pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.66 1999/10/30 13:18:49 noring Exp $"); + RCSID("$Id: operators.c,v 1.67 1999/11/04 20:05:22 hubbe 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:626:       return 0;   }      void o_subtract(void)   {    if (sp[-2].type != sp[-1].type && !float_promote())    {    if(call_lfun(LFUN_SUBTRACT, LFUN_RSUBTRACT))    return; -  bad_arg_error("`-", sp-2, 2, 2, type_name[sp[-2].type], +  bad_arg_error("`-", sp-2, 2, 2, get_name_of_type(sp[-2].type),    sp-1, "Subtract on different types.\n");    }       switch(sp[-2].type)    {    case T_OBJECT:    CALL_OPERATOR(LFUN_SUBTRACT,2);    break;       case T_ARRAY:
pike.git/src/operators.c:754:   }      void o_and(void)   {    if(sp[-1].type != sp[-2].type)    {    if(call_lfun(LFUN_AND, LFUN_RAND))    return;    {    int args = 2; -  SIMPLE_BAD_ARG_ERROR("`&", 2, type_name[sp[-2].type]); +  SIMPLE_BAD_ARG_ERROR("`&", 2, get_name_of_type(sp[-2].type));    }    }       switch(sp[-2].type)    {    case T_OBJECT:    CALL_OPERATOR(LFUN_AND,2);    break;       case T_INT:
pike.git/src/operators.c:942:      void o_or(void)   {    if(sp[-1].type != sp[-2].type)    {    if(call_lfun(LFUN_OR, LFUN_ROR))    return;       {    int args = 2; -  SIMPLE_BAD_ARG_ERROR("`|", 2, type_name[sp[-2].type]); +  SIMPLE_BAD_ARG_ERROR("`|", 2, get_name_of_type(sp[-2].type));    }    }       switch(sp[-2].type)    {    case T_OBJECT:    CALL_OPERATOR(LFUN_OR,2);    break;       case T_INT:
pike.git/src/operators.c:1035:         void o_xor(void)   {    if(sp[-1].type != sp[-2].type)    {    if(call_lfun(LFUN_XOR, LFUN_RXOR))    return;    {    int args = 2; -  SIMPLE_BAD_ARG_ERROR("`^", 2, type_name[sp[-2].type]); +  SIMPLE_BAD_ARG_ERROR("`^", 2, get_name_of_type(sp[-2].type));    }    }       switch(sp[-2].type)    {    case T_OBJECT:    CALL_OPERATOR(LFUN_XOR,2);    break;       case T_INT: