*/
#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
int i = 0;
/* omit creation of null code */
- if (opts_omit_nullcode)
+ if (OPTS_FLAG(OMIT_NULL_BYTES))
return;
/*
size_t it = 2;
/* see proposal.txt */
- if (opts_omit_nullcode) {}
+ if (OPTS_FLAG(OMIT_NULL_BYTES)) {}
code_header.statements.offset = sizeof(prog_header);
code_header.statements.length = code_statements_elements;
code_header.defs.offset = code_header.statements.offset + (sizeof(prog_section_statement) * code_statements_elements);
code_header.crc16 = 0; /* TODO: */
code_header.entfield = 0; /* TODO: */
- if (opts_darkplaces_stringtablebug) {
+ if (OPTS_FLAG(DARKPLACES_STRING_TABLE_BUG)) {
util_debug("GEN", "Patching stringtable for -fdarkplaces-stringtablebug\n");
/* >= + P */