daly / axiom

Axiom is a free, open source computer algebra system

This URL has Read+Write access

axiom / zips / gcl-2.5.2.o.cmpaux.c.patch
100644 53 lines (49 sloc) 1.157 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--- cmpaux.c~ Thu Feb 27 09:12:13 2003
+++ cmpaux.c Sat May 3 22:18:06 2003
@@ -199,28 +199,28 @@
  return(i);
 }
 
-/* static float */
-/* object_to_float(object x) */
-/* { */
-/* float f=0.0; */
+float
+object_to_float(object x)
+{
+ float f=0.0;
 
-/* switch (type_of(x)) { */
-/* case t_character: */
-/* f = char_code(x); break; */
-/* case t_fixnum: */
-/* f = fix(x); break; */
-/* case t_bignum: */
-/* case t_ratio: */
-/* f = number_to_double(x); break; */
-/* case t_shortfloat: */
-/* f = sf(x); break; */
-/* case t_longfloat: */
-/* f = lf(x); break; */
-/* default: */
-/* FEerror("~S cannot be coerce to a C float.", 1, x); */
-/* } */
-/* return(f); */
-/* } */
+ switch (type_of(x)) {
+ case t_character:
+ f = char_code(x); break;
+ case t_fixnum:
+ f = fix(x); break;
+ case t_bignum:
+ case t_ratio:
+ f = number_to_double(x); break;
+ case t_shortfloat:
+ f = sf(x); break;
+ case t_longfloat:
+ f = lf(x); break;
+ default:
+ FEerror("~S cannot be coerce to a C float.", 1, x);
+ }
+ return(f);
+ }
 
 /* static double */
 /* object_to_double(object x) */