diff options
author | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 13:12:13 +0000 |
---|---|---|
committer | yugui <yugui@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-10-04 13:12:13 +0000 |
commit | bbbd9c0b7be96824e4648b551b3a66763df38788 (patch) | |
tree | 6ff6cd1d2496e9394fb712108e63906f6b2d9e0c /x68/fconvert.c | |
parent | 0c0e636b19559715798dcbf6493cb4327c60488f (diff) | |
download | ruby-bbbd9c0b7be96824e4648b551b3a66763df38788.tar.gz |
* x68/_dtos18.c: removed. Ruby no longer supports human68k.
* x68/_round.c: ditto.
* x68/fconvert.c: ditto.
* x68/select.c: ditto.
* ext/Setup.x68: ditto.
* missing/x68.c: ditto.
* dln.c (dln_find_exe_r): removed human68k supports.
(dln_find_1): ditto.
* lib/mkmf.rb: ditto.
* ext/extmk.rb (Init_ext): ditto.
* ext/socket/socket.c (init_sock): ditto.
* gc.c (GC_MALLOC_LIMIT): ditto.
(rb_setjmp, rb_jmpbuf): ditto.
(mark_current_machine_context): ditto.
* include/ruby/defines.h (PATH_ENV): ditto.
* io.c: ditto.
* process.c: ditto.
* ruby.c: ditto.
* test/ruby/test_env.rb: ditto.
* test/ruby/test_path.rb: ditto.
* LEGAL
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19677 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'x68/fconvert.c')
-rw-r--r-- | x68/fconvert.c | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/x68/fconvert.c b/x68/fconvert.c deleted file mode 100644 index 9a0bc0e088..0000000000 --- a/x68/fconvert.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * PROJECT C Library, X68000 PROGRAMMING INTERFACE DEFINITION - * -------------------------------------------------------------------- - * This file is written by the Project C Library Group, and completely - * in public domain. You can freely use, copy, modify, and redistribute - * the whole contents, without this notice. - * -------------------------------------------------------------------- - * $Id$ - */ -/* changed 1997.2.3 by K.Okabe */ - -/* System headers */ -#include <stdlib.h> -#include <sys/xstdlib.h> - -/* Functions */ -char *fconvert (double x, int ndigit, int *decpt, int *sign, char *buffer) -{ - int pos, n; - char *src, *dst; - char string[24]; - int figup; - - /* 18桁の文字列に変換 */ - _dtos18 (x, decpt, sign, string); - - /* コピー元アドレスを設定 */ - src = string; - - /* コピー先アドレスを設定 */ - dst = buffer; - - /* 小数点位置を得る */ - pos = *decpt; - - /* 小数点位置が負なら */ - if (pos < 0) { - - /* 埋める桁数を計算 */ - n = min (-pos, ndigit); - - /* 先頭を0で埋める */ - while (n-- > 0) - *dst++ = '0'; - - /* 小数点位置は0になる */ - *decpt = 0; - - } - - /* 残りのコピー桁数 */ - n = ndigit + pos; - - /* 格納先にコピー */ - while (n-- > 0) { - - /* 足りない部分は0で埋める */ - if (*src == '\0') { - while (n-- >= 0) - *dst++ = '0'; - break; - } - - /* 変換文字列からコピー */ - *dst++ = *src++; - - } - - /* 丸める */ - *decpt += (figup = _round (buffer, dst, *src)); - - /* 繰り上がりがあれば末尾に0を追加する */ - if (figup) - *dst++ = '0'; - - /* 終端に NUL を打つ */ - *dst = '\0'; - - /* アドレスを返す */ - return buffer; -} |