gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat
-rwxr-xr-xgcl/o/cmpaux.c 90
1 files changed, 45 insertions, 45 deletions
diff --git a/gcl/o/cmpaux.c b/gcl/o/cmpaux.c
index 88dcf0d6d..0641536fc 100755
--- a/gcl/o/cmpaux.c
+++ b/gcl/o/cmpaux.c
@@ -199,51 +199,51 @@ object_to_int(object x)
return(i);
}
-/* static 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); */
-/* } */
-
-/* static double */
-/* object_to_double(object x) */
-/* { */
-/* double d=0.0; */
-
-/* switch (type_of(x)) { */
-/* case t_character: */
-/* d = char_code(x); break; */
-/* case t_fixnum: */
-/* d = fix(x); break; */
-/* case t_bignum: */
-/* case t_ratio: */
-/* d = number_to_double(x); break; */
-/* case t_shortfloat: */
-/* d = sf(x); break; */
-/* case t_longfloat: */
-/* d = lf(x); break; */
-/* default: */
-/* FEerror("~S cannot be coerce to a C double.", 1, x); */
-/* } */
-/* return(d); */
-/* } */
+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);
+}
+
+double
+object_to_double(object x)
+{
+ double d=0.0;
+
+ switch (type_of(x)) {
+ case t_character:
+ d = char_code(x); break;
+ case t_fixnum:
+ d = fix(x); break;
+ case t_bignum:
+ case t_ratio:
+ d = number_to_double(x); break;
+ case t_shortfloat:
+ d = sf(x); break;
+ case t_longfloat:
+ d = lf(x); break;
+ default:
+ FEerror("~S cannot be coerce to a C double.", 1, x);
+ }
+ return(d);
+}
/* this may allocate storage. The user can prevent this
by providing a string will fillpointer < length and
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月05日 12:53:09 +0000

AltStyle によって変換されたページ (->オリジナル) /