summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-03-05 01:11:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-03-05 01:11:37 +0000
commitc239479b528987a0d52e5c90057dd2ab5c0ca9c3 (patch)
tree228d9a8f7552f57f5fc8d7c4bc904a0a95ce1d17 /toke.c
parent3240d4034f8fa9e108469d9d2c0cc0b8d16f6a8c (diff)
downloadperl-c239479b528987a0d52e5c90057dd2ab5c0ca9c3.tar.gz
more cpp cosmetics, logic cleanup
p4raw-id: //depot/cfgperl@5532
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/toke.c b/toke.c
index 993f091507..5b2fc9899c 100644
--- a/toke.c
+++ b/toke.c
@@ -6947,8 +6947,10 @@ Perl_scan_num(pTHX_ char *start)
/* make an sv from the string */
sv = NEWSV(92,0);
-#if (defined(USE_64_BIT_INT) && (!defined(HAS_STRTOLL)|| !defined(HAS_STRTOULL))) || \
- (!defined(USE_64_BIT_INT) && (!defined(HAS_STRTOL) || !defined(HAS_STRTOUL)))
+#if ( defined(USE_64_BIT_INT) && \
+ (!defined(HAS_STRTOLL)|| !defined(HAS_STRTOULL))) || \
+ (!defined(USE_64_BIT_INT) && \
+ (!defined(HAS_STRTOL) || !defined(HAS_STRTOUL)))
/*
No working strto[u]l[l]. Since atoi() doesn't do range checks,
@@ -6985,20 +6987,22 @@ Perl_scan_num(pTHX_ char *start)
UV uv;
errno = 0;
#ifdef USE_64_BIT_INT
- iv = (*PL_tokenbuf == '-') ?
- strtoll(PL_tokenbuf,&tp,10) :
- (IV)strtoull(PL_tokenbuf,&tp,10);
+ if (*PL_tokenbuf == '-')
+ iv = strtoll(PL_tokenbuf,&tp,10);
+ else
+ uv = strtoull(PL_tokenbuf,&tp,10);
#else
- iv = (*PL_tokenbuf == '-') ?
- strtol(PL_tokenbuf,&tp,10) :
- (IV)strtoul(PL_tokenbuf,&tp,10);
+ if (*PL_tokenbuf == '-')
+ iv = strtol(PL_tokenbuf,&tp,10);
+ else
+ uv = strtoul(PL_tokenbuf,&tp,10);
#endif
if (*tp || errno)
floatit = TRUE; /* probably just too large */
else if (*PL_tokenbuf == '-')
sv_setiv(sv, iv);
else
- sv_setuv(sv, (UV)iv);
+ sv_setuv(sv, uv);
}
if (floatit) {
char *tp;