Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
@Blub Blub authored
Showing with 19 additions and 38 deletions.
  1. +0 −19 code.c
  2. +0 −19 exec.h
  3. +19 −0 gmqcc.h
View
19 code.c
@@ -22,25 +22,6 @@
*/
#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
View
19 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;
View
19 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).
Please sign in to comment.
Something went wrong with that request. Please try again.