]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - gmqcc.h
these can be const now
[xonotic/gmqcc.git] / gmqcc.h
diff --git a/gmqcc.h b/gmqcc.h
old mode 100755 (executable)
new mode 100644 (file)
index 6ae52e9..b3ba817
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -361,7 +361,7 @@ void _util_vec_grow(void **a, size_t i, size_t s);
 )
 
 /* exposed interface */
-#define vec_meta(A)       (((vector_t*)(A)) - 1)
+#define vec_meta(A)       (((vector_t*)((void*)A)) - 1)
 #define vec_free(A)       ((void)((A) ? (mem_d((void*)vec_meta(A)), (A) = NULL) : 0))
 #define vec_push(A,V)     (GMQCC_VEC_WILLGROW((A),1), (A)[vec_meta(A)->used++] = (V))
 #define vec_size(A)       ((A) ? vec_meta(A)->used : 0)
@@ -500,9 +500,9 @@ enum {
 #define CV_VAR   -1
 #define CV_WRONG  0x8000 /* magic number to help parsing */
 
-extern const char *type_name        [TYPE_COUNT];
-extern uint16_t    type_store_instr [TYPE_COUNT];
-extern uint16_t    field_store_instr[TYPE_COUNT];
+extern const char    *type_name        [TYPE_COUNT];
+extern const uint16_t type_store_instr [TYPE_COUNT];
+extern const uint16_t field_store_instr[TYPE_COUNT];
 
 /*
  * could use type_store_instr + INSTR_STOREP_F - INSTR_STORE_F
@@ -510,10 +510,10 @@ extern uint16_t    field_store_instr[TYPE_COUNT];
  * instruction set, the old ones are left untouched, thus the _I instructions
  * are at a seperate place.
  */
-extern uint16_t type_storep_instr[TYPE_COUNT];
-extern uint16_t type_eq_instr    [TYPE_COUNT];
-extern uint16_t type_ne_instr    [TYPE_COUNT];
-extern uint16_t type_not_instr   [TYPE_COUNT];
+extern const uint16_t type_storep_instr[TYPE_COUNT];
+extern const uint16_t type_eq_instr    [TYPE_COUNT];
+extern const uint16_t type_ne_instr    [TYPE_COUNT];
+extern const uint16_t type_not_instr   [TYPE_COUNT];
 
 typedef struct {
     uint32_t offset;      /* Offset in file of where data begins  */
@@ -1012,9 +1012,11 @@ typedef struct {
 
 /*
  * line, file, counter, counter_last, random, random_last, date, time
+ * time_stamp.
+ * 
  * increment when items are added
  */
-#define FTEPP_PREDEF_COUNT 8
+#define FTEPP_PREDEF_COUNT 9
 
 struct ftepp_s *ftepp_create           ();
 bool            ftepp_preprocess_file  (struct ftepp_s *ftepp, const char *filename);