pike.git
/
src
/
lex.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/lex.c:51:
{ while(local_variables) { int e; struct locals *l; for(e=0;e<local_variables->current_number_of_locals;e++) { free_string(local_variables->variable[e].name); free_string(local_variables->variable[e].type); }
+
if(local_variables->current_type)
+
free_string(local_variables->current_type);
l=local_variables->next; free((char *)local_variables); local_variables=l; } if(current_file) free_string(current_file); free_reswords(); } struct keyword reserved_words[] =
pike.git/src/lex.c:98:
{ "protected", F_PROTECTED, }, { "public", F_PUBLIC, }, { "return", F_RETURN, }, { "sscanf", F_SSCANF, }, { "static", F_STATIC, }, { "string", F_STRING_ID, }, { "switch", F_SWITCH, }, { "varargs", F_VARARGS, }, { "void", F_VOID_ID, }, { "while", F_WHILE, },
-
{ "call_other", F_CALL_OTHER, },
+
}; struct keyword instr_names[]= { { "!", F_NOT }, { "!=", F_NE }, { "%", F_MOD }, { "%=", F_MOD_EQ }, { "& global", F_GLOBAL_LVALUE }, { "& local", F_LOCAL_LVALUE },
pike.git/src/lex.c:928:
fd=open(sp[-1].u.string->str,O_RDONLY); if(fd < 0) { my_yyerror("Couldn't open file to include '%s'.",sp[-1].u.string->str); return; } UNGETSTR("\" 2",3); UNGETSTR(current_file->str,current_file->len);
-
sprintf(buf,"\n# %ld \"",current_line+1);
+
sprintf(buf,"\n# %ld \"",
(long)
current_line+1);
UNGETSTR(buf,strlen(buf)); total_lines+=current_line-old_line; old_line=current_line=1; free_string(current_file); current_file=sp[-1].u.string; sp--; link_inputstate(file_inputstate(fd)); UNGETSTR("\n",1); }
pike.git/src/lex.c:1862:
} UNSETJMP(recovery); return ret; } /*** Magic defines ***/ void insert_current_line() { char buf[20];
-
sprintf(buf," %ld ",current_line);
+
sprintf(buf," %ld ",
(long)
current_line);
UNGETSTR(buf,strlen(buf)); } void insert_current_file_as_string() { UNGETSTR("\"",1); UNGETSTR(current_file->str, current_file->len); UNGETSTR("\"",1); }
pike.git/src/lex.c:1910:
static void start_new() { struct lpc_predef_s *tmpf; free_all_defines(); if(!local_variables) local_variables=ALLOC_STRUCT(locals); local_variables->next=0; local_variables->current_number_of_locals=0;
+
local_variables->current_type=0;
simple_add_define("__uLPC__", "1",0); for (tmpf=lpc_predefs; tmpf; tmpf=tmpf->next) simple_add_define(tmpf->name, tmpf->value,0); simple_add_define("__LINE__",0,insert_current_line); simple_add_define("__FILE__",0,insert_current_file_as_string); simple_add_define("__DATE__",0,insert_current_date_as_string); simple_add_define("__TIME__",0,insert_current_time_as_string);
pike.git/src/lex.c:1958:
{ while(local_variables) { int e; struct locals *l; for(e=0;e<local_variables->current_number_of_locals;e++) { free_string(local_variables->variable[e].name); free_string(local_variables->variable[e].type); }
+
+
if(local_variables->current_type)
+
free_string(local_variables->current_type);
+
l=local_variables->next; free((char *)local_variables); local_variables=l; } free_inputstate(istate); istate=NULL; free_all_defines(); total_lines+=current_line-old_line; }