Mercurial > hg > xemacs-beta
comparison src/floatfns.c @ 2286:04bc9d2f42c7
[xemacs-hg @ 2004-09-20 19:18:55 by james]
Mark all unused parameters as unused. Also eliminate some unneeded local
variables.
author | james |
---|---|
date | Mon, 20 Sep 2004 19:20:08 +0000 |
parents | f557693c61de |
children | b5e1d4f6b66f 3742ea8250b5 |
comparison
equal
deleted
inserted
replaced
2285:914c5afaac33 | 2286:04bc9d2f42c7 |
---|---|
120 | 120 |
121 /* Convert float to Lisp Integer if it fits, else signal a range | 121 /* Convert float to Lisp Integer if it fits, else signal a range |
122 error using the given arguments. If bignums are available, range errors | 122 error using the given arguments. If bignums are available, range errors |
123 are never signaled. */ | 123 are never signaled. */ |
124 static Lisp_Object | 124 static Lisp_Object |
125 float_to_int (double x, const char *name, Lisp_Object num, Lisp_Object num2) | 125 float_to_int (double x, |
126 #ifdef HAVE_BIGNUM | |
127 const char *UNUSED (name), Lisp_Object UNUSED (num), | |
128 Lisp_Object UNUSED (num2) | |
129 #else | |
130 const char *name, Lisp_Object num, Lisp_Object num2 | |
131 #endif | |
132 ) | |
126 { | 133 { |
127 #ifdef HAVE_BIGNUM | 134 #ifdef HAVE_BIGNUM |
128 bignum_set_double (scratch_bignum, x); | 135 bignum_set_double (scratch_bignum, x); |
129 return Fcanonicalize_number (make_bignum_bg (scratch_bignum)); | 136 return Fcanonicalize_number (make_bignum_bg (scratch_bignum)); |
130 #else | 137 #else |
164 } | 171 } |
165 } | 172 } |
166 | 173 |
167 | 174 |
168 static Lisp_Object | 175 static Lisp_Object |
169 mark_float (Lisp_Object obj) | 176 mark_float (Lisp_Object UNUSED (obj)) |
170 { | 177 { |
171 return Qnil; | 178 return Qnil; |
172 } | 179 } |
173 | 180 |
174 static int | 181 static int |
175 float_equal (Lisp_Object obj1, Lisp_Object obj2, int depth) | 182 float_equal (Lisp_Object obj1, Lisp_Object obj2, int UNUSED (depth)) |
176 { | 183 { |
177 return (extract_float (obj1) == extract_float (obj2)); | 184 return (extract_float (obj1) == extract_float (obj2)); |
178 } | 185 } |
179 | 186 |
180 static Hashcode | 187 static Hashcode |
181 float_hash (Lisp_Object obj, int depth) | 188 float_hash (Lisp_Object obj, int UNUSED (depth)) |
182 { | 189 { |
183 /* mod the value down to 32-bit range */ | 190 /* mod the value down to 32-bit range */ |
184 /* #### change for 64-bit machines */ | 191 /* #### change for 64-bit machines */ |
185 return (unsigned long) fmod (extract_float (obj), 4e9); | 192 return (unsigned long) fmod (extract_float (obj), 4e9); |
186 } | 193 } |