blob: 7d7e32a982d708d8667214b7f7c8920e0ccfc4a1 (
plain)
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
|
$NetBSD: patch-ac,v 1.2 2000/12/15 03:13:05 garbled Exp $
--- Sources/API/Core/System/clanstring.h.orig Tue May 9 14:09:32
2000 +++ Sources/API/Core/System/clanstring.h Thu Dec 14 18:08:39 2000
@@ -25,6 +25,8 @@
#ifndef WIN32
#include <cctype>
+#include <stdio.h>
+#include <sys/param.h>
#endif
#ifdef __BEOS__
@@ -101,9 +103,12 @@
{
char buf[25];
buf[0]=0;
+ int precision=4;
+#if (defined(BSD) && BSD >= 199306)
+ snprintf(buf, sizeof buf, "%.*f", precision, (double)_float_number);
+#else
int decimal, sign;
- int precision=4;
char temp;
float float_number = _float_number;
@@ -134,6 +139,7 @@
strcat(buf, &float_buffer[decimal]);
copy_strings:
+#endif
int len=0;
if (prefix!=NULL) len=strlen(prefix);
|