version 1.5, 2015/02/23 11:44:30 |
version 1.11, 2015/02/23 22:50:11 |
|
|
TEXICMD_BANG, |
TEXICMD_BANG, |
TEXICMD_BULLET, |
TEXICMD_BULLET, |
TEXICMD_BYE, |
TEXICMD_BYE, |
|
TEXICMD_CARTOUCHE, |
|
TEXICMD_CEDILLA, |
TEXICMD_CENTER, |
TEXICMD_CENTER, |
TEXICMD_CHAPTER, |
TEXICMD_CHAPTER, |
TEXICMD_CINDEX, |
TEXICMD_CINDEX, |
|
|
TEXICMD_CODE, |
TEXICMD_CODE, |
TEXICMD_COLON, |
TEXICMD_COLON, |
TEXICMD_COLUMNFRACTIONS, |
TEXICMD_COLUMNFRACTIONS, |
|
TEXICMD_COMMA, |
TEXICMD_COMMAND, |
TEXICMD_COMMAND, |
TEXICMD_COMMENT, |
TEXICMD_COMMENT, |
TEXICMD_COMMENT_LONG, |
TEXICMD_COMMENT_LONG, |
|
|
TEXICMD_DEFTYPEFNX, |
TEXICMD_DEFTYPEFNX, |
TEXICMD_DEFTYPEFUN, |
TEXICMD_DEFTYPEFUN, |
TEXICMD_DEFTYPEFUNX, |
TEXICMD_DEFTYPEFUNX, |
|
TEXICMD_DEFTYPEMETHOD, |
|
TEXICMD_DEFTYPEMETHODX, |
TEXICMD_DEFTYPEVAR, |
TEXICMD_DEFTYPEVAR, |
TEXICMD_DEFTYPEVARX, |
TEXICMD_DEFTYPEVARX, |
TEXICMD_DEFTYPEVR, |
TEXICMD_DEFTYPEVR, |
|
|
TEXICMD_DIRENTRY, |
TEXICMD_DIRENTRY, |
TEXICMD_DISPLAY, |
TEXICMD_DISPLAY, |
TEXICMD_DMN, |
TEXICMD_DMN, |
|
TEXICMD_DOCUMENTDESCRPITION, |
|
TEXICMD_DOCUMENTENCODING, |
TEXICMD_DOTS, |
TEXICMD_DOTS, |
TEXICMD_EMAIL, |
TEXICMD_EMAIL, |
TEXICMD_EMPH, |
TEXICMD_EMPH, |
TEXICMD_END, |
TEXICMD_END, |
|
TEXICMD_ENDDOTS, |
TEXICMD_ENUMERATE, |
TEXICMD_ENUMERATE, |
TEXICMD_ENV, |
TEXICMD_ENV, |
TEXICMD_EQUIV, |
TEXICMD_EQUIV, |
|
|
TEXICMD_FILE, |
TEXICMD_FILE, |
TEXICMD_FINALOUT, |
TEXICMD_FINALOUT, |
TEXICMD_FINDEX, |
TEXICMD_FINDEX, |
|
TEXICMD_FOOTNOTE, |
TEXICMD_FTABLE, |
TEXICMD_FTABLE, |
TEXICMD_FORMAT, |
TEXICMD_FORMAT, |
TEXICMD_GRAVE, |
TEXICMD_GRAVE, |
|
|
TEXICMD_IMAGE, |
TEXICMD_IMAGE, |
TEXICMD_INCLUDE, |
TEXICMD_INCLUDE, |
TEXICMD_INDENTBLOCK, |
TEXICMD_INDENTBLOCK, |
TEXICMD_USER_INDEX, |
TEXICMD_INFOREF, |
TEXICMD_INSERTCOPYING, |
TEXICMD_INSERTCOPYING, |
TEXICMD_ITEM, |
TEXICMD_ITEM, |
TEXICMD_ITEMIZE, |
TEXICMD_ITEMIZE, |
|
|
TEXICMD_SECTION, |
TEXICMD_SECTION, |
TEXICMD_SET, |
TEXICMD_SET, |
TEXICMD_SETCHAPNEWPAGE, |
TEXICMD_SETCHAPNEWPAGE, |
|
TEXICMD_SETCONTENTSAFTER, |
TEXICMD_SETFILENAME, |
TEXICMD_SETFILENAME, |
TEXICMD_SETTITLE, |
TEXICMD_SETTITLE, |
TEXICMD_SHORTCONTENTS, |
TEXICMD_SHORTCONTENTS, |
TEXICMD_SLANTED, |
TEXICMD_SLANTED, |
|
TEXICMD_SLASH, |
TEXICMD_SP, |
TEXICMD_SP, |
TEXICMD_SPACE, |
TEXICMD_SPACE, |
TEXICMD_SMALLBOOK, |
TEXICMD_SMALLBOOK, |
|
|
TEXICMD_SMALLINDENTBLOCK, |
TEXICMD_SMALLINDENTBLOCK, |
TEXICMD_SQUIGGLE_LEFT, |
TEXICMD_SQUIGGLE_LEFT, |
TEXICMD_SQUIGGLE_RIGHT, |
TEXICMD_SQUIGGLE_RIGHT, |
|
TEXICMD_SS, |
TEXICMD_STRONG, |
TEXICMD_STRONG, |
TEXICMD_SUBHEADING, |
TEXICMD_SUBHEADING, |
TEXICMD_SUBSECTION, |
TEXICMD_SUBSECTION, |
|
|
TEXICMD_TABLE, |
TEXICMD_TABLE, |
TEXICMD_TEX, |
TEXICMD_TEX, |
TEXICMD_TEXSYM, |
TEXICMD_TEXSYM, |
|
TEXICMD_TIE, |
TEXICMD_TILDE, |
TEXICMD_TILDE, |
TEXICMD_TINDEX, |
TEXICMD_TINDEX, |
TEXICMD_TITLE, |
TEXICMD_TITLE, |
|
|
TEXICMD_UNNUMBEREDSUBSUBSEC, |
TEXICMD_UNNUMBEREDSUBSUBSEC, |
TEXICMD_UREF, |
TEXICMD_UREF, |
TEXICMD_URL, |
TEXICMD_URL, |
|
TEXICMD_USER_INDEX, |
TEXICMD_VALUE, |
TEXICMD_VALUE, |
TEXICMD_VAR, |
TEXICMD_VAR, |
|
TEXICMD_VERB, |
TEXICMD_VERBATIM, |
TEXICMD_VERBATIM, |
TEXICMD_VERBATIMINCLUDE, |
TEXICMD_VERBATIMINCLUDE, |
TEXICMD_VINDEX, |
TEXICMD_VINDEX, |
|
|
TEXICMD__MAX |
TEXICMD__MAX |
}; |
}; |
|
|
|
enum texisrc { |
|
TEXISRC_FILE, |
|
TEXISRC_STDIN |
|
}; |
|
|
/* |
/* |
* The file currently being parsed. |
* The file currently being parsed. |
* This keeps track of our location within that file. |
* This keeps track of our location within that file. |
*/ |
*/ |
struct texifile { |
struct texifile { |
|
enum texisrc type; /* type of file */ |
const char *name; /* name of the file */ |
const char *name; /* name of the file */ |
size_t line; /* current line (from zero) */ |
size_t line; /* current line (from zero) */ |
size_t col; /* current column in line (from zero) */ |
size_t col; /* current column in line (from zero) */ |
char *map; /* mmap'd file */ |
char *map; /* mmap'd file OR allocated buffer */ |
size_t mapsz; /* size of mmap */ |
size_t mapsz; /* size of mmap */ |
}; |
}; |
|
|
Line 245 struct texitok { |
|
Line 266 struct texitok { |
|
size_t len; /* strlen(tok) */ |
size_t len; /* strlen(tok) */ |
}; |
}; |
|
|
|
/* |
|
* These values instruct us on whether a list (or table) of some type is |
|
* currently being parsed. |
|
*/ |
enum texilist { |
enum texilist { |
TEXILIST_NONE = 0, |
TEXILIST_NONE = 0, |
TEXILIST_ITEM, |
TEXILIST_ITEM, |
|
|
TEXILIST_TABLE |
TEXILIST_TABLE |
}; |
}; |
|
|
|
/* |
|
* Hold values assigned with @set and retrieved with @value. |
|
* These values can contain arbitrary Texinfo. |
|
*/ |
struct texivalue { |
struct texivalue { |
char *key; |
char *key; /* the nil-terminated value name */ |
char *value; |
char *value; /* the nil-terminated value */ |
}; |
}; |
|
|
|
/* |
|
* Macros are (possibly-recursive) Texinfo sequences created with @macro |
|
* and filled in by arguments when invoked. |
|
*/ |
struct teximacro { |
struct teximacro { |
char *key; |
char *key; /* nil-terminated macro name */ |
char *value; |
char *value; /* nil-terminated value */ |
char **args; |
char **args; /* array of argument names (or NULL) */ |
size_t argsz; |
size_t argsz; /* array size */ |
}; |
}; |
|
|
/* |
/* |
|
|
size_t indexsz; /* entries in indexs */ |
size_t indexsz; /* entries in indexs */ |
struct texivalue *vals; /* @value entries */ |
struct texivalue *vals; /* @value entries */ |
size_t valsz; /* entries in vals */ |
size_t valsz; /* entries in vals */ |
struct teximacro *macros; |
struct teximacro *macros; /* @macro entries */ |
size_t macrosz; |
size_t macrosz; /* entries in macros */ |
/* |
/* |
* The following control what we output to the screen. |
* The following control what we output to the screen. |
* The complexity is required to accomodate for mdoc(7). |
* The complexity is required to accomodate for mdoc(7). |
Line 308 void advance(struct texi *, const char *, size_t *); |
|
Line 341 void advance(struct texi *, const char *, size_t *); |
|
size_t advanceeoln(struct texi *, const char *, size_t, size_t *, int); |
size_t advanceeoln(struct texi *, const char *, size_t, size_t *, int); |
void advanceto(struct texi *, const char *, size_t *, size_t); |
void advanceto(struct texi *, const char *, size_t *, size_t); |
|
|
char **argparse(struct texi *, const char *, size_t, size_t *, size_t *); |
char **argparse(struct texi *, const char *, size_t, size_t *, size_t *, size_t); |
|
|
int parsearg(struct texi *, const char *, size_t, size_t *, size_t); |
int parsearg(struct texi *, const char *, size_t, size_t *, size_t); |
void parsebracket(struct texi *, const char *, size_t, size_t *); |
void parsebracket(struct texi *, const char *, size_t, size_t *); |
|
void parsestdin(struct texi *); |
void parsefile(struct texi *, const char *, int); |
void parsefile(struct texi *, const char *, int); |
int parselinearg(struct texi *, const char *, size_t, size_t *); |
int parselinearg(struct texi *, const char *, size_t, size_t *); |
void parseeof(struct texi *, const char *, size_t); |
void parseeof(struct texi *, const char *, size_t); |
|
void parsemembuf(struct texi *, const char *, size_t); |
void parseeoln(struct texi *, const char *, size_t, size_t *); |
void parseeoln(struct texi *, const char *, size_t, size_t *); |
void parsesingle(struct texi *, const char *, size_t, size_t *); |
void parsesingle(struct texi *, const char *, size_t, size_t *); |
void parseto(struct texi *, const char *, size_t, size_t *, const char *); |
void parseto(struct texi *, const char *, size_t, size_t *, const char *); |
Line 333 void teximacro(struct texi *, const char *); |
|
Line 368 void teximacro(struct texi *, const char *); |
|
void teximacroclose(struct texi *); |
void teximacroclose(struct texi *); |
void teximacroopen(struct texi *, const char *); |
void teximacroopen(struct texi *, const char *); |
void texipunctuate(struct texi *, const char *, size_t, size_t *); |
void texipunctuate(struct texi *, const char *, size_t, size_t *); |
|
void texiputbuf(struct texi *p, const char *, size_t, size_t); |
void texiputchar(struct texi *p, char); |
void texiputchar(struct texi *p, char); |
void texiputchars(struct texi *, const char *); |
void texiputchars(struct texi *, const char *); |
void texivspace(struct texi *); |
void texivspace(struct texi *); |