pike.git / src / lex.c

version» Context lines:

pike.git/src/lex.c:75:    if(current_file) free_string(current_file);    free_reswords();   }      struct keyword reserved_words[] =   {   { "array", F_ARRAY_ID, },   { "break", F_BREAK, },   { "case", F_CASE, },   { "catch", F_CATCH, }, + { "class", F_CLASS, },   { "continue", F_CONTINUE, },   { "default", F_DEFAULT, },   { "do", F_DO, },   { "efun", F_EFUN, },   { "else", F_ELSE, },   { "float", F_FLOAT_ID, },   { "for", F_FOR, },   { "foreach", F_FOREACH, },   { "function", F_FUNCTION_ID, },   { "gauge", F_GAUGE, },
pike.git/src/lex.c:264:      char *low_get_f_name(int n,struct program *p)   {    static char buf[30];       if (n<F_MAX_OPCODE && instrs[n-F_OFFSET].name)    {    return instrs[n-F_OFFSET].name;    }else if(n >= F_MAX_OPCODE) {    if(p && -  p->num_constants > n-F_MAX_OPCODE && +  (int)p->num_constants > (int)(n-F_MAX_OPCODE) &&    p->constants[n-F_MAX_OPCODE].type==T_FUNCTION &&    p->constants[n-F_MAX_OPCODE].subtype == -1 &&    p->constants[n-F_MAX_OPCODE].u.efun)    {    return p->constants[n-F_MAX_OPCODE].u.efun->name->str;    }else{    sprintf(buf, "Call efun %d", n - F_MAX_OPCODE);    return buf;    }    }else{
pike.git/src/lex.c:288:   }      char *get_f_name(int n)   {    static char buf[30];    if (n<F_MAX_OPCODE && instrs[n-F_OFFSET].name)    {    return instrs[n-F_OFFSET].name;    }else if(n >= F_MAX_OPCODE) {    if(fp && fp->context.prog && -  fp->context.prog->num_constants > n-F_MAX_OPCODE && +  (int)fp->context.prog->num_constants > (int)(n-F_MAX_OPCODE) &&    fp->context.prog->constants[n-F_MAX_OPCODE].type==T_FUNCTION &&    fp->context.prog->constants[n-F_MAX_OPCODE].subtype == -1 &&    fp->context.prog->constants[n-F_MAX_OPCODE].u.efun)    {    return fp->context.prog->constants[n-F_MAX_OPCODE].u.efun->name->str;    }else{    sprintf(buf, "Call efun %d", n - F_MAX_OPCODE);    return buf;    }    }else{
pike.git/src/lex.c:1925:   }      /*** ***/      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:1970:   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];