RCS Header: /home/amb/CVS/cxref/src/latex.c,v 1.40 2004-06-26 18:50:36 amb Exp
C Cross Referencing & Documentation tool. Version 1.6.
Writes the Latex output.
#define min( x, y )
The name of the output tex file that includes each of the others.
#define LATEX_FILE ".tex"
#define LATEX_FILE_BACKUP ".tex~"
The name of the output tex file that contains the appendix.
#define LATEX_APDX ".apdx"
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 built-in style sheets.
extern char* latex_fonts_style
Defined in: | latex-style.c |
The built-in style sheets.
extern char* latex_page_style
Defined in: | latex-style.c |
The built-in style sheets.
extern char* latex_cxref_style
Defined in: | latex-style.c |
The output file for the latex.
The name of the file.
Used in: | WriteLatexAppendix() | |
WriteLatexFile() | ||
WriteLatexFunction() | ||
WriteLatexTypedef() | ||
WriteLatexVariable() |
Counts the lines in a table to insert breaks.
Used in: | WriteLatexInclude() | |
WriteLatexStructUnion() | ||
WriteLatexSubInclude() | ||
WriteLatexTypedef() |
Write out the appendix information.
void WriteLatexAppendix ( StringList files, StringList2 funcs, StringList2 vars, StringList2 types )
Prototyped in: | cxref.h | |
Calls: | ConcatStrings() | memory.c |
WriteLatexDocument() | latex.c | |
latex() | latex.c | |
exit(), fclose(), fopen(), fprintf(), fputs(), strncmp() | ||
Called by: | main() | cxref.c |
References Variables: | filename | latex.c |
of | latex.c | |
option_name | cxref.c | |
option_odir | cxref.c | |
run_command | cxref.c |
Write a Latex file for a complete File structure and all components.
void WriteLatexFile ( File file )
The file structure is broken into its components and they are each written out.
Prototyped in: | cxref.h | |
Calls: | ConcatStrings() | memory.c |
WriteLatexDefine() | latex.c | |
WriteLatexDocument() | latex.c | |
WriteLatexFilePart() | latex.c | |
WriteLatexFunction() | latex.c | |
WriteLatexInclude() | latex.c | |
WriteLatexTypedef() | latex.c | |
WriteLatexVariable() | latex.c | |
latex() | latex.c | |
exit(), fclose(), fopen(), fprintf(), fputs(), mkdir(), stat(), strlen() | ||
Called by: | main() | cxref.c |
References Variables: | filename | latex.c |
of | latex.c | |
option_odir | cxref.c | |
run_command | cxref.c | |
run_cpp_command | cxref.c |
Delete the latex file and main file reference that belong to the named file.
void WriteLatexFileDelete ( char* name )
Prototyped in: | cxref.h | |
Calls: | ConcatStrings() | memory.c |
fclose(), fgets(), fopen(), fprintf(), fputs(), rename(), strcmp(), unlink() | ||
Called by: | main() | cxref.c |
References Variables: | option_name | cxref.c |
option_odir | cxref.c |
Write a Define structure out.
static void WriteLatexDefine ( Define def )
Prototyped in: | latex.c | |
Calls: | latex() | latex.c |
fprintf() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | of | latex.c |
Write out a file that will include the current information.
static void WriteLatexDocument ( char* name, int appendix )
Prototyped in: | latex.c | |
Calls: | ConcatStrings() | memory.c |
WriteLatexTemplate() | latex.c | |
exit(), fclose(), fgets(), fopen(), fprintf(), fputs(), rename(), strcmp(), unlink() | ||
Called by: | WriteLatexAppendix() | latex.c |
WriteLatexFile() | latex.c | |
References Variables: | option_name | cxref.c |
option_odir | cxref.c |
Write a File structure out.
static void WriteLatexFilePart ( File file )
Prototyped in: | latex.c | |
Calls: | latex() | latex.c |
fprintf(), strstr() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | of | latex.c |
option_verbatim_comments | cxref.c |
Write a Function structure out.
static void WriteLatexFunction ( Function func )
Prototyped in: | latex.c | |
Calls: | latex() | latex.c |
fprintf(), strcmp(), strncmp(), strstr() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | filename | latex.c |
of | latex.c | |
option_verbatim_comments | cxref.c |
Write an Include structure out.
static void WriteLatexInclude ( Include inc )
Prototyped in: | latex.c | |
Calls: | WriteLatexSubInclude() | latex.c |
latex() | latex.c | |
fprintf() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | countlines | latex.c |
of | latex.c |
Write a structure / union structure out.
static void WriteLatexStructUnion ( StructUnion su, int depth )
Prototyped in: | latex.c | |
Calls: | WriteLatexStructUnion() | latex.c |
latex() | latex.c | |
fprintf(), strstr() | ||
Called by: | WriteLatexStructUnion() | latex.c |
WriteLatexTypedef() | latex.c | |
References Variables: | countlines | latex.c |
of | latex.c |
Write an Sub Include structure out. (An include structure that is included from another file.)
static void WriteLatexSubInclude ( Include inc, int depth )
Prototyped in: | latex.c | |
Calls: | WriteLatexSubInclude() | latex.c |
latex() | latex.c | |
fprintf() | ||
Called by: | WriteLatexInclude() | latex.c |
WriteLatexSubInclude() | latex.c | |
References Variables: | countlines | latex.c |
of | latex.c |
Write out the standard template for the main LaTeX file. This sets up the page styles, and includes markers for the start and end of included source code.
static void WriteLatexTemplate ( char* name )
Prototyped in: | latex.c | |
Calls: | ConcatStrings() | memory.c |
exit(), fclose(), fopen(), fprintf(), fputs(), stat() | ||
Called by: | WriteLatexDocument() | latex.c |
References Variables: | latex_cxref_style | latex-style.c |
latex_fonts_style | latex-style.c | |
latex_page_style | latex-style.c | |
option_odir | cxref.c |
Write a Typedef structure out.
static void WriteLatexTypedef ( Typedef type )
Prototyped in: | latex.c | |
Calls: | WriteLatexStructUnion() | latex.c |
latex() | latex.c | |
fprintf(), strncmp() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | countlines | latex.c |
filename | latex.c | |
of | latex.c |
Write a Variable structure out.
static void WriteLatexVariable ( Variable var )
Prototyped in: | latex.c | |
Calls: | latex() | latex.c |
fprintf() | ||
Called by: | WriteLatexFile() | latex.c |
References Variables: | filename | latex.c |
of | latex.c |
Make the input string safe to output as LaTeX ( not #, $, %, &, \, ^, _, {, }, <, > or ~ ).
static char* latex ( char* c, int verbatim )
The function can only be called four times in each fprintf() since it returns one of only four static strings.