4 //#define COMMONINLINES
5 //#define inline _inline
20 #ifdef __MINGW32_VERSION
24 #define progfuncs qccprogfuncs
25 extern progfuncs_t *qccprogfuncs;
28 #define stricmp strcasecmp
29 #define strnicmp strncasecmp
32 void *qccHunkAlloc(size_t mem);
33 void qccClearHunk(void);
35 extern short (*PRBigShort) (short l);
36 extern short (*PRLittleShort) (short l);
37 extern int (*PRBigLong) (int l);
38 extern int (*PRLittleLong) (int l);
39 extern float (*PRBigFloat) (float l);
40 extern float (*PRLittleFloat) (float l);
45 #define MAX_NAME 128 // chars long
47 extern unsigned int MAX_REGS;
49 extern int MAX_STRINGS;
50 extern int MAX_GLOBALS;
51 extern int MAX_FIELDS;
52 extern int MAX_STATEMENTS;
53 extern int MAX_FUNCTIONS;
55 #define MAX_SOUNDS 1024 //convert to int?
56 #define MAX_TEXTURES 1024 //convert to int?
57 #define MAX_MODELS 1024 //convert to int?
58 #define MAX_FILES 1024 //convert to int?
59 #define MAX_DATA_PATH 64
61 extern int MAX_CONSTANTS;
62 #define MAXCONSTANTLENGTH 64
63 #define MAXCONSTANTPARAMLENGTH 32
64 #define MAXCONSTANTPARAMS 32
66 typedef enum {QCF_STANDARD, QCF_HEXEN2, QCF_DARKPLACES, QCF_FTE, QCF_FTEDEBUG, QCF_KK7, QCF_QTEST} qcc_targetformat_t;
67 extern qcc_targetformat_t qcc_targetformat;
74 "stopped at 10 errors"
76 other pointer types for models and clients?
80 always initialize all variables to something safe
82 the def->type->type arrangement is really silly.
86 parm count type checking
88 immediate overflow checking
90 pass the first two parms in call->b and call->c
98 // comments discard text until the end of line
99 / * * / comments discard all enclosed text (spaced out on this line because this documentation is in a regular C comment block, and typing them in normally causes a parse error)
104 <type> <name> [ = <immediate>] {, <name> [ = <immediate>] };
109 simple types: void, float, vector, string, or entity
115 vector org; // also creates org_x, org_y, and org_z float defs
118 A function type is specified as: simpletype ( type name {,type name} )
119 The names are ignored except when the function is initialized.
122 void(vector destination, float speed, void() callback) SUB_CalcMove;
123 void(...) dprint; // variable argument builtin
125 A field type is specified as: .type
128 .void() think, touch, use;
133 Names are a maximum of 64 characters, must begin with A-Z,a-z, or _, and can continue with those characters or 0-9.
135 There are two levels of scoping: global, and function. The parameter list of a function and any vars declared inside a function with the "local" statement are only visible within that function,
140 Float immediates must begin with 0-9 or minus sign. .5 is illegal.
142 A parsing ambiguity is present with negative constants. "a-5" will be parsed as "a", then "-5", causing an error. Seperate the - from the digits with a space "a - 5" to get the proper behavior.
148 Vector immediates are three float immediates enclosed in single quotes.
152 String immediates are characters enclosed in double quotes. The string cannot contain explicit newlines, but the escape character \n can embed one. The \" escape can be used to include a quote in the string.
157 Code immediates are statements enclosed in {} braces.
159 { <multiple statements> }
161 local <type> <name> [ = <immediate>] {, <name> [ = <immediate>] };
163 if ( <expression> ) <statement> [ else <statement> ];
164 while ( <expression> ) <statement>;
165 do <statement> while ( <expression> );
166 <function name> ( <function parms> );
169 combiations of names and these operators with standard C precedence:
170 "&&", "||", "<=", ">=","==", "!=", "!", "*", "/", "-", "+", "=", ".", "<", ">", "&", "|"
171 Parenthesis can be used to alter order of operation.
172 The & and | operations perform integral bit ops on floats
174 A built in function immediate is a number sign followed by an integer.
181 Source files are processed sequentially without dumping any state, so if a defs file is the first one processed, the definitions will be available to all other files.
183 The language is strongly typed and there are no casts.
185 Anything that is initialized is assumed to be constant, and will have immediates folded into it. If you change the value, your program will malfunction. All uninitialized globals will be saved to savegame files.
187 Functions cannot have more than eight parameters.
189 Error recovery during compilation is minimal. It will skip to the next global definition, so you will never see more than one error at a time in a given function. All compilation aborts after ten error messages.
191 Names can be defined multiple times until they are defined with an initialization, allowing functions to be prototyped before their definition.
193 void() MyFunction; // the prototype
195 void() MyFunction = // the initialization
197 dprint ("we're here\n");
207 Code execution is initiated by C code in quake from two main places: the timed think routines for periodic control, and the touch function when two objects impact each other.
209 There are three global variables that are set before beginning code execution:
210 entity world; // the server's world object, which holds all global
211 // state for the server, like the deathmatch flags
212 // and the body ques.
213 entity self; // the entity the function is executing for
214 entity other; // the other object in an impact, not used for thinks
215 float time; // the current game time. Note that because the
216 // entities in the world are simulated sequentially,
217 // time is NOT strictly increasing. An impact late
218 // in one entity's time slice may set time higher
219 // than the think function of the next entity.
220 // The difference is limited to 0.1 seconds.
221 Execution is also caused by a few uncommon events, like the addition of a new client to an existing server.
223 There is a runnaway counter that stops a program if 100000 statements are executed, assuming it is in an infinite loop.
225 It is acceptable to change the system set global variables. This is usually done to pose as another entity by changing self and calling a function.
227 The interpretation is fairly efficient, but it is still over an order of magnitude slower than compiled C code. All time consuming operations should be made into built in functions.
229 A profile counter is kept for each function, and incremented for each interpreted instruction inside that function. The "profile" console command in Quake will dump out the top 10 functions, then clear all the counters. The "profile all" command will dump sorted stats for every function that has been executed.
232 afunc ( 4, bfunc(1,2,3));
233 will fail because there is a shared parameter marshaling area, which will cause the 1 from bfunc to overwrite the 4 already placed in parm0. When a function is called, it copies the parms from the globals into it's privately scoped variables, so there is no collision when calling another function.
235 total = factorial(3) + factorial(4);
236 Will fail because the return value from functions is held in a single global area. If this really gets on your nerves, tell me and I can work around it at a slight performance and space penalty by allocating a new register for the function call and copying it out.
241 void(string text) dprint;
242 Prints the string to the server console.
244 void(entity client, string text) cprint;
245 Prints a message to a specific client.
247 void(string text) bprint;
248 Broadcast prints a message to all clients on the current server.
251 Returns a totally empty entity. You can manually set everything up, or just set the origin and call one of the existing entity setup functions.
253 entity(entity start, .string field, string match) find;
254 Searches the server entity list beginning at start, looking for an entity that has entity.field = match. To start at the beginning of the list, pass world. World is returned when the end of the list is reached.
256 <FIXME: define all the other functions...>
262 The && and || operators DO NOT EARLY OUT like C!
264 Don't confuse single quoted vectors with double quoted strings
266 The function declaration syntax takes a little getting used to.
268 Don't forget the ; after the trailing brace of a function initialization.
270 Don't forget the "local" before defining local variables.
272 There are no ++ / -- operators, or operate/assign operators.
279 extern hashtable_t compconstantstable;
280 extern hashtable_t globalstable, localstable;
286 //=============================================================================
288 // offsets are always multiplied by 4 before using
289 typedef unsigned int gofs_t; // offset in global data block
290 typedef struct QCC_function_s QCC_function_t;
294 typedef struct QCC_type_s
298 struct QCC_type_s *parentclass; //type_entity...
299 struct QCC_type_s *next;
300 // function types are more complex
301 struct QCC_type_s *aux_type; // return type or field type
302 struct QCC_type_s *param;
303 int num_parms; // -1 = variable args
304 // struct QCC_type_s *parm_types[MAX_PARMS]; // only [num_parms] allocated
306 unsigned int ofs; //inside a structure.
310 int typecmp(QCC_type_t *a, QCC_type_t *b);
312 typedef struct temp_s {
314 struct QCC_def_s *scope;
316 struct QCC_def_s *lastfunc;
322 void QCC_PurgeTemps(void);
325 typedef struct QCC_def_s
329 struct QCC_def_s *next;
330 struct QCC_def_s *nextlocal; //provides a chain of local variables for the opt_locals_marshalling optimisation.
332 struct QCC_def_s *scope; // function the var was defined in, or NULL
333 int initialized; // 1 when a declaration included "= immediate"
334 int constant; // 1 says we can use the value over and over again
337 int timescalled; //part of the opt_stripfunctions optimisation.
346 pbool subscoped_away;
351 //============================================================================
353 // pr_loc.h -- program local defs
356 //=============================================================================
357 extern char QCC_copyright[1024];
358 extern char QCC_Packname[5][128];
359 extern int QCC_packid;
361 typedef union QCC_eval_s
368 union QCC_eval_s *ptr;
371 const extern unsigned int type_size[];
372 //extern QCC_def_t *def_for_type[9];
374 extern QCC_type_t *type_void, *type_string, *type_float, *type_vector, *type_entity, *type_field, *type_function, *type_pointer, *type_integer, *type_variant, *type_floatfield;
376 struct QCC_function_s
378 int builtin; // if non 0, call an internal function
379 int code; // first statement
380 char *file; // source file with definition
382 struct QCC_def_s *def;
383 unsigned int parm_ofs[MAX_PARMS]; // always contiguous, right?
388 // output generated by prog parsing
397 QCC_def_t def_head; // unused head of linked list
398 QCC_def_t *def_tail; // add new defs after this and move it
399 QCC_def_t *localvars; // chain of variables which need to be pushed and stuff.
404 extern QCC_pr_info_t pr;
409 char name[MAXCONSTANTLENGTH];
411 char params[MAXCONSTANTPARAMS][MAXCONSTANTPARAMLENGTH];
417 } CompilerConstant_t;
418 extern CompilerConstant_t *CompilerConstant;
420 //============================================================================
422 extern pbool pr_dumpasm;
424 //extern QCC_def_t **pr_global_defs; // to find def for a global variable
427 tt_eof, // end of file reached
428 tt_name, // an alphanumeric name token
429 tt_punct, // code punctuation
430 tt_immediate, // string, float, vector
433 extern char pr_token[8192];
434 extern token_type_t pr_token_type;
435 extern QCC_type_t *pr_immediate_type;
436 extern QCC_eval_t pr_immediate;
438 extern pbool keyword_asm;
439 extern pbool keyword_break;
440 extern pbool keyword_case;
441 extern pbool keyword_class;
442 extern pbool keyword_const;
443 extern pbool keyword_continue;
444 extern pbool keyword_default;
445 extern pbool keyword_do;
446 extern pbool keyword_entity;
447 extern pbool keyword_float;
448 extern pbool keyword_for;
449 extern pbool keyword_goto;
450 extern pbool keyword_int;
451 extern pbool keyword_integer;
452 extern pbool keyword_state;
453 extern pbool keyword_string;
454 extern pbool keyword_struct;
455 extern pbool keyword_switch;
456 extern pbool keyword_thinktime;
457 extern pbool keyword_var;
458 extern pbool keyword_vector;
459 extern pbool keyword_union;
460 extern pbool keyword_enum; //kinda like in c, but typedef not supported.
461 extern pbool keyword_enumflags; //like enum, but doubles instead of adds 1.
462 extern pbool keyword_typedef; //fixme
463 extern pbool keyword_extern; //function is external, don't error or warn if the body was not found
464 extern pbool keyword_shared; //mark global to be copied over when progs changes (part of FTE_MULTIPROGS)
465 extern pbool keyword_noref; //nowhere else references this, don't strip it.
466 extern pbool keyword_nosave; //don't write the def to the output.
467 extern pbool keyword_union; //you surly know what a union is!
470 extern pbool keywords_coexist;
471 extern pbool output_parms;
472 extern pbool autoprototype;
473 extern pbool pr_subscopedlocals;
474 extern pbool flag_ifstring;
475 extern pbool flag_iffloat;
476 extern pbool flag_acc;
477 extern pbool flag_caseinsensative;
478 extern pbool flag_laxcasts;
479 extern pbool flag_hashonly;
480 extern pbool flag_fasttrackarrays;
481 extern pbool flag_assume_integer;
482 extern pbool flag_msvcstyle;
483 extern pbool flag_filetimes;
485 extern pbool opt_overlaptemps;
486 extern pbool opt_shortenifnots;
487 extern pbool opt_noduplicatestrings;
488 extern pbool opt_constantarithmatic;
489 extern pbool opt_nonvec_parms;
490 extern pbool opt_constant_names;
491 extern pbool opt_precache_file;
492 extern pbool opt_filenames;
493 extern pbool opt_assignments;
494 extern pbool opt_unreferenced;
495 extern pbool opt_function_names;
496 extern pbool opt_locals;
497 extern pbool opt_dupconstdefs;
498 extern pbool opt_constant_names_strings;
499 extern pbool opt_return_only;
500 extern pbool opt_compound_jumps;
501 //extern pbool opt_comexprremoval;
502 extern pbool opt_stripfunctions;
503 extern pbool opt_locals_marshalling;
504 extern pbool opt_logicops;
505 extern pbool opt_vectorcalls;
507 extern int optres_shortenifnots;
508 extern int optres_overlaptemps;
509 extern int optres_noduplicatestrings;
510 extern int optres_constantarithmatic;
511 extern int optres_nonvec_parms;
512 extern int optres_constant_names;
513 extern int optres_precache_file;
514 extern int optres_filenames;
515 extern int optres_assignments;
516 extern int optres_unreferenced;
517 extern int optres_function_names;
518 extern int optres_locals;
519 extern int optres_dupconstdefs;
520 extern int optres_constant_names_strings;
521 extern int optres_return_only;
522 extern int optres_compound_jumps;
523 //extern int optres_comexprremoval;
524 extern int optres_stripfunctions;
525 extern int optres_locals_marshalling;
526 extern int optres_logicops;
528 pbool CompileParams(progfuncs_t *progfuncs, int doall, int nump, char **parms);
530 void QCC_PR_PrintStatement (QCC_dstatement_t *s);
532 void QCC_PR_Lex (void);
533 // reads the next token into pr_token and classifies its type
535 QCC_type_t *QCC_PR_NewType (char *name, int basictype);
536 QCC_type_t *QCC_PR_ParseType (int newtype); extern pbool type_inlinefunction;
537 QCC_type_t *QCC_TypeForName(char *name);
538 QCC_type_t *QCC_PR_ParseFunctionType (int newtype, QCC_type_t *returntype);
539 QCC_type_t *QCC_PR_ParseFunctionTypeReacc (int newtype, QCC_type_t *returntype);
540 char *QCC_PR_ParseName (void);
541 CompilerConstant_t *QCC_PR_DefineName(char *name);
543 void QCC_RemapOffsets(unsigned int firststatement, unsigned int laststatement, unsigned int min, unsigned int max, unsigned int newmin);
545 #ifndef COMMONINLINES
546 pbool QCC_PR_CheckImmediate (char *string);
547 pbool QCC_PR_CheckToken (char *string);
548 pbool QCC_PR_CheckName (char *string);
549 void QCC_PR_Expect (char *string);
550 pbool QCC_PR_CheckKeyword(int keywordenabled, char *string);
552 void VARGS QCC_PR_ParseError (int errortype, char *error, ...);
553 void VARGS QCC_PR_ParseWarning (int warningtype, char *error, ...);
554 void VARGS QCC_PR_Warning (int type, char *file, int line, char *error, ...);
555 void VARGS QCC_PR_Note (int type, char *file, int line, char *error, ...);
556 void QCC_PR_ParsePrintDef (int warningtype, QCC_def_t *def);
557 void VARGS QCC_PR_ParseErrorPrintDef (int errortype, QCC_def_t *def, char *error, ...);
559 int QCC_WarningForName(char *name);
561 //QccMain.c must be changed if this is changed.
566 WARN_NOTREFERENCEDCONST,
567 WARN_CONFLICTINGRETURNS,
570 WARN_UNEXPECTEDPUNCT,
571 WARN_ASSIGNMENTTOCONSTANT,
572 WARN_ASSIGNMENTTOCONSTANTFUNC,
573 WARN_MISSINGRETURNVALUE,
574 WARN_WRONGRETURNTYPE,
575 WARN_CORRECTEDRETURNTYPE,
576 WARN_POINTLESSSTATEMENT,
578 WARN_DUPLICATEDEFINITION,
579 WARN_UNDEFNOTDEFINED,
580 WARN_PRECOMPILERMESSAGE,
581 WARN_TOOMANYPARAMETERSFORFUNC,
588 WARN_SWITCHTYPEMISMATCH,
589 WARN_CONFLICTINGUNIONMEMBER,
590 WARN_KEYWORDDISABLED,
591 WARN_ENUMFLAGS_NOTINTEGER,
592 WARN_ENUMFLAGS_NOTBINARY,
593 WARN_CASEINSENSATIVEFRAMEMACRO,
596 WARN_ASSIGNMENTINCONDITIONAL,
599 WARN_IMPLICITCONVERSION,
600 WARN_FIXEDRETURNVALUECONFLICT,
604 WARN_UNREACHABLECODE,
605 WARN_NOTSTANDARDBEHAVIOUR,
606 WARN_INEFFICIENTPLUSPLUS,
607 WARN_DUPLICATEPRECOMPILER,
608 WARN_IDENTICALPRECOMPILER,
609 WARN_FTE_SPECIFIC, //extension that only FTEQCC will have a clue about.
610 WARN_EXTENSION_USED, //extension that frikqcc also understands
612 WARN_LAXCAST, //some errors become this with a compiler flag
613 WARN_UNDESIRABLECONVENTION,
614 WARN_SAMENAMEASGLOBAL,
615 WARN_CONSTANTCOMPARISON,
616 WARN_UNSAFEFUNCTIONRETURNTYPE,
618 ERR_PARSEERRORS, //caused by qcc_pr_parseerror being called.
620 //these are definatly my fault...
624 ERR_TOOMANYSTATEMENTS,
629 ERR_PRECOMPILERCONSTANTTOOLONG,
630 ERR_MACROTOOMANYPARMS,
631 ERR_TOOMANYFRAMEMACROS,
633 //limitations, some are imposed by compiler, some arn't.
637 ERR_TOOMANYCONTINUES,
640 ERR_TOOMANYOPENFILES,
641 ERR_TOOMANYPARAMETERSVARARGS,
642 ERR_TOOMANYTOTALPARAMETERS,
644 //these are probably yours, or qcc being fussy.
646 ERR_BADIMMEDIATETYPE,
649 ERR_FUNCTIONWITHVARGS,
651 ERR_UNKNOWNPUCTUATION,
660 ERR_CONSTANTNOTDEFINED,
663 ERR_TYPEMISMATCHREDEC,
664 ERR_TYPEMISMATCHPARM,
665 ERR_TYPEMISMATCHARRAYSIZE,
666 ERR_UNEXPECTEDPUNCTUATION,
669 ERR_INITIALISEDLOCALFUNCTION,
672 ERR_ARRAYNEEDSBRACES,
673 ERR_TOOMANYINITIALISERS,
674 ERR_TYPEINVALIDINSTRUCT,
679 ERR_SHAREDINITIALISED,
681 ERR_BADARRAYINDEXTYPE,
684 ERR_BADPLUSPLUSOPERATOR,
687 ERR_MULTIPLEDEFAULTS,
688 ERR_CASENOTIMMEDIATE,
692 ERR_THINKTIMETYPEMISMATCH,
693 ERR_STATETYPEMISMATCH,
694 ERR_BADBUILTINIMMEDIATE,
697 ERR_ILLEGALCONTINUES,
707 ERR_TOOMANYPACKFILES,
708 ERR_INVALIDVECTORIMMEDIATE,
709 ERR_INVALIDSTRINGIMMEDIATE,
710 ERR_BADCHARACTERCODE,
717 #define FLAG_KILLSDEBUGGERS 1
718 #define FLAG_ASDEFAULT 2
719 #define FLAG_SETINGUI 4
720 #define FLAG_HIDDENINGUI 8
721 #define FLAG_MIDCOMPILE 16 //option can be changed mid-compile with the special pragma
725 int optimisationlevel;
726 int flags; //1: kills debuggers. 2: applied as default.
731 extern optimisations_t optimisations[];
735 int flags; //2 applied as default
741 extern compiler_flag_t compiler_flag[];
743 extern pbool qccwarningdisabled[WARN_MAX];
745 extern jmp_buf pr_parse_abort; // longjump with this on parse error
746 extern int pr_source_line;
747 extern char *pr_file_p;
749 void *QCC_PR_Malloc (int size);
754 #define OFS_PARM0 4 // leave 3 ofs for each parm to hold vectors
759 #define RESERVED_OFS 28
762 extern QCC_def_t *pr_scope;
763 extern int pr_error_count, pr_warning_count;
765 void QCC_PR_NewLine (pbool incomment);
766 QCC_def_t *QCC_PR_GetDef (QCC_type_t *type, char *name, QCC_def_t *scope, pbool allocate, int arraysize, pbool saved);
768 void QCC_PR_PrintDefs (void);
770 void QCC_PR_SkipToSemicolon (void);
772 #define MAX_EXTRA_PARMS 128
773 #ifdef MAX_EXTRA_PARMS
774 extern char pr_parm_names[MAX_PARMS+MAX_EXTRA_PARMS][MAX_NAME];
775 extern QCC_def_t *extra_parms[MAX_EXTRA_PARMS];
777 extern char pr_parm_names[MAX_PARMS][MAX_NAME];
779 extern pbool pr_trace;
781 #define G_FLOAT(o) (qcc_pr_globals[o])
782 #define G_INT(o) (*(int *)&qcc_pr_globals[o])
783 #define G_VECTOR(o) (&qcc_pr_globals[o])
784 #define G_STRING(o) (strings + *(QCC_string_t *)&qcc_pr_globals[o])
785 #define G_FUNCTION(o) (*(func_t *)&qcc_pr_globals[o])
787 char *QCC_PR_ValueString (etype_t type, void *val);
789 void QCC_PR_ClearGrabMacros (void);
791 pbool QCC_PR_CompileFile (char *string, char *filename);
792 void QCC_PR_ResetErrorScope(void);
794 extern pbool pr_dumpasm;
796 extern QCC_string_t s_file; // filename for function definition
798 extern QCC_def_t def_ret, def_parms[MAX_PARMS];
800 void QCC_PR_EmitArrayGetFunction(QCC_def_t *scope, char *arrayname);
801 void QCC_PR_EmitArraySetFunction(QCC_def_t *scope, char *arrayname);
802 void QCC_PR_EmitClassFromFunction(QCC_def_t *scope, char *tname);
804 void PostCompile(void);
805 pbool PreCompile(void);
807 //=============================================================================
809 extern char pr_immediate_string[8192];
811 extern float *qcc_pr_globals;
812 extern unsigned int numpr_globals;
814 extern char *strings;
817 extern QCC_dstatement_t *statements;
818 extern int numstatements;
819 extern int *statement_linenums;
821 extern QCC_dfunction_t *functions;
822 extern int numfunctions;
824 extern QCC_ddef_t *qcc_globals;
825 extern int numglobaldefs;
827 extern QCC_def_t *activetemps;
829 extern QCC_ddef_t *fields;
830 extern int numfielddefs;
832 extern QCC_type_t *qcc_typeinfo;
833 extern int numtypeinfos;
834 extern int maxtypeinfos;
836 extern int ForcedCRC;
837 extern pbool defaultnoref;
838 extern pbool defaultstatic;
840 extern int *qcc_tempofs;
841 extern int max_temps;
842 //extern int qcc_functioncalled; //unuse temps if this is true - don't want to reuse the same space.
844 extern int tempsstart;
847 typedef char PATHSTRING[MAX_DATA_PATH];
849 PATHSTRING *precache_sounds;
850 int *precache_sounds_block;
851 int *precache_sounds_used;
854 PATHSTRING *precache_textures;
855 int *precache_textures_block;
858 PATHSTRING *precache_models;
859 int *precache_models_block;
860 int *precache_models_used;
863 PATHSTRING *precache_files;
864 int *precache_files_block;
867 int QCC_CopyString (char *str);
872 typedef struct qcc_cachedsourcefile_s {
876 enum{FT_CODE, FT_DATA} type; //quakec source file or not.
877 struct qcc_cachedsourcefile_s *next;
878 } qcc_cachedsourcefile_t;
879 extern qcc_cachedsourcefile_t *qcc_sourcefile;
886 static bool inline QCC_PR_CheckToken (char *string)
888 if (pr_token_type != tt_punct)
891 if (STRCMP (string, pr_token))
898 static void inline QCC_PR_Expect (char *string)
900 if (strcmp (string, pr_token))
901 QCC_PR_ParseError ("expected %s, found %s",string, pr_token);
906 void editbadfile(char *fname, int line);
907 char *TypeName(QCC_type_t *type);
908 void QCC_PR_IncludeChunk (char *data, pbool duplicate, char *filename);
909 void QCC_PR_IncludeChunkEx(char *data, pbool duplicate, char *filename, CompilerConstant_t *cnst);
910 pbool QCC_PR_UnInclude(void);
911 extern void *(*pHash_Get)(hashtable_t *table, const char *name);
912 extern void *(*pHash_GetNext)(hashtable_t *table, const char *name, void *old);
913 extern void *(*pHash_Add)(hashtable_t *table, const char *name, void *data, bucket_t *);