[Gmp-commit] /var/hg/gmp: 3 new changesets

mercurial at gmplib.org mercurial at gmplib.org
Thu Apr 26 22:22:20 UTC 2018


details:   /var/hg/gmp/rev/39ea64792dc2
changeset: 17605:39ea64792dc2
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Apr 27 00:19:50 2018 +0200
description:
mini-gmp/mini-mpq.h: Correct the copyright

details:   /var/hg/gmp/rev/117bc31b5541
changeset: 17606:117bc31b5541
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Apr 27 00:21:11 2018 +0200
description:
mpq/set_ui.c: - typo in a comment

details:   /var/hg/gmp/rev/5ad5d5e6e760
changeset: 17607:5ad5d5e6e760
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Fri Apr 27 00:22:13 2018 +0200
description:
mpq/set_si.c: ABS_CAST only if needed

diffstat:

 mini-gmp/mini-mpq.h |  37 +++++++++++++++++++++++--------------
 mpq/set_si.c        |   6 +-----
 mpq/set_ui.c        |   2 +-
 3 files changed, 25 insertions(+), 20 deletions(-)

diffs (92 lines):

diff -r 49c5e550ec8e -r 5ad5d5e6e760 mini-gmp/mini-mpq.h
--- a/mini-gmp/mini-mpq.h	Thu Apr 26 23:37:52 2018 +0200
+++ b/mini-gmp/mini-mpq.h	Fri Apr 27 00:22:13 2018 +0200
@@ -1,23 +1,32 @@
 /* mini-mpq, a minimalistic implementation of a GNU GMP subset.
 
-Copyright 1991-1997, 1999-2018 Free Software Foundation, Inc.
-Copyright 2018 Marco BODRATO.
+Copyright 2018 Free Software Foundation, Inc.
+
+This file is part of the GNU MP Library.
 
-This file is intendet for the GNU MP Library.
+The GNU MP Library is free software; you can redistribute it and/or modify
+it under the terms of either:
+
+  * the GNU Lesser General Public License as published by the Free
+    Software Foundation; either version 3 of the License, or (at your
+    option) any later version.
+
+or
 
-This is free software; you can redistribute it and/or modify it under
-the terms of the GNU Affero General Public License as published by
-the Free Software Foundation; either version 3 of the License, or (at
-your option) any later version.
+  * the GNU General Public License as published by the Free Software
+    Foundation; either version 2 of the License, or (at your option) any
+    later version.
+
+or both in parallel, as here.
 
-This software 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 Affero
-General Public License for more details.
+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 General Public License
+for more details.
 
-You should have received copies of the GNU Affero General Public
-License with the software.
-If not, see https://www.gnu.org/licenses/.  */
+You should have received copies of the GNU General Public License and the
+GNU Lesser General Public License along with the GNU MP Library.  If not,
+see https://www.gnu.org/licenses/.  */
 
 /* Header */
 
diff -r 49c5e550ec8e -r 5ad5d5e6e760 mpq/set_si.c
--- a/mpq/set_si.c	Thu Apr 26 23:37:52 2018 +0200
+++ b/mpq/set_si.c	Fri Apr 27 00:22:13 2018 +0200
@@ -34,8 +34,6 @@
 void
 mpq_set_si (mpq_t dest, signed long int num, unsigned long int den)
 {
-  unsigned long int abs_num;
-
   if (GMP_NUMB_BITS < BITS_PER_ULONG)
     {
       if (num == 0)  /* Canonicalize 0/d to 0/1.  */
@@ -45,8 +43,6 @@
       return;
     }
 
-  abs_num = ABS_CAST (unsigned long, num);
-
   if (num == 0)
     {
       /* Canonicalize 0/d to 0/1.  */
@@ -55,7 +51,7 @@
     }
   else
     {
-      MPZ_NEWALLOC (NUM(dest), 1)[0] = abs_num;
+      MPZ_NEWALLOC (NUM(dest), 1)[0] = ABS_CAST (unsigned long, num);
       SIZ(NUM(dest)) = num > 0 ? 1 : -1;
     }
 
diff -r 49c5e550ec8e -r 5ad5d5e6e760 mpq/set_ui.c
--- a/mpq/set_ui.c	Thu Apr 26 23:37:52 2018 +0200
+++ b/mpq/set_ui.c	Fri Apr 27 00:22:13 2018 +0200
@@ -45,7 +45,7 @@
 
   if (num == 0)
     {
-      /* Canonicalize 0/n to 0/1.  */
+      /* Canonicalize 0/d to 0/1.  */
       den = 1;
       SIZ(NUM(dest)) = 0;
     }


More information about the gmp-commit mailing list