You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(180) |
Apr
(20) |
May
|
Jun
(91) |
Jul
(78) |
Aug
(18) |
Sep
|
Oct
|
Nov
|
Dec
|
---|
From: Peep P. <so...@us...> - 2004-03-21 09:01:11
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10643 Modified Files: main.c net.c Log Message: Cleaned up included headers. Index: net.c =================================================================== RCS file: /cvsroot/agd/server/src/net.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- net.c 18 Mar 2004 20:45:47 -0000 1.8 +++ net.c 21 Mar 2004 08:51:05 -0000 1.9 @@ -2,13 +2,26 @@ net.c - network communication started in summer 2003 */ -#include "std.h" -#include "lpc_incl.h" +#include <stdio.h> +#include "sys.h" +#include "compile_options.h" + +#include "list.h" +#include "array.h" +#include "lpc.h" +#include "object.h" +#include "interpret.h" +#include "net.h" + #include <errno.h> #define LOOP_PLAYERS() for(i=0;i<players.length;i++) { player_t *pl = players.data[i]; array_t players; +extern list_t all_objects; +extern player_t *this_player; +extern object_t *master, *this_ob; + static int greatest_sockfd, listenfd; static fd_set readfds, writefds; Index: main.c =================================================================== RCS file: /cvsroot/agd/server/src/main.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- main.c 18 Mar 2004 20:46:10 -0000 1.12 +++ main.c 21 Mar 2004 08:51:05 -0000 1.13 @@ -18,14 +18,24 @@ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include "std.h" -#include "lpc_incl.h" +#include "config.h" +#include <stdio.h> +#include <time.h> #include <signal.h> +#include "arch.h" +#include "sys.h" -time_t startup_time; +#include "array.h" +#include "lpc.h" +#include "object.h" +#include "compile.h" + +extern object_t *master; static char *conf_file; +time_t startup_time; + void crash(int sig, char *reason, int retval) { #ifdef DEBUG @@ -166,9 +176,10 @@ if(conf.exit_stats) atexit(mstats_summary); net_listen(conf.port); - printf("Started at %s.\n", do_time()); time(&startup_time); + printf("Started at %s", ctime(&startup_time)); + srand(startup_time); printf("Accepting connections on port %d.\n", conf.port); |
From: Peep P. <so...@us...> - 2004-03-21 09:00:49
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10556 Modified Files: object.c Log Message: Added #ifdef's for debugging functions. Index: object.c =================================================================== RCS file: /cvsroot/agd/server/src/object.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- object.c 20 Mar 2004 19:17:42 -0000 1.9 +++ object.c 21 Mar 2004 08:50:45 -0000 1.10 @@ -220,6 +220,7 @@ return NULL; } +#ifdef DEBUG void report_obs(void) { printf("this_ob: %p ", this_ob); @@ -260,4 +261,4 @@ } printf("-----------------------------------------\n"); } - +#endif |
From: Peep P. <so...@us...> - 2004-03-21 09:00:34
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10497 Modified Files: vars.c Log Message: Removed references to T_LVALUE. Index: vars.c =================================================================== RCS file: /cvsroot/agd/server/src/vars.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vars.c 12 Mar 2004 08:40:10 -0000 1.7 +++ vars.c 21 Mar 2004 08:50:29 -0000 1.8 @@ -27,8 +27,6 @@ return v->u.s && strlen(v->u.s); case T_OBJECT: return v->u.ob?1:0; - case T_LVALUE: - return test_var(v->u.v); default: printf("test_var(): unknown datatype %d, returning false\n", v->type); return 0; @@ -37,11 +35,6 @@ int compare_vars(variable_t *v1, variable_t *v2) { - if(v1->type == T_LVALUE) - v1 = v1->u.v; - if(v2->type == T_LVALUE) - v2 = v2->u.v; - switch(v1->type) { case T_INT: switch(v2->type) { @@ -107,11 +100,11 @@ break; case T_OBJECT: var->u.ob = NULL; break; case T_VOID: - printf("trying to init T_VOID\n"); - break; + printf("trying to init T_VOID\n"); + break; default: - printf("init_var(): unhandled var type %d\n", var->type); - break; + printf("init_var(): unhandled var type %d\n", var->type); + break; } } @@ -124,11 +117,6 @@ if(!v1 || !v2) return NULL; - if(v1->type == T_LVALUE) - v1 = v1->u.v; - else if(v2->type == T_LVALUE) - v2 = v2->u.v; - ret = type_xmalloc(variable_t); ret->name = NULL; /* Just for debugging. Remove later. */ |
From: Peep P. <so...@us...> - 2004-03-20 20:40:18
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23894 Modified Files: README Log Message: Changed date. Index: README =================================================================== RCS file: /cvsroot/agd/server/README,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- README 20 Mar 2004 16:04:20 -0000 1.4 +++ README 20 Mar 2004 20:30:18 -0000 1.5 @@ -1,6 +1,6 @@ -------------------------------------- Adventure Game Driver - 0.0.2-2, March 16, 2004 + 0.0.2-2, March 20, 2004 http://agd.sf.net Peep Pullerits <so...@es...> -------------------------------------- |
From: Peep P. <so...@us...> - 2004-03-20 20:37:56
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23465 Modified Files: ChangeLog Log Message: Removed preallocation of arrays. Index: ChangeLog =================================================================== RCS file: /cvsroot/agd/server/ChangeLog,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ChangeLog 20 Mar 2004 19:18:42 -0000 1.7 +++ ChangeLog 20 Mar 2004 20:27:54 -0000 1.8 @@ -1,5 +1,12 @@ 0.0.2-2: ---------------------------------------------------------------------------- +2004-03-20 + * changed how arrays are allocated - realloc() is now called at + every array_push(), not beforehand. This reduces the memory usage + quite a bit (2 times on my test cases), and the malloc/free ratio + dropped from 10:1 to 2:1 (estimate numbers) + * fixed string concatenation, memory is now correctly allocated + (for ' "a" "b" ' style concatenation) 2004-03-18 * +=, -=, *=, /=, %= operators. 2004-03-17 |
From: Peep P. <so...@us...> - 2004-03-20 20:36:52
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23318 Modified Files: lang.y Log Message: Removed preallocation of arrays; fixed string concatenation. Index: lang.y =================================================================== RCS file: /cvsroot/agd/server/src/lang.y,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- lang.y 20 Mar 2004 19:29:19 -0000 1.8 +++ lang.y 20 Mar 2004 20:26:52 -0000 1.9 @@ -654,7 +654,7 @@ array_push(&$$.arr, (void *) F_ADD); array_push(&$$.arr, (void *) F_ASSIGN); } -| expr L_MINUS expr + | expr L_MINUS expr { $$.lval = $$.direct_type = 0; $$.side_effect = $1.side_effect || $3.side_effect; @@ -1075,7 +1075,9 @@ init_array(&$$.arr); if($1.length) { - $$.type = (int) array_pop(&$1); + $1.length--; + $$.type = (int) $1.data[$1.length]; + /*$1.data = realloc($1.data, $1.length);*/ array_concat(&$$.arr, &$1); } } @@ -1190,9 +1192,14 @@ string_con2: L_STRING + { + $$ = $1; + } | string_con2 L_STRING { - $$ = strcat($1, $2); + $$ = malloc(strlen($1) + strlen($2) + 1); + strcpy($$, $1); + $$ = strcat($$, $2); } ; @@ -1333,20 +1340,6 @@ init_array(&$$); #if 0 - if((index = nametable_find_cob(TYPE_FUN | SCOPE_LOCAL, $1)) != -1) { - scope = SCOPE_LOCAL; - if(index >= fun_been_called.allocated) { - array_push(&fun_been_called, (void *) index); - } - fun_been_called.data[index] = (void *) 1; - fun_been_called.length = index + 1; - } else { - index = nametable_find_cob(TYPE_FUN | SCOPE_GLOBAL, $1); - scope = SCOPE_GLOBAL; - } -#endif - -#if 0 if($1->type == ID_FUN_PROT) { char buf[256]; sprintf(buf, "Function '%s' is called, but not defined", $1->name); @@ -1357,10 +1350,6 @@ if($1->type == ID_FUN_PROT) $1->has_been_called = 1; - /* Leave a place for F_CALL_*FUN to place it's return value. */ -/* array_push(&$$, (void *) F_PUSH); - array_push(&$$, (void *) NULL);*/ - realargs = type_xmalloc(array_t); init_array(realargs); for(i=0;i<$3.length;i++) { @@ -1370,10 +1359,9 @@ array_concat(&$$, realargs); xfree(realargs); - /* First arguments, then call. So F_CALL won't have to do any pushing. */ - if($1->type == ID_DFUN) + if($1->type == ID_DFUN) { array_push(&$$, (void *) F_CALL_DFUN); - else /* ID_FUN */ + } else /* ID_FUN */ array_push(&$$, (void *) F_CALL_LFUN); array_push(&$$, (void *) $1->index); array_push(&$$, (void *) $3.length); /* num_arg */ |
From: Peep P. <so...@us...> - 2004-03-20 20:36:36
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23277 Modified Files: array.c array.h compile.c compile_options.h Log Message: Removed preallocation of arrays. Index: compile_options.h =================================================================== RCS file: /cvsroot/agd/server/src/compile_options.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- compile_options.h 16 Mar 2004 20:12:59 -0000 1.10 +++ compile_options.h 20 Mar 2004 20:26:36 -0000 1.11 @@ -8,16 +8,6 @@ (DGD has 64k by default) */ #define MAX_STRING_LENGTH 1024 -/* The default length an array has. If an item - is added to the array and it doesn't have enough - memory, memory is realloc()'d. - Bigger number uses more memory, smaller number - calls realloc() more often if arrays are generally - long (and that can cause lots of memory fragmentation - which would eventually crash the driver with an "out of memory" - error. */ -#define LIST_DEFAULT_LENGTH 25 - /* The size of the interpreter's value stack. This determines how many local variables, function arguments and return values we can have at one time. Index: compile.c =================================================================== RCS file: /cvsroot/agd/server/src/compile.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- compile.c 20 Mar 2004 19:16:57 -0000 1.15 +++ compile.c 20 Mar 2004 20:26:36 -0000 1.16 @@ -438,7 +438,10 @@ void end_block_level(void) { pop_scope(); - curr_block = array_pop(&block_history); + block_history.length--; + curr_block = block_history.data[block_history.length]; + /*block_history.data = realloc(block_history.data, + block_history.length);*/ /* if(locals_level > 0) locals_level--; if(!locals_level) { Index: array.c =================================================================== RCS file: /cvsroot/agd/server/src/array.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- array.c 20 Mar 2004 19:16:28 -0000 1.10 +++ array.c 20 Mar 2004 20:26:36 -0000 1.11 @@ -14,30 +14,9 @@ void init_array(array_t *a) { a->length = 0; - a->allocated = 0; a->data = NULL; } -/* Doubles the length of the allocated array until all of the array fits in. - User needs to set the length before using (array must also be inited). */ -void alloc_array(array_t *a) -{ - int needs_it; - - needs_it = 0; - while(a->length >= a->allocated) { - if(!a->allocated) - a->allocated = LIST_DEFAULT_LENGTH; - else - a->allocated *= 2; /* This could take a while if length&allocated diff is large */ - needs_it = 1; - } - - if(needs_it) { - a->data = realloc(a->data, sizeof(void *) * a->allocated); - } -} - void free_array(array_t *a, void (*freefun)(void *)) { int i; @@ -56,8 +35,7 @@ return; a->length++; - alloc_array(a); - + a->data = realloc(a->data, sizeof(void *) * a->length); a->data[a->length-1] = data; } @@ -65,33 +43,37 @@ { int i; +#ifdef DEBUG if(index > a->length) { printf("array_insert(): illegal index %d!\n", index); return; } +#endif a->length++; - alloc_array(a); + a->data = realloc(a->data, sizeof(void *) * a->length); for(i=a->length-1;i>index;i--) { a->data[i] = a->data[i-1]; } a->data[index] = data; } +#if 0 void *array_pop(array_t *a) { void *p; a->length--; - /* No reducing is done (length/allocated only goes bigger). */ p = a->data[a->length]; return p; } +#endif void array_remove(array_t *a, int index) { int i; if(index == a->length - 1) { a->length--; + a->data = realloc(a->data, sizeof(void *) * a->length); return; } @@ -99,7 +81,8 @@ a->data[i] = a->data[i+1]; } a->length--; - a->data[++i] = NULL; + a->data = realloc(a->data, sizeof(void *) * a->length); +/* a->data[++i] = NULL;*/ } void array_remove_by_data(array_t *a, void *data) @@ -120,9 +103,7 @@ p = type_xmalloc(array_t); p->length = a->length; - p->allocated = 0; - p->data = NULL; - alloc_array(p); + p->data = malloc(sizeof(void *) * p->length); for(i = 0; i < p->length; i++) if(copyfun) @@ -139,7 +120,7 @@ oldlen = a1->length; a1->length += a2->length; - alloc_array(a1); + a1->data = realloc(a1->data, sizeof(void *) * a1->length); for(i = oldlen; i < a1->length; i++) a1->data[i] = a2->data[i - oldlen]; Index: array.h =================================================================== RCS file: /cvsroot/agd/server/src/array.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- array.h 12 Mar 2004 08:40:10 -0000 1.5 +++ array.h 20 Mar 2004 20:26:36 -0000 1.6 @@ -3,7 +3,6 @@ typedef struct array_t { int length; - int allocated; void **data; } array_t; |
From: Peep P. <so...@us...> - 2004-03-20 19:39:19
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12557 Modified Files: lang.y Log Message: Removed debugging printf. Index: lang.y =================================================================== RCS file: /cvsroot/agd/server/src/lang.y,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- lang.y 20 Mar 2004 19:18:42 -0000 1.7 +++ lang.y 20 Mar 2004 19:29:19 -0000 1.8 @@ -1192,8 +1192,6 @@ L_STRING | string_con2 L_STRING { - printf("$1.len: %d; $2.len: %d\n", strlen($1), strlen($2)); - printf("$1: %s; $2: %s\n", $1, $2); $$ = strcat($1, $2); } ; |
From: Peep P. <so...@us...> - 2004-03-20 19:28:43
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10321/src Modified Files: interpret.h lang.y lex.l Log Message: New x= operators. Index: lang.y =================================================================== RCS file: /cvsroot/agd/server/src/lang.y,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- lang.y 18 Mar 2004 20:46:39 -0000 1.6 +++ lang.y 20 Mar 2004 19:18:42 -0000 1.7 @@ -14,9 +14,12 @@ void redeclaration_error(def_id_t *id, int new_type); int compare_args(array_t *arg1, array_t *arg2); -#define MAKE_LVALUE(x) if((int)x.arr.data[0] == F_PUSH_LVAR) x.arr.data[0] = (void *)F_PUSH_LVAR_LVALUE;\ - else if((int)x.arr.data[0] == F_PUSH_GVAR) x.arr.data[0] = (void*)F_PUSH_GVAR_LVALUE;\ - else if((int)x.arr.data[x.arr.length-1] == F_RANGE) x.arr.data[x.arr.length-1] = (void*)F_RANGE_LVALUE\ +#define MAKE_LVALUE(x) if((int)x.arr.data[0] == F_PUSH_LVAR)\ + x.arr.data[0] = (void *)F_PUSH_LVAR_LVALUE;\ + else if((int)x.arr.data[0] == F_PUSH_GVAR)\ + x.arr.data[0] = (void*)F_PUSH_GVAR_LVALUE;\ + else if((int)x.arr.data[x.arr.length-1] == F_RANGE)\ + x.arr.data[x.arr.length-1] = (void*)F_RANGE_LVALUE %} %expect 1 @@ -46,6 +49,8 @@ /* operators */ %right L_ASSIGN +%left L_PE /* Pluq-equals */ L_ME /* Minus-equals */ +%left L_MUE /* Multiply-equals */ L_MOE /* Modulo-equals */ L_DE /* Divide-equals */ %left L_OR L_AND %left L_EQ L_NE %left L_PLUS L_MINUS @@ -628,7 +633,28 @@ array_push(&$$.arr, (void *) F_ADD); } } - | expr L_MINUS expr + | expr L_PE expr /* Plus-equals */ + { + $$.type = $1.type; + $$.side_effect = 1; + $$.direct_type = $$.lval = 0; + + check_operand(F_ADDA, $1.type, $3.type); + + if(!$1.lval) { + comp_error("expression is not a lvalue"); + } + + init_array(&$$.arr); + /* Once for F_ADD, once for F_ASSIGN. */ + array_concat(&$$.arr, &$1.arr); + MAKE_LVALUE($$); + array_concat(&$$.arr, &$1.arr); + array_concat(&$$.arr, &$3.arr); + array_push(&$$.arr, (void *) F_ADD); + array_push(&$$.arr, (void *) F_ASSIGN); + } +| expr L_MINUS expr { $$.lval = $$.direct_type = 0; $$.side_effect = $1.side_effect || $3.side_effect; @@ -653,6 +679,26 @@ array_push(&$$.arr, (void *) F_SUB); } } + | expr L_ME expr /* Minus-equals */ + { + $$.type = $1.type; + $$.side_effect = 1; + $$.direct_type = $$.lval = 0; + + check_operand(F_SUBA, $1.type, $3.type); + if(!$1.lval) { + comp_error("expression is not a lvalue"); + } + + init_array(&$$.arr); + /* Once for F_SUB, once for F_ASSIGN. */ + array_concat(&$$.arr, &$1.arr); + MAKE_LVALUE($$); + array_concat(&$$.arr, &$1.arr); + array_concat(&$$.arr, &$3.arr); + array_push(&$$.arr, (void *) F_SUB); + array_push(&$$.arr, (void *) F_ASSIGN); + } | expr L_MUL expr { $$.lval = $$.direct_type = 0; @@ -672,6 +718,27 @@ array_push(&$$.arr, (void *) F_MUL); } } + | expr L_MUE expr /* Multiply-equals */ + { + $$.type = $1.type; + $$.side_effect = 1; + $$.direct_type = $$.lval = 0; + + check_operand(F_MULA, $1.type, $3.type); + + if(!$1.lval) { + comp_error("expression is not a lvalue"); + } + + init_array(&$$.arr); + /* Once for F_MUL, once for F_ASSIGN. */ + array_concat(&$$.arr, &$1.arr); + MAKE_LVALUE($$); + array_concat(&$$.arr, &$1.arr); + array_concat(&$$.arr, &$3.arr); + array_push(&$$.arr, (void *) F_MUL); + array_push(&$$.arr, (void *) F_ASSIGN); + } | expr L_DIV expr { $$.lval = $$.direct_type = 0; @@ -692,6 +759,27 @@ array_push(&$$.arr, (void *) F_DIV); } } + | expr L_DE expr /* Divide-equals */ + { + $$.type = $1.type; + $$.side_effect = 1; + $$.direct_type = $$.lval = 0; + + check_operand(F_DIVA, $1.type, $3.type); + + if(!$1.lval) { + comp_error("expression is not a lvalue"); + } + + init_array(&$$.arr); + /* Once for F_DIV, once for F_ASSIGN. */ + array_concat(&$$.arr, &$1.arr); + MAKE_LVALUE($$); + array_concat(&$$.arr, &$1.arr); + array_concat(&$$.arr, &$3.arr); + array_push(&$$.arr, (void *) F_DIV); + array_push(&$$.arr, (void *) F_ASSIGN); + } | expr L_MOD expr { $$.lval = $$.direct_type = 0; @@ -711,7 +799,28 @@ array_push(&$$.arr, (void *) F_MOD); } } - | expr L_INC + | expr L_MOE expr /* Modulo-equals */ + { + $$.type = $1.type; + $$.side_effect = 1; + $$.direct_type = $$.lval = 0; + + check_operand(F_MODA, $1.type, $3.type); + + if(!$1.lval) { + comp_error("expression is not a lvalue"); + } + + init_array(&$$.arr); + /* Once for F_MOD, once for F_ASSIGN. */ + array_concat(&$$.arr, &$1.arr); + MAKE_LVALUE($$); + array_concat(&$$.arr, &$1.arr); + array_concat(&$$.arr, &$3.arr); + array_push(&$$.arr, (void *) F_MOD); + array_push(&$$.arr, (void *) F_ASSIGN); + } + | expr L_INC { check_operand(F_POSTINC, $1.type, 0); if(!$1.lval) { Index: interpret.h =================================================================== RCS file: /cvsroot/agd/server/src/interpret.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- interpret.h 18 Mar 2004 20:46:50 -0000 1.7 +++ interpret.h 20 Mar 2004 19:18:42 -0000 1.8 @@ -25,26 +25,31 @@ #define F_ASSIGN 19 /* Pops two variables off the stack, and assigns upper one's value to the lower one. (the lower one should be a T_LVALUE) */ #define F_ADD 20 -#define F_SUB 21 -#define F_MUL 22 -#define F_DIV 23 -#define F_MOD 24 -#define F_NOT 25 -#define F_EQ 26 -#define F_NE 27 -#define F_GT 28 -#define F_GE 29 -#define F_LT 30 -#define F_LE 31 -#define F_NEG 32 -#define F_AND 33 /* Have to keep these in because of check_operand() */ -#define F_OR 34 /* */ -#define F_POSTINC 35 -#define F_PREINC 36 -#define F_POSTDEC 37 -#define F_PREDEC 38 -#define F_RANGE 39 -#define F_RANGE_LVALUE 40 +#define F_ADDA 21 +#define F_SUB 22 +#define F_SUBA 23 +#define F_MUL 24 +#define F_MULA 25 +#define F_DIV 26 +#define F_DIVA 27 +#define F_MOD 28 +#define F_MODA 29 +#define F_NOT 30 +#define F_EQ 31 +#define F_NE 32 +#define F_GT 33 +#define F_GE 34 +#define F_LT 35 +#define F_LE 36 +#define F_NEG 37 +#define F_AND 38 /* Have to keep these in because of check_operand() */ +#define F_OR 39 /* */ +#define F_POSTINC 40 +#define F_PREINC 41 +#define F_POSTDEC 42 +#define F_PREDEC 43 +#define F_RANGE 44 +#define F_RANGE_LVALUE 45 #define F_HIGHEST F_RANGE_LVALUE Index: lex.l =================================================================== RCS file: /cvsroot/agd/server/src/lex.l,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- lex.l 18 Mar 2004 20:46:20 -0000 1.6 +++ lex.l 20 Mar 2004 19:18:42 -0000 1.7 @@ -229,12 +229,6 @@ "--" RET(s, "--", L_DEC); "!" RET(c, '!', L_NOT); "!=" RET(s, "!=", L_NE); -"({" RET(s, "({", L_OPEN_ARRAY); -"([" RET(s, "([", L_OPEN_MAPPING); -"(:" RET(s, "(:", L_OPEN_FUNP); -"})" RET(s, "})", L_CLOSE_ARRAY); -"}]" RET(s, "])", L_CLOSE_MAPPING); -":)" RET(s, ":)", L_CLOSE_FUNP); ")" RET(c, ')', ')'); "==" RET(s, "==", L_EQ); "=" RET(c, '=', L_ASSIGN); @@ -243,7 +237,20 @@ "*" RET(c, '*', L_MUL); "/" RET(c, '/', L_DIV); "%" RET(c, '%', L_MOD); - +"+=" RET(s, "+=", L_PE); +"-=" RET(s, "-=", L_ME); +"*=" RET(s, "*=", L_MUE); +"/=" RET(s, "/=", L_DE); +"%=" RET(s, "%=", L_MOE); + + +"({" RET(s, "({", L_OPEN_ARRAY); +"([" RET(s, "([", L_OPEN_MAPPING); +"(:" RET(s, "(:", L_OPEN_FUNP); +"})" RET(s, "})", L_CLOSE_ARRAY); +"}]" RET(s, "])", L_CLOSE_MAPPING); +":)" RET(s, ":)", L_CLOSE_FUNP); + [0-9]+ yylval.i = atoi(yytext); RET(d, yylval.i, L_INTEGER); return RET(s, "return", L_RETURN); if RET(s, "if", L_IF); |
From: Peep P. <so...@us...> - 2004-03-20 19:28:43
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10321 Modified Files: ChangeLog NEWS Log Message: New x= operators. Index: NEWS =================================================================== RCS file: /cvsroot/agd/server/NEWS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- NEWS 18 Mar 2004 20:51:16 -0000 1.3 +++ NEWS 20 Mar 2004 19:18:42 -0000 1.4 @@ -3,6 +3,7 @@ * Dfuns: random, strlen, capitalize, lower_case * Removed dfun asctime(). This can and should be done with LPC, and there's an example of it in lib/sys/player + * New operators: += -= *= /= %= Features in 0.0.2: * Additional escape codes: \\, \", \t, \a, \b, \f, \e Index: ChangeLog =================================================================== RCS file: /cvsroot/agd/server/ChangeLog,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- ChangeLog 18 Mar 2004 20:51:16 -0000 1.6 +++ ChangeLog 20 Mar 2004 19:18:42 -0000 1.7 @@ -1,5 +1,7 @@ 0.0.2-2: ---------------------------------------------------------------------------- +2004-03-18 + * +=, -=, *=, /=, %= operators. 2004-03-17 * make sure thre is a correct number of arguments on the stack - "void create(int i) { }" won't crash anymore. |
From: Peep P. <so...@us...> - 2004-03-20 19:27:43
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10179 Modified Files: object.c Log Message: Changes whitespace. Index: object.c =================================================================== RCS file: /cvsroot/agd/server/src/object.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- object.c 18 Mar 2004 20:45:20 -0000 1.8 +++ object.c 20 Mar 2004 19:17:42 -0000 1.9 @@ -69,6 +69,7 @@ if(unref_prog(ob->prog)) { ob->prog = NULL; } + /* free_array(&ob->prog->fun_table, NULL); free_array(&ob->prog->functions, free_fun); |
From: Peep P. <so...@us...> - 2004-03-20 19:27:31
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10144 Modified Files: net.h Log Message: Uses #if instead of #ifdef for a config.h-defined symbol. Index: net.h =================================================================== RCS file: /cvsroot/agd/server/src/net.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- net.h 18 Mar 2004 20:45:33 -0000 1.9 +++ net.h 20 Mar 2004 19:17:30 -0000 1.10 @@ -3,7 +3,7 @@ #include "config.h" -#ifdef HAVE_MACHINE_TYPES_H +#if HAVE_MACHINE_TYPES_H #include <machine/types.h> #endif #include <dirent.h> |
From: Peep P. <so...@us...> - 2004-03-20 19:26:58
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10019 Modified Files: compile.c Log Message: Reformatting; new operators Index: compile.c =================================================================== RCS file: /cvsroot/agd/server/src/compile.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- compile.c 19 Mar 2004 14:47:40 -0000 1.14 +++ compile.c 20 Mar 2004 19:16:57 -0000 1.15 @@ -145,37 +145,85 @@ for(i=0;i<=F_HIGHEST;i++) { /* 4 - T_INT, T_STRING, T_VOID(unused), T_OBJECT */ switch(i + F_ADD) { - case F_ADD: SET_OPERATOR("+", 2, 0, 1, 1, 0); break; - case F_GT: SET_OPERATOR(">", 2, 1, 1, 1, 0); break; - case F_GE: SET_OPERATOR(">=", 2, 1, 1, 1, 0); break; - case F_LT: SET_OPERATOR("<", 2, 1, 1, 1, 0); break; - case F_LE: SET_OPERATOR("<=", 2, 1, 1, 1, 0); break; - - case F_MUL: SET_OPERATOR("*", 2, 1, 1, 0, 0); break; - case F_DIV: SET_OPERATOR("/", 2, 1, 1, 0, 0); break; - case F_MOD: SET_OPERATOR("%", 2, 1, 1, 0, 0); break; - case F_SUB: SET_OPERATOR("-", 2, 1, 1, 0, 0); break; - case F_POSTINC: - SET_OPERATOR("postfix increment", 1, 0, 1, 0, 0); - break; - case F_POSTDEC: - SET_OPERATOR("postfix decrement", 1, 0, 1, 0, 0); - break; - case F_PREINC: - SET_OPERATOR("prefix increment", 1, 0, 1, 0, 0); - break; - case F_PREDEC: - SET_OPERATOR("prefix decrement", 1, 0, 1, 0, 0); - break; - case F_NEG: SET_OPERATOR("minus", 1, 0, 1, 0, 0); break; - - case F_NOT: SET_OPERATOR("!", 1, 0, 1, 1, 1); break; - case F_EQ: SET_OPERATOR("==", 2, 1, 1, 1, 1); break; - case F_NE: SET_OPERATOR("!=", 2, 1, 1, 1, 1); break; - case F_AND: SET_OPERATOR("&&", 2, 0, 1, 1, 1); break; - case F_OR: SET_OPERATOR("||", 2, 0, 1, 1, 1); break; - - case F_RANGE: SET_OPERATOR("[]", 1, 0, 0, 1, 0); break; + case F_ADD: + SET_OPERATOR("+", 2, 0, 1, 1, 0); + break; + case F_ADDA: + SET_OPERATOR("+=", 2, 0, 1, 1, 0); + break; + case F_GT: + SET_OPERATOR(">", 2, 1, 1, 1, 0); + break; + case F_GE: + SET_OPERATOR(">=", 2, 1, 1, 1, 0); + break; + case F_LT: + SET_OPERATOR("<", 2, 1, 1, 1, 0); + break; + case F_LE: + SET_OPERATOR("<=", 2, 1, 1, 1, 0); + break; + case F_MUL: + SET_OPERATOR("*", 2, 1, 1, 0, 0); + break; + case F_MULA: + SET_OPERATOR("*=", 2, 0, 1, 0, 0); + break; + case F_DIV: + SET_OPERATOR("/", 2, 1, 1, 0, 0); + break; + case F_DIVA: + SET_OPERATOR("/=", 2, 0, 1, 0, 0); + break; + case F_MOD: + SET_OPERATOR("%", 2, 1, 1, 0, 0); + break; + case F_MODA: + SET_OPERATOR("%=", 2, 0, 1, 0, 0); + break; + case F_SUB: + SET_OPERATOR("-", 2, 1, 1, 0, 0); + break; + case F_SUBA: + SET_OPERATOR("-=", 2, 0, 1, 0, 0); + break; + case F_POSTINC: + SET_OPERATOR("postfix increment", + 1, 0, 1, 0, 0); + break; + case F_POSTDEC: + SET_OPERATOR("postfix decrement", + 1, 0, 1, 0, 0); + break; + case F_PREINC: + SET_OPERATOR("prefix increment", + 1, 0, 1, 0, 0); + break; + case F_PREDEC: + SET_OPERATOR("prefix decrement", + 1, 0, 1, 0, 0); + break; + case F_NEG: + SET_OPERATOR("minus", 1, 0, 1, 0, 0); + break; + case F_NOT: + SET_OPERATOR("!", 1, 0, 1, 1, 1); + break; + case F_EQ: + SET_OPERATOR("==", 2, 1, 1, 1, 1); + break; + case F_NE: + SET_OPERATOR("!=", 2, 1, 1, 1, 1); + break; + case F_AND: + SET_OPERATOR("&&", 2, 0, 1, 1, 1); + break; + case F_OR: + SET_OPERATOR("||", 2, 0, 1, 1, 1); + break; + case F_RANGE: + SET_OPERATOR("[]", 1, 0, 0, 1, 0); + break; } } } @@ -213,9 +261,6 @@ case 3: sprintf(buf, "invalid operands to trinary "); break; - default: - sprintf(buf, "KALA\n"); - break; } sprintf(buf, "%s%s", buf, op->name); comp_error(buf); |
From: Peep P. <so...@us...> - 2004-03-20 19:26:29
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9953 Modified Files: array.c Log Message: Fix for a special case. Index: array.c =================================================================== RCS file: /cvsroot/agd/server/src/array.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- array.c 16 Mar 2004 14:07:37 -0000 1.9 +++ array.c 20 Mar 2004 19:16:28 -0000 1.10 @@ -90,6 +90,11 @@ void array_remove(array_t *a, int index) { int i; + if(index == a->length - 1) { + a->length--; + return; + } + for(i=index;i<a->length;i++) { a->data[i] = a->data[i+1]; } |
From: Peep P. <so...@us...> - 2004-03-20 19:25:54
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9833/src Modified Files: Makefile.in Log Message: Regenerated. Index: Makefile.in =================================================================== RCS file: /cvsroot/agd/server/src/Makefile.in,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.in 16 Mar 2004 20:17:32 -0000 1.7 +++ Makefile.in 20 Mar 2004 19:15:54 -0000 1.8 @@ -507,7 +507,7 @@ dflex.c: dfparse.c -dfdecl.h: dfparse +dfdecl.h: dfdecl.in dfparse ./dfparse >dfdecl.h lex.c: lang.c |
From: Peep P. <so...@us...> - 2004-03-20 19:25:20
|
Update of /cvsroot/agd/server/lib/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9749/lib/sys Modified Files: player.c Log Message: Using the new operators. Index: player.c =================================================================== RCS file: /cvsroot/agd/server/lib/sys/player.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- player.c 18 Mar 2004 20:49:37 -0000 1.7 +++ player.c 20 Mar 2004 19:15:21 -0000 1.8 @@ -28,13 +28,13 @@ secs = t; if(secs >= 60) { - secs /*%=*/ = secs % 60; - mins = t /*/=*/ = t / 60; + secs %= 60; + mins = t /= 60; if(mins >= 60) { - mins /*%=*/ = mins % 60; - hrs = t /*/=*/ = t / 60; + mins %= 60; + hrs = t /= 60; if(hrs > 24) { - hrs /*%=*/ = hrs % 24; + hrs %= 24; days = t / 24; } } @@ -42,13 +42,13 @@ ret = ""; /* :-( */ if(days) - ret/* +=*/ = ret + days + " day" + days>1?"s":"" + " "; + ret += days + " day" + days>1?"s":"" + " "; if(hrs) - ret/* +=*/ = ret + hrs + " hour" + hrs>1?"s":"" + " "; + ret += hrs + " hour" + hrs>1?"s":"" + " "; if(mins) - ret/* +=*/ = ret + mins + " minute" + mins>1?"s":"" + " "; + ret += mins + " minute" + mins>1?"s":"" + " "; if(secs) { - ret/* +=*/ = ret + secs + " second" + secs>1?"s":"" + " "; + ret += secs + " second" + secs>1?"s":"" + " "; } return ret; } @@ -92,7 +92,7 @@ } void write_prompt() { - write("> "); + write(_name + /* "@" + __HOSTNAME__ + */ "$ "); } void net_dead() { |
From: Peep P. <so...@us...> - 2004-03-20 19:25:08
|
Update of /cvsroot/agd/server/lib/sys In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9618/lib/sys Modified Files: master.c Log Message: Reformatting. Index: master.c =================================================================== RCS file: /cvsroot/agd/server/lib/sys/master.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- master.c 18 Mar 2004 20:49:49 -0000 1.8 +++ master.c 20 Mar 2004 19:15:07 -0000 1.9 @@ -2,9 +2,11 @@ int crash(int signal) { if(signal == 11) { - shout("Driver shutting down - segmentation fault!\n", (object)0); + shout("Driver shutting down - " + "segmentation fault!\n", (object)0); } else if(signal) { - shout("Crashing on signal " + signal + "!\n", (object)0); + shout("Crashing on signal " + signal + "!\n", + (object)0); } else { shout("Driver crashing!\n", (object)0); } |
From: Peep P. <so...@us...> - 2004-03-20 19:24:45
|
Update of /cvsroot/agd/server/doc/lpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9528/doc/lpc Modified Files: operators Log Message: Reformatting; x= operators Index: operators =================================================================== RCS file: /cvsroot/agd/server/doc/lpc/operators,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- operators 18 Mar 2004 20:50:16 -0000 1.3 +++ operators 20 Mar 2004 19:14:46 -0000 1.4 @@ -5,11 +5,11 @@ -- unary decrement * (F_POSTDEC, F_PREDEC) ++ unary increment * (F_POSTINC, F_PREINC) ('a x= b' is equal to 'a = a x b') - += binary self-increment - -= binary self-decrement - /= binary self-division - *= binary self-multiplication - %= binary self-modulo + += binary self-increment * + -= binary self-decrement * + /= binary self-division * + *= binary self-multiplication * + %= binary self-modulo * comparison: == binary equal * (F_EQ) @@ -26,11 +26,14 @@ misc: -> binary call_other * (F_CALL_OTHER) - note: This is different from C's ->. in LPC it calls a function in an object other than - the current object; i.e. ob->call() would execute the function call() in object ob. + note: This is different from C's ->. + in LPC it calls a function in an object other than + the current object; i.e. ob->call() would execute + the function call() in object ob. ?: trinary conditional (if-then-else) * - , binary comma - left and right side are evaluated, then right side discarded. - [] (F_RANGE) + , binary comma - left and right side are evaluated, + then right side discarded. + [] * (F_RANGE) arithmetic: + binary addition * (F_ADD) @@ -39,7 +42,7 @@ / binary division *(F_DIV) * binary multiplication *(F_MUL) % binary modulo * (F_MOD) - ** power + ** binary power binary: & |
From: Peep P. <so...@us...> - 2004-03-20 19:24:28
|
Update of /cvsroot/agd/server/doc/lpc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9480/doc/lpc Modified Files: datatypes Log Message: Formatting changes. Index: datatypes =================================================================== RCS file: /cvsroot/agd/server/doc/lpc/datatypes,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- datatypes 15 Mar 2004 18:57:45 -0000 1.1 +++ datatypes 20 Mar 2004 19:14:27 -0000 1.2 @@ -1,8 +1,20 @@ -Data types currently implemented in AGD are int, string, object, void. +Data types currently implemented in AGD are: + int + string + object + void These should be fully functional everywhere. -Valid, but not implemented types are mixed and type* (array type). In fact, using arrays can cause -severe bugs, as they are not handled properly yet. +Valid, but not implemented types are mixed and type* +(array type). In fact, using arrays can cause severe bugs, +as they are not handled properly yet. -Data types that should be working in future versions are status (memory-optimized boolean type), -mapping, function, enum, struct/class and char. +Data types that I will implement: + mapping + function + enum + struct/class + +Data types that I might implement: + char + status |
From: Peep P. <so...@us...> - 2004-03-20 19:24:20
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9392 Modified Files: TODO Log Message: Added some new items. Index: TODO =================================================================== RCS file: /cvsroot/agd/server/TODO,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- TODO 18 Mar 2004 20:51:16 -0000 1.6 +++ TODO 20 Mar 2004 19:14:11 -0000 1.7 @@ -37,7 +37,7 @@ - hexadecimal: \0xnn - binary: \0bnnnnnnnn - dfuns: - query_ip() for players. + query_ip() and query_hostname() for players. - mudlib: /update command - better logging system @@ -66,3 +66,5 @@ compare_args(): 0 should be any valid type (shout("a", 0) should be ok) - or maybe use NULL or nil - if we crash while running apply(master::crash), then we should rerun with debugging on + - set debuglevel with "agd -d=5" + - define DEBUG and set CFLAGS to -g with "./configure --enable-debug" |
From: Peep P. <so...@us...> - 2004-03-20 19:24:01
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9338 Modified Files: Ideas Log Message: Added some new ideas. Index: Ideas =================================================================== RCS file: /cvsroot/agd/server/Ideas,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Ideas 18 Mar 2004 20:51:16 -0000 1.3 +++ Ideas 20 Mar 2004 19:13:57 -0000 1.4 @@ -2,10 +2,59 @@ lpc: * if(x == 1 || == 2 && != 3) * Argument type grouping - int foo(int i, j, k, string s1, s2, s3, object ob1, ob2); + int foo(int i, j, k, string s1, s2, s3, object ob1, ob2); * k integer constants: 100k equals to 100000 1k equals to 1000 etc. * the same for K, M (suggested by elver) K (or maybe Kb / KB) = 1024 M = 1024 * 1024 + * unlimited <statement> + For example: + unlimited { + int i; + while(+i < 100k); + } + This would go over normal eval_cost. + Unlimited allow for longer execution, and stopping + only when going after hard eval_cost. hard eval_cost + should be like 10 times bigger than soft eval_cost. + This statement should be privileged to system + objects (maybe a master::valid_unlimited() apply) + + * variable arguments: + Three ways: + * varargs foo(int i, int j); + Valid calls: + foo(1, 2); + foo(1); + foo(); + Invalid calls: + foo(1, 2, 3); + foo(1, ); + * foo(int i, int j, ...) + Valid calls: + foo(1, 2, 3, 4, 5); + foo(1, 2); + Invalid calls: + foo(1); + foo(1, , 2, 3); + Arguments can be gotten with + mixed va_arg(); + * with default values + foo(int i, int j = 2); + Valid calls: + foo(1); + foo(1, 2); + Invalid calls: + foo(1, 2, 3); + foo(); + But only in the end of the arguments. + * can be used together: + varargs(int i, ...); + But not: + varargs(int i, int j = 2, ...); +dfuns: + * throw(string) + will runtime with string + |
From: Peep P. <so...@us...> - 2004-03-20 16:14:18
|
Update of /cvsroot/agd/server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4043 Modified Files: README Log Message: Formatted for a 80-character display. Index: README =================================================================== RCS file: /cvsroot/agd/server/README,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- README 16 Mar 2004 20:17:32 -0000 1.3 +++ README 20 Mar 2004 16:04:20 -0000 1.4 @@ -5,49 +5,53 @@ Peep Pullerits <so...@es...> -------------------------------------- - This is a small LPMUD driver, intended to run graphical MUDs with Sierra AGI-like graphics. - Currently no graphics are implemented, as even the LPC compiler/interpreter is a - work-in-progress. - It can act as a basic chat server with the default lib. - If you write anything in LPC, I would be glad if you send it to me. +This is a small LPMUD driver, intended to run graphical MUDs +with Sierra AGI-like graphics. +Currently no graphics are implemented, as even the LPC +compiler/interpreter is a work-in-progress. +It can act as a basic chat server with the default lib. +If you write anything in LPC, I would be glad if you send it to me. - Installing. - Follow the instructions in the INSTALL file that came with this package. +1. Installing. +Follow the instructions in the INSTALL file that came with +this package. - Running. - AGD comes with a default configuration in /usr/share/agd/options, and - it will use this file if it isn't given a parameter. This, however, - expects you to have done 'make install', but probably not everyone - who wants to run this driver will have root access to their machine. - So, you can copy the binary, options file and library to your - home directory and provide a configuration file path as an argument - each time you run the driver (using a shell script, for example). +2. Running. +AGD comes with a default configuration in /usr/share/agd/options, +and it will use this file if it isn't given a parameter. +This, however, expects you to have done 'make install', but +probably not everyone who wants to run this driver will have +root access to their machine. +So, you can copy the binary, options file and library to your +home directory and provide a configuration file path as an argument +each time you run the driver (using a shell script, for example). - So, in short: - If you have root access, do 'make install' and run agd - with 'agd'. AGD will use /usr/share/agd/options for the configuration. - If you don't have root access, run agd with './agd options', - assuming the 'agd' binary and the 'options' file are in the same directory. +So, in short: +If you have root access, do 'make install' and run agd +with 'agd'. AGD will use /usr/share/agd/options for the configuration. +If you don't have root access, run agd with './agd options', +assuming the 'agd' binary and the 'options' file are in the +same directory. - There might be a 'make userinstall' target in the future that will do this - automatically. +There might be a 'make userinstall' target in the future that +will do this automatically. - You might also want to separate stderr and stdout, by redirecting one or both - of them to a file, because some lines don't have newlines, so stdout and stderr - could get mixed up. Like this: - './agd >agd.out 2>agd.err' - Or write a shell script to do it. +You might also want to separate stderr and stdout, by redirecting +one or both of them to a file, because some lines don't have +newlines, so stdout and stderr could get mixed up. Like this: + './agd >agd.out 2>agd.err' +Or write a shell script to do it. - Bugs. - This is an alpha release. As such, it most probably is infestated with bugs. - Please do try to break it, and report everything you find. +3. Bugs. +This is an alpha release. As such, it most probably is +full of bugs. +Please do try to break it, and report everything you find. - If the driver crashes with a segmentation fault, do this: - $ gdb agd - (gdb) run - <reproduce the bug> - Program received signal SIGSEGV, Segmentation fault. - (gdb) backtrace - - And include the output in your bug report. +If the driver crashes with a segmentation fault, do this: + $ gdb agd + (gdb) run + <reproduce the bug> + Program received signal SIGSEGV, Segmentation fault. + (gdb) backtrace + And include the output in your bug report. |
From: Peep P. <so...@us...> - 2004-03-19 15:04:30
|
Update of /cvsroot/agd/server/doc/dfuns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15305 Removed Files: asctime Log Message: Removed. --- asctime DELETED --- |
From: Peep P. <so...@us...> - 2004-03-19 15:03:33
|
Update of /cvsroot/agd/server/doc/dfuns In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15007 Added Files: capitalize lower_case random strlen Log Message: New dfuns. --- NEW FILE: lower_case --- string lower_case(string) Returns the lower_case version of the string. Original will not be changed. --- NEW FILE: random --- int random(int) Returns a random number in the range 0..int, lower inclusive. Examples: random(1) always returns 0. random(10) returns a number from 0 to 9. --- NEW FILE: strlen --- int strlen(string) Returns the length of the string. --- NEW FILE: capitalize --- string capitalize(string) Returns the string with the first character in upper case. Does not change the original. |
From: Peep P. <so...@us...> - 2004-03-19 14:57:29
|
Update of /cvsroot/agd/server/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13721 Modified Files: compile.c Log Message: Fixed compilation. Index: compile.c =================================================================== RCS file: /cvsroot/agd/server/src/compile.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- compile.c 18 Mar 2004 20:48:52 -0000 1.13 +++ compile.c 19 Mar 2004 14:47:40 -0000 1.14 @@ -19,9 +19,9 @@ static array_t *curr_block; static array_t block_history; -/*#ifdef YYDEBUG*/ +#ifdef YYDEBUG extern int yydebug; -/*#endif*/ +#endif static int start_with_newline; @@ -568,7 +568,7 @@ parse_init(); curr_fn = ob->name; -#if defined(DEBUG)/* && defined(YYDEBUG)*/ +#if defined(DEBUG) && defined(YYDEBUG) if(conf.debuglevel > 4) { yydebug = 1; } |