2 * PROJECT C Library, X68000 PROGRAMMING INTERFACE DEFINITION
3 * --------------------------------------------------------------------
4 * This file is written by the Project C Library Group, and completely
5 * in public domain. You can freely use, copy, modify, and redistribute
6 * the whole contents, without this notice.
7 * --------------------------------------------------------------------
10 /* changed 1997.2.3 by K.Okabe */
14 #include <sys/xstdlib.h>
17 char *fconvert (double x
, int ndigit
, int *decpt
, int *sign
, char *buffer
)
24 /* 18·å¤Îʸ»úÎó¤ËÊÑ´¹ */
25 _dtos18 (x
, decpt
, sign
, string
);
27 /* ¥³¥Ô¡¼¸µ¥¢¥É¥ì¥¹¤òÀßÄê */
30 /* ¥³¥Ô¡¼À襢¥É¥ì¥¹¤òÀßÄê */
33 /* ¾®¿ôÅÀ°ÌÃÖ¤òÆÀ¤ë */
36 /* ¾®¿ôÅÀ°ÌÃÖ¤¬Éé¤Ê¤é */
39 /* Ëä¤á¤ë·å¿ô¤ò·×»» */
40 n
= min (-pos
, ndigit
);
46 /* ¾®¿ôÅÀ°ÌÃÖ¤Ï0¤Ë¤Ê¤ë */
51 /* »Ä¤ê¤Î¥³¥Ô¡¼·å¿ô */
57 /* ¤ê¤Ê¤¤Éôʬ¤Ï0¤ÇËä¤á¤ë */
64 /* ÊÑ´¹Ê¸»úÎ󤫤饳¥Ô¡¼ */
70 *decpt
+= (figup
= _round (buffer
, dst
, *src
));
72 /* ·«¤ê¾å¤¬¤ê¤¬¤¢¤ì¤ÐËöÈø¤Ë0¤òÄɲ乤ë */
76 /* ½ªÃ¼¤Ë NUL ¤òÂÇ¤Ä */