Commit graph

53 commits

Author SHA1 Message Date
Bill Currie
b7cfb95a64 update for new progs loader api and the makefile for the option of static
linking
2002-01-30 17:41:16 +00:00
Bill Currie
85588c8fcb start implementing the api for input lines and clean up a couple csqc
prototype issues.
2002-01-23 22:37:44 +00:00
Bill Currie
cef918df83 get array initialisation worrking 2002-01-18 08:26:37 +00:00
Bill Currie
3dafbebf10 fix up #0 builtin functions at runtime. not done automaticly (need to call
PR_RelocateBuiltins) and fix a bug with profiling and unlimited execution
counts
2001-12-14 08:15:04 +00:00
Bill Currie
f9149a0d6c finally get around to renaming type_name to pr_type_name 2001-12-12 17:15:09 +00:00
Bill Currie
cc34e5954f lots of work on better array/pointer/struct handline. doesn't quite work yet 2001-12-12 08:39:47 +00:00
Bill Currie
0bb01f310f don't crash when there are too many entities for update messages. just ignore
the excess.
2001-12-10 03:17:21 +00:00
Bill Currie
c60dc54697 Makefile:
update qfcc options
main.qc:
	go back to the original intent :)
2001-11-02 03:03:01 +00:00
Bill Currie
85c9e0ab1e more externs cleaned up 2001-10-29 17:46:03 +00:00
Adam Olsen
3bba5398ba - audit malloc usage. now everything checks the return value :) 2001-10-24 22:50:06 +00:00
Bill Currie
922895ed99 comment out unused var 2001-10-02 19:33:31 +00:00
Bill Currie
7407e4f1b7 and some more 2001-09-28 07:09:38 +00:00
Bill Currie
e71cbaf5ef fix for -- 2001-08-20 22:16:07 +00:00
Bill Currie
c2d3d8f3ab temp def expressions and ?:
seems to work :)
2001-08-11 21:15:24 +00:00
Adam Olsen
caeb31e6ca start of the support for chained function calls. Actually, they
should work fine now, there's just some extra temp vars we want to
remove before we can consider it "done" :)
2001-08-10 20:35:42 +00:00
Adam Olsen
6414897dae got a few new operators for qc :)
<< >> % which all act like their C counterparts
+= -= *= /= &= ^= |= <<= >>= %= which just expand into the obvious,
also like the C versions.
2001-08-10 16:17:00 +00:00
Bill Currie
2774260898 test ^ 2001-08-09 16:39:08 +00:00
Bill Currie
081d8f3c47 ^ and ~ operators for qc (^ from Rhamphoryncus) and clean up the punctuation
line in qc-lex.l (why didn't I think to do that in the first place?!?)
2001-08-09 16:34:46 +00:00
Adam Olsen
ae133d0a90 Modify progs to add builtins at runtime. It should be trivial to
lookup functions by name, and make all our new QC builtins allocate
numbers automatically.
2001-08-03 06:40:28 +00:00
Bill Currie
89da47335b tests, tests, tests 2001-07-27 20:56:16 +00:00
Bill Currie
c553917c53 various tests 2001-07-25 21:48:20 +00:00
Bill Currie
638cd005b0 return type testing 2001-07-25 02:28:04 +00:00
Bill Currie
07fbe47294 tests for if (simple expression) 2001-07-24 22:29:16 +00:00
Bill Currie
c248372e20 Initial integer type support. qfcc /is/ partially broken when it comes to
integer constants and float function args/return values.

pr_comp.h:
	o  add the integer opcodes to pr_opcode_e
pr_edict.c:
	o  add "quaternion" and "integer" to type_name[]
	o  support quatnernion and integers types when printing values
	o  support the integer opcodes when bounds checking
pr_exec.c
	o  enable the integer opcodes
pr_opcode:
	o  add the integer opcodes to the opcode table
	o  logical operators all result in an integer rather than a value
expr.h:
	o  rename int_val to integer_val
qfcc.h:
	o  kill another magic number
expr.c:
	o  move the opcode to string conversion out of type_mismatch and into
	   get_op_string
	o  rename int_val to integer_val
	o  general integer type support.
	o  generate an internal comipiler error for null opcodes rather than
	   segging.
pr_imm.c:
	o  rename int_val to integer_val
	o  support integer constants, converting to float when needed.
pr_lex.c:
	o  magic number death and support quaternions and integers in type_size[]
qc-lex.l
	o  rename int_val to integer_val
	o  support quaternion and integer type keywords
qc-parse.y:
	o  rename int_val to integer_val
	o  use binary_expr instead of new_binary_expr for local initialized
	   variables
builtins.c:
	o  rename int_val to integer_val
	o  fix most (all?) of the INT related FIXMEs
defs.qc:
	o  use integer instead of float where it makes sense
main.c:
	o  read_result is now integer rather than float
main.qc:
	o  float -> integer where appropriate
	o  new test for int const to float arg
2001-07-23 01:31:22 +00:00
Bill Currie
1fca85ee0a kill some unneeded tests 2001-07-20 23:18:03 +00:00
Bill Currie
edcc313501 debug info for local variables is now used. only works when tracing atm:/ 2001-07-19 07:27:14 +00:00
Bill Currie
47a6f2c9b5 pr_debug.c:
capitolise CRC and add a \n to the message
sv_progs.c (both nq and qw):
	don't bother checking the progdefs.h crc: it's just not needed any more
pr_imm.c:
	use r instead of rep when checking the hash tables.
main.c (quaq):
	make developer work and set com_filesize (otherwise, progs crc doesn't
	get set properly (com_filesize, not developer:))
2001-07-18 21:28:41 +00:00
Bill Currie
3eedd3d8fc more tests 2001-07-18 19:04:47 +00:00
Bill Currie
9d50fea8e5 more tests 2001-07-18 06:37:59 +00:00
Bill Currie
c749bc77be add *.sym 2001-07-15 02:58:22 +00:00
Bill Currie
9fa7ecd14d line number tests for while 2001-07-15 01:49:24 +00:00
Bill Currie
6e06ecc461 debug testing 2001-07-14 23:52:56 +00:00
Bill Currie
7fce7e53ff more test (need to find a way to do automated tests, I think) 2001-07-12 23:11:40 +00:00
Bill Currie
ecff96258f cmd.[ch]:
api change: Cmd_Args () now takes a parameter inidcating which arg to
	start at for grabbing the un-parsed command line
qw/source/sv_ccmds.c:
	implement kk's tell command and user name matching (though # is used for
	the wildcard and it's still case sensitive)
everything else:
	adjust for the new Cmd_Args protype
2001-07-10 18:25:54 +00:00
Bill Currie
f6575ca262 more testing 2001-07-07 02:38:40 +00:00
Bill Currie
5a019e9321 don't need to print statement addresses any more 2001-06-29 00:05:34 +00:00
Bill Currie
dfdff6cc59 more testing and add traceon/traceoff to the builtins 2001-06-27 22:56:52 +00:00
Bill Currie
b285ab003d more tests 2001-06-27 21:15:15 +00:00
Bill Currie
1c54a3ddb7 why not? 2001-06-27 05:48:25 +00:00
Bill Currie
a35c049744 main.c:
give instruction address in opcode dump
main.qc:
	more test code
2001-06-27 05:46:53 +00:00
Bill Currie
e61884fefb add a test for initialized locals 2001-06-08 22:54:34 +00:00
Bill Currie
ef99ad24b0 const merge testing. qfcc is currently borked in that dept. 2001-06-08 00:14:11 +00:00
Bill Currie
bddf7069a2 might as well return the result of the main in the progs 2001-06-06 21:30:58 +00:00
Bill Currie
e349ed3013 implement file io for qwaq (and cat in qc }:> ) 2001-06-06 20:05:08 +00:00
Bill Currie
3d566d47e3 more testing 2001-06-06 00:38:24 +00:00
Bill Currie
1e6d69e2be main.c:
allow dumping to work with entities
main.qc:
	more tests
