From: Larry Wall Date: Mon, 22 Jun 1992 23:34:36 +0000 (+0000) Subject: perl 4.0 patch 35: (combined patch) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=514dae0dba791ec01681adb3b3946a7646e146b3;p=p5sagit%2Fp5-mst-13.2.git perl 4.0 patch 35: (combined patch) Subject: bad interaction between backslash and hyphen in tr/// Among other things, tr/\040-\126/ / was not doing a character range, due to a earlier botched fix to make \- work right. Subject: Configure test for presence of nroff was wrong If Loc doesn't find nroff, it sets $nroff to 'nroff'. The man page test was tesing against the null string. Subject: installperl error message printed file mode in decimal, not octal A real, honest-to-goodnes nit. Subject: fixed up some filenames in MANIFEST Erroneously contained "pstruct", omitted hints/isc_3_2_3.sh. --- diff --git a/Configure b/Configure index 4475378..ddfd7e2 100755 --- a/Configure +++ b/Configure @@ -8,7 +8,7 @@ # and edit it to reflect your system. Some packages may include samples # of config.h for certain machines, so you might look for one of those.) # -# $RCSfile: Configure,v $$Revision: 4.0.1.8 $$Date: 92/06/11 21:04:45 $ +# $RCSfile: Configure,v $$Revision: 4.0.1.9 $$Date: 92/06/23 12:28:33 $ # # Yes, you may rip this off to use in other distribution packages. # (Note: this Configure script was generated automatically. Rather than @@ -877,7 +877,7 @@ $cat <c_line; @@ -2394,10 +2398,11 @@ int in_what; s++; } s = d = tmpstr->str_ptr; /* assuming shrinkage only */ - while (s < send) { + while (s < send || dorange) { if (in_what & SCAN_TR) { - if (*s != '\\' && s[1] == '-' && s+2 < send) { + if (dorange) { int i; + int max; if (!tmpstr2) { /* oops, have to grow */ tmpstr2 = str_smake(tmpstr); s = tmpstr2->str_ptr + (s - tmpstr->str_ptr); @@ -2406,11 +2411,17 @@ int in_what; i = d - tmpstr->str_ptr; STR_GROW(tmpstr, tmpstr->str_len + 256); d = tmpstr->str_ptr + i; - for (i = (s[0] & 0377); i <= (s[2] & 0377); i++) + d -= 2; + max = d[1] & 0377; + for (i = (*d & 0377); i <= max; i++) *d++ = i; - s += 3; + dorange = FALSE; continue; } + else if (*s == '-' && s+1 < send && d != tmpstr->str_ptr) { + dorange = TRUE; + s++; + } } else { if ((*s == '$' && s+1 < send && @@ -2432,6 +2443,12 @@ int in_what; if (*s == '\\' && s+1 < send) { s++; switch (*s) { + case '-': + if (in_what & SCAN_TR) { + *d++ = *s++; + continue; + } + /* FALL THROUGH */ default: if (!makesingle && (!leave || (*s && index(leave,*s)))) *d++ = '\\';