Commit graph

768 commits

Author SHA1 Message Date
Doug Torrance a332db862a wmgeneral: Add support for X geometry strings to -geometry option.
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.
2015-05-28 00:36:23 +01:00
Doug Torrance ea884d8b78 wmifs: Honor CONF Makefile variable when parsing system config files. 2015-05-28 00:36:23 +01:00
Doug Torrance c16a5a9d8d wmifs: Add support for wmgeneral's -geometry command line option.
Also take the opportunity to correct the manpage; the -d option should be
-display.
2015-05-28 00:36:23 +01:00
Doug Torrance a51ad11229 wmifs: Reformat help text for readability. 2015-05-28 00:36:23 +01:00
Doug Torrance bcd1d50e02 wmifs: Add -c command line option allowing users to set color. 2015-05-28 00:36:23 +01:00
Doug Torrance 627f693e36 wmifs: Replace deprecated usleep with nanosleep.
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>.
2015-05-28 00:36:23 +01:00
Doug Torrance 90565e05d5 wmifs: Replace deprecated caddr_t with void *. 2015-05-28 00:36:23 +01:00
Doug Torrance c7834d29fd wmifs: Fix "overflow in implicit constant conversion" compiler warnings. 2015-05-28 00:36:23 +01:00
Doug Torrance 6f26dd2f99 wmifs: Fix "comparison between signed and unsigned integer expressions" compiler warning. 2015-05-28 00:36:23 +01:00
Doug Torrance 621457313e wmifs: Fix "suggest braces around empty body in an ‘if’ statement" compiler warning. 2015-05-28 00:36:23 +01:00
Doug Torrance 8a2de61837 wmifs: Update Makefile.
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/
2015-05-28 00:36:23 +01:00
Doug Torrance abe2c4431a wmifs: Fix "variable 'ppp_old" set but not used" compiler warning.
Based on a patch from the Debian package [1].

[1] https://sources.debian.net/src/wmifs/1.4-2/debian/patches/fix-compiler-warning.patch/
2015-05-28 00:36:23 +01:00
Doug Torrance e913422bb8 wmifs: Fix spelling error and escape hyphen in manpage.
Based on a patch in the Debian package [1].

[1] https://sources.debian.net/src/wmifs/1.4-2/debian/patches/fix-manpage.patch/
2015-05-28 00:36:23 +01:00
Doug Torrance d1193f2302 wmifs: Move source files to top directory. 2015-05-28 00:36:23 +01:00
Doug Torrance 617d598a73 wmtime: Bump to version 1.3. 2015-05-26 08:22:15 +01:00
Doug Torrance 336b1afa17 wmtime: Update HINTS.
In particular,
- Add newer command line options.
- Update Window Maker instructions.
2015-05-26 08:22:15 +01:00
Doug Torrance fd46651d08 wmtime: Update README.
In particular,
- Fix typo.
- Mention newer command line options.
- Drop 17-year-old architecture information.
2015-05-26 08:22:15 +01:00
Doug Torrance 75a55e7ced wmtime: Add proper copyright header. 2015-05-26 08:22:15 +01:00
Doug Torrance a754e75a5c wmtime: Update TODO.
In particular,
- Remove note about version 1.0 (was never released).
- Remove note about LED colors (implemented).
- Remove note about language files (unnecessary with locale support).
- Update email address.
2015-05-26 08:22:15 +01:00
Doug Torrance fd199f0612 wmtime: Fix "ordered comparison of pointer with integer zero" warning.
Also take the opportunity to add an error message when iconv_open fails.
2015-05-26 08:22:15 +01:00
Doug Torrance 79d7c047ce wmtime: Replace C++ style comments. 2015-05-26 08:22:15 +01:00
Doug Torrance fde8a3ef34 wmtime: Use #defines to avoid variable length arrays. 2015-05-26 08:22:15 +01:00
Doug Torrance eb93ccf24d wmtime: Fix overflow warning; mask bitmap should be unsigned. 2015-05-26 08:22:15 +01:00
Doug Torrance befeff0c0c wmtime: Add -c command line option allowing users to set color. 2015-05-26 08:22:14 +01:00
Doug Torrance 5d4363d302 wmtime: Tidy #includes based on results of include-what-you-use. 2015-05-26 08:22:14 +01:00
Doug Torrance 59b41b8449 wmtime: Fix typos.
Ran `codespell -w`.
2015-05-26 08:22:14 +01:00
Doug Torrance 2e2937620d wmgeneral: Add _POSIX_C_SOURCE #defines for strdup, pid_t, and getline. 2015-05-26 08:22:14 +01:00
Doug Torrance 7e04b6a890 wmgeneral: Fix "unused variable" warning. 2015-05-26 08:22:14 +01:00
Doug Torrance 5cfb385d02 wmppp.app: Bump to version 1.3.1. 2015-05-20 10:44:41 +01:00
Doug Torrance a75edac40d wmppp.app: Command line options take precedence over configuration files.
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.
2015-05-20 10:44:41 +01:00
Doug Torrance 3c16ef37ec wmppp.app: Reread configuration file.
Based in part on a patch by Chris Gray [1] to fix Debian bug #50181 [2].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=wmppp.diff;att=1;bug=50181
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=50181
2015-05-20 10:44:41 +01:00
Doug Torrance 2b0feb59f8 wmppp.app: Add new command line options.
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
2015-05-20 10:44:41 +01:00
Doug Torrance 540b8ac560 wmppp.app: Fix segfault if stop_action or start_action strings are NULL. 2015-05-20 10:44:41 +01:00
Doug Torrance 37acf2a687 wmppp.app: Fix segfault when HOME undefined.
Instead, we exit with an error message.

