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.626 2007/03/03 18:15:34 grubba Exp $ + || $Id: builtin_functions.c,v 1.627 2007/03/03 21:45:14 nilsson Exp $   */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"   #include "pike_error.h"
pike.git/src/builtin_functions.c:1464:    if(do_docode(CDR(n),DO_NOT_COPY) != 1)    Pike_fatal("Count args was wrong in generate_zero_type().\n");    emit0(F_ZERO_TYPE);    return 1;   }      /*    * Some wide-strings related functions    */    - /*! @decl string8 string_to_unicode(string s) + /*! @decl string(8) string_to_unicode(string s)    *!    *! Converts a string into an UTF16 compliant byte-stream.    *!    *! @note    *! Throws an error if characters not legal in an UTF16 stream are    *! encountered. Valid characters are in the range 0x00000 - 0x10ffff,    *! except for characters 0xfffe and 0xffff.    *!    *! Characters in range 0x010000 - 0x10ffff are encoded using surrogates.    *!
pike.git/src/builtin_functions.c:1761:    ((unsigned char *)str0)[-1];   #endif /* PIKE_BYTEORDER == 4321 */    }    }    }    out = end_shared_string(out);    pop_n_elems(args);    push_string(out);   }    - /*! @decl string8 string_to_utf8(string s) -  *! @decl string8 string_to_utf8(string s, int extended) + /*! @decl string(8) string_to_utf8(string s) +  *! @decl string(8) string_to_utf8(string s, int extended)    *!    *! Converts a string into an UTF-8 compliant byte-stream.    *!    *! @note    *! Throws an error if characters not valid in an UTF-8 stream are    *! encountered. Valid characters are in the ranges    *! @expr{0x00000000-0x0000d7ff@} and @expr{0x0000e000-0x0010ffff@}.    *!    *! If @[extended] is 1 then characters outside the valid ranges are    *! accepted too and encoded using the same algorithm. Such encoded
pike.git/src/builtin_functions.c:1895: Inside #if defined(PIKE_DEBUG)
   if (len != j) {    Pike_fatal("string_to_utf8(): 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 utf8_to_string(string8 s) -  *! @decl string utf8_to_string(string8 s, int extended) + /*! @decl string utf8_to_string(string(8) s) +  *! @decl string utf8_to_string(string(8) s, int extended)    *!    *! Converts an UTF-8 byte-stream into a string.    *!    *! @note    *! Throws an error if the stream is not a legal UTF-8 byte-stream.    *!    *! Accepts and decodes the extension used by @[string_to_utf8()] if    *! @[extended] is @expr{1@}.    *!    *! @note