2001-06-05 23:53:55 +00:00
Bill Currie
e339e82c01 hash.h is now const correct as is a lot of qfcc 2001-06-04 04:52:14 +00:00
Bill Currie
275e74161b string comparison operators 2001-06-04 03:36:35 +00:00
Bill Currie
09118bc01e pr_comp.h:
add OP_ADD_S. WARNING!!! this /will/ move.
progs.h:
	add prototype for PR_PrintStatement
pr_edict.c:
	add OP_ADD_S support in the progs checker
pr_exec.c:
	implement OP_ADD_S
tools/qfcc/include/.gitignore:
	add config.h.in
qfcc.h:
	nuke PR_NameImmediate and change PR_ParseImmediate's prototype (see
	pr_imm.c)
pr_comp.c:
	add ADD_S, adjust for PR_ParseImmediate's prototype, make
	PR_ParseExpression work with non-sequential opcodes (slow, will work on
	that next). Fix up initialised global parsing.
pr_imm.c:
	nuke PR_NameImmediate. didn't work well and wasn't such a good idea anyway.
	PR_ParseImmediate now accepts a def_t * arg. if null, will allocate a
	new global def, otherwise it will initialize the def passed in.
qwaq/main.c:
	sports some debugging code (dumps info about the progs it's running)
qwaq/main.qc:
	better ADD_S testing
2001-06-03 17:36:49 +00:00
Bill Currie
02003cf229 build the progs automaticly 2001-06-01 22:05:36 +00:00