Commit graph

76 commits

Author SHA1 Message Date
Jeremy Sowden 5b7e5d8924 wmail: call XSetCommand().
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
2019-07-10 09:43:45 +01:00
Jeremy Sowden 0e0dd78437 wmail: updated change-log and bumped to 2.3. 2019-06-21 12:28:08 +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 00630c75c7 wmail: updated change-log and bumped to 2.2. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 7c4664d55c wmail: removed superfluous continue. 2019-06-12 23:48:04 +01:00
Jeremy Sowden 1b049207fa wmail: fixed error in build instructions. 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 ea206ef933 wmail: bumped to 2.1. 2019-06-07 11:43:39 +01:00
Jeremy Sowden bc982a37f6 wmail: added new ChangeLog. 2019-06-07 10:53:48 +01:00
Jeremy Sowden ee0f742a1b wmail: updated the copyright notices. 2019-06-07 10:53:48 +01:00
Jeremy Sowden 0d1f1ed6aa wmail: updated contact details in README. 2019-06-07 10:53:48 +01:00
Jeremy Sowden cbc7dc2fb7 wmail: moved old change-log to a separate file. 2019-06-07 10:53:48 +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 dc8827d41a wmail: renamed configure.in to configure.ac. 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 498c7c8951 wmail: no longer install into or uninstall from $HOME. 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