w32tex
About: TeX Live provides a comprehensive TeX system including all the major TeX-related programs, macro packages, and fonts that are free software. Windows sources.
  Fossies Dox: w32tex-src.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

main.h File Reference
#include <assert.h>
#include <stdio.h>
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HAS_STRDUP   1
 
#define SEEK_SET   0
 
#define SEEK_CUR   1
 
#define ERROR   0
 
#define WARNING__   1
 
#define MAXCOMMANDLEN   100
 
#define LEFT   'l'
 
#define RIGHT   'r'
 
#define CENTERED   'c'
 
#define JUSTIFIED   'j'
 
#define PATHMAX   255
 

Typedefs

typedef int bool
 

Functions

void diagnostics (int level, char *format,...)
 
void fprintRTF (char *format,...)
 
void putRtfChar (char cThis)
 
char * getTmpPath (void)
 
char * my_strdup (const char *str)
 
FILEmy_fopen (char *path, char *mode)
 
void debug_malloc (void)
 

Variables

const char * InterpretCommentString
 
FILEfRtf
 
char * g_aux_name
 
char * g_bbl_name
 
char * g_home_dir
 
char * progname
 
bool GermanMode
 
bool FrenchMode
 
bool RussianMode
 
bool CzechMode
 
bool pagenumbering
 
int headings
 
int g_verbosity_level
 
int RecursionLevel
 
int g_left_margin_indent
 
int g_right_margin_indent
 
char alignment
 
char * colFmt
 
long pos_begin_kill
 
int tabcounter
 
int colCount
 
int actCol
 
int g_equation_column
 
bool twocolumn
 
bool titlepage
 
bool g_processing_equation
 
bool g_processing_preamble
 
bool g_processing_figure
 
bool g_processing_table
 
bool g_processing_tabbing
 
bool g_processing_tabular
 
bool g_processing_eqnarray
 
int g_processing_arrays
 
int g_processing_fields
 
int g_dots_per_inch
 
int g_document_type
 
int g_document_bibstyle
 
bool g_fields_use_EQ
 
bool g_fields_use_REF
 
int g_equation_number
 
bool g_escape_parent
 
bool g_show_equation_number
 
int g_enumerate_depth
 
bool g_suppress_equation_number
 
bool g_aux_file_missing
 
char g_charset_encoding_name [20]
 
int g_fcharset_number
 
char * g_figure_label
 
char * g_table_label
 
char * g_equation_label
 
char * g_section_label
 
char * g_config_path
 
char * g_script_path
 
char g_field_separator
 
char * g_preamble
 
double g_png_equation_scale
 
double g_png_figure_scale
 
bool g_latex_figures
 
bool g_equation_inline_rtf
 
bool g_equation_display_rtf
 
bool g_equation_inline_bitmap
 
bool g_equation_display_bitmap
 
bool g_equation_comment
 
bool g_little_endian
 

Macro Definition Documentation

◆ CENTERED

#define CENTERED   'c'

Definition at line 39 of file main.h.

◆ ERROR

#define ERROR   0

Definition at line 31 of file main.h.

◆ HAS_STRDUP

#define HAS_STRDUP   1

Definition at line 20 of file main.h.

◆ JUSTIFIED

#define JUSTIFIED   'j'

Definition at line 40 of file main.h.

◆ LEFT

#define LEFT   'l'

Definition at line 37 of file main.h.

◆ MAXCOMMANDLEN

#define MAXCOMMANDLEN   100

Definition at line 34 of file main.h.

◆ PATHMAX

#define PATHMAX   255

Definition at line 42 of file main.h.

◆ RIGHT

#define RIGHT   'r'

Definition at line 38 of file main.h.

◆ SEEK_CUR

#define SEEK_CUR   1

Definition at line 28 of file main.h.

◆ SEEK_SET

#define SEEK_SET   0

Definition at line 27 of file main.h.

◆ WARNING__

#define WARNING__   1

Definition at line 32 of file main.h.

Typedef Documentation

◆ bool

typedef int bool

Definition at line 51 of file main.h.

Function Documentation

◆ debug_malloc()

void debug_malloc ( void  )

Definition at line 850 of file main.c.

References c, diagnostics(), fflush, and NULL.

◆ diagnostics()

void diagnostics ( int  level,
char *  format,
  ... 
)

purpose: Writes the message to stderr depending on debugging level

Definition at line 469 of file main.c.

