comparison src/lread.c @ 5095:cb4f2e1bacc4

merge
author Ben Wing <ben@xemacs.org>
date Thu, 04 Mar 2010 02:46:38 -0600
parents 207dad9e74f7
children a48ef26d87ee
comparison
equal deleted inserted replaced
5094:ebee7d1e58bd 5095:cb4f2e1bacc4
1980 { 1980 {
1981 /* GMP ratio_set_string has no effect with initial + sign */ 1981 /* GMP ratio_set_string has no effect with initial + sign */
1982 if (*read_ptr == '+') 1982 if (*read_ptr == '+')
1983 read_ptr++; 1983 read_ptr++;
1984 ratio_set_string (scratch_ratio, read_ptr, 0); 1984 ratio_set_string (scratch_ratio, read_ptr, 0);
1985 ratio_canonicalize (scratch_ratio); 1985 if (bignum_sign (ratio_denominator (scratch_ratio)) != 0) {
1986 return Fcanonicalize_number (make_ratio_rt (scratch_ratio)); 1986 ratio_canonicalize (scratch_ratio);
1987 return Fcanonicalize_number (make_ratio_rt (scratch_ratio));
1988 }
1989 return Fsignal (Qinvalid_read_syntax,
1990 list2 (build_msg_string
1991 ("Invalid ratio constant in reader"),
1992 make_string ((Ibyte *) read_ptr, len)));
1987 } 1993 }
1988 #endif 1994 #endif
1989 if (isfloat_string (read_ptr)) 1995 if (isfloat_string (read_ptr))
1990 return make_float (atof (read_ptr)); 1996 return make_float (atof (read_ptr));
1991 } 1997 }