Skip to content
This repository
Browse code

Moving prog_section and prog_header to gmqcc.h to not have it twice: …

…previously was in code.c and exec.h
  • Loading branch information...
commit f1a2ac624fee31664503adc4b371940b1133fb3b 1 parent 178dcb1
Wolfgang Bumiller authored June 27, 2012
19  code.c
@@ -22,25 +22,6 @@
22 22
  */
23 23
 #include "gmqcc.h"
24 24
 
25  
-typedef struct {
26  
-    uint32_t offset;      /* Offset in file of where data begins  */
27  
-    uint32_t length;      /* Length of section (how many of)      */
28  
-} prog_section;
29  
-
30  
-typedef struct {
31  
-    uint32_t     version;      /* Program version (6)     */
32  
-    uint16_t     crc16;        /* What is this?           */
33  
-    uint16_t     skip;         /* see propsal.txt         */
34  
-
35  
-    prog_section statements;   /* prog_section_statement  */
36  
-    prog_section defs;         /* prog_section_def        */
37  
-    prog_section fields;       /* prog_section_field      */
38  
-    prog_section functions;    /* prog_section_function   */
39  
-    prog_section strings;      /* What is this?           */
40  
-    prog_section globals;      /* What is this?           */
41  
-    uint32_t     entfield;     /* Number of entity fields */
42  
-} prog_header;
43  
-
44 25
 /*
45 26
  * The macros below expand to a typesafe vector implementation, which
46 27
  * can be viewed in gmqcc.h
19  exec.h
@@ -45,25 +45,6 @@ typedef union {
45 45
 typedef char qcfloat_size_is_correct [sizeof(qcfloat) == 4 ?1:-1];
46 46
 typedef char qcint_size_is_correct   [sizeof(qcint)   == 4 ?1:-1];
47 47
 
48  
-typedef struct {
49  
-    uint32_t offset;
50  
-    uint32_t length;
51  
-} prog_section;
52  
-
53  
-typedef struct {
54  
-    uint32_t     version;
55  
-    uint16_t     crc16;
56  
-    uint16_t     skip;
57  
-
58  
-    prog_section statements;
59  
-    prog_section defs;
60  
-    prog_section fields;
61  
-    prog_section functions;
62  
-    prog_section strings;
63  
-    prog_section globals;
64  
-    uint32_t     entfield;
65  
-} prog_header;
66  
-
67 48
 typedef prog_section_both      prog_def;
68 49
 typedef prog_section_function  prog_function;
69 50
 typedef prog_section_statement prog_statement;
19  gmqcc.h
@@ -372,6 +372,25 @@ enum {
372 372
 
373 373
 extern size_t type_sizeof[TYPE_COUNT];
374 374
 
  375
+typedef struct {
  376
+    uint32_t offset;      /* Offset in file of where data begins  */
  377
+    uint32_t length;      /* Length of section (how many of)      */
  378
+} prog_section;
  379
+
  380
+typedef struct {
  381
+    uint32_t     version;      /* Program version (6)     */
  382
+    uint16_t     crc16;        /* What is this?           */
  383
+    uint16_t     skip;         /* see propsal.txt         */
  384
+
  385
+    prog_section statements;   /* prog_section_statement  */
  386
+    prog_section defs;         /* prog_section_def        */
  387
+    prog_section fields;       /* prog_section_field      */
  388
+    prog_section functions;    /* prog_section_function   */
  389
+    prog_section strings;      /* What is this?           */
  390
+    prog_section globals;      /* What is this?           */
  391
+    uint32_t     entfield;     /* Number of entity fields */
  392
+} prog_header;
  393
+
375 394
 /*
376 395
  * Each paramater incerements by 3 since vector types hold
377 396
  * 3 components (x,y,z).

0 notes on commit f1a2ac6

Please sign in to comment.
Something went wrong with that request. Please try again.