Skip to content

Commit 4c70ea7

Browse files
committed
remove unused functions from lm_float80
1 parent 771bd5e commit 4c70ea7

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

cutil/lm_float.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,9 @@ value float80_of_string(value s) {
142142

143143
/* Load the string value. */
144144
buffer = String_val(s);
145-
#if 0
146-
/* BUG: Looks like strtold does not work: glibc-2.2.2, Aug 31, 2001 --jyh */
145+
#if 1
146+
/* Looks like strtold does not work: glibc-2.2.2, Aug 31, 2001 --jyh */
147+
/* XXX: LDB: this should no more a problem since 2020 */
147148
val = strtold(buffer, NULL);
148149
#else
149150
val = strtod(buffer, NULL);
@@ -337,10 +338,11 @@ value float80_atan2(value f1, value f2) {
337338
}
338339

339340
/*
340-
* BUG: these are hopefullu temporary.
341+
* XXX: these are hopefullu temporary.
341342
* Use them for assembling floats.
342343
* Error handling is performed at the C level.
343344
*/
345+
#if 0
344346
value c_blit_float32(value x_val, value buf_val, value off_val)
345347
{
346348
unsigned char *buf;
@@ -383,3 +385,4 @@ value c_blit_float80(value x_val, value buf_val, value off_val)
383385
memcpy(buf + off, &x, 10);
384386
return Val_unit;
385387
}
388+
#endif

util/lm_float80.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ let min x y = if compare x y < 0 then x else y
6868
let max x y = if compare x y > 0 then x else y
6969

7070
(* Check buffer bounds *)
71+
(* unused
7172
external c_blit_float32 : float80 -> bytes -> int -> unit = "c_blit_float32"
7273
external c_blit_float64 : float80 -> bytes -> int -> unit = "c_blit_float64"
7374
external c_blit_float80 : float80 -> bytes -> int -> unit = "c_blit_float80"
@@ -89,3 +90,4 @@ let blit_float80 x buf off =
8990
if off + 10 > len then
9091
raise (Invalid_argument "blit_float80");
9192
c_blit_float80 x buf off
93+
*)

util/lm_float80.mli

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,10 @@ val min : float80 -> float80 -> float80
6565
val max : float80 -> float80 -> float80
6666

6767
(*
68-
* BUG: these are hopefully temporary.
68+
* these are hopefully temporary.
6969
* We use them to blit the float into a buffer area.
70-
*)
70+
7171
val blit_float32 : float80 -> bytes -> int -> unit
7272
val blit_float64 : float80 -> bytes -> int -> unit
7373
val blit_float80 : float80 -> bytes -> int -> unit
74+
*)

0 commit comments

Comments
 (0)