Branch: Tag:

1999-03-12

1999-03-12 22:22:55 by Per Hedbor <ph@opera.com>

Added support for nil |= mapping

Rev: src/operators.c:1.51

5:   \*/   #include "global.h"   #include <math.h> - RCSID("$Id: operators.c,v 1.50 1999/03/05 02:15:01 hubbe Exp $"); + RCSID("$Id: operators.c,v 1.51 1999/03/12 22:22:55 per Exp $");   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"
72:    sp[-2]=sp[-1]; \    sp--;    -  +    void f_add(INT32 args)   {    INT_TYPE e,size;
271:    break;    }    -  case BIT_FLOAT | BIT_INT: +  case BIT_FLOAT|BIT_INT:    {    FLOAT_TYPE sum;    sum=0.0;
318:    break;    }    +  case BIT_MAPPING|BIT_INT: +  { +  if(IS_UNDEFINED(sp-args)) +  { +  int e; +  struct mapping *a; +  +  for(e=1;e<args;e++) +  if(sp[e-args].type != T_MAPPING) +  error("`+: trying to add integers and mappings.\n"); +  +  a=add_mappings(sp-args+1,args-1); +  pop_n_elems(args); +  push_mapping(a); +  return; +  } +  error("`+: trying to add integers and mappings.\n"); +  } +     case BIT_MAPPING:    {    struct mapping *m;