Commit graph

42 commits

Author SHA1 Message Date
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 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
Doug Torrance 6dc4716c29 wmgeneral: Merge 2003-10-10 version from wmmon and wmtime.
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.
2015-05-20 10:44:41 +01:00
Doug Torrance 7d77c17cc1 wmgeneral: Remove inline keywords.
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
2015-05-20 10:44:40 +01:00
Doug Torrance dae24a2f5d wmgeneral: Free pointer.
Fixes "(error) Memory leak: argv" found by cppcheck.
2015-05-20 10:44:40 +01:00
Doug Torrance 746c4b6b7c wmgeneral: Check if malloc fails.
Fixes "(error) Uninitialized variable: ret" found by cppcheck.
2015-05-20 10:44:40 +01:00
Doug Torrance 4b9666e97d wmtime: Bump to version 1.2. 2015-01-03 22:31:44 +00:00
Doug Torrance 59e8a712dc wmtime: Remove unnecessary references to current version number.
To simplify maintenace, all references to the current version number outside
of the appropriate macro in in wmtime.c have been removed.  Note that this
macro had been WMMON_VERSION, likely a copy/paste error, and has been
renamed to WMTIME_VERSION.
2015-01-03 22:31:44 +00:00
Doug Torrance ea19c5c3ca wmtime: Add -l option to specify locale.
Based on a similar patch for wmitime [1].

[1] cc801880a5
2015-01-03 22:31:44 +00:00
Doug Torrance ad27c973c1 wmtime: Update Makefile.
In particular,
- Remove reference to deprecated X11R6 directory.
- Honor PREFIX and INSTALL variables.
- Change definition of CFLAGS from += to =; perhaps users don't want to
  append -O2. Also move -Wall to CFLAGS.
- Use C*FLAGS only when compiling and LDFLAGS only when linking.
- Create directories if needed during install.
- Install manpage.
2015-01-03 22:31:44 +00:00
Doug Torrance 937d1d280a wmtime: Move source files to top directory.
Ease the build process by skipping the initial "cd wmtime" step.  Document
this in INSTALL.
2015-01-03 22:31:44 +00:00
Doug Torrance 8b51ce7f1b wmtime: Remove unnecessary Imakefile.
Also update INSTALL to remove reference to it.
2015-01-03 22:31:44 +00:00
Doug Torrance 612921ae43 Remove trailing whitespace. 2014-10-05 19:18:49 +01:00
Doug Torrance de32f3e432 wmtime: Update README contact information; remove trailing whitespaces. 2014-08-27 15:31:05 +01:00
Doug Torrance 9356597905 wmtime: Update GPLv2 from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt. 2014-08-27 15:31:05 +01:00
Doug Torrance af59d08e27 wmtime: Update FSF address. 2014-08-27 15:31:05 +01:00
Doug Torrance 0119083b0a wmtime: Use rm -f in make clean.
This patch uses the -f option for rm in make clean so that no error occurs when
make clean is run while no object or binary files exist.  (It also adds a
newline at the end of the Makefile thanks to emacs.)
2014-08-27 15:31:05 +01:00
Doug Torrance d6ef017638 wmtime: Remove unused variables.
This patch removes the unused variables nexttime and old_time_struct to avoid a
warning when -Wunused-but-set-variable is passed.
2014-08-27 15:31:05 +01:00
Doug Torrance 2ca71dc449 wmtime - increase version number to 1.1
Enough patches have been made over the years to the wmtime Debian
package that I have decided to incorporate these changes into
an official upstream release.

Some updates to the documentation have been made to reflect the
changes.
2013-10-13 22:49:38 +01:00
Doug Torrance 32ffb9e740 wmtime - update localization
When non-Latin alphabet characters are encountered in weekday and month names, the English defaults are used.  This closes Debian bug #726125.

Also, numbers are now printed when encountered in weekday and month names (e.g., Swahili).
2013-10-13 19:19:45 +01:00
Doug Torrance 400eb8b426 wmtime - Removed debian directory.
As per the policy of the dockapp git repository, the debian directory of wmtime has been removed.
2013-09-23 09:21:47 +01:00
Doug Torrance c80c917d37 wmtime - Fix compiler and linker flags in Makefile.
The Makefile of wmtime had to be patched in order for CFLAGS
not to be redefined by the Makefile but to use the CFLAGS
passed by debhelper and add additional flags through
string concatenation. LDFLAGS and CPPFLAGS weren't passed
at all and have been added to the linker command line.

Patch by John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
from Debian package.
2013-09-22 20:23:14 +01:00
Doug Torrance 13243aa489 wmtime: Fixed Debian bug #661843. Applied a patch by Milan Cermak.
Package: wmtime
Version: 1.0b3-2
Severity: normal
Tags: upstream patch l10n

Hi,
the package wmtime claims that it supports localization. Looking into the code,
it seems more like date customization.
When claiming "localization", it should work as such - respecting LANG, LC_ALL,
etc. environment variables and use locales for the day and month abbreviations.

Please see my patch which adds such support.
Regards,
Milan Cermak

-- System Information:
Debian Release: 6.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37.6 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=cs_CZ.UTF-8, LC_CTYPE=cs_CZ.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages wmtime depends on:
ii  libc6                         2.11.3-2   Embedded GNU C Library: Shared lib
ii  libx11-6                      2:1.3.3-4  X11 client-side library
ii  libxext6                      2:1.1.2-1  X11 miscellaneous extension librar
ii  libxpm4                       1:3.5.8-1  X11 pixmap library

wmtime recommends no packages.

wmtime suggests no packages.

-- no debconf information
2012-10-30 21:52:00 +00:00
Doug Torrance 2295cacec4 wmtime: Fixed Debian bug #639626. Applied a patch by Andrew Deason.
Package: wmtime
Version: 1.0b2-10
Tags: patch

wmtime draws a small amount of garbage to the screen when -noseconds is
given, because DrawTime reads beyond the given string buffer. This
doesn't trigger all the time for me (I assume due to the nondeterminism
of reading uninitialized memory or something), but it pretty clearly
happens if I switch VTs.

The attached patch limits the amount of the formatted string we try to
read, so we don't read beyond the end of the string. Fixes it for me.

--
Andrew Deason
adeason@dson.org
2012-10-30 21:50:49 +00:00
Doug Torrance 168a691c80 wmtime: added to repository 2012-10-30 16:03:12 +00:00