summaryrefslogtreecommitdiff
path: root/sprintf.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-28 05:08:44 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-28 05:08:44 (GMT)
commitefdc6d78acc6f5f0c43c82d6aa4a19856a1e0045 (patch)
treed52205fd7003385931686b69a76ba3b28caa575f /sprintf.c
parentfb7c7d1e7959954d8e0d84958d8f1a3d44f9c188 (diff)
sprintf.c: ruby_ultoa
* sprintf.c (ruby_ultoa): prefixed to get rid of conflict with a MSVC library function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sprintf.c')
-rw-r--r--sprintf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sprintf.c b/sprintf.c
index b044fb2..f2d51f1 100644
--- a/sprintf.c
+++ b/sprintf.c
@@ -24,7 +24,7 @@
#define BIT_DIGITS(N) (((N)*146)/485 + 1) /* log2(10) =~ 146/485 */
static char *fmt_setup(char*,size_t,int,int,int,int);
-static char *ultoa(unsigned long val, char *endp, int base, int octzero);
+static char *ruby_ultoa(unsigned long val, char *endp, int base, int octzero);
static char
sign_bits(int base, const char *p)
@@ -939,7 +939,7 @@ rb_str_format(int argc, const VALUE *argv, VALUE fmt)
sc = ' ';
width--;
}
- s = ultoa((unsigned long)v, nbuf + sizeof(nbuf), 10, 0);
+ s = ruby_ultoa((unsigned long)v, nbuf + sizeof(nbuf), 10, 0);
len = (int)(nbuf + sizeof(nbuf) - s);
}
else {
@@ -1200,12 +1200,12 @@ fmt_setup(char *buf, size_t size, int c, int flags, int width, int prec)
*--buf = c;
if (flags & FPREC) {
- buf = ultoa(prec, buf, 10, 0);
+ buf = ruby_ultoa(prec, buf, 10, 0);
*--buf = '.';
}
if (flags & FWIDTH) {
- buf = ultoa(width, buf, 10, 0);
+ buf = ruby_ultoa(width, buf, 10, 0);
}
if (flags & FSPACE) *--buf = ' ';
@@ -1248,7 +1248,7 @@ fmt_setup(char *buf, size_t size, int c, int flags, int width, int prec)
#include "vsnprintf.c"
static char *
-ultoa(unsigned long val, char *endp, int base, int flags)
+ruby_ultoa(unsigned long val, char *endp, int base, int flags)
{
const char *xdigs = lower_hexdigits;
int octzero = flags & FSHARP;