In particular, we can specify the offsets from the right and bottom of the
screen using '-', e.g., '-geometry -64-64' places the dockapp in the lower
right corner of the screen.
Although defining _DEFAULT_SOURCE is overkill for nanosleep, it also fixes
"field ‘b’ has incomplete type" errors, as we need __USE_MISC defined to
pick up the definition of ifreq in <net/if.h>.
In particular,
- Drop unnecessary definition of DESTDIR.
- Drop LIBDIR; pointed to deprecated X11R6 directory.
- Honors CPPFLAGS and LDFLAGS build flags.
- Remove out-of-date version number from installation message.
Based in part on a patch from the Debian package [1].
[1] https://sources.debian.net/src/wmifs/1.4-2/debian/patches/hardening.patch/
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
This prevents several compiler warnings such as the following:
wmifs.c:422:3: warning: null argument where non-null required (argument 1) [-Wnonnull]
left_action = strdup(LEFT_ACTION);
^
Remove several compiler warnings of the form
wmifs.c:666:7: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(temp, BUFFER_SIZE, fp);
^
This patch consists of all remaining differences between the Debian package
version 1.3b1-22 and the original upstream source. They were not mentioned
in the Debian changelog.
Patch by Chris Hanson <cph@martigny.ai.mit.edu>. First appeared in Debian
package 1.3b1-6.
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=39922:
wmifs crashes with a cryptic X error message when there are more than
4 net devices. This occurs for me because I install vmware, which
installs 4 network devices for its bridging hack.
The bug is a loop that fills a fixed-length array, but doesn't stop
when the array is full. The fix is to add a conditional break to the
loop. A patch appears below.
I made two additional changes: (1) increased the size of the array,
and (2) changed a name comparison to compare all of the characters of
the name, rather than just the visible characters, since there may be
multiple net devices with the same first 4 characters (vmware does
this, too).
Patch by Barak Pearlmutter <bap@cs.unm.edu>. First appeared in Debian package
version 1.3b1-6.
From https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=83003:
On my laptop, following a suspend, wmifs scrolls like nuts for a long
time. The scroll speed looks the same as for a wmifs that is paused
for a while using C-z.
Here is a patch that prevents this speedy scrolling problem. I also
got rid of a couple unnecessary compiler warnings.