pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.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: builtin_functions.c,v 1.571 2004/10/15 15:36:04 grubba Exp $ + || $Id: builtin_functions.c,v 1.572 2004/10/16 07:28:28 agehall 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_functions.c:3078:       if( (to->type_field & ~BIT_STRING) &&    (array_fix_type_field(to) & ~BIT_STRING) )    Pike_error("replace: to array not array(string).\n");       /* NOTE: The following test is needed, since sizeof(struct tupel)    * is somewhat greater than sizeof(struct svalue).    */    if (from->size > (ptrdiff_t)(LONG_MAX/sizeof(struct tupel)))    Pike_error("Array too large (size %" PRINTPTRDIFFT "d " -  "exceeds %" PRINTSIZET "d).\n", -  from->size, (LONG_MAX/sizeof(struct tupel))); +  "exceeds %" PRINTSIZET "u).\n", +  from->size, (size_t)(LONG_MAX/sizeof(struct tupel)));    ctx.v=(struct tupel *)xalloc(sizeof(struct tupel)*from->size);    init_string_builder(&ctx.ret,str->size_shift);    SET_ONERROR (uwp, free_replace_many_context, &ctx);       for(num=e=0;e<from->size;e++)    {    if(ITEM(from)[e].u.string->size_shift > str->size_shift)    continue;       ctx.v[num].ind=ITEM(from)[e].u.string;