* uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast
[mmh] / ChangeLog
index da5ac1d..38ba7e4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,360 @@
+2009-12-29  David Levine <levinedl@acm.org>
+
+       * uip/mhlistsbr.c, uip/mhlsbr.c, uip/picksbr.c: cast
+       pointers to unsigned long before casting to unsigned int
+       to avoid warnings on 64-bit about casting from pointer
+       to int of different size.
+
+       * uip/new.c: cast folder_len to int to avoid warning on
+       64-bit about passing a size_t to an int conversion specifier.
+
+2009-12-25  David Levine <levinedl@acm.org>
+
+       * uip/inc.c: gcc 4.4.1 noticed that maildir could have been
+       used before initialization.  In fact, if that code was ever
+       reached, maildir would never have been initialized.  It's in
+       an adios call, so replaced with NULL.
+
+2009-12-21  David Levine <levinedl@acm.org>
+
+       * mts/smtp/smtp.c: In sm_auth_sasl (), removed zeroing of
+       sasl_inbuffer because it could be used in sm_fget ().  Also,
+       removed allocation of sasl_inbuffer because that was done in
+       either smtp_init () or sendmail_init ().
+
+2009-01-17  Eric Gillespie  <epg@pretzelnet.org>
+
+       * etc/mhn.defaults.sh: Never try to make mhshow start xterm.
+
+2009-01-16  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/runtest, test/tests/inc/test-deb359167,
+       test/tests/inc/test-eom-align, test/tests/manpages/test-manpages:
+       Load common.sh via absolute path, otherwise some /bin/sh
+       (e.g. dash) can't load it.
+
+       * uip/Makefile.in, uip/new.c, test/tests/new/test-basic: Add new
+       program, and fn/fp/unseen symlinks.
+
+       * test/{runtest,setup-test}: Move MH profile under Mail directory
+       so each test script will have its own to muck with, if needed.
+
+       * h/Makefile.in, h/crawl_folders.h, sbr/Makefile.in,
+       sbr/crawl_folders.c, uip/folder.c: Extract the folder crawling
+       code from folder.c into new crawl_folders function, using a
+       callback to assemble the folder info in folder.c.  Drop compare
+       function and use strcmp instead.  Rename addfold and addir to
+       add_folder and add_children (add dir vs. add folder?
+       confusing names).
+
+2008-12-26  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * sbr/m_getfld.c: fix two bugs which could cause us to walk off
+       the beginning of the stdio or prefix-string buffer when checking
+       for presence of the end-of-message delimiter in some situations.
+       This might cause inc to dump core if you were unlucky. (This was
+       Debian bug 359167.)
+       * test/tests/inc/{md5sums,msgheader.txt,test-deb359167,
+       test-eom-align,fromline.txt,filler.txt,deb359167.mbox}: new tests
+       both for the specific problem and to try to check various alignments
+       of the eom string with the stdio buffer ending.
+       * test/common.sh: new file for common utility functions for the
+       test scripts. Moved findprog out of manpage test script into this
+       new file. Added some functions for doing progress indicators.
+
+2008-12-25  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * test/runtest: automatically run setup-test if it hasn't already
+       been done. Improve error handling in test script with 'set -e'.
+
+2008-10-23  David Levine <levinedl@acm.org>
+
+       * h/mh.h: raised NAMESZ from 128 to 999.  RFC 2822 limits line
+       lengths to 998 characters, so a header name can be at most that long.
+       m_getfld limits header names to 2 less than NAMESZ, which is fine,
+       because header names must be followed by a colon.  Add one for
+       terminating NULL.
+
+2008-10-23  David Levine <levinedl@acm.org>
+
+       * sbr/m_getfld.c: in warning message, use NAMESZ-2 instead of
+       NAMESZ-1 bytes because the message says "exceeds", not
+       "is greater than or equal to".
+
+2008-10-23  David Levine <levinedl@acm.org>
+
+       * docs/MAIL.FILTERING: added note on removing procmail -f or
+       -r options to try to suppress generation of a "From " line on
+       incoming messages.
+
+2008-08-14  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/setup-test: Don't run autogen.sh unless needed.  Build in a
+       blddir under the temporary directory so as not to interfere with
+       whatever the developer may be doing in the source directory.
+       If the temporary directory already exists, rebuild and install it.
+
+2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
+
+       * sbr/ambigsw.c: Send print_sw output to stderr.  This avoids
+       strange problems with scan `pick -bogus`, not to mention being
+       nicer anyway.
+
+       * sbr/getans.c, sbr/print_help.c, uip/msh.c: Send print_sw output
+       to stdout.
+
+       * h/prototypes.h, sbr/print_sw.c (print_sw): Add FILE * argument
+       and send output there rather than to stdout.
+
+       * test/tests/pick/test-stderr: Add test that error messages don't
+       end up going to stdout.
+
+2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
+
+       * uip/pick.c: Print matching messages immediately, instead of
+       waiting until the very end to print anything.
+       Ensure valid sequence name as soon as we parse it from command,
+       instead of searching the messages first.
+
+2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
+
+       * uip/Makefile.in, uip/popi.c: Remove popi.c, which has been dead
+       since PatchSet 257 (2000/06/12 11:07:34 UTC).
+
+2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
+
+       * h/mhparse.h: Move interfaces also used by mhbuildsbr.c here
+       from mhparse.c.
+
+       * uip/Makefile.in (mhbuild): Build with mhparse.o.
+
+       * uip/mhbuildsbr.c: Drop the duplication of mhparse.c.
+
+       * uip/mhbuild.c, uip/mhlist.c, uip/mhn.c, uip/mhshow.c,
+       uip/mhstore.c, uip/mhtest.c: Drop check swdeclaration, which is
+       now in mhparse.h.
+
+       * uip/mhparse.c: Move some declarations to mhparse.h, and remove
+       'static' from the definitions here.
+       (get_ctinfo): Take magic mhbuild support from mhbuildsbr.c's copy,
+       and adapt callers.
+       (incl_name_value, extract_name_value): Move from mhbuildsbr.c to
+       support get_ctinfo change).
+       (get_content, open7Bit): Add Content-Disposition support, added to
+       mhbuildsbr.c's copy in mhbuildsbr.c r1.12 (PatchSet 549).
+       (InitText): Default to CHARSET_UNSPECIFIED instead of "US-ASCII",
+       as mhbuildsbr.c's copy did.  Explain termproc.
+       (openBase64, openQuoted, open7Bit): Fix comment from r1.5:
+       suffixes, not prefixes.
+       (openMail): Explain showproc.
+
+       * test/tests/mhshow/test-cte-binary: Add test for
+       Content-Transfer-Encoding: binary (Debian #136976).
+
+       * test/tests/mhbuild/test-forw: Add an mhbuild test, testing forw
+       with and without RFC-934 mode.  More mhbuild tests would be nice.
+
+2008-08-13  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/tests/bad-input/test-header: Add test for it.
+
+       * sbr/m_getfld.c: If we reach the end of the line without finding
+       a ':' when parsing a header field, treat that line as the
+       beginning of the body rather than blowing up.  These messages are
+       usually spam, but it's nice to be able to at least scan them.
+
+2008-08-12  Eric Gillespie  <epg@pretzelnet.org>
+
+       * test/tests/mhshow/test-qp: Test various valid and invalid
+       escape sequences.
+
+       * uip/mhparse.c (openQuoted): Simplify the decode-or-show for loop by
+       peeking ahead to the next byte(s) when encountering '=', and just let
+       invalid escape sequences through as literals (fixes bug #15245).
+
+2008-08-12  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * autogen.sh (new file): add script for running the GNU
+       autotools in the right order
+       * INSTALL: mention that you need to run autogen.sh if you
+       got nmh from CVS
+       * docs/README.developers: mention autogen.sh rather than
+       suggesting running autoheader and autoconf by hand.
+       * test/setup-test: run autotools via autogen.sh
+
+2008-08-08  Eric Gillespie  <epg@pretzelnet.org>
+
+       * sbr/discard.c, sbr/m_getfld.c, uip/scansbr.c: Add support for
+       DragonFlyBSD stdio (from NetBSD pkgsrc).
+
+2008-08-05  Eric Gillespie  <epg@pretzelnet.org>
+
+       * uip/folder.c: chdir(nmhdir) in main rather than in dodir, which
+       is called many times.  Drop the chdir in get_folder_info, which
+       served no purpose at all.  If struct stat has d_type (BSD), use
+       that to skip processing (strcmp, stat, and so on) of message
+       files, mostly undoing the slow-down from the last change.
+
+       * configure.in: Call CHECK_TYPE_STRUCT_DIRENT_D_TYPE.
+
+       * aclocal.m4: Add CHECK_TYPE_STRUCT_DIRENT_D_TYPE from
+       GNU coreutils.
+
+2008-08-04  Eric Gillespie  <epg@pretzelnet.org>
+
+       * uip/folder.c: Simplify dodir/addir/addfold.  Dump hacky
+       over-optimization in addir that tried to avoid readdir after all
+       child directories had been read; this was also trying to support
+       symlinks to directories, but would have been failing (because
+       nlink may have gone to 0 with symlinks to directories remaining)
+       had the lstat usage been correct (lstat doesn't fail for normal
+       directories; should have used S_ISLNK).
+
+2008-08-03  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
+
+       * test/setup-test: use 'set -e' so we stop on compile failure.
+       Configure --enable-debug for convenience in debugging.
+
+       * uip/whatnowsbr.c: bug #23319: rework the way we handle the working
+       directory when invoking the user's shell, so that we don't have
+       issues when the cwd contains a space or shell special character.
+       * test/tests/whatnow/test-attach-detach, test/tests/whatnow/test-cd,
+       test/tests/whatnow/test-ls: test cases for this.
+
+       * sbr/fmt_compile.c: add 'do { ... } while (0)' wrappers
+       to various multi-statement macros to avoid nasty surprises
+       if the macros are used in if() clauses.
+
+       * bug #23436: man/scan.man, man/forw.man, man/inc.man,
+       man/mh-chart.man, man/mhmail.man, man/mhshow.man,
+       man/mhstore.man, man/msgchk.man, man/packf.man, man/scan.man:
+       fix minor syntax errors groff warns about.
+       * test/runtest, test/README: allow test cases to report
+       that they have been SKIPped as well as PASS/FAIL
+       * test/tests/manpages/test-manpages - new test which runs groff
+       on the manpages and checks that there are no warnings.
+       * test/runalltests: ignore editor backup files
+
+2008-08-03  Eric Gillespie  <epg@pretzelnet.org>
+
+       * etc/replcomps, etc/replgroupcomps: Trim trailing whitespace from
+       Subject field.
+
+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
 2008-04-29  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * Revert previous attempt at fix for SASL issue as it
        (the SASL libraries now care if you pass in the wrong
        length).
 
        (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
 2008-04-29  Peter Maydell  <pmaydell@chiark.greenend.org.uk>
 
        * Cope with sasl_decode64() returning SASL_CONTINUE, as