This fixes Debian bug #716472 [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716472
2015-05-20 10:44:41 +01:00
Doug Torrance 7631c7d566 wmppp.app: Update Makefile.
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.
2015-05-20 10:44:41 +01:00
Doug Torrance 9dab93996e wmppp.app: Use #includes from include-what-you-use.
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."
2015-05-20 10:44:41 +01:00
Doug Torrance b14003c1ee wmppp.app: Remove C++ style comments. 2015-05-20 10:44:41 +01:00
Doug Torrance c1b23f6a43 wmppp.app: Replace deprecated usleep with nanosleep. 2015-05-20 10:44:41 +01:00
Doug Torrance 7ec61f487b wmppp.app: Replace deprecated caddr_t cast with void*. 2015-05-20 10:44:41 +01:00
Doug Torrance 40aaf4c6af wmppp.app: Remove unused parameter from get_statistics().
Fixes "warning: unused parameter ‘devname’" compiler warning.
2015-05-20 10:44:41 +01:00
Doug Torrance 82aceda014 wmppp.app: Switch ifs to #ifs for macros.
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.
2015-05-20 10:44:41 +01:00
Doug Torrance 8d3011886d wmppp.app: Reduce scope of several variables.
Fixes several "(style) The scope of the variable 'p' can be reduced" found
by cppcheck.
2015-05-20 10:44:41 +01:00
Doug Torrance 6b8351219c wmppp.app: Fix spelling mistakes.
Used codespell -w.
2015-05-20 10:44:41 +01:00
Doug Torrance 9d8970e27a wmppp.app: Move source files to top directory.
This way, users need only type "make" to build instead of needing to
"cd wmppp" first.
2015-05-20 10:44:41 +01:00
Doug Torrance 624b2898fe wmgeneral: Don't call free on pointers we haven't malloced.
Could cause occasional segfaults.
2015-05-20 10:44:41 +01:00
Doug Torrance a9b73f2fd6 wmgeneral: Fix segfault if newline encountered in parse_rcfile.
From a patch for wmppp.app by Chris Gray <cgray@tribsoft.com> submitted to
Debian to fix several bugs [1].

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=27997
2015-05-20 10:44:41 +01:00
Doug Torrance cd30d4127d wmgeneral: Add proper copyright headers; fix changelog formatting. 2015-05-20 10:44:41 +01:00
Doug Torrance afd3d56aea wmgeneral: Use #includes from include-what-you-use. 2015-05-20 10:44:41 +01:00
Doug Torrance 6b1ed40882 wmgeneral: Use field width limits for scanf.
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.
2015-05-20 10:44:41 +01:00
Doug Torrance a0f16b945a wmgeneral: Reduce scope of several variables.
Also took the opportunity to fix some whitespace formatting.
2015-05-20 10:44:41 +01:00