Replace getcpy() and strdup() with mh_xstrdup() this harmonise the code. Also fix some bugs, if return value of strdup is not checked.
Replace free() with mh_free0() mh_free0() free's the memmory and set's the pointer to NULL after the free. This avoids doublefree and dereferenc of a non valid poiter.
Use sysexits.h for better exit-codes The sysexits header describe some standard exit-codes, which should be used. adios has now a status argument so sysexits.h can be used.
Move #include from h/mh.h to source files Included files should not include further files. Now, only the necessary files are included and not all of them in every file. A large bunch of this work is done, but there are some more nested include files.
Removed unnecessary #include of h/signals.h.
mhlist: Always display the column header (removed -headers).
mhlist, mhbuild: Always evaluate realsizes of the MIME parts. This already had been the default. Now I removed the -[no]realsize switches.
No more mhshow-charset-* but instead automatic invocation of iconv(1). Unless there is an mhshow-show-* rule, text/plain content types are automatically piped through iconv(1) if their charset is foreign. For mhshow-show-* rules, there's a new %c escape, which expands to the foreign charset. The contents of the files, referenced by %f/%F are still in foreign encoding. One might want to use `iconv -f %c %f | mycommand' for custom mhshow-show-* rules. We depend on iconv(1) now! But this may change to dependence on iconv(3), soon. This field is inconsistent and not at all finished, yet.
mhshow/mhstore: Removed support for retrieving message/external-body parts. These tools won't download the contents automatically anymore. Instead, they print the information needed to get the contents. If someone should really receive one of those rare message/external-body messages, he can do the job manually. We save nearly a thousand lines of code. That's worth it! (The profile entry `nmh-access-ftp' and sbr/ruserpass.c for reading ~/.netrc are gone now.)
Fixed mhlist -verbose to work with all content types [Bug #35219]. Pulled in from nmh. Thanks to David Levine.
Merged h/mts.h into h/prototypes.h. Note: spost.c is not up to date.
Relayouted all switch statements: case aligns with switch. Desired style is: switch (n) { case foo: ... }
Completely reworked the path convertion functions Moved everything (from sbr/getfolder.c and sbr/m_maildir.c) into sbr/path.c, but actually replaced the code almost completely. See h/prototypes.h for the function changes. sbr/path.c provides explaining comments on the functions. None of them allocates memory automatically. Additionally: - Like for other ``files'', `inc -audit file' places file relative to the cwd, not relative to the mh-dir. This is for consistency. - Replaced add(foo, NULL) with getcpy(foo), which ist clearer.
Renamed r1bindex() to mhbasename(), to make its function becomes clear. All calls to r1bindex() had '/' as second argument. For everything else one can use strrchr(3) instead of r1bindex().
Removed the space between function names and the opening parenthesis.
Reformated comments and long lines
Rearranged whitespace (and comments) in all the code! The primary goal was to only indent with tabs and not mix them with spaces. Also, no more tabs should appear past the first printable char on each line. Now editing the sources will be much easier, no matter which editor one uses, and rearranging won't break aligned code. (Beware, the changeset is huge, but the `diff -w' changes are moderate.)
Remove RCS keywords, since they no longer work after git migration.
* 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.
* 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.