redesign version string Now we have two version nummbers one for the tool and one for the lib. Also the version number is changed everytime the object is rebuild.
Drop register storage class
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.
Replace done with exit at uip Replace done with exit in most sourcefiles of uip. This makes the code better to read. If the done was overwritten by an externel function atexit() is used instand. send.c and mhl.c are excluded, because need a bit rewrite first.
Removed configure flag --disable-locale and have it always enabled. Todays system are assumed to have locale support.
Renamed -version switch to -Version to remove the conflict with -verbose. Now, `mhlist -V' prints the version and `mhlist -v' lists verbosely. There are only a few switches left that conflict on the first character, apart from the inverted (no*) variants.
s/nfs/fmtstr/ and s/c_nfs/c_fstr/ in uip/mhl.c
Removed the -width option from ap and dp. Always print the whole string now.
Removed `-format string' switches but made -form accept `=formatstring'. For all tools that take `-from file' or `-format string' switches, those were merged: `-format string' went away, but one may supply any such string to the -form switch by prepending it with an equal sign `='. Thus scan -format '%(msg) %{from}' is now written as scan -form '=%(msg) %{from}' Note: mhl isn't adjusted this way, yet. It's too complex to be understood by me, now. Thus, it still remains as it was: Any parameter to -form will be interepreted as a filter *file*. As show and mhshow use mhl, they are affected, too. In the same go: Compactified the new_fs() function: folded the arguments.
Augmented new_fs() with an additional argument for a default form. This balances the arguments: user-form, user-string, def-form, def-string. In comp.c I've already replaced open_form() with new_fs(). forw.c and dist.c are to follow.
Relayouted all switch statements: case aligns with switch. Desired style is: switch (n) { case foo: ... }
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.
Return type of (*done)() changed to void. default_done() replaced by exit(). All dead code "return 1" lines removed from *_done()s and replaced by explicit "return 1" following done() calls in main()s (they should never be reached). This should make cleaning up program termination structures easier.
Add/update copyright notice in all source code files.
Updating user programs to use <h/tws> instead of <zotnet/tws/tws.h>