=================================================================== RCS file: /home/cvs/OpenXM_contrib/gmp/mpz/Attic/ior.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -p -r1.1.1.1 -r1.1.1.2 --- OpenXM_contrib/gmp/mpz/Attic/ior.c 2000/01/10 15:35:27 1.1.1.1 +++ OpenXM_contrib/gmp/mpz/Attic/ior.c 2000/09/09 14:12:53 1.1.1.2 @@ -1,20 +1,21 @@ /* mpz_ior -- Logical inclusive or. -Copyright (C) 1991, 1993, 1994, 1996 Free Software Foundation, Inc. +Copyright (C) 1991, 1993, 1994, 1996, 1997, 2000 Free Software Foundation, +Inc. This file is part of the GNU MP Library. The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Library General Public License as published by -the Free Software Foundation; either version 2 of the License, or (at your +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. The GNU MP Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -You should have received a copy of the GNU Library General Public License +You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ @@ -126,7 +127,7 @@ mpz_ior (res, op1, op2) _mpz_realloc (res, res_size); res_ptr = res->_mp_d; /* Don't re-read OP1_PTR and OP2_PTR. They point to - temporary space--never to the space RES->_mp_D used + temporary space--never to the space RES->_mp_d used to point to before reallocation. */ } @@ -163,9 +164,8 @@ mpz_ior (res, op1, op2) { /* We should compute -OP1 | OP2. Swap OP1 and OP2 and fall through to the code that handles OP1 | -OP2. */ - {mpz_srcptr t = op1; op1 = op2; op2 = t;} - {mp_srcptr t = op1_ptr; op1_ptr = op2_ptr; op2_ptr = t;} - {mp_size_t t = op1_size; op1_size = op2_size; op2_size = t;} + MPZ_SRCPTR_SWAP (op1, op2); + MPN_SRCPTR_SWAP (op1_ptr,op1_size, op2_ptr,op2_size); } } @@ -187,6 +187,7 @@ mpz_ior (res, op1, op2) opx = (mp_ptr) TMP_ALLOC (op2_size * BYTES_PER_MP_LIMB); mpn_sub_1 (opx, op2_ptr, op2_size, (mp_limb_t) 1); op2_ptr = opx; + op2_size -= op2_ptr[op2_size - 1] == 0; if (res->_mp_alloc < res_alloc) { @@ -194,7 +195,7 @@ mpz_ior (res, op1, op2) op1_ptr = op1->_mp_d; res_ptr = res->_mp_d; /* Don't re-read OP2_PTR. It points to temporary space--never - to the space RES->_mp_D used to point to before reallocation. */ + to the space RES->_mp_d used to point to before reallocation. */ } if (op1_size >= op2_size)