pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: builtin_functions.c,v 1.475 2005/04/02 14:25:13 mast Exp $ + || $Id: builtin_functions.c,v 1.476 2005/04/12 09:59:01 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.475 2005/04/02 14:25:13 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.476 2005/04/12 09:59:01 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"   #include "constants.h"   #include "mapping.h"   #include "stralloc.h"
pike.git/src/builtin_functions.c:1591:    * 000800-000fff e0 a0-bf 80-bf    * 001000-00cfff e1-ec 80-bf 80-bf    * 00d000-00d7ff ed 80-9f 80-bf    * 00e000-00ffff ee-ef 80-bf 80-bf    * 010000-03ffff f0 90-bf 80-bf 80-bf    * 040000-0fffff f1-f3 80-bf 80-bf 80-bf    * 100000-10ffff f4 80-8f 80-bf 80-bf    */       if ((c & 0xc0) == 0x80) { -  bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, -  NULL, Pike_sp - args, -  "Invalid continuation character 0x%02x " -  "at index %"PRINTPTRDIFFT"d.\n", -  c, i); +  Pike_error ("utf8_to_string: Invalid continuation character 0x%02x " +  "at index %"PRINTPTRDIFFT"d.\n", c, i);    }      #define GET_CONT_CHAR(in, i, c) do { \    i++; \    if (i >= in->len) \ -  bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ -  NULL, Pike_sp - args, \ -  "Truncated UTF-8 sequence at end of string.\n"); \ +  Pike_error ("utf8_to_string: " \ +  "Truncated UTF-8 sequence at end of string.\n"); \    c = ((unsigned char *)(in->str))[i]; \    if ((c & 0xc0) != 0x80) \ -  bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ -  NULL, Pike_sp - args, \ -  "Expected continuation character at index %d, " \ -  "got 0x%02x.\n", \ -  i, c); \ +  Pike_error ("utf8_to_string: Expected continuation character " \ +  "at index %d, got 0x%02x.\n", i, c); \    } while (0)      #define UTF8_SEQ_ERROR(prefix, c, i, problem) do { \ -  bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, \ -  NULL, Pike_sp - args, \ -  "UTF-8 sequence beginning with %s0x%02x " \ -  "at index %"PRINTPTRDIFFT"d %s.\n", \ -  prefix, c, i, problem); \ +  Pike_error ("utf8_to_string: UTF-8 sequence beginning with %s0x%02x " \ +  "at index %"PRINTPTRDIFFT"d %s.\n", prefix, c, i, problem); \    } while (0)       if ((c & 0xe0) == 0xc0) {    /* 11bit */    if (!(c & 0x1e))    UTF8_SEQ_ERROR ("", c, i, "is a non-shortest form");    cont = 1;    if (c & 0x1c) {    if (shift < 1) {    shift = 1;
pike.git/src/builtin_functions.c:1665:    GET_CONT_CHAR (in, i, c);    if (!(c & 0x30))    UTF8_SEQ_ERROR ("0xf0 ", c, i - 1, "is a non-shortest form");    cont = 2;    }    else    cont = 3;    }       else if (c == 0xff) -  bad_arg_error ("utf8_to_string", Pike_sp - args, args, 1, -  NULL, Pike_sp - args, -  "Invalid character 0xff at index %"PRINTPTRDIFFT"d.\n", -  i); +  Pike_error ("utf8_to_string: " +  "Invalid character 0xff at index %"PRINTPTRDIFFT"d.\n", i);       else {    if ((c & 0xfc) == 0xf8) {    /* 26bit */    if (c == 0xf8) {    GET_CONT_CHAR (in, i, c);    if (!(c & 0x38))    UTF8_SEQ_ERROR ("0xf8 ", c, i - 1, "is a non-shortest form");    cont = 3;    }