]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
Update doc/specification.tex
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
index ab585d5143bb70b9f73e09af01905ce64a02ba97..ae443014678ec7a4aed55688691b8c63952c9395 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -453,7 +453,8 @@ GMQCC_INLINE FILE   *file_open   (const char *, const char *);
 /*=========================== correct.c =============================*/
 /*===================================================================*/
 typedef struct {
-    char ***edits;
+    char   ***edits;
+    size_t  **lens;
 } correction_t;
 
 void  correct_del (correct_trie_t*, size_t **);
@@ -683,17 +684,11 @@ enum {
     INSTR_BITAND,
     INSTR_BITOR,
 
-    /*
-     * Virtual instructions used by the assembler
-     * keep at the end but before virtual instructions
-     * for the IR below.
-     */
-    AINSTR_END,
-
     /*
      * Virtual instructions used by the IR
      * Keep at the end!
      */
+    VINSTR_END,
     VINSTR_PHI,
     VINSTR_JUMP,
     VINSTR_COND,
@@ -1063,7 +1058,6 @@ int     u8_fromchar(uchar_t w,   char *to,     size_t maxlen);
 typedef struct {
     const char *name;
     longbit     bit;
-    const char *description;
 } opts_flag_def;
 
 bool opts_setflag  (const char *, bool);
@@ -1084,65 +1078,56 @@ void opts_restore_non_Werror_all();
 
 enum {
 # define GMQCC_TYPE_FLAGS
-# define GMQCC_DEFINE_FLAG(X, Y) X,
+# define GMQCC_DEFINE_FLAG(X) X,
 #  include "opts.def"
     COUNT_FLAGS
 };
 static const opts_flag_def opts_flag_list[] = {
 # define GMQCC_TYPE_FLAGS
-# define GMQCC_DEFINE_FLAG(X, Y) { #X, LONGBIT(X), Y},
+# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(X) },
 #  include "opts.def"
-    { NULL, LONGBIT(0), "" }
+    { NULL, LONGBIT(0) }
 };
 
 enum {
 # define GMQCC_TYPE_WARNS
-# define GMQCC_DEFINE_FLAG(X, Y) WARN_##X,
+# define GMQCC_DEFINE_FLAG(X) WARN_##X,
 #  include "opts.def"
     COUNT_WARNINGS
 };
 static const opts_flag_def opts_warn_list[] = {
 # define GMQCC_TYPE_WARNS
-# define GMQCC_DEFINE_FLAG(X, Y) { #X, LONGBIT(WARN_##X), Y },
+# define GMQCC_DEFINE_FLAG(X) { #X, LONGBIT(WARN_##X) },
 #  include "opts.def"
-    { NULL, LONGBIT(0), "" }
+    { NULL, LONGBIT(0) }
 };
 
 enum {
 # define GMQCC_TYPE_OPTIMIZATIONS
-# define GMQCC_DEFINE_FLAG(NAME, MIN_O, Y) OPTIM_##NAME,
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) OPTIM_##NAME,
 #  include "opts.def"
     COUNT_OPTIMIZATIONS
 };
 static const opts_flag_def opts_opt_list[] = {
 # define GMQCC_TYPE_OPTIMIZATIONS
-# define GMQCC_DEFINE_FLAG(NAME, MIN_O, Y) { #NAME, LONGBIT(OPTIM_##NAME), Y},
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) { #NAME, LONGBIT(OPTIM_##NAME) },
 #  include "opts.def"
-    { NULL, LONGBIT(0), "" }
+    { NULL, LONGBIT(0) }
 };
 static const unsigned int opts_opt_oflag[] = {
 # define GMQCC_TYPE_OPTIMIZATIONS
-# define GMQCC_DEFINE_FLAG(NAME, MIN_O, Y) MIN_O,
+# define GMQCC_DEFINE_FLAG(NAME, MIN_O) MIN_O,
 #  include "opts.def"
     0
 };
 
 enum {
 #   define GMQCC_TYPE_OPTIONS
-#   define GMQCC_DEFINE_FLAG(X, Y) OPTION_##X,
+#   define GMQCC_DEFINE_FLAG(X) OPTION_##X,
 #   include "opts.def"
     OPTION_COUNT
 };
 
-
-GMQCC_USED static const char *opts_options_descriptions[] = {
-#   define GMQCC_TYPE_OPTIONS
-#   define GMQCC_DEFINE_FLAG(X, Y) Y,
-#   include "opts.def"
-    "<null>"
-};
-
-
 extern unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
 
 /* other options: */
@@ -1153,13 +1138,6 @@ typedef enum {
     COMPILER_GMQCC    /* this   QuakeC */
 } opts_std_t;
 
-typedef enum {
-    OPT_TYPE_BOOL,
-    OPT_TYPE_U16,
-    OPT_TYPE_U32,
-    OPT_TYPE_STR
-} opt_type_t;
-
 typedef union {
     bool     B;
     uint16_t U16;