XMLDB_Generator/RB_XMLDB_Generate_Char NAME RB_XMLDB_Generate_Char FUNCTION Switchboard to RB_XMLDB_Generate_Char --------------------------------------------------------------------------- XMLDB_Generator/RB_XMLDB_Generate_Item_Line_Number FUNCTION Generate line numbers for SOURCE like items INPUTS o dest_doc -- the file to write to. o line_number_string -- the line number as string. --------------------------------------------------------------------------- Utilities/RB_Mem_Check FUNCTION Check for memory allocation failures. --------------------------------------------------------------------------- ROBODoc/Utilities FUNCTION Set of general purpose utility functions that are used in more than one module. --------------------------------------------------------------------------- Analyser/RB_GetCurrentFile NAME Get a copy of the name of the current file. Allocates memory. --------------------------------------------------------------------------- Analyser/RB_Warning NAME RB_Warning FUNCTION Print warning to stdout. (stderr better?) INPUTS * format -- * ... -- --------------------------------------------------------------------------- Analyser/RB_Warning_Full NAME RB_Warning_Full FUNCTION Print warning to stdout. INPUTS * arg_filename -- * arg_line_number -- * arg_format -- * ... --------------------------------------------------------------------------- Utilities/CR_LF_Conversion FUNCTION Fix CR/LF problems. If ROBODoc reads a text file that was created on another OS line-endings might not be what ROBODoc expects of the current OS. This function tries to detect and fix this. INPUTS * line -- a line of text RETURN VALUE * number of characters that were removed. --------------------------------------------------------------------------- Utilities/cwd FUNCTION Holds current working directory --------------------------------------------------------------------------- Utilities/ExpandTab FUNCTION Expand the tabs in a line of text. INPUTS line -- the line to be expanded tab_size -- global. RETURN pointer to the expanded line. NOTE This function is not reentrant. --------------------------------------------------------------------------- Utilities/RB_Alloc_Header FUNCTION allocate the struct RB_header RESULT struct RB_header * -- all attributes/pointers set to zero AUTHOR Koessi SEE ALSO RB_Free_Header() --------------------------------------------------------------------------- Utilities/RB_Change_Back_To_CWD FUNCTION Changes back to saved working directory and frees cwd string --------------------------------------------------------------------------- Utilities/RB_Change_To_Docdir FUNCTION Saves current working directory and then changes to document dir --------------------------------------------------------------------------- Utilities/RB_Close_File FUNCTION Closes a given file --------------------------------------------------------------------------- Utilities/RB_Close_Pipe FUNCTION Closes a given pipe --------------------------------------------------------------------------- Utilities/RB_ContainsNL FUNCTION Check whether the provided line buffer contains a new line (NL) character. INPUTS * line -- line string to process RETURN VALUE * TRUE -- the line contains a NL character * FALSE -- the line does not contain a NL character --------------------------------------------------------------------------- Utilities/RB_CopyFile NAME RB_CopyFile -- copy a file to another file RESULT Program Exit if one of the specified files did not open. --------------------------------------------------------------------------- Utilities/RB_FputcLatin1ToUtf8 NAME RB_FputcLatin1ToUtf8 BUGS This wrongly assumes that input is always Latin-1. --------------------------------------------------------------------------- Utilities/RB_Free_Header NAME RB_Free_Header -- oop FUNCTION free struct RB_header and associated strings INPUTS struct RB_header *header -- this one AUTHOR Koessi SEE ALSO RB_Alloc_Header(), RB_Close_The_Shop() --------------------------------------------------------------------------- Utilities/RB_FreeLineBuffer FUNCTION Free the dynamically allocated line-buffer INPUTS * works on the globals line_buffer, readChars, myLine --------------------------------------------------------------------------- Utilities/RB_malloc FUNCTION like malloc, but exit if malloc failed RETURN VALUE See malloc --------------------------------------------------------------------------- Utilities/RB_Match FUNCTION See if a wildcard expression matches a target string. The wildcard expression can consists of any literal character and the two wildcards characters '*' and '?'. '*' matches the longest string of zero or more characters that fit. '?' matches any single character. Examples: "*aap" matches "aapaapaapaap" "?inux" matches "linux" "lin*ux" matches "linux" "linux*" matches "linux" NOTES This is a recursive function. INPUTS o target -- the string to be matched agains the wildcard_expression. o wildcard_expression -- the wildcard expression RETURN VALUE TRUE -- the target matches the wildcard expression FALSE -- it does not match. --------------------------------------------------------------------------- Utilities/RB_Open_File FUNCTION Opens a file and returns its handler --------------------------------------------------------------------------- Utilities/RB_Open_Pipe FUNCTION Opens a pipe and returns its handler --------------------------------------------------------------------------- Utilities/RB_Panic NAME RB_Panic -- free resources and shut down FUNCTION Print error message. Frees all resources used by robodoc. Terminates program. Output goes to stderr INPUTS char *format -- formatstring ... -- parameters AUTHOR Koessi --------------------------------------------------------------------------- Utilities/RB_QuickSort FUNCTION Sort an array of pointers according to the lexical order of the elements the pointers point to. This is based on the quicksort routine in "The C programming language" by B Kerninghan en D Ritchie. INPUTS * array -- the array of pointers. * left -- the most left element in the array. * right -- the most right element in the array. * f -- pointer to a function that can compare the objects two elements of the array point to. RESULT array -- A sorted array of pointers. EXAMPLE The following is an example program that shows the use #define TEST_SIZE 10 char* test[ TEST_SIZE ] = { "ape", "zebra", "duck", "goofbal", "dodo", "rabit", "crow", "cow", "pig", "goat" }; int string_compare( void* p1, void* p2 ) { char *cp1 = p1; char *cp2 = p2; return strcmp( cp1, cp2 ); } RB_QuickSort( test, 0, TEST_SIZE - 1, string_compare ); --------------------------------------------------------------------------- Utilities/RB_ReadWholeLine FUNCTION Read a line from the file using the provided buffer. INPUTS * file -- file to read from * buf -- buffer of length MAX_LINE_LEN to read chunks of the line to * arg_readChars -- reference to the variable to store the read characters in RETURN VALUE * returns a dynamically allocated buffer containing the complete line read NOTES If the line did not end in a new line (NL) character one is added. --------------------------------------------------------------------------- Utilities/RB_Say NAME RB_Say -- varargs FUNCTION Say what's going on. Goes to stdout. INPUTS * char *format -- formatstring * long mode -- SAY_INFO | SAY_DEBUG * ... -- parameters AUTHOR Koessi --------------------------------------------------------------------------- Utilities/RB_Skip_Whitespace FUNCTION Skip space and tab chars from the start *buf. This is needed when searching for indented headers and items. NOTES We should extract some info about indentation level and save it to global variable in order to write out source items (that originate from indented headers) neatly. SEE ALSO RB_Find_Marker, RB_Find_End_Marker, RB_Find_Item, RB_Generate_Item_Body --------------------------------------------------------------------------- Utilities/RB_Str_Case_Cmp FUNCTION Compare two strings, regardless of the case of the characters. RESULT 0 s == t -1 s < t 1 s > t --------------------------------------------------------------------------- Utilities/RB_StripCR FUNCTION Strip carriage return (CR) from line. INPUTS * line -- line string to process --------------------------------------------------------------------------- Utilities/RB_Swap FUNCTION Swap two elements in a array of pointers. This function is used by RB_QuickSort(). --------------------------------------------------------------------------- Utilities/RB_TimeStamp NAME RB_TimeStamp -- print a time stamp --------------------------------------------------------------------------- Utilities/snprintf FUNCTION Mimic the library function snprintf using sprintf if it is absent. --------------------------------------------------------------------------- Utilities/Stat_Path FUNCTION Check the given path against required type. d -- directory, f -- file, e -- exists RETURN VALUE TRUE if path is of the given type, otherwise FALSE. BUGS Should check if symbolic link points to a directory or to a file. --------------------------------------------------------------------------- ROBODoc/Test_Generator FUNCTION The generator for test output. The purpose of this generator is to create output that is easily scanable by the system test scripts. This to make it easier to write tests for ROBODoc. This generator produces output in utf-8 encoding. This generator is experimental. --------------------------------------------------------------------------- Generator/RB_TEST_Generate_Char NAME RB_TEST_Generate_Char FUNCTION Switchboard to RB_TEST_Generate_Char --------------------------------------------------------------------------- ROBODoc/RTF_Generator FUNCTION A collection of functions to generate output in RTF format. Supports sections upto 7 levels deep. TODO Documentation MODIFICATION HISTORY ????-??-?? Anthon Pang V1.0 2003-02-03 Frans Slothouber Refactoring Anthon Pang --------------------------------------------------------------------------- RTF_Generator/RB_RTF_Generate_Item_Line_Number FUNCTION Generate line numbers for SOURCE like items INPUTS o dest_doc -- the file to write to. o line_number_string -- the line number as string. --------------------------------------------------------------------------- Generator/T_RB_DocType FUNCTION Enumeration for the various output formats that are supported by ROBODoc. NOTES These should be prefixed with RB_ --------------------------------------------------------------------------- Docuwala/ROBODoc FUNCTION ROBODoc is intended to be a replacement for the original AutoDocs program. ROBODoc will extract the comment headers from a source file, and put them into a separate documentation file. General Flow Sourcecode ---> [ROBODoc] ---> Document. The whole ROBODoc process consists of three steps: scanning, analysing, generating. Scanning ROBODoc scans the source directory tree. This collects the names of all the source files. Analysing ROBODOc analyses all the sourcefiles. This reads the content of all source files and collects all the headers. Generating In this step the headers are written to one or more documentation files. In addition The data collected during scanning and analysing is stored in a number of structures. RB_Directory, it stores the names of the sourcefiles and directories in the source direcory tree. File names are stored in a RB_Filename structure, directory names in a RB_Path structure. Each RB_Filename contains a pointer (path) to a RB_Path structure that tells in which directory a file is located. Each RB_Path has a pointer (parent) to another RB_Path structure that tells in which directory is a directory located (of which directory it is a subdirectory). The only exception is the root directory. Besides the name of the sourcefile, the RB_Filename also stores the name of the documentation file. For each sourcefile there is an RB_Part structure. It contains a pointer (filename) to the RB_Filename and a list (headers) of RB_Header structure containing the headers found in the sourcefile. Every RB_Header structure contains a pointer (owner) to the RB_Part structure to which it belongs. Headers can form a hierarchy that is used to create sections and subsections in the documentation. To store this hierarchy every RB_header structure contains a pointer (parent) to its parent header. For instance, given the following two headers, SubModule is the parent of SubSubModule. ****h* TopModule/SubModule * **** ****h* SubModule/SubSubModule * **** In the documentation this creates the sections 1.TopModule 1.1 SubModule 1.1.1 SubSubModule The RB_Directory and the linked list of RB_Part structures are stored in a RB_Document structure. During the generation of the documentation ROBODoc tries to create cross links between the mention of a header's name (an object) and the documentation generated from that header (the documentation for the object). To aid this proces there is an array of RB_link structures. This array is sorted for quick searching. RB_link structures the name of a header and the name of the label under which the documentation can be found in the documentation file. AUTHOR See AUTHORS in the archive. CREATION DATE 20-Dec-94 Jacco van Weert. MODIFICATION HISTORY See ChangeLog in the archive. Latest version can be found on: o http://www.xs4all.nl/~rfsber/Robo/ BUGS Other bugs? Catch them in a jar and send them to rfsber -(at)- xs4all.nl --------------------------------------------------------------------------- ROBODoc/UserInterface FUNCTION This module contains functions to parse the command line and inform the user about any errors. --------------------------------------------------------------------------- UserInterface/copying FUNCTION Information about the ROBODoc licence. AUTHOR Frans --------------------------------------------------------------------------- UserInterface/Find_And_Fix_Path FUNCTION Searches through the options to find a path. This path is converted to a propper path if it contains errors such as the use of '\' or when it does not start with ./ or a drive name. The option must exist. INPUTS o option_name -- the option name for the path RESULT o path -- the path. --------------------------------------------------------------------------- UserInterface/Find_Option FUNCTION Search configuration.options for a specific option. RESULT o TRUE -- option does exist o FALSE -- option does not exist --------------------------------------------------------------------------- UserInterface/Find_Parameterized_Option FUNCTION Search for an option of the form --a_option_name a_value in configuration.options. INPUTS optionname -- the name of the option to search for. RESULT NULL if the option is not found, a pointer to the value otherwise. NOTES Results in a Panic if the option is found but no value is specified. --------------------------------------------------------------------------- UserInterface/Fix_Path FUNCTION Add a "./" to a path if it does not start with a "./" or does not contain a ":". If the path was "." just add a "/". Adding a "./" simplifies the creating of relative links during the generation process. INPUTS o path -- the path to be fixed. RESULT A pointer to a newly allocated string containing the path. --------------------------------------------------------------------------- UserInterface/General_Find_Parameterized_Option FUNCTION Search for an option of the form --a_option_name a_value INPUTS o n -- the number of options in the options array. o options -- the options array o optionname -- the name of the option to search for. RESULT NULL if the option is not found, a pointer to the value otherwise. NOTES Results in a Panic if the option is found but no value is specified. --------------------------------------------------------------------------- UserInterface/main FUNCTION Get and parse the arguments. Analyse document and generate the documentation. Everything starts from here. --------------------------------------------------------------------------- UserInterface/Path_Check FUNCTION Test the validity of the doc and source path. The doc path should not be a sub directory of the source path otherwise the generated documentation will be part of the generated documentation if robodoc is run more than once. INPUTS o sourcepath -- the path to the source files. o docpath -- the path to the documentation files. OUTPUT o error messages --------------------------------------------------------------------------- UserInterface/Path_Convert_Win32_to_Unix FUNCTION Although people are supposed to specify all paths with a '/' as seperator, sometimes people on Win32 use '\', this causes problems later on in some other function of robodoc that expect a '/'. So to prevent this we replace all the '\' in a path with '/' In addition people sometimes add a '/' at the end of the path. We remove it. INPUTS o path -- the path. RESULT o path -- the converted path (in a newly allocated block of memory). --------------------------------------------------------------------------- UserInterface/PathBegin_Check FUNCTION Checks the validity of a path. A path should start with ./ or / or have a ':' some where INPUTS o path -- the path to be cheked. RESULT o FALSE -- path is not OK. o TRUE -- path is OK. --------------------------------------------------------------------------- UserInterface/RB_Find_In_Argv_Parameterized_Option FUNCTION Search for an option of the form --a_option_name a_value in argv. The function is used to look for the --rc option that can be used to specify an alternate robodoc configuration file. INPUTS * argc -- the argument count as received by main(). * argv -- the array of argument values as received by main() * optionname -- the name of the option to search for. RESULT NULL if the option is not found, a pointer to the value otherwise. NOTES Results in a Panic if the option is found but no value is specified. --------------------------------------------------------------------------- UserInterface/use NAME use -- usage string FUNCTION Inform the user how to use ROBODoc. AUTHOR Koessi --------------------------------------------------------------------------- Configuration/keywords_hash_s FUNCTION Structure for a keyword hash table row. ATTRIBUTES o keyword -- pointer to the keyword o next -- pointer to next entry in the row --------------------------------------------------------------------------- Configuration/Parameters FUNCTION Structure to store all the paramters found in a block in the robodoc configuation file. ATTRIBUTES o number -- the number of parameters found. o size -- the maximum size of the names array. o names -- an array with the values of the parameters. NOTES Find a better name for the attribute 'names' --------------------------------------------------------------------------- Configuration/RB_Configuration FUNCTION All the data from the robodoc.rc file is stored in this structure. ATTRIBUTES o items -- an array with names that robodoc recognizes as items. Alsways includes the name "SOURCE" as the first element. o ignore_items -- an array with the names of items that ROBODoc should ignore. o source_items -- an array with the names of items that work similar to the built-in SOURCE item. o preformatted_items -- item names that will be automatically preformatted o format_items -- item names that should be formatted by the browser o item_order -- an array with item names that indicates which items should be displayed first. o options -- Array with all options specified both on the commandline as well as in the robodoc.rc file. o custom_headertypes -- list with custom header types. o ignore_files -- list with wildcard expressions that specifies files and directories that robodoc should skip while scanning the source tree. o header_markers -- list with markers that mark the begin of a header. o remark_markers -- list with markers that mark a remark. o end_markers -- list with markers that markt the end of a header. o remark_begin_markers -- list of markers that mark the begin of a remark. For instance (* o remakr_end_markers -- list of markers that mark the end of a remark. For instance *) o keywords -- source keywords to recognise (and colorise) o source_line_comments -- comment markers that span until the end of line o header_ignore_chars -- characters for beginning of header remarks o header_separate_chars -- characters that separates header artifacts --------------------------------------------------------------------------- ROBODoc/Configuration FUNCTION Functions to access the ROBODoc configuration and configuration file (robodoc.rc) or the file specified with the --rc option. The robodoc.rc file consists of a number of blocks. Each block starts with a line of the form : This is followed by a number of lines of data. Each line starts with at least one space followed by the actual data. This module parses this data and stores it in the global configuration. NOTES Is missing a lot of documentation. You can not use RB_Say() in this module since the --tell flag won't be parsed until after this module has finished. --------------------------------------------------------------------------- Configuration/add_keywords_to_hash_table FUNCTION Initalize hash table and add all keywords from configuration.keywords to the hash table --------------------------------------------------------------------------- Configuration/add_to_keywords_hash_table FUNCTION Add a keyword to the hash table INPUTS keyword -- The keyword string --------------------------------------------------------------------------- Configuration/allocate_keywords_hash_table FUNCTION Allocates space for the keyword hash table. The size of the table depends on the number of keywords rounded up to the next power of two. --------------------------------------------------------------------------- Configuration/c_keywords FUNCTION The default C keywords. --------------------------------------------------------------------------- Configuration/configuration FUNCTION This global stores all the configuration parameters specified on the command line and in the robodoc.rc file. --------------------------------------------------------------------------- Configuration/default_item_names FUNCTION Defines the names of items that ROBODoc recognized as items by default if none are specified in the robodoc.rc file. --------------------------------------------------------------------------- Configuration/Find_Keyword FUNCTION Find a keyword in the hash table INPUTS - keyword -- The keyword string - len -- The length of the keyword string RETURN VALUE - pointer to the found keyword string in hash table or - NULL if the keyword is not found --------------------------------------------------------------------------- Configuration/Find_Parameter_Char FUNCTION Checks for the existence of a given configuration parameter (Character match) --------------------------------------------------------------------------- Configuration/Find_Parameter_Exact FUNCTION Checks for the existence of a given configuration parameter (exact string match) --------------------------------------------------------------------------- Configuration/Find_Parameter_Partial FUNCTION Checks for the existence of a given configuration parameter (partial string match) --------------------------------------------------------------------------- Configuration/GetParameters FUNCTION Parse a line of text and store the individual words in a Parameters structure. Words are seperated by spaces, the exception are words surrounded by quotes. So: aap noot mies "back to the future" contains four words. INPUTS o line -- the line of text. o parameters -- the set of parameters --------------------------------------------------------------------------- Configuration/Hash_Keyword FUNCTION Calculate the hash value for a string The hash value is a 32 bit integer based on the hash function written by Bob Jenkins. It is then reduced by an AND operation to the actual size of the hash table. INPUTS - key -- The keyword string - keylen -- The length of the keyword string RETURN VALUE The hash value for the keyword. --------------------------------------------------------------------------- Configuration/Install_C_Syntax FUNCTION Install default C keywords and comments --------------------------------------------------------------------------- Configuration/keywords_hash FUNCTION This is the hash table for the keywords. See keywords_hash_s. --------------------------------------------------------------------------- Configuration/keywords_hash_mask FUNCTION Mask for keyword hash function. This mask reduces the hash value for the actual hash table size. Also the size of the hash table can be derived from this mask: hash table size = keywords_hash_mask + 1 --------------------------------------------------------------------------- Configuration/ReadConfiguration FUNCTION Read the robodoc configuration file, and create a RB_Configuration structure. INPUTS o argc -- the arg count as received by main() o argv -- the arg valules as received by main() o filename -- an optional filename. If none is given, "robodoc.rc" is used. RESULT An initialized configuration (a global). --------------------------------------------------------------------------- Hash_Keyword/HASH_MIX FUNCTION Helper macro for the function Hash_Keyword( ) --------------------------------------------------------------------------- ROBODoc/RB_Path NAME RB_Path -- Path to a file ATTRIBUTES * next -- pointer to the next RB_Path structure. * parent -- the parent path (one directory up). * name -- null terminated string with the name of the path. (Path names can be relative) * docname -- the corresponding docpath. --------------------------------------------------------------------------- Part/RB_Part NAME RB_Part -- a part of the total documentation FUNCTION RB_Parts are stored in RB_Document. For each source file there is an RB_Part. It points to the source file, the documentation file, and contains all the headers that were found in the source file. ATTRIBUTES o next -- pointer to the next part (to form a linked list). o filename -- Information over the path to the sourcefile and the correcsponding documentation file. o headers -- All the headers that were found in the sourcefile. o last_header -- pointer to the last element in the list of headers. This is used to make it possible to add the the heades in the same order as they were found in the source file. --------------------------------------------------------------------------- ROBODoc/Part FUNCTION Structures and functions that deal with documentation parts. A part links a sourcefile to the documentation file and contains all the headers found in a sourcefile. Parts (in the form of struct RB_Part) are stored in a RB_Document structure. --------------------------------------------------------------------------- Part/RB_Free_RB_Part FUNCTION Free the memory used by an RB_Part. Most of this is handled in other functions. INPUTS o part -- the part to be freed. --------------------------------------------------------------------------- Part/RB_Get_RB_Part FUNCTION Create a new RB_Part and initialize it. RESULT A freshly allocated and initializedand RB_Part. --------------------------------------------------------------------------- Part/RB_Open_Source FUNCTION Open the sourcefile of this part. INPUTS o part -- the part for which the file is opened. --------------------------------------------------------------------------- UserInterface/Add_Option_Name FUNCTION Add the name of an option to the group of option names an option test applies to. INPUTS option_test -- the option test name -- the name of the option --------------------------------------------------------------------------- UserInterface/Add_Option_Test FUNCTION Add a test to the linked list of options tests. INPUTS option_test -- the test to be added. --------------------------------------------------------------------------- UserInterface/Check_Item_Options FUNCTION Check the validity of the item options. Users can specify their own items, item order, and items that ar to be ignored. This all should be consistent. RESULT * EXIT_SUCCESS -- all options are correct. * EXIT_FAILURE -- one of more options incorrect. --------------------------------------------------------------------------- UserInterface/Check_Option_Spelling FUNCTION Check for misspelled options specified by the user. RESULT * EXIT_SUCCESS -- all options are correctly spelled. * EXIT_FAILURE -- one of more options are misspelled. --------------------------------------------------------------------------- UserInterface/Check_Options FUNCTION Check the validity of all the options in configuration.options[]. This runs a number of checks. RESULT * EXIT_SUCCESS -- all options are correct. * EXIT_FAILURE -- one of more options incorrect. --------------------------------------------------------------------------- UserInterface/Create_New_Option_Test FUNCTION Allocate and initialize a new option test. INPUTS kind -- the kind of test that has to be created. --------------------------------------------------------------------------- UserInterface/Create_Test_Data FUNCTION Create a linked list of tests. TODO Generate this code automatically from a set of high-level specifications. --------------------------------------------------------------------------- UserInterface/Do_Mutual_Exlcude_Test FUNCTION Check all the options to see if combinations of options are used that mutually exclude each other, such as --singledoc and --multidoc. INPUTS * cur_option_test -- the test to be carried out. --------------------------------------------------------------------------- UserInterface/Do_Option_Tests FUNCTION Run a series of tests on the options that the user specified. These tests are specified in option_tests. RESULT * EXIT_FAILURE -- one of the tests failed. * EXIT_SUCCESS -- all test completed successfully --------------------------------------------------------------------------- UserInterface/ok_options FUNCTION An list of all allowed command-line options. If you add any options add its name here too. This list is used to verify the options specified by the user. --------------------------------------------------------------------------- UserInterface/Option_Test_Kind FUNCTION Enumeration for the kind of tests that are carried out on the options that the user specifies. --------------------------------------------------------------------------- UserInterface/option_tests FUNCTION A linked lists of tests that check the options specified by the user. --------------------------------------------------------------------------- UserInterface/RB_Option_Name FUNCTION Element in a list of option names. Used in a RB_Option_Test to specify to what options a test applies. --------------------------------------------------------------------------- UserInterface/RB_Option_Test FUNCTION A test specification for options. This stores information about the kind of test and the options it applies to, and the message that is given to the user. --------------------------------------------------------------------------- ROBODoc/Makefile.plain NAME Makefile.plain -- Plain makefile that does not need autoconf PURPOSE The makefile GCC. You can use it if you are on a non Unix system or a system that does not support autoconfiguration. The following targets are the most useful for the user: * robodoc - makes the robodc executable. * example - makes robodoc and shows you the autodocs generated from the ROBODoc source code using browser. * html - makes autodocs for robodoc in html format. To build robodoc use: * make -f makefile.plain robodoc Developers might try: * depend - create dependencies * test - * count - * clean - NOTES This documentation is not complete. It is just a test to see how to best use ROBODoc with makefiles. --------------------------------------------------------------------------- Makefile.plain/clean NAME clean -- Clean up the mess we made. FUNCTION Cleans up the mess we made. --------------------------------------------------------------------------- Makefile.plain/count NAME count -- count the number of lines of the ROBODoc source. --------------------------------------------------------------------------- Makefile.plain/example NAME example -- create and show autodocs extracted from ROBODoc source. FUNCTION --------------------------------------------------------------------------- Makefile.plain/robodoc NAME robodoc -- NOTE This assumes that you version of make knows how to make an .o file out of an .c file. --------------------------------------------------------------------------- Makefile.plain/robohdrs NAME robohdrs -- --------------------------------------------------------------------------- Makefile.plain/test NAME test -- run some tests FUNCTION Runs robodoc on file with a number of different headers. --------------------------------------------------------------------------- Makefile.plain/xcompile NAME xcompile NOTE Cross-compile Wintel binary. Consider `apt-get install mingw32' before running this. RESULT Excutable `robodoc.exe' is created. --------------------------------------------------------------------------- Makefile.plain/xcompiler-test NAME xcompiler-test NOTE Used by do.sh. RESULT Exit status 0 if cross-compiler is found. --------------------------------------------------------------------------- ROBODoc/makefile.mingw-cygwin NAME makefile.mingw-cygwin -- Plain makefile that does not need autoconf PURPOSE The makefile for MingW Minimalist GNU for Windows under the Cygwin environment, See: * http://www.mingw.org, * http://www.cygwin.com You can use it if you are on a win32 system. The following targets are the most useful for the user: * robodoc - makes the robodoc executable. Developers might try: * test - run system tests * clean - clean all results. EXAMPLES make -f makefile.mingw-cygwin robodoc make -f makefile.mingw-cygwin test make -f makefile.mingw-cygwin clean --------------------------------------------------------------------------- makefile.mingw-cygwin/CFLAGS FUNCTION Defined the flags used for the C compiler: * -W, -Wall and -std=gnu99 -- This turns on all warnings based on the C99 standard. Making the source warning free for an earlier standard is not necessary as this code is compiled on Unix, Windows, and Mac systems that all have C99 compliant C compilers. It also allows some gnu extensions. Using -std=c99 gives some spurious warnings about popen() * -O3 -- optimize, turning optimization on finds more errors and warnings. * -mno-cygwin -- Tells gcc not to link with cygwin1.dll but use the windows standard C library. (make mingw windows native executable under cygwin) * -s -- Strip debug info out from objects, making the executable smaller * -g -- Include all debugger info for GDB --------------------------------------------------------------------------- makefile.mingw-cygwin/clean NAME clean -- Clean up the mess we made. FUNCTION Cleans up the mess we made. --------------------------------------------------------------------------- makefile.mingw-cygwin/robodoc NAME robodoc -- NOTE This assumes that your version of make knows how to make an .o file out of an .c file. --------------------------------------------------------------------------- makefile.mingw-cygwin/robohdrs NAME robohdrs -- --------------------------------------------------------------------------- makefile.mingw-cygwin/SOURCES FUNCTION All source files needed to compile ROBODoc --------------------------------------------------------------------------- makefile.mingw-cygwin/test NAME test -- run some tests FUNCTION Runs robodoc on file with a number of different headers. --------------------------------------------------------------------------- ROBODoc/Lua_Generator FUNCTION Shell generator that actually gives data to a Lua script. Supports singledoc mode. AUTHOR Jeremy Cowgar NOTES No code defined yet. This is just a shell. --------------------------------------------------------------------------- Links/RB_link NAME RB_link -- link data structure PURPOSE Structure to store links to the documentation of an component. ATTRIBUTES * label_name -- the label under which the component can be found. this should be a unique name. * object_name -- the proper name of the object * file_name -- the file the component can be found in. * type -- the type of component (the header type). * is_internal -- is the header an internal header? --------------------------------------------------------------------------- ROBODoc/Links FUNCTION This module contains functions to manipulate links. Links are derived from headers. They are used to create links in the documentation between a word and the part of the documentation that explains something about that word. (For instance a function name or variable name). In addition to the links derived from the headers links are also derived from the names of all the sourcefiles. MODIFICATION HISTORY ????-??-?? Frans Slothouber V1.0 2003-02-03 Frans Slothouber Refactoring --------------------------------------------------------------------------- Links/Find_Link NAME Find_Link -- try to match word with a link FUNCTION Searches for the given word in the list of links and headers. There are three passes (or four, when the C option is selected). Each pass uses a different definition of "word": o In the first pass it is any thing that ends with a 'space', a '.' or a ','. o In the second pass it is any string that consists of alpha numerics, '_', ':', '.', or '-'. o In the third pass (for C) it is any string that consists of alpha numerics or '_'. INPUTS o word_begin - pointer to a word (a string). o object_name - pointer to a pointer to a string o file_name - pointer to a pointer to a string SIDE EFFECTS label_name & file_name are modified RESULT o object_name -- points to the object if a match was found, NULL otherwise. o file_name -- points to the file name if a match was found, NULL otherwise. o label_name -- points to the labelname if a match was found, o TRUE -- a match was found. o FALSE -- no match was found. NOTES This is a rather sensitive algorithm. Don't mess with it too much. --------------------------------------------------------------------------- Links/RB_Alloc_Link NAME RB_Alloc_Link -- oop FUNCTION allocate struct + strings INPUTS char *label_name -- strings to copy into the link char *file_name RESULT struct RB_link * -- ready-to-use AUTHOR Koessi SEE ALSO RB_StrDup(), RB_Free_Link() --------------------------------------------------------------------------- Links/RB_CollectLinks FUNCTION Convert header information into link information. RB_header -> RB_link conversion INPUTS * document -- * headers -- the array with headers. * count -- number of headers in the array OUTPUT * link_index -- an array with links * link_index_size -- the number of links in the array. --------------------------------------------------------------------------- Links/RB_Free_Link NAME RB_Free_Link -- oop FUNCTION free struct + strings INPUTS struct RB_link *link AUTHOR Koessi SEE ALSO RB_Alloc_Link(), RB_Close_The_Shop() --------------------------------------------------------------------------- Links/RB_Free_Links FUNCTION Deallocate all the memory used to store the links. INPUTS o link_index_size o link_index[] BUGS Should use RB_Free_Link instead of doing everything by it self. --------------------------------------------------------------------------- Items/ItemLineKind FUNCTION Holds the type of an item line --------------------------------------------------------------------------- Items/ItemTypes NAME ItemTypes -- enumeration of item types FUNCTION Defines a number of item types. There are two kind of items: * the SOURCE item which is always available, * and items defined by the user (or through the default items). NOTES Never check an item type against SOURCECODE_ITEM directily! Use Works_Like_SourceItem() function instead. --------------------------------------------------------------------------- Items/RB_Item FUNCTION Keeps track of where items start end end in the header. The index numbers point to the lines array in RB_header. --------------------------------------------------------------------------- Items/RB_Item_Line FUNCTION Holds the attributes and the content of an item line ATTRIBUTES * line -- The contents of the item line * kind -- The type of the line (see: ItemLineKind) * format -- Formatting attributes for the line * pipe_mode -- The output mode * line_number -- The original source line number of the line --------------------------------------------------------------------------- ROBODoc/Items FUNCTION This module contains functions that deal with items. The documentation consists of headers, and headers contains one of more items. Each item has a name and a body. All possible items are listed in configuration.items. A uses can specify that certain items are not to be added to the documentation. These items are listed in configuration.ignore_items. AUTHOR Frans Slothouber --------------------------------------------------------------------------- HeaderTypes/Is_Format_Item FUNCTION Tells wether this item should be formatted by the browser SYNPOPSIS INPUTS item_type -- Type of item (also the index to the item name) RESULT TRUE -- Item should be formatted by the browser FALSE -- Item should be left alone --------------------------------------------------------------------------- HeaderTypes/Is_Preformatted_Item FUNCTION Tells wether this item should be automatically preformatted in the output. SYNPOPSIS INPUTS item_type -- Type of item (also the index to the item name) RESULT TRUE -- Item should be automatically preformatted FALSE -- Item should NOT be automatically preformatted --------------------------------------------------------------------------- HeaderTypes/Works_Like_SourceItem FUNCTION Tells wether this item works similar to the source item, that is weather it copies it's content verbatim to the output document. SYNPOPSIS INPUTS item_type -- Type of item (also the index to the item name) RESULT TRUE -- Item works like a SOURCE item FALSE -- Item does NOT work like a SOURCE item --------------------------------------------------------------------------- Items/item_name_buffer FUNCTION Stores the name of the last item that was found. --------------------------------------------------------------------------- Items/RB_Create_Item --------------------------------------------------------------------------- Items/RB_Get_Item_Type FUNCTION return the item_type represented by the given string. INPUTS char *cmp_name -- item_name to evaluate RESULT int -- the right item_type or NO_ITEM --------------------------------------------------------------------------- Items/RB_Is_ItemName FUNCTION Is there an itemname in the line. Ignores leading spaces and remark markers. INPUTS line -- line to be searched. RESULT The kind of item that was found or NO_ITEM if no item could be found. The name of the item will be stored in item_name_buffer. NOTES We used to check for misspelled items names by testing if the item name buffer consists of only upper case characters. However checking for a misspelled item name this way results in many false positives. For instance many warnings are given for FORTRAN code as all the keywords are in uppercase. We need to find a better method for this. --------------------------------------------------------------------------- ROBODoc/HTML_Generator FUNCTION The generator for HTML output. The generator supports sections upto 7 levels deep. It supports a Table of Contents based on all headers. A masterindex for all headertypes and seperate masterindexes for each headertype. MODIFICATION HISTORY 2003-02-03 Frans Slothouber Refactoring ????-??-?? Frans Slothouber V1.0 --------------------------------------------------------------------------- HTML_Generator/RB_Create_CSS FUNCTION Create the .css file. Unless the user specified it's own css file robodoc creates a default one. For multidoc mode the name of the .css file is robodoc.css For singledoc mode the name of the .css file is equal to the name of the documentation file. INPUTS o document -- the document for which to create the file. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Color_String FUNCTION Generates various colored strings --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Char NAME RB_HTML_Generate_Char -- generate a single character for an item. FUNCTION This function is called for every character that goes into an item's body. This escapes all the reserved HTML characters such as '&', '<', '>', '"'. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Doc_Start NAME RB_HTML_Generate_Doc_Start -- FUNCTION Generate the first part of a HTML document. As far as ROBODoc is concerned a HTML document consists of three parts: * The start of a document * The body of a document * The end of a document INPUTS o dest_doc -- the output file. o src_name -- The file or directoryname from which this document is generated. o name -- The title for this document o dest_name -- the name of the output file. o charset -- the charset to be used for the file. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Extra FUNCTION Do some additional processing to detect HTML extra's like file references and other kind of links for the documentation body of an item. INPUTS o dest_doc -- the file to write to. o item_type -- the kind of item the body belongs to. o cur_char -- pointer to a substring of the item's body o prev_char -- the character just before cur char (zero if none) RESULTS Number of characters produced. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Index_Page FUNCTION Generate a single file with a index table for headers of one specific type of headers INPUTS o document -- the document o header_type -- the type for which the table is to be generated. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_IndexMenu FUNCTION Generates a menu to jump to the various master index files for the various header types. The menu is generated for each of the master index files. The current header type is highlighted. INPUTS * dest_doc -- the output file. * filename -- the name of the output file * document -- the gathered documention. * cur_headertype -- the header type that is to be highlighted. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Item_Line_Number FUNCTION Generate line numbers for SOURCE like items INPUTS o dest_doc -- the file to write to. o line_number_string -- the line number as string. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Label FUNCTION Generate a label (name) that can be refered too. A label should consist of only alphanumeric characters so all 'odd' characters are replaced with their ASCII code in hex format. INPUTS o dest_doc -- the file to write it to. o name -- the name of the label. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Line_Comment_End FUNCTION Check if a line comment is active and generate ending sequence for it. Should be called at the end of each SOURCE line. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_Link NAME RB_HTML_Generate_Link -- INPUTS cur_doc -- the file to which the text is written cur_name -- the name of the destination file (the file from which we link) filename -- the name of the file that contains the link (the file we link to) labelname-- the name of the unique label of the link. linkname -- the name of the link as shown to the user. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_Generate_TOC_Section FUNCTION Create a table of contents based on the hierarchy of the headers starting for a particular point in this hierarchy (the parent). INPUTS o dest_doc -- the file to write to. o dest_name -- the name of this file. o parent -- the parent of the headers for which the the current level(depth) of TOC is created. o headers -- an array of headers for which the TOC is created o count -- the number of headers in this array o depth -- the current depth of the TOC NOTES This is a recursive function and tricky stuff. --------------------------------------------------------------------------- HTML_Generator/RB_HTML_RelativeAddress FUNCTION Link to 'that' from 'this' computing the relative path. Here 'this' and 'that' are both paths. This function is used to create links from one document to another document that might be in a completely different directory. EXAMPLE The following two this /sub1/sub2/sub3/f.html that /sub1/sub2/g.html result in ../g.html this /sub1/f.html that /sub1/sub2/g.html == ./sub2/g.html this /sub1/f.html that /sub1/g.html == ./g.html this /sub1/doc3/doc1/tt.html that /sub1/doc5/doc2/qq.html == ../../doc5/doc2/qq.html NOTES Notice the execelent docmentation. --------------------------------------------------------------------------- Headers/RB_HeaderType NAME RB_HeaderType -- Information about a header type ATTRIBUTES o typeCharacter -- The character used to indicate it o indexName -- The name used for the master index o fileName -- The name of the file use to store the master index for this type of headers. o priority -- The sorting priority of this header. Higher priorities appear first --------------------------------------------------------------------------- ROBODoc/HeaderTypes FUNCTION Headers come in different types. This module defines what kind of headertypes ROBODoc recognizes, and contains functions to add new headertypes and to compare headertypes. All the headertypes are stored in an array, header_type_lookup_table. --------------------------------------------------------------------------- HeaderTypes/header_type_lookup_table FUNCTION A lookup table for all the header types that ROBODoc recognizes. At the moment is has about 127 entries. About as many as there are characters in the standard ASCII set. The first 32 entries can be used for special purposes. Two of them are use: HT_MASTERINDEXTYPE and HT_SOURCEHEADERTYPE HT_MASTERINDEXTYPE is a wildcard type. All headertypes match this type. This is used to collect all the headers for the masterindex. HT_SOURCEHEADERTYPE is used to pretend that the name of a sourcefile is a kind of header. This makes it possible to include the names of the source files in the master index. --------------------------------------------------------------------------- HeaderTypes/RB_AddHeaderType FUNCTION Add a new headertype to the list of header type that robodoc recognizes. RESULT * FALSE -- it is a new header type. * TRUE -- header type already existed. --------------------------------------------------------------------------- HeaderTypes/RB_CompareHeaderTypes FUNCTION Compare two header types and check if they are equal. If one of the header types is a HT_MASTERINDEXTYPE the comparison is always TRUE. (This to make sure that all headers appear in the Index.) INPUTS o ht1 and ht2 -- the header types to compare. RESULT o 0 -- header types are not equal o != 0 -- header type are equal --------------------------------------------------------------------------- HeaderTypes/RB_FindHeaderType FUNCTION Return the header type that corresponds to the type character. RESULT * 0 -- there is no such header type * pointer to the header type otherwise. --------------------------------------------------------------------------- HeaderTypes/RB_IsInternalHeader FUNCTION Given the typeCharacter is this an internal header? RESULT * TRUE -- yes it is * FALSE -- no it is not --------------------------------------------------------------------------- Headers/end_remark_constants NAME end_remark_constants -- numerals for end_markers NOTE Most of them seem to be unused at the moment. But it's better to keep it up to date for the eventuality of a later use by robohdrs. --------------------------------------------------------------------------- Headers/RB_header FUNCTION This structure is used to store the headers that are extracted from the source files. MODIFICATION HISTORY * 8. August 1995: Koessi changed int version to char *version * 5. December 2007: Budai changed the type of lines from char to struct RB_header_lines ATTRIBUTES * next -- used to store RB_headers in a RB_Part as a linked list. * parent -- the parent of this header * name -- the full name of the header modulename/functionname [versioninfo] * owner -- the Part that owns this header. * htype -- the type of this header. * items -- pointers to the items in this header. * version -- unused * function_name -- the functionname ( a better name would be objectname or thingy name, it is the name of the thing that is being documented ). * module_name -- the modulename * unique_name -- unique name used for labels. * file_name -- documentation file of this header. * lines -- content of the header with line numbers * no_lines -- number of lines in the content. * line_number -- the line number at which the header was found in the source file. --------------------------------------------------------------------------- Headers/src_constants NAME src_constants -- numerals for header_markers NOTE Most of them seem to be unused at the moment. But it's better to keep it up to date for the eventuality of a later use by robohdrs. --------------------------------------------------------------------------- Headers/src_remark_constants NAME src_remark_constants -- numerals for remark_markers NOTE Most of them seem to be unused at the moment. But it's better to keep it up to date for the eventuality of a later use by robohdrs. --------------------------------------------------------------------------- RB_header/RB_header_line FUNCTION This structure holds the content of one header line and the original source line number of it. ATTRIBUTES * line_number -- The original source file line number for this line * line -- The content of the source file line --------------------------------------------------------------------------- ROBODoc/Headers FUNCTION This module contains a set of variables that define how headers start and how they end in various programming languages. NOTES Added C++/ACM header option (David White) Enables documentation only comments (//!) to be extracted from C++ and ACM files, rather than all comments. --------------------------------------------------------------------------- Headers/end_markers NAME end_markers -- strings that mark the end of a header. FUNCTION These specify what robodoc recognizes as the end of a documentation header. In most cases this will be "***" or " ***". If the header contains a SOURCE item then the end of the source has to be marked, which is when the other strings in this array are used. NOTE The numbers at the beginning of the lines make it easier to find a special index-number. --------------------------------------------------------------------------- Headers/end_remark_markers NAME end_remark_markers -- strings that mark the end of a comment. NOTE The numbers at the beginning of the lines make it easier to keep them in sync with the end_remark_constants --------------------------------------------------------------------------- Headers/header_markers NAME header_markers -- strings that mark the begin of a header. FUNCTION These specify what robodoc recognizes as the beginning NOTE The numbers at the beginning of the lines make it easier to keep them in sync with the src_constants of a header. --------------------------------------------------------------------------- Headers/RB_Has_Remark_Marker FUNCTION Check if a line starts with a remark marker. This function assumes that the remark marker starts on the first character of the line. INPUTS o lline_buffer -- the line of text. RESULT o TRUE -- it starts with a remark marker o FALSE -- it does not. --------------------------------------------------------------------------- Headers/RB_Is_End_Marker FUNCTION Scan a line and see if any of the end of a header markers defined in header_markers can be found. INPUTS cur_line -- line to be searched. OUTPUT none RESULT TRUE -- an end header was found FALSE -- none was found. --------------------------------------------------------------------------- Headers/RB_Skip_Remark_Marker NAME RB_Skip_Remark_Marker FUNCTION Scan and search for a recognized remark marker; skip past the marker to the body of the text --------------------------------------------------------------------------- Headers/remark_markers NAME remark_markers FUNCTION These specify what robodoc recognizes as a comment marker. TODO (1) All the markers that start with one or more spaces are never recognized, and should be removed. (2) The numbers at the beginning of the lines make it easier to keep them in sync with the src_remark_constants --------------------------------------------------------------------------- Headers/robo_end NAME robo_end[] -- the distinct robodoc end marker - alternative to using end_markers FUNCTION This is an alternative to using end_markers - sometimes ROBODOC confuses asterisks commonly used in comments as an end marker. To use this footer instead of end_markers use the -rh switch. NOTE Added by David Druffner. --------------------------------------------------------------------------- Headers/robo_header NAME robo_header -- the distinct robodoc header - alternative to using header_markers FUNCTION This is an alternative to using header_markers - sometimes ROBODOC confuses asterisks commonly used in comments as a header. To use this header instead of header_markers use the -rh switch. NOTE Added by David Druffner. OBSOLETE --------------------------------------------------------------------------- ROBODoc/Globals FUNCTION A number of global variables. TODO Documentation. --------------------------------------------------------------------------- Globals/course_of_action NAME course_of_action FUNCTION Global Variable that defines the course of action. --------------------------------------------------------------------------- Globals/debugmode NAME debugmode FUNCTION A bitfield determining the output levels --------------------------------------------------------------------------- Globals/document_title NAME documentat_title -- title for the documentation. PURPOSE Used as the title for master index files or for latex documentation. --------------------------------------------------------------------------- Globals/line_buffer NAME line_buffer -- global line buffer FUNCTION Temporary storage area for lines that are read from an input file. --------------------------------------------------------------------------- Globals/line_number NAME line_number -- global line counter PURPOSE Keeps track of the number of lines that are read from the source file. AUTHOR Koessi --------------------------------------------------------------------------- Globals/myLine NAME myLine -- dynamic buffer for current line FUNCTION Temporary storage area for lines that are read from an input file. --------------------------------------------------------------------------- Globals/output_mode NAME output_mode -- the mode of output FUNCTION Controls which type of output will be generated. --------------------------------------------------------------------------- Globals/readChars NAME readChars -- number of characters in the currently bufferd line FUNCTION Temporary storage area for lines that are read from an input file. --------------------------------------------------------------------------- ROBODoc/Generator FUNCTION This contains routines to generate the documentation from the headers collected from the source code. It contains functionality common for all document types (HTML, RTF etc). The specifics are handled in the modules for each of the several document types. The behaviour of many of the functions in this module are modified by the global output_mode. The general call sequence is as follows: RB_Generate_Documentation +> RB_Generate_SingleDoc +> RB_Generate_Part +> Generate_Header +> Generate_Item_Line +> Generate_Char BUGS o Confusing use of doctype and output mode. NOTES Might be a good idea to replace all the switch statements with function pointers. So instead of: switch (output_mode) { case HTML: RB_HTML_Generate_Doc_Start(dest_doc, src_name, name, toc); break; case LATEX: RB_LaTeX_Generate_Doc_Start(dest_doc, src_name, name, toc); break; case RTF: RB_RTF_Generate_Doc_Start(dest_doc, src_name, name, toc); break; case ASCII: RB_ASCII_Generate_Doc_Start(dest_doc, src_name, name, toc); break; case TROFF: RB_TROFF_Generate_Doc_Start(dest_doc, src_name, name, toc); break; default: break; } we will have (*rb_generate_doc_start)(dest_doc, src_name, name, toc); were the function pointers are initialized at program start based on the output mode. --------------------------------------------------------------------------- Generator/Generate_Char FUNCTION Generate a single character in the current output mode. The individual generators will make sure that special characters are escaped. INPUTS * dest_doc -- destination file. * cur_char -- character to be generated. --------------------------------------------------------------------------- Generator/Generate_Header FUNCTION Generate the documentation for all the items found in a header except for any items specified in configuration.ignore_items. INPUTS * f -- destination file * header -- header to be searched. * srcname -- name of the source file the header was found in. * docname -- name of the documentation file. BUGS This skips the first item body if the first item name was not correctly spelled. --------------------------------------------------------------------------- Generator/Generate_Index NAME Generate_Index -- generate index file based on xref files. FUNCTION Create a master index file. It contains pointers to the documentation generated for each source file, as well as all "objects" found in the source files. --------------------------------------------------------------------------- Generator/Generate_Item FUNCTION Generate the documentation for a single item. NOTE This function is way too long... --------------------------------------------------------------------------- Generator/Generate_Item_Name NAME Generate_Item_Name -- fast&easy FUNCTION write the item's name to the doc INPUTS o FILE* dest_doc -- destination file o int item_type -- the type of item AUTHOR Koessi NOTES uses globals: output_mode --------------------------------------------------------------------------- Generator/Generate_Label FUNCTION Generate a label that can be used for a link. For instance in HTML this is INPUTS * dest_doc -- file to be written to * name -- the label's name. * output_mode -- global with the current output mode --------------------------------------------------------------------------- Generator/Generate_Link FUNCTION Generate a link to another headers documentation. INPUTS * dest_doc -- the output file * docname -- the name of the output file * file_name -- the name of the file that contains the link's body * label_name -- the label for the link * function_name -- the name that is shown for the link in the documentation --------------------------------------------------------------------------- Generator/RB_Add_Extension FUNCTION Add an extension to the filename base based on on the current output mode. INPUTS * doctype -- output mode * name -- the name of the file without extension and with enough room left to add the extension. OUTPUT name -- the name of the file including the extension. --------------------------------------------------------------------------- Generator/RB_Generate_BeginSection FUNCTION Generate a section of level depth in the current output mode. This is used for the --sections option. Where each header is placed in a section based on the header hierarchy. INPUTS * dest_doc -- the destination file. * doctype -- document type * depth -- the level of the section * name -- the name of the section * header -- pointer to the header structure * output_mode -- global with the current output mode. --------------------------------------------------------------------------- Generator/RB_Generate_Doc_End NAME RB_Generate_Doc_End -- generate document trailer. FUNCTION Generates for depending on the output_mode the text that will be at the end of a document. INPUTS o dest_doc - pointer to the file to which the output will be written. o name - the name of this file. o output_mode - global variable that indicates the output mode. NOTES Doesn't do anything with its arguments, but that might change in the future. BUGS --------------------------------------------------------------------------- Generator/RB_Generate_Doc_Start NAME RB_Generate_Doc_Start -- Generate document header. FUNCTION Generates for depending on the output_mode the text that will be at the start of a document. Including the table of contents. INPUTS o dest_doc - pointer to the file to which the output will be written. o src_name - the name of the source file or directory. o name - the name of this file. o output_mode - global variable that indicates the output mode. o toc - generate table of contens SEE ALSO RB_Generate_Doc_End --------------------------------------------------------------------------- Generator/RB_Generate_Documentation FUNCTION Generate the documentation for all the information contained in a RB_Document structure. INPUTS document -- pointer to the RB_Document structure. --------------------------------------------------------------------------- Generator/RB_Generate_DOT_Image_Link FUNCTION Generates the image link for the created dot graphics --------------------------------------------------------------------------- Generator/RB_Generate_EndSection FUNCTION Generate the end of a section base on the current output mode. The functions is used for the --section option. It closes a section in the current output mode. INPUTS * dest_doc -- the destination file. * doctype -- * depth -- the level of the section * name -- the name of the section * output_mode -- global with the current output mode. --------------------------------------------------------------------------- Generator/RB_Generate_Header_End NAME RB_Generate_Header_End FUNCTION Generates for depending on the output_mode the text that will be at the end of a header. This function is used if the option --section is _not_ used. INPUTS o dest_doc - pointer to the file to which the output will be written. o cur_header - pointer to a RB_header structure. SEE ALSO RB_Generate_Header_Start, RB_Generate_EndSection, RB_Generate_BeginSection --------------------------------------------------------------------------- Generator/RB_Generate_Header_Start NAME RB_Generate_Header_Start -- generate header start text. FUNCTION Generates depending on the output_mode the text that will be at the end of each header. INPUTS o dest_doc - pointer to the file to which the output will be written. o cur_header - pointer to a RB_header structure. SEE ALSO RB_Generate_Header_End --------------------------------------------------------------------------- Generator/RB_Generate_Index_Entry FUNCTION Generate an entry for an auto generated index. This works only for output modes that support this, LaTeX for instance. This has nothting to do with the master index. INPUTS * dest_doc -- the destination file. * header -- pointer to the header the index entry is for. * output_mode -- global with the current output mode. --------------------------------------------------------------------------- Generator/RB_Generate_Item_Begin FUNCTION Generate the begin of an item. This should switch to some preformatted output mode, similar to HTML's
.
INPUTS
   dest_doc -- file to be written to
   output_mode -- global with the current output mode