References BraceLevel, buffer, CloseRtf(), CurrentEnvironmentCount(), CurrentFileName(), CurrentLineNumber(), exit(), EXIT_FAILURE, fflush, format, fprintf, fprintRTF(), fRtf, g_RTF_warnings, g_verbosity_level, i, iEnvCount, input, level, linenumber, putRtfChar(), RecursionLevel, va_end, and va_start.

Referenced by BasicPop(), BasicPush(), CallCommandFunc(), CallParamFunc(), citation_used(), CleanStack(), CloseRtf(), CmdAlign(), CmdApaCite(), CmdArray(), CmdBCAY(), CmdBeginEnd(), CmdBibitem(), CmdBibliography(), CmdBox(), CmdCaption(), CmdCite(), CmdCiteName(), CmdClosing(), CmdColsep(), CmdCounter(), CmdDocumentStyle(), CmdEmphasize(), CmdEndParagraph(), CmdEquation(), CmdFigure(), CmdFontFamily(), CmdFontSeries(), CmdFontShape(), CmdFontSize(), CmdFootNote(), CmdFraction(), CmdGraphics(), CmdHeader(), CmdHeadFoot(), CmdInclude(), CmdIndent(), CmdIndex(), CmdIntegral(), CmdItem(), CmdLabel(), CmdLeftRight(), CmdLength(), CmdLink(), CmdMultiCol(), CmdMusic(), CmdNewEnvironment(), CmdNewTheorem(), CmdOaccentChar(), CmdOpening(), CmdPagestyle(), CmdPreambleBeginEnd(), CmdQuote(), CmdSection(), CmdSetTexLength(), CmdStackrel(), CmdStartParagraph(), CmdTabbing(), CmdTabular(), CmdTextColor(), CmdTextNormal(), CmdThePage(), CmdUnderline(), CmdUsepackage(), CmdVerb(), CmdVerbatim(), CmdVerse(), Convert(), ConvertAllttString(), ConvertFormatString(), ConvertLatexPreamble(), ConvertNatbib(), ConvertOverToFrac(), ConvertString(), ConvertWholeDocument(), CurrentCyrillicFontFamily(), CurrentFontFamily(), CurrentFontSeries(), CurrentFontShape(), CurrentFontSize(), debug_malloc(), DefaultFontFamily(), DefaultFontSeries(), DefaultFontShape(), DefaultFontSize(), Environment(), eps_to_emf(), eps_to_pict(), eps_to_png(), exists_with_extension(), existsDefinition(), existsEnvironment(), existsTheorem(), expandDefinition(), expandEnvironment(), expandmacro(), ExtractAndRemoveTag(), ExtractLabelTag(), FinishRtfEquation(), getAngleParam(), GetBaseline(), getLength(), GetPngSize(), Ignore_Environment(), InitializeDocumentFont(), InsertBookmark(), main(), maybeDefinition(), maybeEnvironment(), MonitorFontChanges(), my_fopen(), my_getopt(), my_strdup(), newDefinition(), newEnvironment(), newLength(), newTheorem(), open_cfg(), OpenRtfFile(), pdf_to_png(), PopBrace(), PopEnvironment(), PopFontSettings(), PopSource(), PopTrackLineNumber(), PrepareRtfEquation(), PushEnvironment(), PushFontSettings(), PushLevels(), PushSource(), PushTrackLineNumber(), PutEmfFile(), PutEpsFile(), PutGifFile(), PutJpegFile(), PutLatexFile(), PutPdfFile(), PutPictFile(), PutPngFile(), PutTiffFile(), PutWmfFile(), read_cfg(), ReadCfg(), ReadLanguage(), ReadUptoMatch(), RecordBookmark(), renewDefinition(), renewEnvironment(), RtfFontNumber(), RtfHeader(), SaveEquationAsFile(), ScanAux(), setDocumentOptions(), setPackageInputenc(), SetTexMode(), SlurpEquation(), strdup_together(), StyleCount(), SubSupWorker(), TabbingWriteRow(), TabularCountVert(), TabularGetRow(), TabularMultiParameters(), TabularWriteRow(), TranslateCommand(), try_path(), TryDirectConvert(), TryStyleConvert(), TryVariableIgnore(), WriteEightBitChar(), WriteFontName(), WriteLatexAsBitmap(), WritePageSize(), WriteRtfHeader(), and WriteStyleHeader().

◆ fprintRTF()

void fprintRTF ( char *  format,
  ... 
)

purpose: output filter to track of brace depth and font settings all output to the RTF file passes through this routine or the one above

Definition at line 722 of file main.c.

