RCS Header: /home/amb/CVS/cxref/src/rtf.c,v 1.11 2004-06-26 18:50:36 amb Exp
C Cross Referencing & Documentation tool. Version 1.6.
Writes the RTF output.
The name of the output rtf file.
#define RTF_FILE ".rtf"
#define RTF_FILE_BACKUP ".rtf~"
The name of the output rtf file that contains the appendix.
#define RTF_APDX ".apdx"
#define STYLE_NORM "\\s0\\f0\\fs24"
#define STYLE_H1 "\\s1\\f0\\fs40\\b\\sb400\\sa200\\keepn\\keep"
#define STYLE_H2 "\\s2\\f0\\fs32\\b\\sb200\\sa100\\keepn\\keep"
#define STYLE_H3 "\\s3\\f0\\fs28\\b\\sb100\\sa100\\keepn\\keep"
#define STYLE_H4 "\\s4\\f0\\fs24\\b\\sb100\\sa50\\keepn\\keep"
#define STYLE_TT "\\s5\\f1\\fs20\\ql\\sb50\\sa50"
#define STYLE_IND "\\s6\\f0\\fs24\\ql\\li720"
The comments are to be inserted verbatim.
extern int option_verbatim_comments
| Defined in: | cxref.c |
The name of the directory for the output.
extern char* option_odir
| Defined in: | cxref.c |
The base name of the file for the output.
extern char* option_name
| Defined in: | cxref.c |
The information about the cxref run, the command line options.
extern char* run_command
| Defined in: | cxref.c |
The information about the cxref run, the cpp command and options.
extern char* run_cpp_command
| Defined in: | cxref.c |
The output file for the RTF.
| Used in: | WriteRTFAppendix() | |
| WriteRTFDefine() | ||
| WriteRTFFile() | ||
| WriteRTFFilePart() | ||
| WriteRTFFunction() | ||
| WriteRTFInclude() | ||
| WriteRTFStructUnion() | ||
| WriteRTFSubInclude() | ||
| WriteRTFTypedef() | ||
| WriteRTFVariable() |
The name of the file.
| Used in: | WriteRTFAppendix() | |
| WriteRTFFile() | ||
| WriteRTFPreamble() |
Write out the appendix information.
void WriteRTFAppendix ( StringList files, StringList2 funcs, StringList2 vars, StringList2 types )
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| WriteRTFPostamble() | rtf.c | |
| WriteRTFPreamble() | rtf.c | |
| rtf() | rtf.c | |
| exit(), fclose(), fopen(), fprintf(), strncmp() | ||
| Called by: | main() | cxref.c |
| References Variables: | filename | rtf.c |
| of | rtf.c | |
| option_name | cxref.c | |
| option_odir | cxref.c | |
Write an RTF file for a complete File structure and all components.
void WriteRTFFile ( File file )
The file structure is broken into its components and they are each written out.
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| WriteRTFDefine() | rtf.c | |
| WriteRTFFilePart() | rtf.c | |
| WriteRTFFunction() | rtf.c | |
| WriteRTFInclude() | rtf.c | |
| WriteRTFPostamble() | rtf.c | |
| WriteRTFPreamble() | rtf.c | |
| WriteRTFTypedef() | rtf.c | |
| WriteRTFVariable() | rtf.c | |
| rtf() | rtf.c | |
| exit(), fclose(), fopen(), fprintf(), mkdir(), stat(), strlen() | ||
| Called by: | main() | cxref.c |
| References Variables: | filename | rtf.c |
| of | rtf.c | |
| option_odir | cxref.c | |
Delete the RTF file and main file reference that belong to the named file.
void WriteRTFFileDelete ( char* name )
| Prototyped in: | cxref.h | |
| Calls: | ConcatStrings() | memory.c |
| unlink() | ||
| Called by: | main() | cxref.c |
| References Variables: | option_odir | cxref.c |
Write a Define structure out.
static void WriteRTFDefine ( Define def )
| Prototyped in: | rtf.c | |
| Calls: | rtf() | rtf.c |
| fprintf() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
Write a File structure out.
static void WriteRTFFilePart ( File file )
| Prototyped in: | rtf.c | |
| Calls: | rtf() | rtf.c |
| fprintf(), strstr() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
| option_verbatim_comments | cxref.c | |
Write a Function structure out.
static void WriteRTFFunction ( Function func )
| Prototyped in: | rtf.c | |
| Calls: | rtf() | rtf.c |
| fprintf(), strcmp(), strncmp(), strstr() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
| option_verbatim_comments | cxref.c | |
Write an Include structure out.
static void WriteRTFInclude ( Include inc )
| Prototyped in: | rtf.c | |
| Calls: | WriteRTFSubInclude() | rtf.c |
| rtf() | rtf.c | |
| fprintf() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
Write out the tail of an RTF file.
static void WriteRTFPostamble ( FILE* f )
| Prototyped in: | rtf.c | |
| Calls: | fputs() | |
| Called by: | WriteRTFAppendix() | rtf.c |
| WriteRTFFile() | rtf.c | |
Write out the head of an RTF file.
static void WriteRTFPreamble ( FILE* f )
| Prototyped in: | rtf.c | |
| Calls: | fprintf(), fputs(), strcmp() | |
| Called by: | WriteRTFAppendix() | rtf.c |
| WriteRTFFile() | rtf.c | |
| References Variables: | filename | rtf.c |
| run_command | cxref.c | |
| run_cpp_command | cxref.c | |
Write a structure / union structure out.
static void WriteRTFStructUnion ( StructUnion su, int depth )
| Prototyped in: | rtf.c | |
| Calls: | WriteRTFStructUnion() | rtf.c |
| rtf() | rtf.c | |
| fprintf(), strstr() | ||
| Called by: | WriteRTFStructUnion() | rtf.c |
| WriteRTFTypedef() | rtf.c | |
| References Variables: | of | rtf.c |
Write an Sub Include structure out. (An include structure that is included from another file.)
static void WriteRTFSubInclude ( Include inc, int depth )
| Prototyped in: | rtf.c | |
| Calls: | WriteRTFSubInclude() | rtf.c |
| rtf() | rtf.c | |
| fprintf() | ||
| Called by: | WriteRTFInclude() | rtf.c |
| WriteRTFSubInclude() | rtf.c | |
| References Variables: | of | rtf.c |
Write a Typedef structure out.
static void WriteRTFTypedef ( Typedef type )
| Prototyped in: | rtf.c | |
| Calls: | WriteRTFStructUnion() | rtf.c |
| rtf() | rtf.c | |
| fprintf(), strncmp() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
Write a Variable structure out.
static void WriteRTFVariable ( Variable var )
| Prototyped in: | rtf.c | |
| Calls: | rtf() | rtf.c |
| fprintf() | ||
| Called by: | WriteRTFFile() | rtf.c |
| References Variables: | of | rtf.c |
Make the input string safe to output as RTF ( not \, { or } ).
static char* rtf ( char* c, int verbatim )
The function can only be called four times in each fprintf() since it returns one of only four static strings.