Commit graph

1148 commits

Author SHA1 Message Date
Jeremy Sowden c04cc87128 wmail: keep track of buffer lengths and avoid repeated strlen calls. 2019-06-07 10:53:48 +01:00
Jeremy Sowden be89c2a7a0 wmail: strlen returns size_t. 2019-06-07 10:53:48 +01:00
Jeremy Sowden d5312c3133 wmail: use AC_CONFIG_HEADERS to generate config.h. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 356b07a201 wmail: use CPPFLAGS. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 1d1c7e63b1 wmail: don't clobber CFLAGS. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 254328761e wmail: add static to declarations of lots of variables and functions. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 86a8f6f0a1 wmail: added signal-handler for SIGINT and SIGTERM. 2019-05-28 11:07:22 +01:00
Jeremy Sowden a3ef21b122 wmail: skip leading white-space in From: headers. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 9158bb68f3 wmail: DAMakePixmapFromData expects an unsigned short pointer. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 5eef361597 wmail: replaced SIGALRM handler with DA timer call-back.
The application was doing a lot of work in a signal-handler.  This was
not re-entrant and could interact badly with X.  Since the DA event-loop
supports a timer call-back use that instead.
2019-05-28 11:07:22 +01:00
Jeremy Sowden e4760eb90f wmail: fix prototypes of functions accepting no parameters. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 49def3a155 wmail: use calloc, instead of malloc + memset. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 9f0821af1f wmail: fix memory leaks. 2019-05-28 11:07:22 +01:00
Jeremy Sowden e0f5120b9d wmail: FileNameConcat does exactly the same thing as MakePathName: get rid of it. 2019-05-28 11:07:22 +01:00
Jeremy Sowden a8261ff053 wmail: handle allocation failures. 2019-05-28 11:07:22 +01:00
Jeremy Sowden adf1164fba wmail: consistent 4-column indentation with 8-character tabs. 2019-05-28 11:07:22 +01:00
Jeremy Sowden 293e8aab96 wmail: added .gitignore. 2019-05-28 11:07:22 +01:00
Torrance, Douglas b904bd01b0 wmbiff: Bump to version 0.4.33 2019-03-01 11:49:03 +00:00
Torrance, Douglas 9527870311 wmbiff: Remove unnecessary loop.
The last release of wmbiff included a patch by Nye Liu from Debian
bug #917467 [1].  However, the second part of that patch is not necessary.
From Andreas Metzler's comment

    I am not sure about the second part of the patch. I understand wmbiff
    breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started
    to happen recently (with TLS1.3) on blocking sockets.

    What I do not get from my rudimentary understanding C programmimg is the
    second part, this is in the else of "if (scs->tls_state)", so, afaiui for
    non-encrypted connections. Is the change necessary there at all, is it
    the right thing to retry read on EAGAIN then?

We revert the second part of the patch.

[1] https://bugs.debian.org/917467
2019-03-01 11:49:03 +00:00
Torrance, Douglas e807986e6e wmbiff: Bump to version 0.4.32. 2019-02-13 02:32:15 +00:00
Torrance, Douglas 01cdccc241 wmbiff: handle EAGAIN or GNUTLS_E_AGAIN
From Debian bug #917467, reported by Nye Liu <nyet@nyet.org> [1]:

If gnutls_read() or read() report EAGAIN, tlscomm_expect() fails:

wmbiff/nyet  comm: wrote a000 CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: expecting: * CAPABILITY
wmbiff/nyet  comm: imap.***.***:993: gnutls error reading: Resource temporarily unavailable, try again.
wmbiff/nyet  imap4: unable to query capability stringwmbiff/nyet  comm: wrote a002 LOGOUT
wmbiff/nyet  comm: imap.***.***:993: closing.

[1] https://bugs.debian.org/917467
2019-02-13 02:32:15 +00:00
Carlos R. Mafra c78465cae2 Revert "wmnet: simplify updateStats_dev() a bit"
This reverts commit 49944a01ae.

Shame on me.
2019-01-12 22:18:19 +00:00
Carlos R. Mafra bd0d7d1f67 wmmemload: Use MemAvailable from kernel > v3.14 to display memory usage
After the introduction of MemAvailable in the kernel v3.14 one can
estimate how much RAM memory is being "used" by how much it is left
before the system starts swapping.

That is the reason why I want to monitor memory usage, to know
how close the system is to swapping. Therefore I propose to
use MemAvailable to compute the percentage of "used" memory.
Theoretically, after this patch a 100% memory usage is a more
accurate description of "yeah, we need to swap from now on".

See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
2019-01-12 22:05:06 +00:00
Carlos R. Mafra 774e4f769f wmmemload: call usleep() directly in main loop
The reason is the same as in the analogous patch for wmwifi
in commit 1e34ea7f980; it improves considerably the efficiency.

Keeping the 'interval' unchanged (set to 1 sec), with this change
the number of wakeups as measured by powertop goes from around 14 wakeups/sec
to around 2 wakeup/sec.
2019-01-12 21:22:15 +00:00
Carlos R. Mafra dd5d59b8f9 wmwifi: Display interface/essid in 2-second intervals
Base the decision to display either the interface name or essid
on a time interval rather than how many times the update() function
is called. The time interval is chosen to be 2 seconds.

