Jeremy Sowden
5b7e5d8924
wmail: call XSetCommand()
.
...
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-10 09:43:45 +01:00
Jeremy Sowden
d77e013060
wmail: fixed use-after-free.
...
The CleanupNames() function removed the sender-addresses for deleted
mails, but did not set the namesChanged flag to true. This meant that
if the ticker was displaying the address of a mail which had been
deleted it would continue doing so after the address had been freed.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
c4eb6d91d2
wmail: handle allocation failures.
...
Check the return values of some invocations of malloc and strdup and
ensure that any NULL's are handled correctly.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
dbc178ec3f
wmail: fixed possible NULL-pointer dereference in config-parser.
...
The code calling Tokenize assumed that if it returned true, value would
not be NULL. However, in the case of a line containing no equals sign:
blah
that would not be the case. Changed Tokenize to return false unless id
and value are both defined.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
40d7eb504c
wmail: fixed NULL-pointer dereference if opendir(3) fails.
...
Code was:
if (( dir = opendir( ... )))
{
// ...
}
closedir( dir ); // dir may be NULL
Moved closedir(3) inside if-block.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
2ae0c7cba4
wmail: use continue instead of goto.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
68baa67992
wmail: formatting improvements.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
1b6f872f07
wmail: debug macro fixes.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
98872a4c14
wmail: fixed config typo.
...
The old spelling is still supported.
2019-06-21 12:28:08 +01:00
Jeremy Sowden
7c4664d55c
wmail: removed superfluous continue.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
9205d51d68
wmail: removed commented-out variable.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
97a82c5e14
wmail: POSIX doesn't have a "t" mode flag for fopen(3).
2019-06-12 23:48:04 +01:00
Jeremy Sowden
73897dff25
wmail: formatting fixes.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
b25ef198e3
wmail: strip leading white-space when doing skip-name comparisons.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
116d47e6e1
wmail: dropped unused enum values.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
0360aff8e8
wmail: use realloc(3) and handle allocation failures.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
0fb61f1e49
wmail: fixed memory leaks in skip-names.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
6e48b4a431
wmail: added command-line option to specify a different config-file.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
7590c32f82
wmail: parse command-line arguments before reading config-file.
...
Fixes warnings about config and check-sum files when using --help and --version.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
8f7f9881a0
wmail: removed hard-coded string lengths.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
d969ee2ca6
wmail: use continues rather than if-else chain to improve readability.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
e27a0f4001
wmail: added option index enum and used designated initializers for options.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
7e3cb9cbe4
wmail: removed hard-coded buffer size.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
dff64f3b71
wmail: use stdbool.h if available.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
24ce08f47c
wmail: more version and copyright updates.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
85d207d4af
wmail: fixed some typo's.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
bd70588098
wmail: only include one set of XPM's among wmail's sources.
2019-06-12 23:48:04 +01:00
Jeremy Sowden
2fbac189e8
wmail: define debug macros as empty if debug is not enabled.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
107922018b
wmail: only one DEBUG macro is ever defined.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
07f158ad7e
wmail: change "!stat(...) == 0" to "stat(...) == -1"
2019-06-07 10:53:48 +01:00
Jeremy Sowden
51fc232cdb
wmail: refactored MakePathName: one malloc; one snprintf instead of two memcpys.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
7740071745
wmail: use automake.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
0a852e2639
wmail: check for libdockapp/dockapp.h and fall back to dockapp.h.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
46cd3297ae
wmail: use pkg-config for X11 and dockapp.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
fa97374dd0
wmail: use DA_VERSION to determine the correct type for DAMakePixmapFromData parameters.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
fd74dc6f8a
wmail: added breaks and explicit fall-through comments to switches.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
4497ebeab1
wmail: declare enum variable with the right type.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
7af1c537ac
wmail: fixed warnings about unused parameters.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
18d77b13bb
wmail: fixed comparisons between signed and unsigned.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
d808c1e21a
wmail: use designated initializers to define config.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
7f0d8d12e2
wmail: strcasecmp and strncasecmp are properly declared in strings.h.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
71c126d20e
wmail: white-space fixes.
2019-06-07 10:53:48 +01:00
Jeremy Sowden
b78df8ed42
wmail: allow for multiple white-space characters between name and address.
2019-06-07 10:53:48 +01:00
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
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