Mercurial > hg > xemacs-beta
comparison src/lread.c @ 2013:f2fdfc131770
[xemacs-hg @ 2004-04-14 22:50:52 by james]
Work around GMP string to number limitations.
author | james |
---|---|
date | Wed, 14 Apr 2004 22:50:54 +0000 |
parents | a9cdbfb4716e |
children | 61855263cb07 |
comparison
equal
deleted
inserted
replaced
2012:dd25e95fdbe1 | 2013:f2fdfc131770 |
---|---|
1849 } | 1849 } |
1850 } | 1850 } |
1851 #ifdef HAVE_RATIO | 1851 #ifdef HAVE_RATIO |
1852 if (isratio_string (read_ptr)) | 1852 if (isratio_string (read_ptr)) |
1853 { | 1853 { |
1854 /* GMP ratio_set_string returns random values with initial + sign */ | 1854 /* GMP ratio_set_string has no effect with initial + sign */ |
1855 if (*read_ptr == '+') | 1855 if (*read_ptr == '+') |
1856 read_ptr++; | 1856 read_ptr++; |
1857 ratio_set_string (scratch_ratio, read_ptr, 0); | 1857 ratio_set_string (scratch_ratio, read_ptr, 0); |
1858 ratio_canonicalize (scratch_ratio); | 1858 ratio_canonicalize (scratch_ratio); |
1859 return Fcanonicalize_number (make_ratio_rt (scratch_ratio)); | 1859 return Fcanonicalize_number (make_ratio_rt (scratch_ratio)); |