Branch: Tag:

1999-02-10

1999-02-10 01:29:43 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

UNDEFINED + ({}) and `+= implemented

Rev: src/docode.c:1.44
Rev: src/lex.c:1.62
Rev: src/modules/Gmp/mpz_glue.c:1.38
Rev: src/operators.c:1.46
Rev: src/program.c:1.109
Rev: src/program.h:1.50
Rev: src/security.c:1.10
Rev: src/testsuite.in:1.146

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: mpz_glue.c,v 1.37 1999/02/01 02:42:21 hubbe Exp $"); + RCSID("$Id: mpz_glue.c,v 1.38 1999/02/10 01:29:43 hubbe Exp $");   #include "gmp_machine.h"      #if defined(HAVE_GMP2_GMP_H) && defined(HAVE_LIBGMP2)
438:   BINFUN(mpzmod_mul,mpz_mul)   BINFUN(mpzmod_gcd,mpz_gcd)    +  + static void mpzmod_add_eq(INT32 args) + { +  INT32 e; +  struct object *res; +  for(e=0; e<args; e++) +  get_mpz(sp+e-args, 1); +  for(e=0;e<args;e++) +  mpz_add(THIS, THIS, OBTOMPZ(sp[e-args].u.object)); +  pop_n_elems(args); +  ref_push_object(fp->current_object); + } +    static void mpzmod_sub(INT32 args)   {    INT32 e;
930:   #define MPZ_BINOP_TYPE ("function(" MPZ_ARG_TYPE "...:object)")       add_function("`+",mpzmod_add,MPZ_BINOP_TYPE,0); +  add_function("`+=",mpzmod_add_eq,MPZ_BINOP_TYPE,0);    add_function("``+",mpzmod_add,MPZ_BINOP_TYPE,0);    add_function("`-",mpzmod_sub,MPZ_BINOP_TYPE,0);    add_function("``-",mpzmod_rsub,MPZ_BINOP_TYPE,0);