pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:127:   /* NOTE: There is a corresponding list to this one in    Tools.AutoDoc.PikeObjects       If new lfuns are added it might be beneficial to also add them to    that list.   */   const char *const lfun_names[] = {   #ifdef PIKE_NEW_LFUN_LOOKUP    "__INIT",    "create", -  "_destruct destroy", +  "\0_destruct\0destroy",    "_sprintf",    0,       "`+",    "`-",    "`*",    "`/",    "`%",    "`&",    "`|",
pike.git/src/program.c:202: Inside #if defined(PIKE_NEW_LFUN_LOOKUP)
   "_m_delete",    "_m_clear",    "_m_add",    "_atomic_get_set",    0,       "_serialize",    "_deserialize",    0,    -  "_iterator_next next", -  "_iterator_index index", -  "_iterator_value value", +  "\0_iterator_next\0next", +  "\0_iterator_index\0index", +  "\0_iterator_value\0value",    0,    0, /* End marker. */   #else    "__INIT",    "create", -  "_destruct destroy", +  "\0_destruct\0destroy",    "`+",    "`-",    "`&",    "`|",    "`^",    "`<<",    "`>>",    "`*",    "`/",    "`%",
pike.git/src/program.c:267:    "_deserialize",    "_size_object",    "_random",    "`**",    "``**",    "_sqrt",    "_annotations",    "_m_clear",    "_m_add",    "_reverse", -  "_iterator_next next", -  "_iterator_index index", -  "_iterator_value value", +  "\0_iterator_next\0next", +  "\0_iterator_index\0index", +  "\0_iterator_value\0value",    "_atomic_get_set",   #endif   };      #ifdef PIKE_NEW_LFUN_LOOKUP   struct pike_string *lfun_strings[0x100];   struct pike_string *lfun_compat_strings[0x100];   #else   struct pike_string *lfun_strings[NELEM(lfun_names)];   struct pike_string *lfun_compat_strings[NELEM(lfun_names)];
pike.git/src/program.c:4422: Inside #if defined(PIKE_NEW_LFUN_LOOKUP)
  #ifdef PIKE_NEW_LFUN_LOOKUP    {    int n = 0;    for (d = 0; d < (int)NELEM(lfun_names); d++,n++) {    if (!lfun_names[d]) {    n |= 0xf;    continue;    }    if (QUICK_FIND_LFUN(p, n) != -1) {    fprintf(stderr, "%*s 0x%02x: %04d %s\n", -  indent, "", n, QUICK_FIND_LFUN(p, n), lfun_names[d]); +  indent, "", n, QUICK_FIND_LFUN(p, n), +  lfun_names[d][0]?lfun_names[d]:(lfun_names[d]+1));    }    }    }   #else    for (d = 0; d < NUM_LFUNS; d++) {    if (p->lfuns[d] != -1) {    fprintf(stderr, "%*s %4d: %04d %s\n", -  indent, "", d, p->lfuns[d], lfun_names[d]); +  indent, "", d, p->lfuns[d], +  lfun_names[d][0]?lfun_names[d]:(lfun_names[d]+1));    }    }   #endif       fprintf(stderr, "\n"    "%*sLinenumber table:\n",    indent, "");    {    INT32 off = 0;    INT_TYPE line = 0;
pike.git/src/program.c:9584:    MAKE_CONST_STRING(args_string, "__args__");       MAKE_CONST_STRING(parser_system_string, "parser");    MAKE_CONST_STRING(type_check_system_string, "type_check");       /* NB: One extra entry needed for lfun::destroy(). */    lfun_ids = allocate_mapping(NUM_LFUNS + 1);    lfun_types = allocate_mapping(NUM_LFUNS + 1);   #ifdef PIKE_NEW_LFUN_LOOKUP    for (i=0; i < NELEM(lfun_names); i++,n++) { -  const char *name, *compat_name; +  const char *name, *compat_name = NULL;    if (!lfun_names[i]) {    n |= 0xf;    continue;    }    name = lfun_names[i]; -  compat_name = strchr(name, ' '); +  if (!name[0]) { +  name += 1; +  compat_name = name + strlen(name) + 1; +  }    if (compat_name) {    lfun_strings[n] = -  make_shared_static_string(name, compat_name - name, eightbit); +  make_shared_static_string(name, compat_name - (name + 1), eightbit);    lfun_compat_strings[n] = -  make_shared_static_string(compat_name + 1, -  strlen(compat_name + 1), eightbit); +  make_shared_static_string(compat_name, +  strlen(compat_name), eightbit);    } else {    lfun_strings[n] =    make_shared_static_string(name, strlen(name), eightbit);    lfun_compat_strings[n] = NULL;    }       SET_SVAL(id, T_INT, NUMBER_NUMBER, integer, n);    SET_SVAL(key, T_STRING, 0, string, lfun_strings[n]);    mapping_insert(lfun_ids, &key, &id);   
pike.git/src/program.c:9625: Inside #if defined(PIKE_NEW_LFUN_LOOKUP)
   free_type(val.u.type);       SET_SVAL(id, T_INT, NUMBER_NUMBER, integer, n);    mapping_insert(lfun_ids, &key, &id);    } else {    free_type(val.u.type);    }    }   #else    for (i=0; i < NELEM(lfun_names); i++) { -  const char *name, *compat_name; +  const char *name, *compat_name = NULL;    name = lfun_names[i]; -  compat_name = strchr(name, ' '); +  if (!name[0]) { +  name += 1; +  compat_name = name + strlen(name) + 1; +  }    if (compat_name) {    lfun_strings[i] = -  make_shared_static_string(name, compat_name - name, eightbit); +  make_shared_static_string(name, compat_name - (name + 1), eightbit);    lfun_compat_strings[i] = -  make_shared_static_string(compat_name + 1, -  strlen(compat_name + 1), eightbit); +  make_shared_static_string(compat_name, +  strlen(compat_name), eightbit);    } else {    lfun_strings[i] =    make_shared_static_string(name, strlen(name), eightbit);    lfun_compat_strings[i] = NULL;    }       SET_SVAL(id, T_INT, NUMBER_NUMBER, integer, i);    SET_SVAL(key, T_STRING, 0, string, lfun_strings[i]);    mapping_insert(lfun_ids, &key, &id);