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.554 2005/04/02 14:25:13 mast Exp $ + || $Id: builtin_functions.c,v 1.555 2005/05/18 12:36:53 mast Exp $   */      #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.554 2005/04/02 14:25:13 mast Exp $"); + RCSID("$Id: builtin_functions.c,v 1.555 2005/05/18 12:36:53 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:1828:   #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"); \    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", \ +  "Expected continuation character " \ +  "at index %"PRINTPTRDIFFT"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); \    } while (0)
pike.git/src/builtin_functions.c:1982:    }    while(cont--) {    unsigned INT32 c2 = ((unsigned char *)(in->str))[++i] & 0x3f;    c = (c << 6) | c2;    }    }    low_set_index(out, j++, c);    }   #ifdef PIKE_DEBUG    if (j != len) { -  Pike_fatal("utf8_to_string(): Calculated and actual lengths differ: %d != %d\n", +  Pike_fatal("utf8_to_string(): Calculated and actual lengths differ: " +  "%"PRINTPTRDIFFT"d != %"PRINTPTRDIFFT"d\n",    len, j);    }   #endif /* PIKE_DEBUG */    out = end_shared_string(out);    pop_n_elems(args);    push_string(out);   }      /*! @decl string __parse_pike_type(string t)    */