]> diplodocus.org Git - nmh/log
nmh
9 years agoUse the imperfect snprintf(3) instead of sprintf(3).
Ralph Corderoy [Wed, 19 Oct 2016 17:29:56 +0000 (18:29 +0100)]
Use the imperfect snprintf(3) instead of sprintf(3).

9 years agoUse the imperfect snprintf(3) instead of sprintf(3).
Ralph Corderoy [Wed, 19 Oct 2016 17:29:43 +0000 (18:29 +0100)]
Use the imperfect snprintf(3) instead of sprintf(3).

9 years agoUse the imperfect snprintf(3) instead of sprintf(3).
Ralph Corderoy [Wed, 19 Oct 2016 17:29:18 +0000 (18:29 +0100)]
Use the imperfect snprintf(3) instead of sprintf(3).

9 years agoAdd EndsWithC(char *s, int c) and call it in some initial places.
Ralph Corderoy [Wed, 19 Oct 2016 17:13:10 +0000 (18:13 +0100)]
Add EndsWithC(char *s, int c) and call it in some initial places.
EndsWithC returns true if non-NULL string s ends with a c before the
terminating NUL.

9 years agoAdd stdbool.h plus fallback to h/nmh.h.
Ralph Corderoy [Wed, 19 Oct 2016 16:52:44 +0000 (17:52 +0100)]
Add stdbool.h plus fallback to h/nmh.h.
Change h/mh.h's FALSE and TRUE to use stdbool.h's.  In time, everything
can switch over and FALSE and TRUE can go.  Delete some local
re-definitions of FALSE and TRUE.

9 years agoFix ruserpass() to not assume `\n' present before trimming.
Ralph Corderoy [Wed, 19 Oct 2016 15:34:05 +0000 (16:34 +0100)]
Fix ruserpass() to not assume `\n' present before trimming.

9 years agoRemoved remaining relics of generated ctypoe-checked.[hc].
David Levine [Wed, 19 Oct 2016 16:09:37 +0000 (12:09 -0400)]
Removed remaining relics of generated ctypoe-checked.[hc].

9 years agoAlter ctype-checked to handle EOF and be hand-written.
Ralph Corderoy [Wed, 19 Oct 2016 14:43:12 +0000 (15:43 +0100)]
Alter ctype-checked to handle EOF and be hand-written.
Along the way, replace the code generation with code that punts the work
onto the stdlib's C functions, needing only a single `identity' array
for all the macros.  A mkdir needed to be added in Makefile.am because
otherwise etc didn't exist in a distcheck and attempting to redirect
stdout to a file in etc failed.  I'm not happy that's the best automake
way to achieve this, i.e. what if another rule attempts to create in etc
first?

9 years agoRemove ./configure's --enable-debug support; it did nothing.
Ralph Corderoy [Wed, 19 Oct 2016 13:39:53 +0000 (14:39 +0100)]
Remove ./configure's --enable-debug support;  it did nothing.
David on nmh-workers said "that looks like a relic that can be removed".

9 years agoDon't recurse in advertise() on writev(2) error, just write(2).
Ralph Corderoy [Wed, 19 Oct 2016 12:04:12 +0000 (13:04 +0100)]
Don't recurse in advertise() on writev(2) error, just write(2).
Some errors, e.g. EPIPE, cause the advise()'s call to another
advertise() to fail again, ad segvinitum when stack busts.  Instead,
snprintf(3) and write(2) that single string, ignoring any error.

9 years agoAdd check-programs target to Makefile.am to add to `make all'.
Ralph Corderoy [Wed, 19 Oct 2016 11:22:47 +0000 (12:22 +0100)]
Add check-programs target to Makefile.am to add to `make all'.

9 years agoIgnore etags ugly TAGS output file.
Ralph Corderoy [Wed, 19 Oct 2016 10:30:55 +0000 (11:30 +0100)]
Ignore etags ugly TAGS output file.
Makefile prefers etags over ctags.

