quakeforge/tools/qfcc/include/qfcc.h

94 lines
2.2 KiB
C
Raw Normal View History

2002-06-04 18:44:03 +00:00
/*
qfcc.h
2002-06-04 18:44:03 +00:00
#DESCRIPTION#
2002-06-04 18:44:03 +00:00
Copyright (C) 2001 #AUTHOR#
2002-06-04 18:44:03 +00:00
Author: #AUTHOR#
Date: #DATE#
2002-06-04 18:44:03 +00:00
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
2001-12-08 20:40:50 +00:00
$Id$
*/
2001-12-08 20:40:50 +00:00
#ifndef __qfcc_h
#define __qfcc_h
#include "QF/pr_comp.h"
//============================================================================
#define MAX_REGS 65536
//=============================================================================
//
// output generated by prog parsing
//
2002-06-01 05:30:16 +00:00
typedef struct {
2002-06-04 18:44:03 +00:00
struct type_s *types;
2002-06-04 21:23:39 +00:00
struct def_s *def_head; // unused head of linked list
struct def_s **def_tail; // add new defs after this and move it
char *strings;
int strofs;
int strings_size;
dstatement_t *statements;
int *statement_linenums;
int num_statements;
int statements_size;
struct function_s *function_list;
dfunction_t *functions;
int num_functions;
float *globals;
int num_globals;
int globals_size;
2002-06-04 21:23:39 +00:00
int size_fields;
} pr_info_t;
extern pr_info_t pr;
//============================================================================
extern char destfile[];
extern int pr_source_line;
2002-06-04 21:23:39 +00:00
extern struct def_s *pr_scope;
extern int pr_error_count;
#define G_FLOAT(o) (pr.globals[o])
#define G_INT(o) (*(int *)&pr.globals[o])
#define G_VECTOR(o) (&pr.globals[o])
#define G_STRING(o) (pr.strings + *(string_t *)&pr.globals[o])
#define G_FUNCTION(o) (*(func_t *)&pr.globals[o])
#define G_STRUCT(t,o) (*(t *)&pr.globals[o])
extern string_t s_file; // filename for function definition
const char *strip_path (const char *filename);
2001-12-08 20:40:50 +00:00
#endif//__qfcc_h