diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 20:45:30 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-02-06 20:45:30 +0000 |
commit | c8a6b92a6ce5b3141a0edca8e46088f95d823e22 (patch) | |
tree | 53e97cd4154273174e1cb2cc51b69419507ec6a4 | |
parent | 76f1b7b884b5e8751096fdc9fddf6916256ab0c9 (diff) | |
download | perl-c8a6b92a6ce5b3141a0edca8e46088f95d823e22.tar.gz |
set SvUTF8 on vectors only if there are chars > 127; update copyright
years (from Gisle Aas)
p4raw-id: //depot/perl@5009
-rw-r--r-- | EXTERN.h | 2 | ||||
-rw-r--r-- | INTERN.h | 2 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | av.c | 2 | ||||
-rw-r--r-- | av.h | 2 | ||||
-rw-r--r-- | cop.h | 2 | ||||
-rw-r--r-- | cv.h | 2 | ||||
-rw-r--r-- | deb.c | 2 | ||||
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | doop.c | 2 | ||||
-rw-r--r-- | dump.c | 7 | ||||
-rw-r--r-- | form.h | 2 | ||||
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | gv.h | 2 | ||||
-rw-r--r-- | handy.h | 2 | ||||
-rw-r--r-- | hv.c | 2 | ||||
-rw-r--r-- | hv.h | 2 | ||||
-rw-r--r-- | mg.c | 2 | ||||
-rw-r--r-- | mg.h | 2 | ||||
-rw-r--r-- | op.c | 2 | ||||
-rw-r--r-- | op.h | 2 | ||||
-rw-r--r-- | perl.c | 4 | ||||
-rw-r--r-- | perl.h | 2 | ||||
-rw-r--r-- | perlio.c | 2 | ||||
-rw-r--r-- | perly.y | 2 | ||||
-rw-r--r-- | pp.c | 2 | ||||
-rw-r--r-- | pp.h | 2 | ||||
-rw-r--r-- | pp_ctl.c | 4 | ||||
-rw-r--r-- | pp_hot.c | 2 | ||||
-rw-r--r-- | pp_sys.c | 2 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | regexec.c | 2 | ||||
-rw-r--r-- | run.c | 2 | ||||
-rw-r--r-- | scope.c | 2 | ||||
-rw-r--r-- | sv.c | 2 | ||||
-rw-r--r-- | sv.h | 2 | ||||
-rw-r--r-- | toke.c | 16 | ||||
-rw-r--r-- | utf8.c | 2 | ||||
-rw-r--r-- | utf8.h | 2 | ||||
-rw-r--r-- | util.c | 2 | ||||
-rw-r--r-- | util.h | 2 |
41 files changed, 58 insertions, 47 deletions
@@ -1,6 +1,6 @@ /* EXTERN.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* INTERN.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,7 +1,7 @@ Perl Kit, Version 5.0 - Copyright 1989-1999, Larry Wall + Copyright 1989-2000, Larry Wall All rights reserved. This program is free software; you can redistribute it and/or modify @@ -1,6 +1,6 @@ /* av.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* av.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* cop.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* cv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* deb.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* doio.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* doop.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* dump.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -131,9 +131,9 @@ Perl_pv_display(pTHX_ SV *sv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim) } else { if (cur && isDIGIT(*(pv+1))) - Perl_sv_catpvf(aTHX_ sv, "\\%03o", *pv); + Perl_sv_catpvf(aTHX_ sv, "\\%03o", (U8)*pv); else - Perl_sv_catpvf(aTHX_ sv, "\\%o", *pv); + Perl_sv_catpvf(aTHX_ sv, "\\%o", (U8)*pv); } } sv_catpvn(sv, "\"", 1); @@ -846,6 +846,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo default: if (SvEVALED(sv)) sv_catpv(d, "EVALED,"); if (SvIsUV(sv)) sv_catpv(d, "IsUV,"); + if (SvUTF8(sv)) sv_catpv(d, "UTF8"); break; case SVt_PVBM: if (SvTAIL(sv)) sv_catpv(d, "TAIL,"); @@ -1,6 +1,6 @@ /* form.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* gv.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* gv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* handy.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* hv.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* hv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* mg.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* mg.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* op.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* op.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* perl.c * - * Copyright (c) 1987-1999 Larry Wall + * Copyright (c) 1987-2000 Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -2036,7 +2036,7 @@ Perl_moreswitches(pTHX_ char *s) (int)LOCAL_PATCH_COUNT, (LOCAL_PATCH_COUNT!=1) ? "es" : ""); #endif - printf("\n\nCopyright 1987-1999, Larry Wall\n"); + printf("\n\nCopyright 1987-2000, Larry Wall\n"); #ifdef MSDOS printf("\nMS-DOS port Copyright (c) 1989, 1990, Diomidis Spinellis\n"); #endif @@ -1,6 +1,6 @@ /* perl.h * - * Copyright (c) 1987-1997, Larry Wall + * Copyright (c) 1987-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* perlio.c * - * Copyright (c) 1996-1999, Nick Ing-Simmons + * Copyright (c) 1996-2000, Nick Ing-Simmons * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* perly.y * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp_ctl.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -2865,7 +2865,7 @@ PP(pp_require) sv = POPs; if (SvNIOKp(sv)) { UV rev, ver, sver; - if (SvPOKp(sv) && SvUTF8(sv)) { /* require v5.6.1 */ + if (SvPOKp(sv)) { /* require v5.6.1 */ I32 len; U8 *s = (U8*)SvPVX(sv); U8 *end = (U8*)SvPVX(sv) + SvCUR(sv); @@ -1,6 +1,6 @@ /* pp_hot.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* pp_sys.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -69,7 +69,7 @@ * **** Alterations to Henry's code are... **** - **** Copyright (c) 1991-1999, Larry Wall + **** Copyright (c) 1991-2000, Larry Wall **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -66,7 +66,7 @@ * **** Alterations to Henry's code are... **** - **** Copyright (c) 1991-1999, Larry Wall + **** Copyright (c) 1991-2000, Larry Wall **** **** You may distribute under the terms of either the GNU General Public **** License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* run.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* scope.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* sv.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* sv.h * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* toke.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -6890,6 +6890,7 @@ Perl_scan_num(pTHX_ char *start) U8 tmpbuf[10]; U8 *tmpend; NV nshift = 1.0; + bool utf8 = FALSE; s++; /* get past 'v' */ sv = NEWSV(92,5); @@ -6904,7 +6905,14 @@ Perl_scan_num(pTHX_ char *start) while (isDIGIT(*pos)) pos++; - tmpend = uv_to_utf8(tmpbuf, rev); + if (rev > 127) { + tmpend = uv_to_utf8(tmpbuf, rev); + utf8 = TRUE; + } + else { + tmpbuf[0] = (U8)rev; + tmpend = &tmpbuf[1]; + } *tmpend = '\0'; sv_catpvn(sv, (const char*)tmpbuf, tmpend - tmpbuf); if (rev > 0) @@ -6917,6 +6925,7 @@ Perl_scan_num(pTHX_ char *start) rev = atoi(s); s = pos; tmpend = uv_to_utf8(tmpbuf, rev); + utf8 = utf8 || rev > 127; *tmpend = '\0'; sv_catpvn(sv, (const char*)tmpbuf, tmpend - tmpbuf); if (rev > 0) @@ -6925,7 +6934,8 @@ Perl_scan_num(pTHX_ char *start) SvPOK_on(sv); SvNOK_on(sv); SvREADONLY_on(sv); - SvUTF8_on(sv); + if (utf8) + SvUTF8_on(sv); } } break; @@ -1,6 +1,6 @@ /* utf8.c * - * Copyright (c) 1998-1999, Larry Wall + * Copyright (c) 1998-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* utf8.h * - * Copyright (c) 1998-1999, Larry Wall + * Copyright (c) 1998-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* util.c * - * Copyright (c) 1991-1999, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. @@ -1,6 +1,6 @@ /* util.h * - * Copyright (c) 1991-1997, Larry Wall + * Copyright (c) 1991-2000, Larry Wall * * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. |