All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Kranzkowski <dl8bcu@dl8bcu.de>
To: Paul Lewis <paul@skywaves.demon.co.uk>
Cc: linux-hams@vger.kernel.org
Subject: Re: conversd-saupp-1.62a
Date: Sat, 14 Feb 2015 13:54:26 +0000	[thread overview]
Message-ID: <20150214135426.GA12773@ds20.borg.net> (raw)
In-Reply-To: <SjBy6FCcxz3UFwCP@skywaves.demon.co.uk>

On Sat, Feb 14, 2015 at 12:15:24PM +0000, Paul Lewis wrote:
> Hello Thorsten

Hi Paul!

> I think you are right about that.
> Ok on this change here is the result for info.
>  make install-all

As a rule of thumb, you generally should use a plain 'make' first,
and only if you are satisfied with the result (no errors detected)
proceed with 'make install' etc.
Otherwise with sloppy Makefiles you might end up with a broken
installation that possibly overwrote a working previous version....


> warning: your configuration will be overwritten with
>          the provided example files.
>          do you really want to do this?
>                anyway, a backup is made for every file, as filename~
>          press ^C to interrupt
> sleep 10
> make install install-conf
> make[1]: Entering directory `/usr/local/src/ax25/conversd-saupp'
> gcc -O2 -s -Wall -Wstrict-prototypes -DWANT_LOG -DFORKPTY
> -DOWNER=\"daemon\" -DGID=\"daemon\" -DCONF_DIR=\"/usr/local/conv
> ersd-saupp/etc\" -DDATA_DIR=\"/usr/local/conversd-saupp/var\"
> -DCONVERSHOST=\"localhost\" -DNO_SHELL -DRAW -DNO_IOCTL \
>                 convers.c ba_stub.o -o rawconvers
> convers.c: In function 창main창:
> convers.c:628:0: error: unterminated #else
>  #ifdef NO_IOCTL
>  ^ 

Ok, I suppose you botched the last correction. Did you notice you
needed to replace _two_ old lines with _three_ new lines? And two
of the new lines have a '#' at the beginning.

The whole block should read linke this:

    628 #ifdef  NO_IOCTL
    629     echo = 0;
    630 #else
    631     signal(SIGTSTP, SIG_IGN);   /* suspend */
    632     if (tcgetattr(0, &prev_termios)) stop(convtype);
    633     memcpy(&curr_termios, &prev_termios, sizeof(struct termios));
    634     echo = curr_termios.c_lflag & ECHO;
    635     curr_termios.c_lflag = 0;
    636     curr_termios.c_cc[VMIN] = 1;
    637     curr_termios.c_cc[VTIME] = 0;
    638 #ifdef HAVE_LIBREADLINE
    639     screenwidth = 80;
    640 #if defined (TIOCGWINSZ)
    641     if (ioctl (0, TIOCGWINSZ, &window_size) == 0)
    642     {
    643         screenwidth = (int) window_size.ws_col;
    644     }
    645 #endif
    646     curr_termios.c_lflag = curr_termios.c_lflag & ~ECHO;
    647     // at the time of writing, rl_event_hook is buggy
    648     // http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=144585
    649     rl_event_hook = 0;
    650 #ifdef  RL_READLINE_VERSION /* older version have no RL_READLINE_VERSION :( */
    651 #   if (RL_READLINE_VERSION < 0x0400)
    652         rl_event_hook = (Function *) do_select_call;
    653 #   endif
    654 #endif
    655 #endif
    656     if (tcsetattr(0, TCSANOW, &curr_termios)) stop(convtype);
    657 #endif


Note that in lines 653 to 655 there are three '#endif's in a row.
In general each '#if' and '#ifdef' needs a corresponding '#endif'.
The compiler (preprocessor, to be precise) tells you, that it cannot find
the '#endif' belonging to '#ifdef  NO_IOCTL' (line 628) / '#else' (line 630).
The matching '#endif' is in line 657, but that only works out, if the other
'#if'/'#ifdef's and '#endif's in between are correctly paired.


> convers.c:629:5: error: expected declaration or statement at end of
> input
>      echo = 0;
>      ^

This error is a result from the problem above.

> convers.c:591:11: warning: unused variable 창init_string창
> [-Wunused-variable]
>      char *init_string = 0;
>            ^

All those 'unused variable' warnings can be more or less safely ignored.
They are a sign of sloppy programming.

73 Thorsten

> 73 de Paul g4apl
> 
> 
> 
> 
> 
> >replace these two lines (line 651-652 in convers.c)
> >
> >    if (RL_READLINE_VERSION < 0x0400)
> >        rl_event_hook = (Function *) do_select_call;
> >
> >with these three lines:
> >
> >#   if (RL_READLINE_VERSION < 0x0400)
> >        rl_event_hook = (Function *) do_select_call;
> >#   endif
> >
> >
> >The whole package is in a need of a deep overhaul. There's a lot of unfinished
> >code in it. And support for some really ancient libraries should probably just
> >be removed.

-- 
| Thorsten Kranzkowski        Internet: dl8bcu@dl8bcu.de                      |
| Mobile: ++49 170 1876134       Snail: Kiebitzstr. 14, 49324 Melle, Germany  |
| Ampr: dl8bcu@db0lj.#rpl.deu.eu, dl8bcu@marvin.dl8bcu.ampr.org [44.130.8.19] |
--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2015-02-14 13:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31  8:24 Soundmodem problems Apostolos Kefalas
2015-02-01  4:56 ` David Ranch
2015-02-13 14:53   ` conversd-saupp-1.62a Paul Lewis
2015-02-13 19:09     ` conversd-saupp-1.62a Thorsten Kranzkowski
2015-02-13 19:18       ` conversd-saupp-1.62a Paul Lewis
2015-02-13 23:59       ` conversd-saupp-1.62a Paul Lewis
2015-02-14 11:12         ` conversd-saupp-1.62a Thorsten Kranzkowski
2015-02-14 12:15           ` conversd-saupp-1.62a Paul Lewis
2015-02-14 13:54             ` Thorsten Kranzkowski [this message]
2015-02-14 14:47               ` conversd-saupp-1.62a Paul Lewis
2015-02-14 13:18           ` conversd-saupp-1.62a Paul Lewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150214135426.GA12773@ds20.borg.net \
    --to=dl8bcu@dl8bcu.de \
    --cc=linux-hams@vger.kernel.org \
    --cc=paul@skywaves.demon.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.