diff options
author | John Millaway <john43@users.sourceforge.net> | 2002-09-05 10:48:55 +0000 |
---|---|---|
committer | John Millaway <john43@users.sourceforge.net> | 2002-09-05 10:48:55 +0000 |
commit | 2f7d2995f0550e2f91222c76885015d07e3d64f5 (patch) | |
tree | 7803d313233c0589561cba738b0c6c36f78d1f43 /flexdef.h | |
parent | d32f04f70eb5b1e588e62c0fbd6ffd25b4b723b7 (diff) |
Tons more work on tables.
Diffstat (limited to 'flexdef.h')
-rw-r--r-- | flexdef.h | 37 |
1 files changed, 27 insertions, 10 deletions
@@ -445,16 +445,6 @@ extern int C_plus_plus, long_align, use_read, yytext_is_array, do_yywrap; extern int csize; extern int yymore_used, reject, real_reject, continued_action, in_rule; -/* - * tablesext - if true, create external tables - * tablestoggle - if true, output external tables code while processing skel - * tablesfilename - filename for external tables - * tablesout - FILE stream for external tables - */ -extern bool tablesext, tablestoggle; -extern char *tablesfilename; -extern FILE *tablesout; - extern int yymore_really_used, reject_really_used; @@ -1157,7 +1147,34 @@ extern char *chomp (char *str); /* Tables serialization API declarations. */ #include "tables_shared.h" +struct yytbl_writer { + FILE *out; + uint32_t total_written; + /**< bytes written so far */ + fpos_t th_ssize_pos; + /**< position of th_ssize */ +}; + + +/* + * tablesext - if true, create external tables + * tablestoggle - if true, output external tables code while processing skel + * tablesfilename - filename for external tables + * tableswr - writer for external tables + */ +extern bool tablesext, tablestoggle; +extern char *tablesfilename; +extern struct yytbl_writer tableswr; + +int yytbl_writer_init (struct yytbl_writer *, FILE *); +int yytbl_hdr_init (struct yytbl_hdr *th, const char *version_str, + const char *name); int yytbl_data_init (struct yytbl_data *tbl, enum yytbl_id id); +int yytbl_data_destroy (struct yytbl_data *td); +int yytbl_hdr_fwrite (struct yytbl_writer *wr, + const struct yytbl_hdr *th); +int yytbl_data_fwrite (struct yytbl_writer *wr, struct yytbl_data *td); +void yytbl_data_compress (struct yytbl_data *tbl); struct yytbl_data *mkftbl (void); |