version 1.15, 2015/02/25 14:37:17 |
version 1.23, 2015/03/01 16:57:39 |
|
|
#ifndef EXTERN_H |
#ifndef EXTERN_H |
#define EXTERN_H |
#define EXTERN_H |
|
|
|
#if !defined(__BEGIN_DECLS) |
|
# ifdef __cplusplus |
|
# define __BEGIN_DECLS extern "C" { |
|
# else |
|
# define __BEGIN_DECLS |
|
# endif |
|
#endif |
|
#if !defined(__END_DECLS) |
|
# ifdef __cplusplus |
|
# define __END_DECLS } |
|
# else |
|
# define __END_DECLS |
|
# endif |
|
#endif |
|
|
/* |
/* |
* This defines each one of the Texinfo commands that we understand. |
* This defines each one of the Texinfo commands that we understand. |
* Obviously this only refers to native commands; overriden names are a |
* Obviously this only refers to native commands; overriden names are a |
Line 301 struct texifile { |
|
Line 316 struct texifile { |
|
char *map; /* allocated file buffer */ |
char *map; /* allocated file buffer */ |
size_t mapsz; /* size of map */ |
size_t mapsz; /* size of map */ |
size_t mapmaxsz; /* full size of map */ |
size_t mapmaxsz; /* full size of map */ |
|
size_t insplice; /* how many bytes left in splice */ |
|
size_t depth; /* pasted macro recursive depth */ |
}; |
}; |
|
|
struct texi; |
struct texi; |
Line 355 struct teximacro { |
|
Line 372 struct teximacro { |
|
* This keeps any necessary information handy. |
* This keeps any necessary information handy. |
*/ |
*/ |
struct texi { |
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 */ |
struct texifile files[64]; /* stack of open files */ |
size_t filepos; /* number of open files */ |
size_t filepos; /* number of open files */ |
const char *valstack[64]; /* stack of opened values */ |
const char *valstack[64]; /* stack of opened values */ |
size_t valstackpos; /* position in valstack */ |
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 *title; /* title of document */ |
char *subtitle; /* subtitle of document */ |
char *subtitle; /* subtitle of document */ |
int secoffs; /* see sectioner() */ |
int secoffs; /* see sectioner() */ |
|
|
*/ |
*/ |
enum texilist list; /* current list (set recursively) */ |
enum texilist list; /* current list (set recursively) */ |
int outmacro; /* if >0, output is in line macro */ |
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 seenws; /* ws has been seen (and ignored) */ |
int seenvs; /* newline has been Pp'd */ |
int seenvs; /* newline has been Pp'd */ |
int ign; /* if >0, don't print anything */ |
int ign; /* if >0, don't print anything */ |
Line 400 void advanceto(struct texi *, size_t *, size_t); |
|
Line 423 void advanceto(struct texi *, size_t *, size_t); |
|
char **argparse(struct texi *, size_t *, size_t *, size_t); |
char **argparse(struct texi *, size_t *, size_t *, size_t); |
|
|
int parsearg(struct texi *, size_t *, size_t); |
int parsearg(struct texi *, size_t *, size_t); |
void parsebracket(struct texi *, size_t *); |
void parsebracket(struct texi *, size_t *, int); |
void parsestdin(struct texi *); |
void parsestdin(struct texi *); |
void parsefile(struct texi *, const char *, int); |
void parsefile(struct texi *, const char *, int); |
int parselinearg(struct texi *, size_t *); |
int parselinearg(struct texi *, size_t *); |
Line 410 void parseto(struct texi *, size_t *, const char *); |
|
Line 433 void parseto(struct texi *, size_t *, const char *); |
|
void texiabort(struct texi *, const char *) |
void texiabort(struct texi *, const char *) |
__attribute__((noreturn)); |
__attribute__((noreturn)); |
enum texicmd |
enum texicmd |
texicmd(struct texi *, size_t, |
texicmd(const struct texi *, size_t, size_t *, struct teximacro **); |
size_t *, struct teximacro **); |
enum texicmd |
|
peekcmd(const struct texi *, size_t); |
void texierr(struct texi *, const char *, ...) |
void texierr(struct texi *, const char *, ...) |
__attribute__((format(printf, 2, 3))) |
__attribute__((format(printf, 2, 3))) |
__attribute__((noreturn)); |
__attribute__((noreturn)); |
Line 420 void texifilepop(struct texi *); |
|
Line 444 void texifilepop(struct texi *); |
|
void teximacro(struct texi *, const char *); |
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 teximdocopen(struct texi *, size_t *); |
|
void teximdocclose(struct texi *, int); |
void texipunctuate(struct texi *, size_t *); |
void texipunctuate(struct texi *, size_t *); |
void texiputbuf(struct texi *p, size_t, size_t); |
void texiputbuf(struct texi *p, size_t, size_t); |
void texiputchar(struct texi *p, char); |
void texiputchar(struct texi *p, char); |
Line 427 void texiputchars(struct texi *, const char *); |
|
Line 453 void texiputchars(struct texi *, const char *); |
|
void texivspace(struct texi *); |
void texivspace(struct texi *); |
void texiwarn(const struct texi *, const char *, ...) |
void texiwarn(const struct texi *, const char *, ...) |
__attribute__((format(printf, 2, 3))); |
__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 *); |
void valueadd(struct texi *, char *, char *); |
const char * |
const char * |