9 years agoReplace strchr() condition with TrimSuffixC(), fixing assumptions.
Ralph Corderoy [Wed, 19 Oct 2016 09:09:47 +0000 (10:09 +0100)]
Replace strchr() condition with TrimSuffixC(), fixing assumptions.
A couple of the existing strchr()-based trims assumed fgets() returned a
string containing `\n' if it didn't return NULL.

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Wed, 19 Oct 2016 09:06:44 +0000 (10:06 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Wed, 19 Oct 2016 09:06:24 +0000 (10:06 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Wed, 19 Oct 2016 09:04:59 +0000 (10:04 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Wed, 19 Oct 2016 09:04:12 +0000 (10:04 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Wed, 19 Oct 2016 09:03:31 +0000 (10:03 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoReplace strchr() condition with TrimSuffixC().
Ralph Corderoy [Tue, 18 Oct 2016 23:50:28 +0000 (00:50 +0100)]
Replace strchr() condition with TrimSuffixC().

9 years agoAdd TrimSuffixC(char *s, int c).
Ralph Corderoy [Tue, 18 Oct 2016 16:05:24 +0000 (17:05 +0100)]
Add TrimSuffixC(char *s, int c).
TrimSuffixC deletes c from the end of non-NULL string s if it's present,
shortening s by 1.  Only one instance of c is removed.

9 years agoWith EAI (mhbuild -headerencoding utf-8), force message header to
David Levine [Tue, 18 Oct 2016 23:55:49 +0000 (19:55 -0400)]
With EAI (mhbuild -headerencoding utf-8), force message header to
show 8-bit UTF-8, even if the message body is ASCII.

9 years agoOutput an error message from post(8) when user specifies
David Levine [Tue, 18 Oct 2016 20:45:30 +0000 (16:45 -0400)]
Output an error message from post(8) when user specifies
mhbuild -headerencoding utf-8 but the SMTP server doesn't
support SMTPUTF8.

9 years agoRewrite r1bindex() using strrchr(3).
Ralph Corderoy [Tue, 18 Oct 2016 15:33:12 +0000 (16:33 +0100)]
Rewrite r1bindex() using strrchr(3).

9 years agoUse concat() in m_putenv. Add FIXME about memory leaks.
Ralph Corderoy [Tue, 18 Oct 2016 15:23:44 +0000 (16:23 +0100)]
Use concat() in m_putenv.  Add FIXME about memory leaks.
POSIX defines setenv(3) and unsetenv(3).  They seem like a good route,
just need to preserve the existing functions' behaviour.

9 years agoShrink the static char[] for "%d" from 8KiB to just right.
Ralph Corderoy [Tue, 18 Oct 2016 15:22:41 +0000 (16:22 +0100)]
Shrink the static char[] for "%d" from 8KiB to just right.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:26 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 13:52:25 +0000 (14:52 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:15 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:15 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:37:14 +0000 (13:37 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoReplace getcpy() with mh_xstrdup() where the string isn't NULL.
Ralph Corderoy [Tue, 18 Oct 2016 12:09:27 +0000 (13:09 +0100)]
Replace getcpy() with mh_xstrdup() where the string isn't NULL.

9 years agoFix unlikely bug in oauth's make_query_url() of base_url overflow.
Ralph Corderoy [Tue, 18 Oct 2016 00:27:27 +0000 (01:27 +0100)]
Fix unlikely bug in oauth's make_query_url() of base_url overflow.

9 years agoReplace a few calculations of string lengths with concat().
Ralph Corderoy [Tue, 18 Oct 2016 00:18:24 +0000 (01:18 +0100)]
Replace a few calculations of string lengths with concat().
Saves the reader have to keep checking all the +1 are correct.
Passed the oauth tests;  they weren't skipped.

9 years agoClose FILE pointer in anno for -append as well as -delete.
Ralph Corderoy [Mon, 17 Oct 2016 22:52:00 +0000 (23:52 +0100)]
Close FILE pointer in anno for -append as well as -delete.
https://savannah.nongnu.org/bugs/?23465 has Peter Maydell pointing out
the assymetric open and close of a FILE pointer.  He's right on that
AFAICS so change the test to be for a non-NULL pointer rather than the
more wordy and prone to error flag-testing.

9 years agoOops, should have offset file in showbuildenv rather than cat.
Ralph Corderoy [Mon, 17 Oct 2016 20:46:47 +0000 (21:46 +0100)]
Oops, should have offset file in showbuildenv rather than cat.

9 years agoLook for a platform-specific /etc/*-release or similar.
Ralph Corderoy [Mon, 17 Oct 2016 20:16:38 +0000 (21:16 +0100)]
Look for a platform-specific /etc/*-release or similar.
/etc/os-release is becoming standard due to systemd.

9 years agoProtect showbuildenv's headers from glob expansion.
Ralph Corderoy [Mon, 17 Oct 2016 19:51:09 +0000 (20:51 +0100)]
Protect showbuildenv's headers from glob expansion.

9 years agoA-ha! automake has support for tests expected to fail; use that.
Ralph Corderoy [Mon, 17 Oct 2016 19:35:51 +0000 (20:35 +0100)]
A-ha!  automake has support for tests expected to fail;  use that.
Backing out my recent addition of an `expectedfail` parameter to the
`check' function.

9 years agoRemove use of C's register keyword.
Ralph Corderoy [Mon, 17 Oct 2016 19:14:33 +0000 (20:14 +0100)]
Remove use of C's register keyword.

9 years agoAdded reference to mh-profile(5) man page for more information on
David Levine [Mon, 17 Oct 2016 13:42:32 +0000 (09:42 -0400)]
Added reference to mh-profile(5) man page for more information on
postproc.  And note that "Nmh-" header lines are filtered out.

