2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 // this file is shared by quake and qcc
26 typedef unsigned int func_t;
29 typedef enum {ev_void, ev_string, ev_float, ev_vector, ev_entity, ev_field, ev_function, ev_pointer} etype_t;
34 #define OFS_PARM0 4 // leave 3 ofs for each parm to hold vectors
42 #define RESERVED_OFS 28
124 typedef struct statement_s
132 unsigned short type; // if DEF_SAVEGLOBGAL bit is set
133 // the variable needs to be saved in savegames
137 #define DEF_SAVEGLOBAL (1<<15)
143 int first_statement; // negative numbers are builtins
145 int locals; // total ints of parms + locals
147 int profile; // runtime
150 int s_file; // source file defined in
153 qbyte parm_size[MAX_PARMS];
158 int first_statement; // negative numbers are builtins
160 int locals; // total ints of parms + locals
162 int profile; // runtime
163 int builtinsprofile; // cost of builtin functions called by this function
164 int callcount; // times the functions has been called since the last profile call
167 int s_file; // source file defined in
170 qbyte parm_size[MAX_PARMS];
174 #define PROG_VERSION 6
178 int crc; // check of header file
181 int numstatements; // statement 0 is an error
190 int numfunctions; // function 0 is an empty
193 int numstrings; // first string is a null string