---------------------------------------------------------------------------
Generator/RB_Generate_Item_End

FUNCTION
   Generate the end of an item.  This should switch back from the
   preformatted mode.  So in HTML it generates the 
of a
   
pair. INPUTS * dest_doc -- file to be written to * output_mode -- global with the current output mode --------------------------------------------------------------------------- Generator/RB_Generate_Item_Line_Number FUNCTION Generate line numbers for SOURCE like items INPUTS o dest_doc -- the file to write to. o line_number -- the actual line number. o max_lines -- the maximal line number in this item. --------------------------------------------------------------------------- Generator/RB_Generate_MultiDoc FUNCTION Create documentation by creating a file for each individual source file that was scanned. INPUTS document -- pointer to the RB_Document structure. --------------------------------------------------------------------------- Generator/RB_Generate_Part FUNCTION Generate the documention for all the headers found in a single source file. INPUTS * document_file -- The file were it stored. * document -- All the documentation. * part -- pointer to a RB_Part that contains all the headers found in a single source file. --------------------------------------------------------------------------- Generator/RB_Generate_Section FUNCTION Generate the documentation for a header and all its childern. INPUTS o document_file -- destination file o parent -- the parent of the header for which the documentation is to be generated. o document -- pointer to the RB_Document structure. o depth -- level of sectioning ( 1 1.1 1.1.1 etc) NOTE This is a recursive function. SEE ALSO RB_Generate_Sections --------------------------------------------------------------------------- Generator/RB_Generate_Sections FUNCTION Creates the documentation for all headers found in all source files. The order in which they are generated depends on the header hierarchy. First the top level header's documentation is generated then, the documentation for all it's childern, then the next top level header's documentation is generated. This is a recursive proces. The idea is to create something like: 1. Parentheader1 1.1 Child1 1.2 Child2 1.2.1 Child's child1 2. Parentheader2 etc INPUTS o document_file -- destination file. o document -- pointer to the RB_Document structure. --------------------------------------------------------------------------- Generator/RB_Generate_SingleDoc FUNCTION Create documentation by creating a single file for all individual source file that were scanned. This function is called when the option --singledoc is used. Based on whether the option --sections is used this function then calls RB_Generate_Sections or RB_Generate_Part INPUTS document -- pointer to the RB_Document structure. --------------------------------------------------------------------------- Generator/RB_Generate_TOC_2 FUNCTION Create a Table of Contents based on the headers found in _all_ source files. There is also a function to create a table of contents based on the headers found in a single source file RB_Generate_TOC_1 INPUTS * dest_doc -- the destination file. * headers -- an array of pointers to all the headers. * count -- the number of pointers in the array. * output_mode -- global with the current output mode. * owner -- The owner of the TOC. Only the headers that are owned by this owner are included in the TOC. Can be NULL, in which case all headers are included. --------------------------------------------------------------------------- Generator/RB_Get_DOT_Type FUNCTION Returns the type of the DOT file for the given output mode --------------------------------------------------------------------------- Generator/RB_Get_SubIndex_FileName FUNCTION Get the name of the master index file for a specific header_type. INPUTS * docroot -- the path to the documentation directory. * extension -- the extension for the file * header_type -- the header type RESULT a pointer to a freshly allocated string. NOTES Has too many parameters. --------------------------------------------------------------------------- Generator/RB_Name_Headers FUNCTION Give all headers a unique name. This makes sure that if two headers have the same name linking to one of the headers still works. --------------------------------------------------------------------------- Generator/RB_Sort_Items FUNCTION Sort the items in all the headers according to the order specified in the 'item order' block in the robodoc.rc file. --------------------------------------------------------------------------- Filename/RB_Filename NAME RB_Filename -- ATTRIBUTES * next pointer to the next RB_File. * name null terminated string with the name of the file, (Without the path, but including the extension). * fullname * path pointer to a RB_Path structure that holds the path for this file. * link The link used to represent this file while in multidoc mode. --------------------------------------------------------------------------- ROBODoc/Filename NAME Functions to deal with keeping track of filenames and directory names. --------------------------------------------------------------------------- Filename/Get_Fullname NAME Get_Fullname -- FUNCTION Give the full name of the file, that is the name of the file including the extension and the path. The path can be relative or absolute. NOTE The string returned is owned by this function so don't change it. --------------------------------------------------------------------------- Filename/RB_Get_Extension NAME RB_Get_Extension -- FUNCTION Give the extension of this file. That is the part after the last '.' if there is any. RESULT pointer to the extension pointer to a '\0' if no extension was found. NOTE The string returned is owned by this function so don't change it. --------------------------------------------------------------------------- Filename/RB_Get_Filename NAME RB_Get_Filename -- FUNCTION Give the name of this file. That is the name of the file without its path but with the extension. RESULT pointer to the extension pointer to a '\0' if no extension was found. NOTE The string returned is owned by this function so don't change it. --------------------------------------------------------------------------- Filename/RB_Get_Path FUNCTION Give the path for this file. NOTE The string returned is owned by this function so don't change it. --------------------------------------------------------------------------- Filename/RB_Get_RB_Filename NAME RB_Get_RB_Filename INPUTS o arg_rb_filename -- o arg_rb_path -- FUNCTION Create a new RB_Filename structure based on arg_filename and arg_rb_path. --------------------------------------------------------------------------- Document/RB_Document NAME RB_Document -- Information store. FUNCTION A document is a collection of source files and documentation files. Depending on the mode that is used there is either a single documentation file or there is one documentation file for each source file. This mapping is stored in RB_Document. For each source file there is an RB_Part. It points to the source file, the documentation file, and contains all the headers that were found in the source file. ATTRIBUTES * links -- linked list of all links. * parts -- linked list of all parts. * no_headers -- total number of headers * headers -- array of pointers to all the headers. * srctree -- the list of all sourcefiles in the srcroot. * doctype -- the kind of documentation to be generated. * actions -- what to de while analysing en generating. * srcroot -- root dir for the sourcecode. * docroot -- root dir for the documentation. * charset -- the character set used for HTML and XML documentation. * first_section_level -- level of the first section, Defaults to 1 so the first section will be 1. If set to 2 the first section will be 1.1 * extension -- the extension used for the documentation files. * css -- the cascading style sheet to be used. * cur_part -- unused TODO remove. --------------------------------------------------------------------------- ROBODoc/Document FUNCTION This module contains functions to manipulate the central data structure (RB_Document) that contains information about the source files, and documentation files, and headers. The name is a bit confusing because it sort of implies that it contains the documentation extracted from the sourcefiles. For each run a RB_Document structure is created, it is filled by the analyser and directory module and then used by the generator module to create the documentation. MODIFICATION HISTORY * ????-??-?? Frans Slothouber V1.0 * 2003-02-03 Frans Slothouber Refactoring * 2003-10-30 David White Removed unistd.h for Borland --------------------------------------------------------------------------- Document/RB_Document_Add_Part FUNCTION Add a new part to the document. INPUTS o document -- the document the part is to be added to. o part -- the part to be added --------------------------------------------------------------------------- Document/RB_Document_Collect_Headers FUNCTION Create a table of pointers to all headers. This is done to have easy access to all heades without having to scan all RB_Parts. INPUTS o document -- the document for which the table is created. OUTPUT o document->headers o document->no_headers --------------------------------------------------------------------------- Document/RB_Document_Create_DocFilePaths FUNCTION This function creates the whole document directory tree. It tests if the directories exist and if they do not the directory is created. INPUTS o document -- the document for which the tree is created. --------------------------------------------------------------------------- Document/RB_Document_Create_Parts FUNCTION Create all the parts of a document based on the sourcefiles in the source tree. This creates a new RB_Part for each file in the source tree. INPUTS o document -- the document for which the parts are generated. --------------------------------------------------------------------------- Document/RB_Document_Determine_DocFilePaths FUNCTION Determine the path of each of the documentation files based on the path of the source file and the documentation root path and the source root path. EXAMPLE srcpath = ./test/mysrc/sub1/sub2 srcroot = ./test/mysrc/ docroot = ./test/mydoc/ ==> docpath = ./test/mydoc/sub1/sub2 --------------------------------------------------------------------------- Document/RB_Fill_Header_Filename FUNCTION Fill the file_name attribute of all headers based either on the part or the singledoc name. The file_name tells in which file the documentation for the header is to be stored. --------------------------------------------------------------------------- Document/RB_Get_RB_Document FUNCTION Allocate and initialize an RB_Document structure. RESULT An initialized document structure. --------------------------------------------------------------------------- Document/RB_Open_SingleDocumentation FUNCTION Open the file that will contain the documentation in case we create a single document. RESULT An opened file. --------------------------------------------------------------------------- Directory/RB_Directory NAME RB_Directory -- the directory tree with the source files. FUNCTION Stores information about files in a directory tree. The whole structure consist of two linked lists. One for directory paths, and one for filenames. EXAMPLE The following show an example structure. RB_Directory RB_Path +-------+ +------+ +-------+ +-----------+ | +-->| . |--->| ./sub |-->| ./sub/sub | | | +------+ +-------+ +-----------+ | | ^ ^ ^ | | | | | | | |-----------+ +------+ +------+ | | | | | | | | | | | | | | +------+ +------+ +------+ +-------+ | +-->| a.c |--->| b.c |-->| sa.c |-->| ssb.c | +-------+ +------+ +------+ +------+ +-------+ RB_Filename ATTRIBUTES * first -- first RB_Filename in the list of files * current -- the last file that was returned in RB_Get_Next_Filename. * last -- the last RB_Filename in the list of files used for the insert operation * first_path -- first RB_Path in the list of paths. --------------------------------------------------------------------------- Directory/T_RB_FileType FUNCTION Constants for the two different filetypes that ROBODoc recognizes. --------------------------------------------------------------------------- ROBODoc/Directory NAME This module contains function to scan a directory tree and to create a RB_Directory structure. Most of the OS dependend parts of ROBODoc can be found in this module.. This module currently works under: o Cygwin http://cygwin.com o Redhad 7.3 Linux o VC++ under Windows NT o MINGW http://www.mingw.org/ o OS/X AUTHOR Frans Slothouber --------------------------------------------------------------------------- Directory/content_buffer FUNCTION Temporary buffer file file content and filenames. --------------------------------------------------------------------------- Directory/RB_Directory_Insert_RB_File FUNCTION Insert an RB_File structure into a RB_Directory structure. The RB_File is added at the end of the list. --------------------------------------------------------------------------- Directory/RB_Directory_Insert_RB_Path FUNCTION Insert a RB_Path into a RB_Directory. The RB_Path is added at the beginning of the list. --------------------------------------------------------------------------- Directory/RB_FileType FUNCTION Determine the type of the file. This function is used for all compilers except VC++. If _DIRENT_HAVE_D_TYPE is defined we can find the filetype directly in the a_direntry. If not we have to stat the file to find out. INPUTS o arg_pathname -- the path leading up to this file o a_direntry -- a directory entry read by readdir() RESULT The type of the file. --------------------------------------------------------------------------- Directory/RB_Fill_Directory NAME RB_Fill_Directory -- fill a RB_Directory structure FUNCTION Walks through all the files in the directory pointed to by arg_path and adds all the files to arg_rb_directory. This is a recursive function. INPUTS o arg_rb_directory -- the result. o arg_path -- the current path that is scanned. o arg_doc_path -- the path to the documentation files. RESULT a RB_Directory structure filled with all sourcefiles and subdirectories in arg_path. NOTE This a is a recursive function. --------------------------------------------------------------------------- Directory/RB_Free_RB_Directory FUNCTION Free all the memory use by the RB_Directory structure. INPUTS o arg_directory -- the thing to be freed. --------------------------------------------------------------------------- Directory/RB_Get_FileName NAME RB_Get_PathName -- extract the file name FUNCTION Given a full path to a file, that is a filename, or a filename prefixed with a pathname, return the filename. So "./filename" returns "filename" "/home/et/filename" returns "filename" "filename" return "filename" INPUTS arg_fullpath -- a full path to a file, with or without a path. RESULT 0 -- The full path did not contain a filename pointer to the filename -- otherwise. NOTES You are responsible for deallocating it. --------------------------------------------------------------------------- Directory/RB_Get_PathName NAME RB_Get_PathName -- extract the path name FUNCTION Given a full path to a file, that is a filename, or a filename prefixed with a pathname, return the pathname. So "./filename" returns "./" "/home/et/filename" returns "/home/et/" "filename" return "" INPUTS arg_fullpath -- a full path to a file, with or without a path. RESULT 0 -- The full path did not contain a path pointer to the pathname -- otherwise. NOTES You are responsible for deallocating it. --------------------------------------------------------------------------- Directory/RB_Get_RB_Directory NAME RB_Get_RB_Directory -- get a RB_Directory structure FUNCTION Returns a RB_Directory structure to the give directory, specified by the path. This structure can then be uses to walk through all the files in the directory and it's subdirectories. INPUTS arg_rootpath -- the name a the directory to get, a nul terminated string. arg_docroot_name -- the name of the directory the documentation file are stored in. This directory is skipped while scanning for sourcefiles. It can be NULL. RESULT A freshly allocated RB_Directory filled with source files. --------------------------------------------------------------------------- Directory/RB_Get_RB_SingleFileDirectory NAME RB_Get_RB_SingleFileDirectory -- get a RB_Directory structure FUNCTION Returns a RB_Directory structure to the give directory, specified by the path that contains only a single file. This is used for the --singlefile option. INPUT o filename -- a filename. This may include the path. RESULT a freshly allocated RB_Directory that contains only a single file. --------------------------------------------------------------------------- Directory/RB_Is_PathCharacter FUNCTION Test if a character is part of the group of characters that you would normally find in a path. INPUTS c -- the character to be tested. RESULT TRUE -- it is a path character. FALSE -- it is not. --------------------------------------------------------------------------- Directory/RB_Is_Source_File NAME RB_Is_Source_File -- Is a file a sourcefile? FUNCTION This functions examines the content of a file to see whether or not it is a sourcefile. Currently it checks if there are no nul characters in the first 8191 characters of the file. --------------------------------------------------------------------------- Directory/RB_Not_Accepted FUNCTION Test if a file should be skipped, because it does not match a pattern in "accept files:" This test is done based on the wildcard expressions specified in configuration.accept_files. INPUTS o filename -- the name of the file --------------------------------------------------------------------------- Directory/RB_To_Be_Skipped FUNCTION Test if a file should not be included in the list of source files that are scanned for documentation. This test is done based on the wildcard expressions specified in configuration.ignore_files. INPUTS o filename -- the name of the file --------------------------------------------------------------------------- ROBODoc/ASCII_Generator NAME ASCII_Generator -- Generator for ASCII output FUNCTION Plain ascii output, no formatting. MODIFICATION HISTORY 2003-06-17 Frans Slothouber V1.0 --------------------------------------------------------------------------- ASCII_Generator/RB_ASCII_Generate_Item_Line_Number FUNCTION Generate line numbers for SOURCE like items INPUTS o dest_doc -- the file to write to. o line_number_string -- the line number as string. --------------------------------------------------------------------------- ROBODoc/Analyser NAME Analyser -- Functions to scan source and collect headers FUNCTION This module provides the functions to scan a sourcefile and collect all the headers. --------------------------------------------------------------------------- Analyser/Analyse_Indentation FUNCTION Figure out how text is indented. SYNPOPSIS INPUTS * arg_item -- the item to be analysed. --------------------------------------------------------------------------- Analyser/Analyse_Item_Format FUNCTION Try to determine the formatting of an item. An empty line generates a new paragraph Things that are indented more that the rest of the text are preformatted. Things that start with a '*' or '-' create list items unless they are indented more that the rest of the text. SYNPOPSIS INPUTS * arg_item -- the item to be analysed. --------------------------------------------------------------------------- Analyser/Analyse_List FUNCTION Parse the item text to see if there are any lists. A list is either case I: ITEMNAME o bla bla o bla bla or case II: some text: <-- begin of a list o bla bla <-- list item bla bla bla <-- continuation of list item. o bla bla <-- list item <-- end of a list bla bla <-- this can also be the end of a list. SYNPOPSIS INPUTS * arg_item -- the item to be parsed. * indent -- the indent of this item. OUTPUT * arg_item -- the itemlines will contain formatting information for all the lists that were found. --------------------------------------------------------------------------- Analyser/Analyse_ListBody FUNCTION Analyse... (TODO) SYNPOPSIS INPUTS * arg_item -- the item to be analysed. * start_index -- * arg_index -- --------------------------------------------------------------------------- Analyser/Analyse_Paragraphs FUNCTION Analyse paragraphs... (TODO) SYNPOPSIS INPUTS * arg_item -- the item to be analysed. --------------------------------------------------------------------------- Analyser/Analyse_Preformatted FUNCTION Analyse preformatted text ... (TODO) SYNPOPSIS INPUTS * arg_item -- the item to be analysed. * indent -- --------------------------------------------------------------------------- Analyser/AnalyseHeaderType FUNCTION Determine the type of the header. INPUTS o cur_char -- pointer to the header type character OUTPUT o is_internal -- indicates if it is an internal header or not.* o cur_char -- points to the header type character RESULT o pointer to a RB_HeaderType --------------------------------------------------------------------------- Analyser/Find_End_Marker FUNCTION Scan and store all lines from a source file until an end marker is found. INPUTS o document -- a pointer to an opened source file. OUTPUT o new_header -- the lines of source code will be added here. RESULT o TRUE -- an end marker was found. o FALSE -- no end marker was found while scanning the source file. --------------------------------------------------------------------------- Analyser/Function_Name FUNCTION A header name is consists of two parts. The module name and the function name. This returns a pointer to the function name. The name "function name" is a bit obsolete. It is really the name of any of objects that can be documented; classes, methods, variables, functions, projects, etc. --------------------------------------------------------------------------- Analyser/Get_Indent INPUTS * line -- the line RESULT The indentation. --------------------------------------------------------------------------- Analyser/Grab_Header FUNCTION Grab a header from a source file, that is scan a source file until the start of a header is found. Then search for the end of a header and store all the lines in between. SYNPOPSIS INPUTS o sourcehandle -- an opened source file. OUTPUT o sourcehandle -- will point to the line following the end marker. RESULT 0 if no header was found, or a pointer to a new header otherwise. --------------------------------------------------------------------------- Analyser/Is_Empty_Line FUNCTION Check if line is empty. This assumes that Copy_Lines_To_Item has been run on the item. INPUTS * line -- the string to be analysed. --------------------------------------------------------------------------- Analyser/Is_List_Item_Continuation FUNCTION Is it like the second line in something like: * this is a list item that continues SYNPOPSIS INPUTS * arg_line -- the current line * indent -- the indent of the current item. RESULT * TRUE -- it is. * FALSE -- it is not. --------------------------------------------------------------------------- Analyser/Is_ListItem_Start FUNCTION Test if a line starts with something that indicates a list item. List items start with '*', '-', or 'o'. SYNPOPSIS INPUTS * line -- the line RESULT * TRUE -- it did start with one of those characters * FALSE -- it did not. --------------------------------------------------------------------------- Analyser/Is_Pipe_Marker NAME Is_Pipe_Marker FUNCTION Check for "pipe" markers e.g. "|html ". RESULT Pointer to the data to be piped to document or in case no pointers are found. SEE ALSO RB_Check_Pipe --------------------------------------------------------------------------- Analyser/Is_Start_List FUNCTION Check... (TODO) INPUTS * arg_line -- * indent -- --------------------------------------------------------------------------- Analyser/Is_Tool FUNCTION Checks for tool start and end markers --------------------------------------------------------------------------- Analyser/Module_Name FUNCTION Get the module name from the header name. The header name will be something like module/functionname. SYNPOPSIS INPUTS o header_name -- a pointer to a nul terminated string. RESULT Pointer to the modulename. You're responsible for freeing it. SEE ALSO Function_Name() --------------------------------------------------------------------------- Analyser/Preformat_All FUNCTION Process... (TODO) SYNPOPSIS INPUTS * arg_item -- the item to be pre-formatted. * source -- is it a source item ? --------------------------------------------------------------------------- Analyser/RB_Analyse_Document FUNCTION Scan all the sourcefiles of all parts of a document for headers. Store these headers in each part (RB_Part). INPUTS o document -- document to be analysed. RESULT Each part will contain the headers that were found in the sourcefile of the part. --------------------------------------------------------------------------- Analyser/RB_Analyse_Items FUNCTION Locate the items in the header and create RB_Item structures for them. SYNPOPSIS --------------------------------------------------------------------------- Analyser/RB_Find_Marker NAME RB_Find_Marker -- Search for header marker in document. FUNCTION Read document file line by line, and search each line for any of the headers defined in the array header_markers (OR if using the -rh switch, robo_head) INPUTS document - pointer to the file to be searched. the gobal buffer line_buffer. OUTPUT o document will point to the line after the line with the header marker. o is_internal will be TRUE if the header is an internal header. RESULT o header type BUGS Bad use of feof(), fgets(). SEE ALSO Find_End_Marker --------------------------------------------------------------------------- Analyser/Remove_List_Char FUNCTION Remove... (TODO) INPUTS * arg_item -- the item to be analysed. * start_index -- --------------------------------------------------------------------------- Analyser/ToBeAdded FUNCTION Test whether or not a header needs to be added to the list of headers. This implements the options --internal and --internalonly SYNPOPSIS INPUTS o document -- a document (to determine the options) o header -- a header RESULT TRUE -- Add header FALSE -- Don't add header ---------------------------------------------------------------------------