Branch: Tag:

2014-08-18

2014-08-18 21:31:29 by Martin Nilsson <nilsson@opera.com>

Shortened some error messages.

1158:    int inherit_no = SUBTYPEOF(Pike_sp[-args]);       if (!o->prog || FIND_LFUN(o->prog, LFUN__SIZEOF) < 0) { -  Pike_error("has_prefix(): Object in argument 1 lacks lfun::_sizeof().\n"); +  Pike_error("Object in argument 1 lacks lfun::_sizeof().\n");    }       apply_lfun(o, LFUN__SIZEOF, 0);
1232:    CASE_SHIFT(2,0);    CASE_SHIFT(2,1);    default: -  Pike_error("has_prefix(): Unexpected string shift combination: a:%d, b:%d!\n", +  Pike_error("Unexpected string shift combination: a:%d, b:%d!\n",    a->size_shift, b->size_shift);    break;    }
1306:    CASE_SHIFT(2,0);    CASE_SHIFT(2,1);    default: -  Pike_error("has_prefix(): Unexpected string shift combination: a:%d, b:%d!\n", +  Pike_error("Unexpected string shift combination: a:%d, b:%d!\n",    a->size_shift, b->size_shift);    break;    }
1752:    /* 0xfffe: Byte-order detection illegal character.    * 0xffff: Illegal character.    */ -  Pike_error("string_to_unicode(): Illegal character 0x%04x (index %ld) " +  Pike_error("Illegal character 0x%04x (index %ld) "    "is not a Unicode character.",    str2[i], PTRDIFF_T_TO_LONG(i));    }    if (str2[i] > 0x10ffff) { -  Pike_error("string_to_unicode(): Character 0x%08x (index %ld) " +  Pike_error("Character 0x%08x (index %ld) "    "is out of range (0x00000000..0x0010ffff).",    str2[i], PTRDIFF_T_TO_LONG(i));    }
2509: Inside #if defined(PIKE_DEBUG)
     #ifdef PIKE_DEBUG    if (j != len) { -  Pike_fatal("utf8_to_string(): Calculated and actual lengths differ: " +  Pike_fatal("Calculated and actual lengths differ: "    "%"PRINTPTRDIFFT"d != %"PRINTPTRDIFFT"d\n",    len, j);    }
6342: Inside #if defined(PIKE_DEBUG)
   INT_TYPE low = MAX_INT_TYPE;   #ifdef PIKE_DEBUG    if (TYPEOF(ITEM(arr)[i]) != T_MAPPING) { -  Pike_error("interleave_array(): Element %d is not a mapping!\n", i); +  Pike_error("Element %d is not a mapping!\n", i);    }   #endif /* PIKE_DEBUG */    md = ITEM(arr)[i].u.mapping->data;    NEW_MAPPING_LOOP(md) {    if (TYPEOF(k->ind) != T_INT) { -  Pike_error("interleave_array(): Index not an integer in mapping %d!\n", i); +  Pike_error("Index not an integer in mapping %d!\n", i);    }    if (low > k->ind.u.integer) {    low = k->ind.u.integer;    if (low < 0) { -  Pike_error("interleave_array(): Index %"PRINTPIKEINT"d in mapping %d is negative!\n", +  Pike_error("Index %"PRINTPIKEINT"d in mapping %d is negative!\n",    low, i);    }    }
6439:    char *newtab = realloc(tab, size*2 + max);    if (!newtab) {    free(tab); -  Pike_error("interleave_array(): Couldn't extend table!\n"); +  Pike_error("Couldn't extend table!\n");    }    tab = newtab;    MEMSET(tab + size + max, 0, size);