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.178 2004/11/06 15:33:17 grubba Exp $ + || $Id: stralloc.c,v 1.179 2004/11/06 15:35:32 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:2180:   PMOD_EXPORT void string_builder_append_integer(struct string_builder *s,    LONGEST val,    unsigned int base,    int flags,    size_t min_width,    size_t precision)   {    unsigned LONGEST tmp;    size_t len = 1;    const char *numbers = "0123456789abcdef"; +  fprintf(stderr, "min_width: %d\nprecision:%d\nflags:0x%04x\n", +  min_width, precision, flags);    if ((base < 2) || (base > 16)) {    Pike_fatal("string_builder_append_int(): Unsupported base %u.\n", base);    }    if (flags & APPEND_UPPER_CASE) {    numbers = "0123456789ABCDEF";    }    if ((flags & APPEND_SIGNED) && (val < 0)) {    string_builder_putchar(s, '-');    val = -val;    } else if (flags & APPEND_POSITIVE) {
pike.git/src/stralloc.c:2333:    continue;       case '0':    if (!state) {    flags |= APPEND_ZERO_PAD;    }    /* FALL_THROUGH */    case '1': case '2': case '3':    case '4': case '5': case '6':    case '7': case '8': case '9': -  if (state = STATE_PRECISION) { +  if (state == STATE_PRECISION) {    precision = precision * 10 + fmt[-1] - '0';    } else {    state = STATE_MIN_WIDTH;    min_width = min_width * 10 + fmt[-1] - '0';    }    continue; -  +     case '.':    state = STATE_PRECISION;    continue;       case 'O':    {    /* FIXME: Doesn't care about field widths yet. */    dynamic_buffer old_buf;    init_buf(&old_buf);    describe_svalue(va_arg(args, struct svalue *), 0, NULL);