=================================================================== RCS file: /cvs/texi2mdoc/extern.h,v retrieving revision 1.20 retrieving revision 1.25 diff -u -p -r1.20 -r1.25 --- texi2mdoc/extern.h 2015/02/28 13:16:44 1.20 +++ texi2mdoc/extern.h 2015/03/03 15:04:24 1.25 @@ -1,4 +1,4 @@ -/* $Id: extern.h,v 1.20 2015/02/28 13:16:44 kristaps Exp $ */ +/* $Id: extern.h,v 1.25 2015/03/03 15:04:24 kristaps Exp $ */ /* * Copyright (c) 2015 Kristaps Dzonsons * @@ -55,6 +55,7 @@ enum texicmd { TEXICMD_AT, TEXICMD_AUTHOR, TEXICMD_B, + TEXICMD_BACKSLASH, TEXICMD_BANG, TEXICMD_BULLET, TEXICMD_BYE, @@ -372,13 +373,18 @@ struct teximacro { * This keeps any necessary information handy. */ struct texi { + const char *chapters; /* are we splitting chapters */ + size_t chapnum; /* current chapter node */ + char **dirs; /* texi directories */ + size_t dirsz; /* number of texi directories */ + FILE *outfile; + /* + * Run-time parameters. + */ struct texifile files[64]; /* stack of open files */ size_t filepos; /* number of open files */ const char *valstack[64]; /* stack of opened values */ size_t valstackpos; /* position in valstack */ - size_t outcol; /* column in output line */ - char **dirs; /* texi directories */ - size_t dirsz; /* number of texi directories */ char *title; /* title of document */ char *subtitle; /* subtitle of document */ int secoffs; /* see sectioner() */ @@ -394,10 +400,12 @@ struct texi { */ enum texilist list; /* current list (set recursively) */ int outmacro; /* if >0, output is in line macro */ + size_t outcol; /* column in output line */ int seenws; /* ws has been seen (and ignored) */ int seenvs; /* newline has been Pp'd */ int ign; /* if >0, don't print anything */ int literal; /* if >0, literal context */ + int uppercase; /* if >0, uppercase */ }; #define BUF(_p) ((_p)->files[(_p)->filepos - 1].map) @@ -438,6 +446,8 @@ void texifilepop(struct texi *); void teximacro(struct texi *, const char *); void teximacroclose(struct texi *); void teximacroopen(struct texi *, const char *); +void teximdocopen(struct texi *, size_t *); +void teximdocclose(struct texi *, int); void texipunctuate(struct texi *, size_t *); void texiputbuf(struct texi *p, size_t, size_t); void texiputchar(struct texi *p, char); @@ -445,7 +455,7 @@ void texiputchars(struct texi *, const char *); void texivspace(struct texi *); void texiwarn(const struct texi *, const char *, ...) __attribute__((format(printf, 2, 3))); -void texisplice(struct texi *, const char *, size_t, size_t *); +void texisplice(struct texi *, const char *, size_t, size_t); void valueadd(struct texi *, char *, char *); const char *