pike.git/
src/
builtin.cmod
Branch:
Tag:
Non-build tags
All tags
No tags
2010-01-08
2010-01-08 18:17:53 by Stephen R. van den Berg <srb@cuci.nl>
22c7d87da7be39e44412f3e67f0bee437852e0ba (
13
lines) (+
7
/-
6
)
[
Show
|
Annotate
]
Branch:
7.9
Use input shift instead of output shift.
Rev: src/builtin.cmod:1.247
2:
|| 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.
246
2010/01/08 17:
55:10
srb Exp $
+
|| $Id: builtin.cmod,v 1.
247
2010/01/08
18:
17:
53
srb Exp $
*/ #include "global.h"
793:
bshift = 2; else if(replspace > 0xff && !bshift) bshift = 1;
-
if(wshift!=
bshift
) { /* convert whitespace to shift of input */
+
if(wshift!=
shift
) {
/* convert whitespace to shift of input */
PCHARP pcnws;
-
wstemp = xalloc(wlen<<
bshift
);
-
pcnws = MKPCHARP(wstemp,
bshift
);
-
if(wshift>
bshift
) {
+
wstemp = xalloc(wlen<<
shift
);
+
pcnws = MKPCHARP(wstemp,
shift
);
+
if(wshift>
shift
) {
PCHARP pcows; pcows = MKPCHARP_STR(whitespace); size_t clen = wlen, i; i = wlen = 0; do { unsigned chr = INDEX_PCHARP(pcows, i++);
-
if (chr<=0xff || chr<=0xffff &&
bshift
) /*
bshift
is 0 or 1 */
+
if (chr<=0xff || chr<=0xffff &&
shift
)
/*
shift
is 0 or 1 */
SET_INDEX_PCHARP(pcnws, wlen++, chr); } while(--clen); } else