From f1a2ac624fee31664503adc4b371940b1133fb3b Mon Sep 17 00:00:00 2001 From: "Wolfgang (Blub) Bumiller" Date: Wed, 27 Jun 2012 22:04:58 +0200 Subject: [PATCH] Moving prog_section and prog_header to gmqcc.h to not have it twice: previously was in code.c and exec.h --- code.c | 19 ------------------- exec.h | 19 ------------------- gmqcc.h | 19 +++++++++++++++++++ 3 files changed, 19 insertions(+), 38 deletions(-) diff --git a/code.c b/code.c index caeab88..d11db04 100644 --- a/code.c +++ b/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 diff --git a/exec.h b/exec.h index bfa1f10..bc193c6 100644 --- 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 47c145c..91ad7a3 100644 --- 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). -- 2.39.2