RCS Header: /home/amb/CVS/cxref/src/comment.c,v 1.22 2003-01-17 19:07:56 amb Exp
C Cross Referencing & Documentation tool. Version 1.5e.
Collects the comments from the parser.
Turn on the debugging in this file.
The option to insert the comments verbatim into the output.
extern int option_verbatim_comments
| Defined in: | cxref.c |
The file that is currently being processed.
extern File CurFile
| Defined in: | cxref.c |
The name of the current file.
extern char* parse_file
| Defined in: | parse-lex.c |
The current (latest) comment.
| Used in: | DeleteComment() | |
| GetCurrentComment() | ||
| SeenComment() | ||
| SetCurrentComment() |
The malloced string for the current comment.
| Used in: | DeleteComment() | |
| SeenComment() | ||
| SetCurrentComment() |
The status of the current comment.
| Used in: | DeleteComment() | |
| SeenComment() |
Delete the malloced string for the comment
| Prototyped in: | cxref.h | |
| Calls: | SafeFree() | memory.c |
| Called by: | main() | cxref.c |
| References Variables: | comment_ended | comment.c |
| current_comment | comment.c | |
| malloc_comment | comment.c | |
Provide the current (latest) comment.
char* GetCurrentComment ( void )
Function that is called when a comment or part of one is seen. The comment is built up until an end of comment is signaled.
void SeenComment ( char* c, int flag )
| Prototyped in: | cxref.h | |
| Calls: | SafeMalloc() | memory.c |
| SafeRealloc() | memory.c | |
| SeenFileComment() | file.c | |
| SeenFuncIntComment() | func.c | |
| TidyCommentString() | comment.c | |
| strcat(), strcmp(), strcpy(), strlen() | ||
| Called by: | yylex() | parse-lex.c |
| References Variables: | CurFile | cxref.c |
| comment_ended | comment.c | |
| current_comment | comment.c | |
| malloc_comment | comment.c | |
| option_verbatim_comments | cxref.c | |
| parse_file | parse-lex.c | |
Set the current (latest) comment.
void SetCurrentComment ( char* comment )
| Prototyped in: | cxref.h | |
| Calls: | SafeRealloc() | memory.c |
| strcpy(), strlen() | ||
| Called by: | SeenFileChange() | preproc.c |
| yyparse() | parse-yacc.c | |
| References Variables: | current_comment | comment.c |
| malloc_comment | comment.c | |
A function to split out the arguments etc from a comment, for example the function argument comments are separated using this.
char* SplitComment ( char** original, char* name )
A most clever function that ignores spaces so that 'char* b' and 'char *b' match.
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| CopyString() | memory.c | |
| SafeFree() | memory.c | |
| SafeMallocString() | memory.c | |
| TidyCommentString() | comment.c | |
| strlen(), strstr() | ||
| Called by: | SeenDefineFunctionArg() | preproc.c |
| SeenFunctionArg() | func.c | |
| SeenFunctionDefinition() | func.c | |
Tidy up the current comment string by snipping off trailing and leading junk.
static void TidyCommentString ( char** string, int spaces )
| Prototyped in: | comment.c | |
| Calls: | strlen() | |
| Called by: | SeenComment() | comment.c |
| SplitComment() | comment.c | |