version 1.9 | | version 1.10 |
---|
| | |
%{ | | %{ |
/* | | /* |
* static char *rcsid_object_c = | | * static char *rcsid_object_c = |
* "$Id: loader.l,v 1.9 2001/02/11 09:12:12 cvs Exp $"; | | * "$Id: loader.l,v 1.10 2001/02/23 06:06:35 mwedel Exp $"; |
*/ | | */ |
| | |
/* | | /* |
| | |
static char *yval(); | | static char *yval(); |
| | |
static int lex_error; | | static int lex_error; |
| | static char msgbuf[HUGE_BUF]; |
| | |
#define FREE_AND_COPY(sv,nv) { if (sv) free_string(sv); sv=add_string(nv); } | | #define FREE_AND_COPY(sv,nv) { if (sv) free_string(sv); sv=add_string(nv); } |
#define SET_OR_CLEAR_FLAG(op, flag, val) \ | | #define SET_OR_CLEAR_FLAG(op, flag, val) \ |
| | |
| | |
%{ | | %{ |
/* Declare some local variables */ | | /* Declare some local variables */ |
char msgbuf[HUGE_BUF]; | | |
int ismore=0; | | int ismore=0; |
| | |
lex_error=0; | | lex_error=0; |
strcpy(msgbuf, ""); | | |
| | |
%} | | %} |
| | |
| | |
tmp->arch = find_archetype(yval()); | | tmp->arch = find_archetype(yval()); |
if (tmp->arch!=NULL) | | if (tmp->arch!=NULL) |
copy_object(&tmp->arch->clone,tmp); | | copy_object(&tmp->arch->clone,tmp); |
| | strcpy(msgbuf, ""); |
lex_load(tmp, map_flags); | | lex_load(tmp, map_flags); |
insert_ob_in_ob(tmp,op); | | insert_ob_in_ob(tmp,op); |
} | | } |
| | |
int retval; | | int retval; |
char inbuf[MAX_BUF]; | | char inbuf[MAX_BUF]; |
| | |
| | strcpy(msgbuf, ""); |
if (bufstate==LO_NEWFILE || bufstate==LO_NOREAD) { | | if (bufstate==LO_NEWFILE || bufstate==LO_NOREAD) { |
/* LOG(llevDebug,"Switching lex buffers\n");*/ | | /* LOG(llevDebug,"Switching lex buffers\n");*/ |
yy_delete_buffer(YY_CURRENT_BUFFER); | | yy_delete_buffer(YY_CURRENT_BUFFER); |
| | |
YY_BUFFER_STATE yybufstate,yycurbuf=YY_CURRENT_BUFFER; | | YY_BUFFER_STATE yybufstate,yycurbuf=YY_CURRENT_BUFFER; |
int retval; | | int retval; |
| | |
| | strcpy(msgbuf, ""); |
yy_push_state(INITIAL); | | yy_push_state(INITIAL); |
yybufstate=yy_scan_string(buf); | | yybufstate=yy_scan_string(buf); |
retval=lex_load(op,0); | | retval=lex_load(op,0); |