9 years agoAdd FIXME for more documentation to showbuildenv.
Ralph Corderoy [Mon, 17 Oct 2016 10:55:12 +0000 (11:55 +0100)]
Add FIXME for more documentation to showbuildenv.

9 years agoHave showbuildenv only indent non-blank lines.
Ralph Corderoy [Mon, 17 Oct 2016 10:51:32 +0000 (11:51 +0100)]
Have showbuildenv only indent non-blank lines.

9 years agoRun lsb_release(1) if uname is Linux.
Ralph Corderoy [Mon, 17 Oct 2016 10:50:22 +0000 (11:50 +0100)]
Run lsb_release(1) if uname is Linux.

9 years agoOops, fc31cece had a syntax error that gcc ignored, clang doesn't.
Ralph Corderoy [Mon, 17 Oct 2016 10:30:24 +0000 (11:30 +0100)]
Oops, fc31cece had a syntax error that gcc ignored, clang doesn't.
Two logical-or operators in a row don't upset gcc.  Who said parsing was
a solved problem?

9 years agoReplace NEW() then memset() of 0 with NEW0().
Ralph Corderoy [Mon, 17 Oct 2016 00:41:32 +0000 (01:41 +0100)]
Replace NEW() then memset() of 0 with NEW0().

9 years agoDon't call strlen() twice; save result.
Ralph Corderoy [Mon, 17 Oct 2016 00:36:35 +0000 (01:36 +0100)]
Don't call strlen() twice;  save result.
The second instance was attempting to write strlen(mmdlm2) bytes
and checking the return value against strlen(mmdlm1).  I assumed
that was an error without digging.

9 years agoDon't call strlen() twice; save result.
Ralph Corderoy [Mon, 17 Oct 2016 00:35:15 +0000 (01:35 +0100)]
Don't call strlen() twice;  save result.

9 years agoDeference char pointer to test for empty string instead of strlen(3).
Ralph Corderoy [Mon, 17 Oct 2016 00:34:18 +0000 (01:34 +0100)]
Deference char pointer to test for empty string instead of strlen(3).

9 years agoReplace getcpy() with mh_xstrdup().
Ralph Corderoy [Mon, 17 Oct 2016 00:28:53 +0000 (01:28 +0100)]
Replace getcpy() with mh_xstrdup().

9 years agoReplace mh_xmalloc() with mh_xstrdup().
Ralph Corderoy [Mon, 17 Oct 2016 00:28:13 +0000 (01:28 +0100)]
Replace mh_xmalloc() with mh_xstrdup().

9 years agoReplace mh_xmalloc() with mh_xstrdup().
Ralph Corderoy [Mon, 17 Oct 2016 00:26:53 +0000 (01:26 +0100)]
Replace mh_xmalloc() with mh_xstrdup().

9 years agoDelete client_getcpy(); don't know why it exists.
Ralph Corderoy [Sun, 16 Oct 2016 23:32:46 +0000 (00:32 +0100)]
Delete client_getcpy();  don't know why it exists.
Replace with calls to getcpy() or mh_xstrdup().

9 years agoUse mh_xstrdup() instead of getcpy() for a string constant.
Ralph Corderoy [Sun, 16 Oct 2016 23:22:23 +0000 (00:22 +0100)]
Use mh_xstrdup() instead of getcpy() for a string constant.
It cannot be NULL.

9 years agoRewrite getcpy() using mh_x*() allocation functions.
Ralph Corderoy [Sun, 16 Oct 2016 23:08:26 +0000 (00:08 +0100)]
Rewrite getcpy() using mh_x*() allocation functions.

9 years agoAdd const specifier to mh_xstrdup()'s src parameter.
Ralph Corderoy [Sun, 16 Oct 2016 23:07:24 +0000 (00:07 +0100)]
Add const specifier to mh_xstrdup()'s src parameter.

9 years agoRename fmt_compile.c's NEW macro to NEW_FP to avoid redefine.
Ralph Corderoy [Sun, 16 Oct 2016 22:35:35 +0000 (23:35 +0100)]
Rename fmt_compile.c's NEW macro to NEW_FP to avoid redefine.
It grabs and fills in a pointer called `fp' so a more specific name
seems OK.

9 years agoRename local enum to avoid clashing with NEW() macro.
Ralph Corderoy [Sun, 16 Oct 2016 22:16:26 +0000 (23:16 +0100)]
Rename local enum to avoid clashing with NEW() macro.
Even if it doesn't in practice due to the lack of parenthesis, it makes
things more clean if all the enumerates have a common abbreviation
prefix.

9 years agoAdd mh_xstrdup() that exits on allocation failure.
Ralph Corderoy [Sun, 16 Oct 2016 21:53:23 +0000 (22:53 +0100)]
Add mh_xstrdup() that exits on allocation failure.
Call it from a few simple places.