]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Fix all the memleaks in the corrector. Holy shit, the amount of hours I wasted trying...
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index bdda81b8b14ffd24dfbcbe60d0c2ac533bffa3d4..36a67fdf282bb6f78b7a9cb3bb437f51912ad427 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -445,6 +445,7 @@ enum {
     TYPE_ARRAY    ,
 
     TYPE_NIL      , /* it's its own type / untyped */
+    TYPE_NOEXPR   , /* simply invalid in expressions */
 
     TYPE_COUNT
 };
@@ -962,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);
@@ -971,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 ========================*/
 /*===================================================================*/