Since we now reread the configuration files on occasion, the options given
at the command line could be overwritten. To avoid this, we save the
command line options and always use them if present.
We add command line options for the user to change the start, stop, speed,
ifdown, and stampfile settings at runtime. This closes a Debian wishlist
bug [1].
Note that, in order to have the command line options overwrite the
defaults set in the configuration file, we split the command line parsing
code into a new function (parse_cmdline()). We then merged main() and
wmppp_routine().
We document the new options in the help text and in the man page. We also
take the opportunity to reformat the help text for the -i option and add
the -geometry option to the man page.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=293839
Main change is to use $(INSTALL) instead of cp in install target along with
$(DESTDIR) variable. We also remove installation of user ~/.wmppprc config
file -- this isn't useful for sysadmins or package maintainers.
We also update INSTALL to reflect the changes.
We actually include <sys/socket.h> instead of <bits/socket_type.h>, as it
returns an error: "Never include <bits/socket_type.h> directly; use
<sys/socket.h> instead."
Fixes "warning: null argument where non-null required" compiler warnings by
not passing NULL to strdup and "(warning) Conversion of string literal to
bool always evaluates to true" found by cppcheck.
This fixes "(portability) scanf without field width limits can crash with
huge input data on some versions of libc" warning from cppcheck.
We choose 10 as the field width limit as it is the number of characters in
2^31-1, the largest int.
Note that this was a fork of the earlier 1998-05-02 version and didn't
contain the later changes. Therefore we merge the best of both versions.
wmtime had some additional unnecessary dummy variables, so we use the wmmon
version.
Note that wmckgmail and wmtz were identical; this is the version we use.
wmSMPmon differed only with some whitespace.
wmitime differed only with a bugfix (a segfault when -display is given with
no argument), but this will be fixed again in the next commit.
wmsm.app had patched wmgeneral to work with its xpm; instead we patch its
xpm to work with wmgeneral.
Previously, if we attempted to build using C99 or later, we got "inline
function declared but never defined" warnings and eventual "undefined
reference" errors. As a result, it fails to build from source using gcc5.
However, if we move the definitions to list.h and add "extern inline"
declarations to list.c, which does compile using C99 and later, then it no
longer compiles using gnu90, the default for gcc4.
To avoid this mess, we remove the inline keywords altogether.
Note that this fixes Debian bugs for wmifs [1], wmppp.app [2], and
wmtime [3].
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778170
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778172
[3] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778174
Compile with CPPFLAGS and LDFLAGS and append, rather than overwrite, CFLAGS.
This enables the Debian package to be built with hardening options. See
https://wiki.debian.org/Hardening.
When the download speed is too high, wmppp can't display it because it has
only 5 digit. The most significant digits are hidden !
This small patch display the speed in K when it is too high.
Based on the patch by jguiton <jguiton@free.fr>.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=328699.
Users of ISDN dialup lines (such as me) cannot use wmppp as shipped,
because it rejects to use any device except those beginning with `ppp'.
The patch attached solves this.
Based on the patch by Juan Cespedes <cespedes@debian.org>.
See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=97509.