[Gmp-commit] /var/hg/gmp: mini-gmp/mini-gmp.c (mpz_set_str): Accept uppercase...

mercurial at gmplib.org mercurial at gmplib.org
Wed Jan 16 19:51:13 CET 2013


details:   /var/hg/gmp/rev/eee6b8e54765
changeset: 15288:eee6b8e54765
user:      Marco Bodrato <bodrato at mail.dm.unipi.it>
date:      Wed Jan 16 19:50:47 2013 +0100
description:
mini-gmp/mini-gmp.c (mpz_set_str): Accept uppercase '0X' and '0B'.

diffstat:

 mini-gmp/mini-gmp.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r d69baf93e621 -r eee6b8e54765 mini-gmp/mini-gmp.c
--- a/mini-gmp/mini-gmp.c	Wed Jan 16 17:44:04 2013 +0100
+++ b/mini-gmp/mini-gmp.c	Wed Jan 16 19:50:47 2013 +0100
@@ -3877,12 +3877,12 @@
       if (*sp == '0')
 	{
 	  sp++;
-	  if (*sp == 'x')
+	  if (*sp == 'x' || *sp == 'X')
 	    {
 	      base = 16;
 	      sp++;
 	    }
-	  else if (*sp == 'b')
+	  else if (*sp == 'b' || *sp == 'B')
 	    {
 	      base = 2;
 	      sp++;


More information about the gmp-commit mailing list