The old logic would swap the display after update() was called
50 times. If 'interval' between updates is a sane value around 1 second,
it would take 50 seconds to swap the name on display.
2019-01-12 20:54:43 +00:00
Carlos R. Mafra 1e34ea7f98 wmwifi: call usleep() directly in main loop
I noticed using powertop that the number of wakeups per second
generated by wmwifi did not correlate well with the update interval,
where I'd expect approximately 1 wakeup if the update interval was 1 sec.

Strangely enough, calling the function

dockapp_nextevent_or_timeout(&event, update_interval * 1000)

in the main loop (note that I already replaced * 100 by * 1000 above)
with update_interval = 1 generates around 15 wakeups/sec here.

Calling usleep() in the loop instead leads to fewer wakeups, around 1/sec.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
2019-01-12 19:20:30 +00:00
Carlos R. Mafra 742d4deddf asmon: Just assume linux kernel > v2.6
Running asmon in a new kernel (v4.19 here) did not display memory information
because the code checked whether the kernel was _exactly_ v2.6.

Although I could modify the check for > v2.6 I decided to drop support
for versions less than v2.6 (released in 2003).
2019-01-12 18:34:03 +00:00
Carlos R. Mafra e239e4a58d asmon: re-indent code
indent -linux asmon.c
2019-01-12 18:32:11 +00:00
Anil N' via Window Maker Development deb3acc132 libdockapp: Fix for missing windowname and one more.
- "Untitled window" appears in xfce4-wmdock-plugin's enumeration of
  dockapps using libdockapp.
- Reference to string buffer that might not live long enough.
2019-01-04 18:09:46 +00:00
Torrance, Douglas 9f23c97912 wmhdplop: Bump to version 0.9.11. 2018-12-11 11:52:46 +00:00
Torrance, Douglas 28b757ce2f wmshutdown: Bump to version 1.6 2018-12-08 15:36:44 +00:00
Torrance, Douglas 2ef4549500 wmshutdown: Use const in XPM image. The function gdk_pixbuf_new_from_xpm_data expects a const char, and so previously we had a compiler warning. 2018-12-08 15:36:44 +00:00
Torrance, Douglas c177247360 wmshutdown: Destroy dialog window before shutting down. This is especially useful for suspending or hibernating. After turning the computer back on, the wmshutdown dialog would still be open from before, and clicking on the dockapp would n... 2018-12-08 15:36:44 +00:00
Flisk a01f239aca Fix error message spam when no player is running 2018-10-05 15:36:56 +01:00
Torrance, Douglas bfe8518888 wmshutdown: Bump to version 1.5. 2018-09-23 12:15:08 +01:00
Torrance, Douglas ddd1876d1d wmshutdown: Add freedesktop.org desktop entry file. 2018-09-23 12:15:08 +01:00
Torrance, Douglas ec0624dc47 wmshutdown: Add icon for freedesktop.org icon themes. 2018-09-23 12:15:08 +01:00
Torrance, Douglas c4bb16479c wmshutdown: Include xpm icon in source rather than installing into a data directory and loading it from file. 2018-09-23 12:15:08 +01:00
Torrance, Douglas c2271bfeb2 wmshutdown: Update manpage 2018-09-23 12:15:08 +01:00
Torrance, Douglas cfd259f5bd wmshutdown: Update my email address. 2018-09-23 12:15:08 +01:00
Torrance, Douglas 6b2a8dc61a wmshutdown: Add support for suspend and hibernate. 2018-09-23 12:15:08 +01:00
Torrance, Douglas eaa934f12a wmshutdown: Remove support for deprecated Consolekit. 2018-09-23 12:15:08 +01:00
Doug Torrance ef490d0670 wmcalc: Bump to version 0.7. 2018-09-11 06:28:25 -04:00
Doug Torrance a916fe2800 wmcalc: Add freedesktop.org desktop entry file. 2018-09-11 06:28:25 -04:00
Doug Torrance ff19c1226f wmcalc: Add icon for freedesktop.org icon themes. 2018-09-11 06:28:25 -04:00
Doug Torrance 0467087064 wmcalc: Use version number from autoconf. 2018-09-11 06:28:25 -04:00
Doug Torrance d90f29b5be wmcalc: Remove unused image files. 2018-09-11 06:28:25 -04:00
Doug Torrance 13b3710b02 wmcalc: Use autotools for build. 2018-09-11 06:28:25 -04:00
Doug Torrance ec62fab633 wmcalc: Null-termitate display string when clearing.
Often, the number currently being displayed has more than 10 digits.
However, when clearing the display, only the first 10 digits were cleared.
When a new number was entered, it would be prepended to any digits that
weren't cleared.  This behavior was invisible to the user, causing
incorrect calculations, e.g., Debian bug #564173:

1814 / 720 * 300 -> 7568.41111

But the correct answer is 755.833333.

The problem was that when the display was cleared, the string that stores
this number was not null-terminated.  Indeed, 1814 / 720 gives us
2.519444444 (6 4's), but only 2.51944444 (5 4's) is displayed.  When we
begin to multiply by 300, the final 4 remained, and so we really were
multiplying by 3004.
2018-08-29 23:14:02 -04:00
Doug Torrance 1d813d4434 wmthrottle: Remove autogenerated autotools files from git. 2018-07-15 18:57:29 +01:00