RCS Header: /home/amb/CVS/cxref/src/func.c,v 1.20 2003-12-02 19:51:08 amb Exp
C Cross Referencing & Documentation tool. Version 1.5f.
Handle Function stuff.
Control the debugging information from this file.
The current parsing options.
extern int option_xref
| Defined in: | cxref.c |
The current file that is being processed.
extern File CurFile
| Defined in: | cxref.c |
When in a header file include functions from that file (except inline functions).
extern int in_header
| Defined in: | preproc.c |
The current function, this is initialised by the start of a possible declaration and maintained until all of the arguments have been added and confirmation that it is a definition and not a prototype is seen.
| Used in: | CheckFunctionVariableRef() | |
| ResetFunctionAnalyser() | ||
| SeenFuncIntComment() | ||
| SeenFunctionArg() | ||
| SeenFunctionCall() | ||
| SeenFunctionDeclaration() | ||
| SeenFunctionDefinition() | ||
| SeenFunctionProto() |
The list of function prototypes and the files that they are defined in.
| Used in: | CheckFunctionVariableRef() | |
| ResetFunctionAnalyser() | ||
| SeenFunctionDefinition() | ||
| SeenFunctionProto() |
Function that is called when a function or variable is referenced in the current function.
void CheckFunctionVariableRef ( char* name, int in_a_function )
| Prototyped in: | cxref.h | |
| Calls: | AddToStringList2() | slist.c |
| IsAScopeVariable() | var.c | |
| strcmp() | ||
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | CurFile | cxref.c |
| cur_func | func.c | |
| option_xref | cxref.c | |
| prototypes | func.c | |
Delete the specified Function type.
void DeleteFunctionType ( Function func )
| Prototyped in: | cxref.h | |
| Calls: | DeleteStringList() | slist.c |
| DeleteStringList2() | slist.c | |
| SafeFree() | memory.c | |
| Called by: | DeleteFile() | file.c |
| ResetFunctionAnalyser() | func.c | |
| SeenFunctionDeclaration() | func.c | |
Tidy up all of the local variables in case of a problem and abnormal parser termination.
void ResetFunctionAnalyser ( void )
| Prototyped in: | cxref.h | |
| Calls: | DeleteFunctionType() | func.c |
| DeleteStringList2() | slist.c | |
| Called by: | main() | cxref.c |
| References Variables: | CurFile | cxref.c |
| cur_func | func.c | |
| prototypes | func.c | |
Function that is called when a comment is seen, that may be in a function body.
int SeenFuncIntComment ( char* comment )
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| SafeFree() | memory.c | |
| SafeMallocString() | memory.c | |
| Called by: | SeenComment() | comment.c |
| References Variables: | cur_func | func.c |
Function that is called when a function argument is seen in the current function declaration.
void SeenFunctionArg ( char* name, char* type )
| Prototyped in: | cxref.h | |
| Calls: | AddToStringList2() | slist.c |
| GetCurrentComment() | comment.c | |
| SafeFree() | memory.c | |
| SafeMallocString() | memory.c | |
| SplitComment() | comment.c | |
| strcmp() | ||
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | cur_func | func.c |
Function that is called when a function call is seen in the current function.
void SeenFunctionCall ( char* name )
| Prototyped in: | cxref.h | |
| Calls: | AddToStringList2() | slist.c |
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | cur_func | func.c |
| option_xref | cxref.c | |
Function that is called when a function declaration is seen. This may or may not be a function defintion, we will need to wait and see.
void SeenFunctionDeclaration ( char* name, int scope )
| Prototyped in: | cxref.h | |
| Calls: | DeleteFunctionType() | func.c |
| GetCurrentComment() | comment.c | |
| NewFunctionType() | func.c | |
| SafeMallocString() | memory.c | |
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | cur_func | func.c |
| in_header | preproc.c | |
| parse_file | parse-lex.c | |
| parse_line | parse-lex.c | |
Called when a possible function definition is confirmed.
void SeenFunctionDefinition ( char* type )
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| GetCurrentComment() | comment.c | |
| SafeFree() | memory.c | |
| SafeMallocString() | memory.c | |
| SplitComment() | comment.c | |
| strchr(), strcmp() | ||
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | CurFile | cxref.c |
| cur_func | func.c | |
| option_xref | cxref.c | |
| prototypes | func.c | |
Function that is called when a function prototype is seen.
void SeenFunctionProto ( char* name, int in_a_function )
| Prototyped in: | cxref.h | |
| Calls: | AddToStringList() | slist.c |
| AddToStringList2() | slist.c | |
| NewStringList2() | slist.c | |
| Called by: | yyparse() | parse-yacc.c |
| References Variables: | cur_func | func.c |
| option_xref | cxref.c | |
| parse_file | parse-lex.c | |
| prototypes | func.c | |
Create a new Function Type variable.
static Function NewFunctionType ( char* name, char* type )
| Prototyped in: | func.c | |
| Calls: | NewStringList() | slist.c |
| NewStringList2() | slist.c | |
| SafeCalloc() | memory.c | |
| SafeMallocString() | memory.c | |
| Called by: | SeenFunctionDeclaration() | func.c |