pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*-   || 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.cmod,v 1.251 2010/01/09 13:49:05 srb Exp $ + || $Id: builtin.cmod,v 1.252 2010/01/11 13:19:56 jonasw 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.cmod:796:    replspace = index_shared_string(whitespace, 0);    if(replspace > 0xffff)    bshift = 2;    else if(replspace > 0xff && !bshift)    bshift = 1;    if(wshift!=shift) { /* convert whitespace to shift of input */    PCHARP pcnws;    wstemp = xalloc(wlen<<shift);    pcnws = MKPCHARP(wstemp, shift);    if(wshift>shift) { -  PCHARP pcows; -  pcows = MKPCHARP_STR(whitespace); +  PCHARP pcows = MKPCHARP_STR(whitespace);    size_t clen = wlen, i;    i = wlen = 0;    do {    unsigned chr = INDEX_PCHARP(pcows, i++);    if (chr<=0xff || chr<=0xffff && shift) /* shift is 0 or 1 */    SET_INDEX_PCHARP(pcnws, wlen++, chr);    } while(--clen);    } else    pike_string_cpy(pcnws, whitespace);    ws = wstemp;