pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.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: operators.c,v 1.182 2003/11/12 18:59:17 mast Exp $ + || $Id: operators.c,v 1.183 2003/11/13 21:55:34 mast Exp $   */      #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.182 2003/11/12 18:59:17 mast Exp $"); + RCSID("$Id: operators.c,v 1.183 2003/11/13 21:55:34 mast Exp $");   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"   #include "mapping.h"   #include "array.h"   #include "stralloc.h"   #include "opcodes.h"   #include "operators.h"   #include "language.h"   #include "pike_memory.h"
pike.git/src/operators.c:500:    for(e=-args;e<0;e++)    {    switch(sp[e].type)    {    case T_STRING:    pike_string_cpy(buf,sp[e].u.string);    INC_PCHARP(buf,sp[e].u.string->len);    break;       case T_INT: -  sprintf(buffer,"%ld",(long)sp[e].u.integer); +  sprintf(buffer,"%"PRINTPIKEINT"d",sp[e].u.integer);    goto append_buffer;       case T_FLOAT: -  sprintf(buffer,"%f",(double)sp[e].u.float_number); +  sprintf(buffer,"%"PRINTPIKEFLOAT"f",sp[e].u.float_number);    append_buffer:    switch(max_shift)    {    case 0:    convert_0_to_0((p_wchar0 *)buf.ptr,buffer,strlen(buffer));    break;       case 1:    convert_0_to_1((p_wchar1 *)buf.ptr,(p_wchar0 *)buffer,    strlen(buffer));
pike.git/src/operators.c:3255:    sp[-1].u.integer = - sp[-1].u.integer;    return;       default:    PIKE_ERROR("`-", "Bad argument to unary minus.\n", sp, 1);    }   }      PMOD_EXPORT void o_range(void)   { -  ptrdiff_t from,to; +  INT_TYPE from, to;       if(sp[-3].type==T_OBJECT)    {    CALL_OPERATOR(LFUN_INDEX, 3);    return;    }       if(sp[-2].type != T_INT)    PIKE_ERROR("`[]", "Bad argument 2 to [ .. ]\n", sp, 3);