summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-02-06 20:45:30 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-02-06 20:45:30 +0000
commit3818b22bb9ef820a2553aa5e3504220f3b156f21 (patch)
tree53e97cd4154273174e1cb2cc51b69419507ec6a4
parentd308986b5b369caa1602a636a5e2ecfa149dfc89 (diff)
downloadperl-3818b22bb9ef820a2553aa5e3504220f3b156f21.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.h2
-rw-r--r--INTERN.h2
-rw-r--r--README2
-rw-r--r--av.c2
-rw-r--r--av.h2
-rw-r--r--cop.h2
-rw-r--r--cv.h2
-rw-r--r--deb.c2
-rw-r--r--doio.c2
-rw-r--r--doop.c2
-rw-r--r--dump.c7
-rw-r--r--form.h2
-rw-r--r--gv.c2
-rw-r--r--gv.h2
-rw-r--r--handy.h2
-rw-r--r--hv.c2
-rw-r--r--hv.h2
-rw-r--r--mg.c2
-rw-r--r--mg.h2
-rw-r--r--op.c2
-rw-r--r--op.h2
-rw-r--r--perl.c4
-rw-r--r--perl.h2
-rw-r--r--perlio.c2
-rw-r--r--perly.y2
-rw-r--r--pp.c2
-rw-r--r--pp.h2
-rw-r--r--pp_ctl.c4
-rw-r--r--pp_hot.c2
-rw-r--r--pp_sys.c2
-rw-r--r--regcomp.c2
-rw-r--r--regexec.c2
-rw-r--r--run.c2
-rw-r--r--scope.c2
-rw-r--r--sv.c2
-rw-r--r--sv.h2
-rw-r--r--toke.c16
-rw-r--r--utf8.c2
-rw-r--r--utf8.h2
-rw-r--r--util.c2
-rw-r--r--util.h2
41 files changed, 58 insertions, 47 deletions
diff --git a/EXTERN.h b/EXTERN.h
index 7601838d8b..897fae63b0 100644
--- a/EXTERN.h
+++ b/EXTERN.h
@@ -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.
diff --git a/INTERN.h b/INTERN.h
index ee2959c383..286cc46fd8 100644
--- a/INTERN.h
+++ b/INTERN.h
@@ -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.
diff --git a/README b/README
index 7b294f2a40..0925b98018 100644
--- a/README
+++ b/README
@@ -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
diff --git a/av.c b/av.c
index 264fe23b10..511d4d34b4 100644
--- a/av.c
+++ b/av.c
@@ -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.
diff --git a/av.h b/av.h
index b56917fa2c..6b66bfd1b1 100644
--- a/av.h
+++ b/av.h
@@ -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.
diff --git a/cop.h b/cop.h
index 5760a8d582..734d2ea068 100644
--- a/cop.h
+++ b/cop.h
@@ -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.
diff --git a/cv.h b/cv.h
index 821029838d..adb424e8ea 100644
--- a/cv.h
+++ b/cv.h
@@ -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.
diff --git a/deb.c b/deb.c
index 36b8ca3b68..0928c01a9a 100644
--- a/deb.c
+++ b/deb.c
@@ -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.
diff --git a/doio.c b/doio.c
index 0463af8b3b..cb5f3e2fc2 100644
--- a/doio.c
+++ b/doio.c
@@ -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.
diff --git a/doop.c b/doop.c
index 26ac87dbca..a0fa729792 100644
--- a/doop.c
+++ b/doop.c
@@ -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.
diff --git a/dump.c b/dump.c
index e3648ead93..569dc8c923 100644
--- a/dump.c
+++ b/dump.c
@@ -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,");
diff --git a/form.h b/form.h
index 0d3053d78b..ca2a0c8433 100644
--- a/form.h
+++ b/form.h
@@ -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.
diff --git a/gv.c b/gv.c
index b8fef0d8b0..a7ed085a2e 100644
--- a/gv.c
+++ b/gv.c
@@ -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.
diff --git a/gv.h b/gv.h
index 680f2c0eb6..d2234a69b4 100644
--- a/gv.h
+++ b/gv.h
@@ -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.
diff --git a/handy.h b/handy.h
index 741c7162b0..ce2631f9d2 100644
--- a/handy.h
+++ b/handy.h
@@ -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.
diff --git a/hv.c b/hv.c
index e48e8b071b..e3f3d95aaa 100644
--- a/hv.c
+++ b/hv.c
@@ -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.
diff --git a/hv.h b/hv.h
index f0522580bb..5bc38a0a79 100644
--- a/hv.h
+++ b/hv.h
@@ -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.
diff --git a/mg.c b/mg.c
index 8d2e4e3d26..893f4ff914 100644
--- a/mg.c
+++ b/mg.c
@@ -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.
diff --git a/mg.h b/mg.h
index 6a8afdc13b..baedde5a6e 100644
--- a/mg.h
+++ b/mg.h
@@ -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.
diff --git a/op.c b/op.c
index fb696a70bb..8f3330cd25 100644
--- a/op.c
+++ b/op.c
@@ -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.
diff --git a/op.h b/op.h
index 2360f9b381..6019486701 100644
--- a/op.h
+++ b/op.h
@@ -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.
diff --git a/perl.c b/perl.c
index 186b85c85a..40ce5ca1a0 100644
--- a/perl.c
+++ b/perl.c
@@ -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
diff --git a/perl.h b/perl.h
index 37ef3f1983..ebc0dba0b5 100644
--- a/perl.h
+++ b/perl.h
@@ -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.
diff --git a/perlio.c b/perlio.c
index 2ad8b4e77a..6945a75069 100644
--- a/perlio.c
+++ b/perlio.c
@@ -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.
diff --git a/perly.y b/perly.y
index e6ee287be2..5170b365f3 100644
--- a/perly.y
+++ b/perly.y
@@ -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.
diff --git a/pp.c b/pp.c
index aec5073e93..9406a0b343 100644
--- a/pp.c
+++ b/pp.c
@@ -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.
diff --git a/pp.h b/pp.h
index 49155c30a8..bdc0b1a6c1 100644
--- a/pp.h
+++ b/pp.h
@@ -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.
diff --git a/pp_ctl.c b/pp_ctl.c
index 8eb02b7ff2..972c21d30c 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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);
diff --git a/pp_hot.c b/pp_hot.c
index 133265a1a7..6ef302c117 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -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.
diff --git a/pp_sys.c b/pp_sys.c
index 756ab10265..a9292a1c83 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -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.
diff --git a/regcomp.c b/regcomp.c
index bf08761d43..5df82c07b0 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -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.
diff --git a/regexec.c b/regexec.c
index 106c5d1d76..524313d570 100644
--- a/regexec.c
+++ b/regexec.c
@@ -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.
diff --git a/run.c b/run.c
index 2491b93a25..57f90dee64 100644
--- a/run.c
+++ b/run.c
@@ -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.
diff --git a/scope.c b/scope.c
index 91e0374955..0f568543ba 100644
--- a/scope.c
+++ b/scope.c
@@ -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.
diff --git a/sv.c b/sv.c
index 586c0dd968..0cf3b4c7da 100644
--- a/sv.c
+++ b/sv.c
@@ -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.
diff --git a/sv.h b/sv.h
index d8cd48789c..e5832040f8 100644
--- a/sv.h
+++ b/sv.h
@@ -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.
diff --git a/toke.c b/toke.c
index b9a12c41da..3410ab522b 100644
--- a/toke.c
+++ b/toke.c
@@ -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;
diff --git a/utf8.c b/utf8.c
index 0153fd6cd8..3d9caf9337 100644
--- a/utf8.c
+++ b/utf8.c
@@ -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.
diff --git a/utf8.h b/utf8.h
index 96ae621334..e864316fac 100644
--- a/utf8.h
+++ b/utf8.h
@@ -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.
diff --git a/util.c b/util.c
index d58b230fb7..031922a9f9 100644
--- a/util.c
+++ b/util.c
@@ -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.
diff --git a/util.h b/util.h
index 1c2c5552e7..beb5215e81 100644
--- a/util.h
+++ b/util.h
@@ -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.