X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=blobdiff_plain;f=gmqcc.h;h=36a67fdf282bb6f78b7a9cb3bb437f51912ad427;hp=02b9bfe147f0b06535c8f14b5115e10b45272587;hb=7ef051f58a723e48b8d2ca597697e0c7a1ddd209;hpb=686394654fff6ecfc4f6b9a76bec599585d56795 diff --git a/gmqcc.h b/gmqcc.h index 02b9bfe..36a67fd 100644 --- a/gmqcc.h +++ b/gmqcc.h @@ -413,6 +413,7 @@ GMQCC_INLINE int file_error (FILE *); GMQCC_INLINE int file_getc (FILE *); GMQCC_INLINE int file_printf (FILE *, const char *, ...); GMQCC_INLINE int file_puts (FILE *, const char *); +GMQCC_INLINE int file_putc (FILE *, int); GMQCC_INLINE int file_seek (FILE *, long int, int); GMQCC_INLINE size_t file_read (void *, size_t, size_t, FILE *); @@ -444,6 +445,7 @@ enum { TYPE_ARRAY , TYPE_NIL , /* it's its own type / untyped */ + TYPE_NOEXPR , /* simply invalid in expressions */ TYPE_COUNT }; @@ -961,6 +963,18 @@ void parser_cleanup (); /*===================================================================*/ /*====================== ftepp.c commandline ========================*/ /*===================================================================*/ +struct lex_file_s; +typedef struct { + const char *name; + char *(*func)(struct lex_file_s *); +} ftepp_predef_t; + +/* + * line, file, counter, counter_last, random, random_last, date, time + * increment when items are added + */ +#define FTEPP_PREDEF_COUNT 8 + bool ftepp_init (); bool ftepp_preprocess_file (const char *filename); bool ftepp_preprocess_string(const char *name, const char *str); @@ -970,6 +984,8 @@ void ftepp_flush (); void ftepp_add_define (const char *source, const char *name); void ftepp_add_macro (const char *name, const char *value); +extern const ftepp_predef_t ftepp_predefs[FTEPP_PREDEF_COUNT]; + /*===================================================================*/ /*======================= main.c commandline ========================*/ /*===================================================================*/