]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Moving prog_section and prog_header to gmqcc.h to not have it twice: previously was...
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 27 Jun 2012 20:04:58 +0000 (22:04 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 27 Jun 2012 20:04:58 +0000 (22:04 +0200)
code.c
exec.h
gmqcc.h

diff --git a/code.c b/code.c
index caeab883b8ada2edb099e2113b9f4cc2ff02357a..d11db046ed6b19fb112ec6fab86e03375220dd91 100644 (file)
--- a/code.c
+++ b/code.c
  */
 #include "gmqcc.h"
 
-typedef struct {
-    uint32_t offset;      /* Offset in file of where data begins  */
-    uint32_t length;      /* Length of section (how many of)      */
-} prog_section;
-
-typedef struct {
-    uint32_t     version;      /* Program version (6)     */
-    uint16_t     crc16;        /* What is this?           */
-    uint16_t     skip;         /* see propsal.txt         */
-
-    prog_section statements;   /* prog_section_statement  */
-    prog_section defs;         /* prog_section_def        */
-    prog_section fields;       /* prog_section_field      */
-    prog_section functions;    /* prog_section_function   */
-    prog_section strings;      /* What is this?           */
-    prog_section globals;      /* What is this?           */
-    uint32_t     entfield;     /* Number of entity fields */
-} prog_header;
-
 /*
  * The macros below expand to a typesafe vector implementation, which
  * can be viewed in gmqcc.h
diff --git a/exec.h b/exec.h
index bfa1f10be0ed5b6e798a2f89b477db473ac8dbc1..bc193c668e4b227d5de130a28f52103b28f4aa79 100644 (file)
--- a/exec.h
+++ b/exec.h
@@ -45,25 +45,6 @@ typedef union {
 typedef char qcfloat_size_is_correct [sizeof(qcfloat) == 4 ?1:-1];
 typedef char qcint_size_is_correct   [sizeof(qcint)   == 4 ?1:-1];
 
-typedef struct {
-    uint32_t offset;
-    uint32_t length;
-} prog_section;
-
-typedef struct {
-    uint32_t     version;
-    uint16_t     crc16;
-    uint16_t     skip;
-
-    prog_section statements;
-    prog_section defs;
-    prog_section fields;
-    prog_section functions;
-    prog_section strings;
-    prog_section globals;
-    uint32_t     entfield;
-} prog_header;
-
 typedef prog_section_both      prog_def;
 typedef prog_section_function  prog_function;
 typedef prog_section_statement prog_statement;
diff --git a/gmqcc.h b/gmqcc.h
index 47c145cf4cae56aee092b8dce60f2900afbf9264..91ad7a3ea27d77cb741350528694edc10e334732 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -372,6 +372,25 @@ enum {
 
 extern size_t type_sizeof[TYPE_COUNT];
 
+typedef struct {
+    uint32_t offset;      /* Offset in file of where data begins  */
+    uint32_t length;      /* Length of section (how many of)      */
+} prog_section;
+
+typedef struct {
+    uint32_t     version;      /* Program version (6)     */
+    uint16_t     crc16;        /* What is this?           */
+    uint16_t     skip;         /* see propsal.txt         */
+
+    prog_section statements;   /* prog_section_statement  */
+    prog_section defs;         /* prog_section_def        */
+    prog_section fields;       /* prog_section_field      */
+    prog_section functions;    /* prog_section_function   */
+    prog_section strings;      /* What is this?           */
+    prog_section globals;      /* What is this?           */
+    uint32_t     entfield;     /* Number of entity fields */
+} prog_header;
+
 /*
  * Each paramater incerements by 3 since vector types hold
  * 3 components (x,y,z).