X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=toke.c;h=dcb44541e8d8dd68f6f5101800e6f2c02a659c47;hb=7f2c89897f1cc260c9f4949731056784f989703f;hp=322e194c54c291b5dfb27931c0aeb3f50833f17e;hpb=155aba94f677ac771761a1f510964fe5b21524ed;p=p5sagit%2Fp5-mst-13.2.git diff --git a/toke.c b/toke.c index 322e194..dcb4454 100644 --- a/toke.c +++ b/toke.c @@ -3958,7 +3958,8 @@ Perl_yylex(pTHX) s += 2; d = s; s = scan_word(s, PL_tokenbuf, sizeof PL_tokenbuf, FALSE, &len); - tmp = keyword(PL_tokenbuf, len); + if (!(tmp = keyword(PL_tokenbuf, len))) + Perl_croak(aTHX_ "CORE::%s is not a keyword", PL_tokenbuf); if (tmp < 0) tmp = -tmp; goto reserved_word; @@ -3984,7 +3985,7 @@ Perl_yylex(pTHX) LOP(OP_BIND,XTERM); case KEY_binmode: - UNI(OP_BINMODE); + LOP(OP_BINMODE,XTERM); case KEY_bless: LOP(OP_BLESS,XTERM); @@ -6938,10 +6939,9 @@ 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))) + /* unfortunately this monster needs to be on one line or + makedepend will be confused. */ +#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, @@ -6979,22 +6979,14 @@ Perl_scan_num(pTHX_ char *start) */ if (!floatit) { - char *tp; IV iv; UV uv; errno = 0; -#ifdef USE_64_BIT_INT if (*PL_tokenbuf == '-') - iv = strtoll(PL_tokenbuf,&tp,10); + iv = Strtol(PL_tokenbuf, (char**)NULL, 10); else - uv = strtoull(PL_tokenbuf,&tp,10); -#else - if (*PL_tokenbuf == '-') - iv = strtol(PL_tokenbuf,&tp,10); - else - uv = strtoul(PL_tokenbuf,&tp,10); -#endif - if (*tp || errno) + uv = Strtoul(PL_tokenbuf, (char**)NULL, 10); + if (errno) floatit = TRUE; /* probably just too large */ else if (*PL_tokenbuf == '-') sv_setiv(sv, iv); @@ -7002,18 +6994,9 @@ Perl_scan_num(pTHX_ char *start) sv_setuv(sv, uv); } if (floatit) { - char *tp; - errno = 0; -#ifdef USE_LONG_DOUBLE - value = strtold(PL_tokenbuf,&tp); -#else - value = strtod(PL_tokenbuf,&tp); -#endif - if (*tp || errno) - Perl_die(aTHX_ "unparseable float"); - else - sv_setnv(sv, value); - } + value = Atof(PL_tokenbuf); + sv_setnv(sv, value); + } #endif if ( floatit ? (PL_hints & HINT_NEW_FLOAT) : (PL_hints & HINT_NEW_INTEGER) )