pike.git / src / lex.c

version» Context lines:

pike.git/src/lex.c:1926:   }      /*** ***/      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; -  local_variables->current_return_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:1971:   void start_new_string(char *s,INT32 len,struct lpc_string *name)   {    start_new();    copy_shared_string(current_file,name);    link_inputstate(prot_memory_inputstate(s,len));    UNGETSTR("\n",1);   }      void end_new_file()   { -  while(local_variables) +  if(current_file)    { -  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); +  free_string(current_file); +  current_file=0;    }    -  if(local_variables->current_type) -  free_string(local_variables->current_type); -  -  if(local_variables->current_return_type) -  free_string(local_variables->current_return_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;   }         void add_predefine(char *s)   {    char buffer1[100],buffer2[10000];