When doing an if-test on the result of a function which returns a string
[mmh] / ChangeLog
index 8679550..d76efca 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,428 @@
+2008-08-03  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * sbr/fmt_compile.c: when doing an if-test on the result
+       of a function which returns a string result, check whether
+       the string is non-empty (as the documentation says we do).
+       Previously we were always testing the integer 'value'. Bug
+       spotted by Eric Gillespie.
+       * test/tests/repl/test-if-str: test case for this bug.
+
+2008-07-24  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/setup-test: Run 'make clean' before building
+
+2008-07-24  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/runtest: cat test-temp-dir only once.  Destroy and create
+       test Mail hierarchy here, so each test has its own independent
+       test data.
+
+       * test/setup-test: Drop needless pushd/popd, which don't exist in
+       sh anyway.  Don't use aclocal, which is part of automake.
+       Don't create Mail hierarchy here (see test/runtest).
+
+       * test/tests/folder/test-create, tests/folder/test-total: Drop
+       unused BINDIR.
+
+       * tests/pick/test-pick: Remove failing no-op test.
+
+       * test/tests/scan/test-scan: Write expected and actual output to
+       files and diff them.  This way, if the output differs, diff
+       provides the FAILing exit code and shows the differences.
+
+2008-06-12  Josh Bressers <josh@bress.net>
+       * man/repl.man, etc/mhl.reply:
+       Add an attribution line when replying to messages.
+
+2008-06-02  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * h/mh.h, h/prototypes.h, sbr/done.c, uip/inc.c,
+       uip/mhbuild.c, uip/mhlist.c, uip/mhn.c, uip/mhshow.c,
+       uip/mhstore.c, uip/mhtest.c, uip/packf.c, uip/pick.c,
+       uip/rcvdist.c, uip/rcvstore.c, uip/sendsbr.c: when
+       building on gcc, use the noreturn attribute on various
+       functions (should improve code and avoid some spurious
+       'uninitialized variable' warnings).
+
+2008-06-01  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * docs/README.developers: update the bits about doing a
+       release announcement, now I've actually done one.
+
+2008-05-22  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * uip/scansbr.c: don't use MB_CUR_MAX if we aren't compiled
+       with multibyte support.
+
+       * uip/whatnowsbr.c: factor out common code for writing ls
+       shell command, and make it do more sensible buffer length
+       checks. Also avoid relying on the return value of sprintf(),
+       as some old systems don't return number of characters written.
+
+2008-05-21  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * sbr/utils.c (mh_xrealloc): don't assume realloc() can
+       handle NULL pointers; some non-POSIX realloc()s can't.
+
+       * sbr/dtimep.lex: add some table size declarations for the
+       benefit of elderly lexes with small defaults.
+
+2008-05-18  David Levine <levinedl@acm.org>
+
+       * sbr/addrsbr.c: removed "err" from conditional, because gcc
+       correctly warned that it would always evaluate as true.  It's
+       the address of a static array.
+
+2008-05-16  Oliver Kiddle <okiddle@yahoo.co.uk>
+
+       * sbr/Makefile.in, config/Makefile.in: Don't use $< in target rules
+       in makefiles, as POSIX says it's only defined in inference rules.
+
+2008-05-13  David Levine <levinedl@acm.org>
+
+       * configure.in, INSTALL: if --enable-masquerade is not
+       specified to configure, enable all supported masquerade forms.
+       This allows users to masquerade with the default
+       configuration.  That seems to be more worthwhile now than
+       trying to prevent users from using it, especially with
+       single-user installations or those where a user can edit
+       etc/mts.conf.
+
+2008-05-04  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * bug #23167: sbr/ruserpass.c (ruserpass): make bad permissions
+       on .netrc be an instantly fatal error. Previously we returned
+       an error value; however, no caller was checking it. So now
+       ruserpass() has a void return type.
+
+       * bug #23163: various minor fixes for the benefit of
+       older Unixes (specifically SunOS 4):
+       reintroduce strerror() substitute implementation
+       provide memmove() substitute implementation
+
+       * bug #23163: fix accidentally broken 'build outside
+       source directory' feature
+       
+       * bug #23162: sbr/dtime.c: fix stray HAVE_TM_GMTOFF that
+       wasn't updated to the new macro name.
+
+2008-04-30  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * mts/smtp/smtp.c: provide a callback for SASL_CB_AUTHNAME
+       (fixes issue with SASL sending the wrong username in some
+       circumstances). Thanks to <der_wachtmeister@freenet.de>
+       for the patch.
+
+2008-04-29  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Revert previous attempt at fix for SASL issue as it
+       is the wrong approach.
+
+       * Fix in correct manner, by making sm_rrecord() and thus
+       sm_hear() set the length of the reply string correctly
+       (the SASL libraries now care if you pass in the wrong
+       length).
+
+       * Correct various places in smtp.c where the reply string
+       might not have been correctly NUL-terminated. Includes a
+       fix for a particularly nasty and long standing screwup
+       where the buffer length counting in smhear() was totally
+       broken for continued lines from the server.
+
+2008-04-29  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Cope with sasl_decode64() returning SASL_CONTINUE, as
+       happens with newer sasl libraries and LOGIN auth.
+
+2008-04-27  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Updated some of the 'how to do a release' documentation.
+
+       * Upped the VERSION string to '1.3-dev', since 1.3-RC1 has
+       been branched off.
+
+2008-04-27  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Released nmh-1.3 RC1.
+
+2008-04-11  Oliver Kiddle <okiddle@yahoo.co.uk>
+
+       * acconfig.h, configure.in, sbr/dtime.c, sbr/pidwait.c,
+       uip/mhshowsbr.c, uip/rcvtty.c, uip/slocal.c, uip/termsbr.c:
+       move most remaining macros out of acconfig.h which is an
+       obsolete feature of autoconf
+
+2008-04-05  Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+       * bug #18655: fix use of admonish() for a fatal error (should
+       be adios(); only actual effect would be wrong exit code).
+       Thanks to Craig Leres for spotting this.
+
+2008-04-05  Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+       * bug #20028 (Debian bug 399271): fix code assuming that pointer
+       differences were 32 bits -- thanks to Dean Gaudet for the patch.
+
+2008-01-25  Josh Bressers <josh@bress.net>
+
+       * uip/mhshowsbr.c (show_all_messages): Be more generous when parsing
+       multipart messages.
+
+2007-11-04  Joel Reicher <joel@panacea.null.org>
+
+       * Changed done() link overriding to function pointer. Return type
+       is now void so that exit() can be used as done() callback. Dead
+       code return from all done()s removed, with return 1 in main()
+       following done() (should never be reached).
+
+2007-08-21  Josh Bressers <josh@bress.net>
+
+       * Red Hat Bug #253342: inc.c, utils.c, utils.h: When inc is run with
+       the -silent flag, don't exit(1) for no apparent reason.
+
+2007-03-12  Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+       * bug #18630, #18631, #18632, #18634: various patches from
+       Craig Leres fixing error message argument problems.
+
+2007-03-12  Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+       * bug #15212: configure.in, acconfig.h: remove configure test for
+       broken AT&T vi. This test was broken (it was always returning
+       failure even for non-broken vi implementations) and
+       unfixable. Nobody should be using AT&T vi any more so I have
+       simply moved it back to being a setting you can put manually into
+       acconfig.h if you must.
+
+2006-10-24  David Levine <levinedl@acm.org>
+
+       * uip/sendsbr.c: with attachformat values of 1 or 2, add
+       name= portion to Content-Type header.  This makes them
+       consistent with attachformat value 0.  And it allows mhstore
+       to use that (file)name when extracting attachments.
+
+2006-08-26  Josh Bressers <josh@bress.net>
+
+       * configure.in: If we're not using dotlocking, there is no need to set
+       inc sgid.
+
+2006-03-30  David Levine <levinedl@acm.org>
+
+       * uip/sendsbr.c: with attachformat values of 1 or 2, only
+       generate Content-Disposition headers for MIME attachments, not
+       for the message contents themselves.  Microsoft Outlook Build
+       10.0.6626, at least, doesn't show the message contents if they
+       have Content-Disposition.
+
+2006-03-09  Josh Bressers <josh@bress.net>
+
+       * sbr/fmt_rfc2047.c (decode_rfc2047): Don't close the iconv descriptor
+       if it isn't valid.
+
+2006-03-08  Josh Bressers <josh@bress.net>
+
+       * (mh_strcasecmp): Rename the private strcasecmp function to
+       mh_strcasecmp.  This keeps the newer gnu linker happy.
+
+2006-03-05  Oliver Kiddle <okiddle@yahoo.co.uk>
+
+       * sbr/fmt_rfc2047.c: don't try to malloc 0 bytes if an RFC2047
+       encoded block is empty
+
+2006-03-04  Peter Maydell <pmaydell@chiark.greenend.org.uk>
+
+       * etc/Makefile.in: use INSTALL_SCRIPT to install scripts;
+       this allows INSTALL_PROGRAM to be set to 'install -s' so
+       binaries are stripped on installation. Apparently the BSDs
+       do this.
+
+2006-02-25  David Levine <levinedl@acm.org>
+
+       * uip/sendsbr.c: replaced st_mtim with st_mtime, that's what
+       it should have been.  Added #include of h/tws.h to pick up
+       dtime() prototype.
+
+2006-02-20  David Levine <levinedl@acm.org>
+
+       * h/mh.h, h/prototypes.h, uip/mhbuildsbr.c, uip/send.c,
+       uip/sendsbr.c, uip/viamail.c, uip/whatnowsbr.c, man/send.man:
+       added -attachformat switch to send, to support alternate MIME
+       header contents when using -attach.  See send man page for
+       description.
+
+       * man/mhbuild.man: wrapped one appearance of "Content-Disposition"
+       with quotes, to be consistent with others.
+
+2006-02-20  Josh Bressers <josh@bress.net>
+
+       * h/utils.h, sbr/utils.c, uip/flist.c, uip/folder.c: Move duplicate
+       function num_digits into utils.c
+
+2006-02-19  Josh Bressers <josh@bress.net>
+
+       * sbr/m_draft.c, sbr/utils.c, uip/folder.c, uip/inc.c,
+       uip/mhstoresbr.c, uip/popi.c, uip/refile.c: Add create_folder()
+       function, replacing duplicate code during folder creation.
+
+2006-02-18  David Levine <levinedl@acm.org>
+
+       * h/mime.h, h/mhparse.h, uip/mhbuildsbr.c, uip/mhfree.c,
+       man/mhbuild.man, docs/TODO:  added support for an optional
+       Content-Disposition header in mhbuild (only).  Its contents
+       are supplied between {}, positioned after the optional [], in
+       a mhbuild directive.  If the contents do not contain a
+       "filename=" parameter, and the directive has a filename, or
+       something else that ends with "name=", then that will be used
+       to add a "filename=" parameter to the header.
+
+2006-02-12  David Levine <levinedl@acm.org>
+
+       * docs/TODO: added RFC2183 to reference of RFC1806 for
+       Content-Disposition header.
+
+2006-01-31  David Levine <levinedl@acm.org>
+
+       * uip/mhbuild.c, uip/mhbuildsbr.c, man/mhbuild.man:  added
+       -nocontentid switch, to disable generation of Content-ID:
+       header in MIME messages.  (Also added -contentid for
+       symmetry.)  The default configuration of Microsoft Outlook,
+       Build 10.0.3416 in particular, doesn't see attachments in
+       incoming messages if there are Content-ID headers, see
+       http://home.cwru.edu/~wrv/eudoraoutlookfix.html.  This allows
+       users to easily accomodate that by adding
+       mhbuild: -nocontentid to their .mh_profile.
+
+2006-01-29  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * bug 4360: uip/replsbr.c: remove trailing newlines from components
+       to fix bug with spaces at the end of Subject/References in replies
+
+2006-01-18  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * configure.in: use AS_HELP_STRING for formatting help messages
+
+       * configure.in, sbr/fmt_scan.c: add autoconf magic to support
+       old systems that don't support multibyte character sets
+
+       * sbr/fmt_scan.c: fix bug with insertion of newline being wrong if
+       the num function was used at the end of the format buffer
+
+2006-01-17  David Levine <levinedl@acm.org>
+
+       * uip/post.c, uip/spost.c: in make_bcc_file (), use same
+       logic as in finish_headers () to detect whether there is an
+       existing From: line in the draft.  If draft_from masquerade
+       flag is enabled, this allows the From: to be obeyed in the
+       Bcc, instead of the old behavior of always replacing it with
+       the signature.
+
+2006-01-17  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * sbr/fmt_scan.c: more robust multi-byte/column support for field
+       widths, restoring right justification feature
+
+2006-01-16  Oliver Kiddle  <okiddle@yahoo.co.uk>
+
+       * h/aliasbr.h, h/rcvmail.h, man/Makefile.in, man/slocal.man,
+       sbr/lock_file.c, uip/aliasbr.c, uip/dropsbr.c, uip/post.c,
+       uip/slocal.c, man/mh-mts.man: remove remnants of code for MMDF
+
+       * uip/scansbr.c: multiply buffer size by MB_CUR_MAX so multi-byte
+       chars fit
+
+2006-01-14  Josh Bressers <josh@bress.net>
+
+       * sbr/fmt_scan.c: Turn the PUTSF macro into a function capable of
+       handling multi column characters.
+
+2006-01-07  Josh Bressers <josh@bress.net>
+
+       * Remove sbr/strerror.c -- strerror(3) is defined in C89.
+
+2006-01-06  Josh Bressers <josh@bress.net>
+
+       * patch #3968: Move the add() function from its own file (add.c) and
+       into utils.c. There was also a duplicate add() function in mf.c which
+       has been removed.
+
+2006-01-02  Josh Bressers <josh@bress.net>
+
+       * Remove sbr/pwd.c file, moving the pwd() function into sbr/utils.c.
+
+2006-01-01  Josh Bressers <josh@bress.net>
+
+       * patch #3967: Create a mh_xrealloc function to prevent mistakes when
+       calling realloc.
+
+2006-01-01  Josh Bressers <josh@bress.net>
+
+       * patch #3966: Create a mh_xmalloc function to prevent mistakes when
+       calling malloc.
+
+2005-12-24  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Bug #15285: Don't use $< in target rules in makefiles, as POSIX
+       says it's only defined in inference rules. (BSD make was expanding
+       $< to the empty string in the rule for building sbr/dtimep.c, which
+       causes lex to apparently hang because it's reading from stdin.)
+
+2005-12-24  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Completely redo db library checking -- we now check for working
+       (include file, library) pairs rather than checking for headers and
+       libraries separately. We also now provide --with-ndbm=lib and
+       --with-ndbmheader=header options to configure to handle situations
+       where configure's autodetection fails.
+
+2005-12-21  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Fix stupid accidental dependence on a bash quirk in previous
+       configure script change.
+
+2005-12-15  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * Improve checking for Berkeley db libraries: configure should now
+       find a suitable library on systems with new gdbm where
+       compatibility functions are in the gdbm_compat library, and on
+       systems with libdb4.
+
+2005-12-13  Michael Forrest <mef@computer.org>
+
+       * Fedora Bug #163760: sbr/context_read.c (context_read): Ensure that
+       the context is only read once.
+
+2005-12-12  Josh Bressers <josh@bress.net>
+
+       * uip/sendsbr.c (annoaux): Fix the call to annotate() fixing a bug
+       which prevented repl from properly annotating messages.
+
+2005-12-07  Jon Steinhart <nmh@fourwinds.com>
+
+       * Fixed a bug where anno -append put the headers in the wrong place
+       if applied to a message that didn't contain any headers.
+
+       * Added a special value of "all" to the -number option that causes
+       anno -delete to delete all matching components instead of just
+       the first one.
+
+       * Added new -preserve and -nopreserve options.  Using -preserve
+       retains the original last accessed and last modified times on
+       annotated messages.
+
+2005-12-05  Josh Bressers  <josh@bress.net>
+
+       * Fedora Bug #174983: configure.in: Fix the AC_PATH_PROG default when
+       vi isn't found during build.
+
+2005-11-19  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * bug #14977: sbr/context_read.c: special case an MHCONTEXT of
+       "/dev/null" and don't try to lock it.
+
+       * bug #9228, debian bug #146449: man/mh-profile.man: make it clearer
+       that lower case environment variables (and in particular mheditor)
+       are internal to nmh and not intended to be set by the user.
+
 2005-11-09  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * sbr/mf.c: fix buffer overrun with absurdly long addresses
 2005-11-09  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * sbr/mf.c: fix buffer overrun with absurdly long addresses
        it uses SASL if necessary. (This bug was preventing Bcc'd emails
        from being sent via SASL authenticated SMTP.)
 
        it uses SASL if necessary. (This bug was preventing Bcc'd emails
        from being sent via SASL authenticated SMTP.)
 
+       * bug #9813: uip/rmf.c: don't crash if there's no Current-Folder
+       entry in the context file.
+
 2005-11-13  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
        * bug #7833: uip/Makefile.in: remove link to install-mh that caused
 2005-11-13  Oliver Kiddle  <okiddle@yahoo.co.uk>
 
        * bug #7833: uip/Makefile.in: remove link to install-mh that caused