References buffer, format, fRtf, isknj(), MonitorFontChanges(), PopFontSettings(), PushFontSettings(), text, va_end, va_start, and WriteEightBitChar().

Referenced by applemac_enc(), BeginCell(), CmdAbstract(), CmdAlign(), CmdApaCite(), CmdArray(), CmdArrows(), CmdBCAY(), CmdBeginEnd(), CmdBibitem(), CmdBreveChar(), CmdCaption(), CmdCedillaChar(), CmdCite(), CmdClosing(), CmdColsep(), CmdColumn(), CmdEmphasize(), CmdEndParagraph(), CmdFontFamily(), CmdFontSeries(), CmdFontShape(), CmdFontSize(), CmdFootNote(), CmdFraction(), CmdHacekChar(), CmdHatChar(), CmdHtml(), CmdIndex(), CmdIntegral(), CmdItem(), CmdLabel(), CmdLApostrophChar(), CmdLdots(), CmdLeftRight(), CmdLim(), CmdLink(), CmdMacronChar(), CmdMakeTitle(), CmdMatrix(), CmdMultiCol(), CmdNewPage(), CmdNonBreakSpace(), CmdOaccentChar(), CmdOpening(), CmdPagestyle(), CmdPrintIndex(), CmdQuad(), CmdRApostrophChar(), CmdRoot(), CmdSection(), CmdSlashSlash(), CmdSpace(), CmdStackrel(), CmdStartParagraph(), CmdSubscript(), CmdSuperscript(), CmdTabbing(), CmdTabjump(), CmdTabular(), CmdTextColor(), CmdTextNormal(), CmdThebibliography(), CmdThePage(), CmdTildeChar(), CmdTitlepage(), CmdToday(), CmdUmlauteChar(), CmdUnderdotChar(), CmdUnderline(), CmdVecChar(), CmdVerb(), CmdVerbatim(), Convert(), ConvertAllttString(), ConvertNatbib(), cp1250_enc(), cp1252_enc(), cp437_enc(), cp850_enc(), cp852_enc(), cp865_enc(), decmulti_enc(), diagnostics(), EndCell(), FinishRtfEquation(), GermanPrint(), Ignore_Environment(), InsertBasicStyle(), InsertBookmark(), latin1_enc(), latin2_enc(), latin3_enc(), latin4_enc(), latin5_enc(), latin9_enc(), next_enc(), PlainPagestyle(), PrepareRtfEquation(), put_acute_char(), put_breve_char(), put_cedilla_char(), put_dot_char(), put_macron_char(), put_ring_char(), put_tilde_char(), PutEmfFile(), PutHexFile(), PutJpegFile(), PutPictFile(), PutPngFile(), PutWmfFile(), RtfHeader(), SubSupWorker(), TabbingBeginRow(), TabbingWriteRow(), TabularBeginRow(), TabularEndRow(), TabularPreamble(), TabularWriteRow(), TranslateCommand(), TranslateGerman(), TryDirectConvert(), WriteColorTable(), WriteEightBitChar(), WriteEquationAsComment(), WriteFontHeader(), WriteFontName(), WriteHeadFoot(), WritePageSize(), WriteRtfHeader(), and WriteStyleHeader().

◆ getTmpPath()

char* getTmpPath ( void  )

purpose: return the directory to store temporary files

Definition at line 762 of file main.c.

References free, g_tmp_path, getenv(), NULL, PATHSEP, strdup, strdup_together(), strlen(), t, and u.

Referenced by SaveEquationAsFile(), and strdup_tmp_path().

◆ my_fopen()

FILE* my_fopen ( char *  path,
char *  mode 
)

purpose: opens "g_home_dir/path" and

Definition at line 817 of file main.c.

References diagnostics(), FALSE, fflush, FILE, fopen, free, g_home_dir, mode, name, NULL, open_cfg(), p, strdup, strdup_together(), strstr(), and WARNING__.

Referenced by PushSource(), and ScanAux().

◆ my_strdup()

char* my_strdup ( const char *  str)

purpose: duplicate string — exists to ease porting

Definition at line 798 of file main.c.

References diagnostics(), ERROR, malloc, NULL, s, str, strcpy(), and strlen().

◆ putRtfChar()

void putRtfChar ( char  cThis)

purpose: output filter to escape characters written to an RTF file all output to the RTF file passes through this routine or the one below

Definition at line 703 of file main.c.

References fprintf, and fRtf.

Referenced by CmdLeftRight(), CmdTabular(), CmdVerb(), CmdVerbatim(), ConvertAllttString(), diagnostics(), and WriteEquationAsComment().

