mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-03-22 02:31:28 +00:00
Major header reworking, this respects the namespaces properly. Makes object dependency more obvious, allows for better make caches, and prevents misuse of library features, i.e use con_* instead of printf.
This commit is contained in:
parent
b2348e1de0
commit
11179a2a71
17 changed files with 43 additions and 19 deletions
1
ast.c
1
ast.c
|
@ -21,7 +21,6 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
1
code.c
1
code.c
|
@ -21,6 +21,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "gmqcc.h"
|
||||
|
||||
/*
|
||||
|
|
1
conout.c
1
conout.c
|
@ -21,7 +21,6 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
#include "gmqcc.h"
|
||||
#include <stdio.h>
|
||||
|
||||
/*
|
||||
* isatty/STDERR_FILENO/STDOUT_FILNO
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include "gmqcc.h"
|
||||
|
||||
/*
|
||||
|
|
1
exec.c
1
exec.c
|
@ -26,6 +26,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
|
|
3
ftepp.c
3
ftepp.c
|
@ -22,7 +22,10 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
#include "lexer.h"
|
||||
|
||||
|
|
6
gmqcc.h
6
gmqcc.h
|
@ -23,12 +23,8 @@
|
|||
*/
|
||||
#ifndef GMQCC_HDR
|
||||
#define GMQCC_HDR
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <ctype.h>
|
||||
#include <stdio.h> /* TODO: remove this */
|
||||
|
||||
/*
|
||||
* Disable some over protective warnings in visual studio because fixing them is a waste
|
||||
|
|
1
ir.c
1
ir.c
|
@ -23,6 +23,7 @@
|
|||
*/
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
#include "ir.h"
|
||||
|
||||
|
|
6
lexer.c
6
lexer.c
|
@ -20,14 +20,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
#include "lexer.h"
|
||||
|
||||
/*
|
||||
* List of Keywords
|
||||
*/
|
||||
|
|
1
lexer.h
1
lexer.h
|
@ -22,7 +22,6 @@
|
|||
*/
|
||||
#ifndef GMQCC_LEXER_HDR
|
||||
#define GMQCC_LEXER_HDR
|
||||
|
||||
typedef struct token_s token;
|
||||
|
||||
struct token_s {
|
||||
|
|
8
main.c
8
main.c
|
@ -21,9 +21,15 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
|
||||
#include "gmqcc.h"
|
||||
#include "lexer.h"
|
||||
#include <time.h>
|
||||
|
||||
/* TODO: cleanup this whole file .. it's a fuckign mess */
|
||||
|
||||
|
|
5
opts.c
5
opts.c
|
@ -21,7 +21,12 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
unsigned int opts_optimizationcount[COUNT_OPTIMIZATIONS];
|
||||
opts_cmd_t opts; /* command lien options */
|
||||
|
||||
|
|
3
pak.c
3
pak.c
|
@ -20,6 +20,9 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
/*
|
||||
|
|
3
parser.c
3
parser.c
|
@ -21,8 +21,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
|
11
stat.c
11
stat.c
|
@ -1,3 +1,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
/*
|
||||
|
@ -22,6 +26,12 @@ typedef struct {
|
|||
size_t value;
|
||||
} stat_size_entry_t, **stat_size_table_t;
|
||||
|
||||
typedef struct {
|
||||
uint64_t used;
|
||||
uint64_t type;
|
||||
uint64_t size;
|
||||
} stat_entry_t;
|
||||
|
||||
static uint64_t stat_mem_allocated = 0;
|
||||
static uint64_t stat_mem_deallocated = 0;
|
||||
static uint64_t stat_mem_allocated_total = 0;
|
||||
|
@ -37,7 +47,6 @@ static stat_size_table_t stat_size_vectors = NULL;
|
|||
static stat_size_table_t stat_size_hashtables = NULL;
|
||||
static stat_mem_block_t *stat_mem_block_root = NULL;
|
||||
|
||||
|
||||
/*
|
||||
* A tiny size_t key-value hashtbale for tracking vector and hashtable
|
||||
* sizes. We can use it for other things too, if we need to. This is
|
||||
|
|
5
test.c
5
test.c
|
@ -20,10 +20,13 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include "gmqcc.h"
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
opts_cmd_t opts;
|
||||
|
||||
static const char *task_bins[] = {
|
||||
|
|
5
util.c
5
util.c
|
@ -21,8 +21,9 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include "gmqcc.h"
|
||||
|
||||
void util_debug(const char *area, const char *ms, ...) {
|
||||
|
|
Loading…
Reference in a new issue