pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.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: stralloc.c,v 1.234 2009/01/06 10:04:24 srb Exp $ + || $Id: stralloc.c,v 1.235 2009/04/10 11:41:39 grubba Exp $   */      #include "global.h"   #include "stralloc.h"   #include "pike_macros.h"   #include "dynamic_buffer.h"   #include "pike_macros.h"   #include "pike_memory.h"   #include "pike_error.h"   #include "gc.h"
pike.git/src/stralloc.c:2545:    string_builder_binary_strcat(buf, "\\U", 2);    string_builder_append_integer(buf, ch, 16, APPEND_ZERO_PAD, 8, 8);    } else if (ch > 0xff) {    /* Unicode character. */    string_builder_binary_strcat(buf, "\\u", 2);    string_builder_append_integer(buf, ch, 16, APPEND_ZERO_PAD, 4, 4);    } else if (ch & 0x60) {    /* Printable character or DEL. */    if (ch == '\177') {    /* DEL */ -  string_builder_binary_strcat(buf, "\\177", 4); -  goto next; +  goto ctrl_char;    } else if ((ch == '"') || (ch == '\\')) {    string_builder_putchar(buf, '\\');    }    string_builder_putchar(buf, ch);    } else { -  +  ctrl_char:    p_wchar2 next_ch;    /* Control character. */    string_builder_putchar(buf, '\\');    if ((ch > 6) && (ch < 14)) {    string_builder_putchar(buf, "0123456abtnvfr"[ch]);    if ((ch == 10) && (flags & QUOTE_BREAK_AT_LF)) {    if (buf->s->len > max_len) {    /* Too bad; no place for the lf. */    buf->s->len = old_len;    return i;