Variable Documentation

◆ actCol

int actCol
extern

Definition at line 61 of file tables.c.

Referenced by CmdColsep(), CmdSlashSlash(), Convert(), TabularPreamble(), and TabularWriteRow().

◆ alignment

◆ colCount

int colCount
extern

Definition at line 60 of file tables.c.

Referenced by CmdSlashSlash(), TabularColumnPosition(), TabularPreamble(), and TabularWriteRow().

◆ colFmt

char* colFmt
extern

◆ CzechMode

bool CzechMode
extern

Definition at line 68 of file main.c.

Referenced by setPackageBabel().

◆ FrenchMode

bool FrenchMode
extern

Definition at line 66 of file main.c.

Referenced by CmdItem(), CmdStartParagraph(), Convert(), and setPackageBabel().

◆ fRtf

FILE* fRtf
extern

Definition at line 54 of file main.c.

Referenced by Convert(), ConvertLatexPreamble(), diagnostics(), fprintRTF(), main(), and putRtfChar().

◆ g_aux_file_missing

bool g_aux_file_missing
extern

Definition at line 90 of file main.c.

Referenced by ScanAux().

◆ g_aux_name

char* g_aux_name
extern

Definition at line 57 of file main.c.

Referenced by main(), and ScanAux().

◆ g_bbl_name

char* g_bbl_name
extern

Definition at line 58 of file main.c.

Referenced by CmdBibliography(), and main().

◆ g_charset_encoding_name

char g_charset_encoding_name[20]
extern

Definition at line 70 of file main.c.

Referenced by setPackageBabel(), setPackageInputenc(), and WriteEightBitChar().

◆ g_config_path

char* g_config_path
extern

Definition at line 101 of file main.c.

Referenced by main(), and open_cfg().

◆ g_document_bibstyle

int g_document_bibstyle
extern

Definition at line 93 of file main.c.

Referenced by CmdBibitem(), CmdCite(), CmdUsepackage(), and setDocumentOptions().

◆ g_document_type

int g_document_type
extern

◆ g_dots_per_inch

int g_dots_per_inch
extern

Definition at line 76 of file main.c.

Referenced by eps_to_pict(), eps_to_png(), main(), pdf_to_png(), PutEpsFile(), PutLatexFile(), and PutPdfFile().

◆ g_enumerate_depth

int g_enumerate_depth
extern

Definition at line 88 of file main.c.

Referenced by CmdItem(), and CmdList().

◆ g_equation_column

int g_equation_column
extern

Definition at line 46 of file equation.c.

Referenced by CmdSlashSlash(), Convert(), FinishRtfEquation(), and PrepareRtfEquation().

◆ g_equation_comment

bool g_equation_comment
extern

Definition at line 112 of file main.c.

Referenced by CmdEquation(), and main().

◆ g_equation_display_bitmap

bool g_equation_display_bitmap
extern

Definition at line 111 of file main.c.

Referenced by CmdEquation(), and main().

◆ g_equation_display_rtf

bool g_equation_display_rtf
extern

Definition at line 108 of file main.c.

Referenced by CmdEquation(), and main().

◆ g_equation_inline_bitmap

bool g_equation_inline_bitmap
extern

Definition at line 110 of file main.c.

Referenced by CmdEquation(), and main().

◆ g_equation_inline_rtf

bool g_equation_inline_rtf
extern

Definition at line 109 of file main.c.

Referenced by CmdEquation(), and main().

◆ g_equation_label

char* g_equation_label
extern

Definition at line 41 of file xref.c.

Referenced by CmdLabel(), CmdSlashSlash(), and FinishRtfEquation().

◆ g_equation_number

int g_equation_number
extern

◆ g_escape_parent

bool g_escape_parent
extern

Definition at line 106 of file main.c.

Referenced by Convert(), and main().

◆ g_fcharset_number

int g_fcharset_number
extern

Definition at line 71 of file main.c.

Referenced by setPackageBabel(), setPackageInputenc(), and WriteFontHeader().

◆ g_field_separator

◆ g_fields_use_EQ

◆ g_fields_use_REF

bool g_fields_use_REF
extern

Definition at line 96 of file main.c.

Referenced by CmdCite(), CmdLabel(), InsertBookmark(), and main().

◆ g_figure_label

char* g_figure_label
extern

Definition at line 39 of file xref.c.

Referenced by CmdCaption(), and CmdFigure().

◆ g_home_dir

◆ g_latex_figures

bool g_latex_figures
extern

Definition at line 116 of file main.c.

