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.170 2004/11/05 16:00:49 grubba Exp $ + || $Id: stralloc.c,v 1.171 2004/11/05 16:05:07 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:2262:    do {    len++;    tmp /= 10;    } while (tmp);       switch(s->s->size_shift) {    case 0:    {    p_wchar0 *p = string_builder_allocate(s, len, 0);    do { -  *(p++) = '0' + val%10; +  p[--len] = '0' + val%10;    val /= 10;    } while (val);    }    break;    case 1:    {    p_wchar1 *p = string_builder_allocate(s, len, 0);    do { -  *(p++) = '0' + val%10; +  p[--len] = '0' + val%10;    val /= 10;    } while (val);    }    break;    case 2:    {    p_wchar2 *p = string_builder_allocate(s, len, 0);    do { -  *(p++) = '0' + val%10; +  p[--len] = '0' + val%10;    val /= 10;    } while (val);    }    break;    }    }    break;       default:    Pike_fatal("string_builder_vsprintf(): Invalid formatting method: "