cleanup/
clist.h cleanup
version 1.3 (09/08/2001)

Abstract
--------
Cleans up the clist.h file to something a little more manageable.

Licence
-------
Use this at your own risk. Make backups. Expect some work. Don't blame me 
if it goes wrong, i'm not going to be held liable.

Usage
-----

If you've not added or removed any commands in any way then you can use 
the replacement clist.h in this archive. Otherwise:

 1. Make backups
 2. Run this program with:

    cleanup.pl > newclist.h

    If you get an error then the path to perl might be different.

 3. You may get some warnings such as:

    Warning: 'home' cmd ('intercom_home' fn) appears badly formed.

    This means that the command list entry (not the prototype) appears
    to be missing the correct number of commas (ie. fields). Whilst the
    script will happily continue, code happily compile and talker happily
    run it is definately a good idea to fix these.

 4. Look at the newclist.h file. You need to do the following:

     a. Add the pg+ header, includes and the stuff at the bottom of the
        file.
     b. Add and order the sub-commands

 5. Compile it.
 6. Fix any errors. If you fix some, then go to 5.
 7. Bingo. One cleaner clist.h file.

Version history
---------------

v1.0 - Initial release

v1.1 - Added sorting of function names
       Made it so that #endif appends with /* <define> */ for clarity

v1.2 - Fixed #ifdef/#endif formatting mistake (thanks to Blimey)
       Prototypes are properly #ifdef'ed if necessary

v1.3 - Made it so that entries that don't have the right paramaters are
       still included but a warning is flagged up.

Other notes
-----------

Smart perl hackers will notice that I use two places to store which 
function has a associated #ifdef. Yes it sucks, but I'm not in the mood 
to go about cleaning it up since it works just fine. 

If you want to clean it up then remove the ^^$define part and then split 
the line to extract the function name. You can then use 
$ifdef{<function_name>) to find out if it needs a prototype.

Stuck? Questions?
-----------------

Take a look at the cleaned up clist.h file in the archive for 
inspiration. If all else fails email silver@ewtoo.org

Last updated: 09/08/2001