diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 04:56:27 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-05-18 04:56:27 +0000 |
commit | 32dc42cf1a248821df7594047bd3fd7822622b32 (patch) | |
tree | b44992897e705edbaec22a2c5e4aee402c5d5177 /sprintf.c | |
parent | ec6b316cf26eae7eb36e3f9bce24110319e33e35 (diff) |
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@215 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r-- | sprintf.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -13,7 +13,7 @@ #include "ruby.h" #include <ctype.h> -static void fmt_setup(); +static void fmt_setup _((char*,char,int,int,int)); static char* remove_sign_bits(str, base) @@ -99,10 +99,7 @@ remove_sign_bits(str, base) return str; } -double big2dbl(); -#ifndef atof -double atof(); -#endif +double big2dbl _((VALUE)); VALUE f_sprintf(argc, argv) @@ -165,7 +162,7 @@ f_sprintf(argc, argv) retry: switch (*p) { default: - if (isprint(*p)) + if (ISPRINT(*p)) ArgError("malformed format string - %%%c", *p); else ArgError("malformed format string"); @@ -199,7 +196,7 @@ f_sprintf(argc, argv) case '5': case '6': case '7': case '8': case '9': flags |= FWIDTH; width = 0; - for (; p < end && isdigit(*p); p++) { + for (; p < end && ISDIGIT(*p); p++) { width = 10 * width + (*p - '0'); } if (p >= end) { @@ -239,7 +236,7 @@ f_sprintf(argc, argv) goto retry; } - for (; p < end && isdigit(*p); p++) { + for (; p < end && ISDIGIT(*p); p++) { prec = 10 * prec + (*p - '0'); } if (p >= end) { |