dox

Check whether c routines have proper dox headers, and if not write a new file with a dummy dox header for the user to update

Command line usage:

usage: * dox.py whatever.c to process a single file * dox.py *.c or -all to process all c files in a directory * dox.py -h to get this help message

Description:

This script looks for a doxyegen header for each function in a .c file, and reports on the results.

If one or more headers are missing, for a file named for exampe foo.c, it will write out a new file named new_foo.c with a basic header installed.

This basic headers in this routine should be edited and the file, in this case new_foo.c copied back to foo.c

Primary routines:

doit processes a single file do_many processes all of the files in a directory, by calling doit multiple times steer processes the command line

Notes

Files that begin new_ will not be checked

dox.py can give incorrect results if the routine is not properly indented

This routine does not check for old style headers used prior to the introduction of doxygen to Python, since that conversion should be complete.

History:

180912 ksl Coding begun

Functions

do_many()

Check all of the .c files in a directory for dox commens

doit([filename, outputfile])

Do something magnificent

gen_file_header(filename)

Craete a new header for the file since one was not found

gen_header([xtype, xname, xvar])

generate a doxygen header for function

is_installed(program)

Tests to see if a program has been installed.

read_file(filename[, char])

Read a file and split it into words, eliminating comments

read_table([filename, format])

Read a file using astropy.io.ascii and return this

steer(argv)

Process the command line