Referenced by CmdFigure(), and main().

◆ g_left_margin_indent

int g_left_margin_indent
extern

◆ g_little_endian

bool g_little_endian
extern

◆ g_png_equation_scale

double g_png_equation_scale
extern

Definition at line 114 of file main.c.

Referenced by main(), and WriteLatexAsBitmap().

◆ g_png_figure_scale

double g_png_figure_scale
extern

Definition at line 115 of file main.c.

Referenced by main(), and WriteLatexAsBitmap().

◆ g_preamble

char* g_preamble
extern

Definition at line 104 of file main.c.

Referenced by ConvertLatexPreamble(), and SaveEquationAsFile().

◆ g_processing_arrays

int g_processing_arrays
extern

Definition at line 84 of file main.c.

Referenced by CmdArray(), CmdSlashSlash(), and Convert().

◆ g_processing_eqnarray

bool g_processing_eqnarray
extern

Definition at line 83 of file main.c.

Referenced by CmdNonumber(), CmdSlashSlash(), FinishRtfEquation(), and PrepareRtfEquation().

◆ g_processing_equation

bool g_processing_equation
extern

Definition at line 99 of file main.c.

◆ g_processing_fields

◆ g_processing_figure

bool g_processing_figure
extern

Definition at line 82 of file main.c.

Referenced by CmdCaption(), CmdFigure(), and CmdLabel().

◆ g_processing_preamble

bool g_processing_preamble
extern

Definition at line 81 of file main.c.

Referenced by CmdHeadFoot(), and ConvertWholeDocument().

◆ g_processing_tabbing

bool g_processing_tabbing
extern

Definition at line 56 of file tables.c.

Referenced by CmdSlashSlash(), CmdTabbing(), and TranslateCommand().

◆ g_processing_table

bool g_processing_table
extern

Definition at line 58 of file tables.c.

Referenced by CmdCaption(), CmdLabel(), and CmdTable().

◆ g_processing_tabular

bool g_processing_tabular
extern

◆ g_right_margin_indent

int g_right_margin_indent
extern

Definition at line 52 of file funct1.c.

Referenced by CmdAbstract(), CmdQuote(), CmdStartParagraph(), PopEnvironment(), and PushEnvironment().

◆ g_script_path

char* g_script_path
extern

Definition at line 102 of file main.c.

Referenced by get_latex2png_name(), and main().

◆ g_section_label

char* g_section_label
extern

Definition at line 42 of file xref.c.

Referenced by CmdSection(), and ConvertWholeDocument().

◆ g_show_equation_number

bool g_show_equation_number
extern

Definition at line 87 of file main.c.

Referenced by CmdSlashSlash(), FinishRtfEquation(), and PrepareRtfEquation().

◆ g_suppress_equation_number

bool g_suppress_equation_number
extern

Definition at line 89 of file main.c.

Referenced by CmdEquation(), CmdNonumber(), CmdSlashSlash(), and FinishRtfEquation().

◆ g_table_label

char* g_table_label
extern

Definition at line 40 of file xref.c.

Referenced by CmdCaption(), and CmdTable().

◆ g_verbosity_level

int g_verbosity_level
extern

Definition at line 74 of file main.c.

Referenced by CmdVerbosityLevel(), diagnostics(), and main().

◆ GermanMode

bool GermanMode
extern

Definition at line 65 of file main.c.

Referenced by Convert(), and setPackageBabel().

◆ headings

int headings
extern

Definition at line 79 of file main.c.

Referenced by CmdPagestyle().

◆ InterpretCommentString

const char* InterpretCommentString
extern

Definition at line 62 of file main.c.

Referenced by RemoveInterpretCommentString().

◆ pagenumbering

bool pagenumbering
extern

Definition at line 78 of file main.c.

Referenced by CmdPagestyle(), and PlainPagestyle().

◆ pos_begin_kill

long pos_begin_kill
extern

Definition at line 55 of file tables.c.

◆ progname

char* progname
extern

Definition at line 19 of file jbigtopnm.c.

◆ RecursionLevel

◆ RussianMode

bool RussianMode
extern

Definition at line 67 of file main.c.

Referenced by setPackageBabel().

◆ tabcounter

int tabcounter
extern

Definition at line 81 of file main.h.

Referenced by CmdSlashSlash(), and Convert().

◆ titlepage

bool titlepage
extern

Definition at line 122 of file main.c.

Referenced by CmdAbstract().

◆ twocolumn

bool twocolumn
extern

Definition at line 121 of file main.c.