diff options
author | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1989-10-26 10:31:40 +0000 |
---|---|---|
committer | Larry Wall <lwall@jpl-devvax.jpl.nasa.gov> | 1989-10-26 10:31:40 +0000 |
commit | 03a14243eca2d4d041778dac4abcfa3a19c06a56 (patch) | |
tree | 0b50fc4dff9a7d56bb58af5bffcfeb7fa3cc49fa /toke.c | |
parent | a687059cbaf2c6fdccb5e0fae2aee80ec15625a8 (diff) | |
download | perl-03a14243eca2d4d041778dac4abcfa3a19c06a56.tar.gz |
perl 3.0 patch #1 (combined patch)
Configure had difficulties if the user's path had weird components.
Now Configure appends the user's path to its own.
Some machines need <netinet/in.h> included in order to define
certain macros for packing or unpacking network order data.
On Suns, the shared library is used by default. If it doesn't
contain something contained in /lib/libc.a, then Configure was
getting things wrong (such as gethostent()). Now Configure uses
the shared library if it's there in preference to libc.a.
When gcc was selected as the compiler, the cc flags defaulted to
-fpcc_struct_return. Unfortunately, the underlines should be hyphens.
Configure figures out if BSD shadow passwords are installed and
the getpw* routines now return slightly different data in the
affected fields.
Some of the prompts in Configure with regard to gid and uid types
were unclear as to their intended use. They are now a little
clearer.
Sometimes you could change a .h file and taintperl and suidperl
didn't get remade correctly because of missing dependencies
in the Makefile.
The README file was misleading about the fact that you have to
say "make test" before you can "cd t; TEST"
The reverse operator was busted in two different ways. Should work
better now. There are now regression tests for it.
Some of the optimizations that perl does are disabled after period
of time if perl decides they aren't doing any good. One of these
caused a string to be freed that was later referenced via another
pointer, causing core dumps. The free turned out to be unnecessary,
so it was removed.
The unless modifier was broken when run under the debugger, due to
the invert() routine in perl.y inverting the logic on the DB
subroutine call instead of the command the unless was modifying.
Configure vfork test was backwards. It now works like other defines.
The numeric switch optimization was broken, and caused code to be
bypassed. This has been fixed.
A split in a subroutine that has no target splits into @_.
Unfortunately, this wrongly freed any referenced arguments passed
in through @_, causing confusing behavior later in the program.
File globbing (<foo.*>) left one orphaned string each time it
called the shell to do the glob.
RCS expanded an unintended $Header in lib/perldb.pl. This has
been fixed simply by replacing the $ with a .
Some forward declarations of static functions were missing from
malloc.c.
There's a strut in malloc for mips machines to extend the overhead
union to the size of a double. This was also enabled for sparc
machines.
DEC risc machines are reported to have a buggy memcmp. I've put
some conditional code into perl.h which I think will undef MEMCMP
appropriately.
In perl.man.4, I documented the desirability of using parens even
where they aren't strictly necessary.
I've grandfathered "format stdout" to be the same as "format STDOUT".
Unary operators can be called with no argument. The corresponding
function call form using empty parens () didn't work right, though
it did for certain functions in 2.0. It now works in 3.0.
The string ordering tests were wrong for pairs of strings in which
one string was a prefix of the other. This affected lt, le, gt,
ge, and the sort operator when used with no subroutine.
$/ didn't work with the stupid code used when STDSTDIO was undefined.
The stupid code has been replaced with smarter code that can do
it right. Special thanks to Piet van Oostrum for the code.
Goulds work better if the union in STR is at an 8 byte boundary.
The fields were rearranged somewhat to provide this.
"sort keys %a" should now work right (though parens are still
desirable for readability).
bcopy() needed a forward declaration on some machines.
In x2p/Makefile.SH, added dependency on ../config.sh so that it
gets linked down from above if it got removed for some reason.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 15 |
1 files changed, 13 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Header: toke.c,v 3.0 89/10/18 15:32:33 lwall Locked $ +/* $Header: toke.c,v 3.0.1.1 89/10/26 23:26:21 lwall Locked $ * * Copyright (c) 1989, Larry Wall * @@ -6,6 +6,9 @@ * as specified in the README file that comes with the perl 3.0 kit. * * $Log: toke.c,v $ + * Revision 3.0.1.1 89/10/26 23:26:21 lwall + * patch1: disambiguated word after "sort" better + * * Revision 3.0 89/10/18 15:32:33 lwall * 3.0 baseline * @@ -865,7 +868,15 @@ yylex() fatal("sort is now a reserved word"); if (isascii(*s) && (isalpha(*s) || *s == '_')) { for (d = s; isalpha(*d) || isdigit(*d) || *d == '_'; d++) ; - if (d >= bufend || isspace(*d)) + strncpy(tokenbuf,s,d-s); + if (strNE(tokenbuf,"keys") && + strNE(tokenbuf,"values") && + strNE(tokenbuf,"split") && + strNE(tokenbuf,"grep") && + strNE(tokenbuf,"readdir") && + strNE(tokenbuf,"unpack") && + strNE(tokenbuf,"do") && + (d >= bufend || isspace(*d)) ) *(--s) = '\\'; /* force next ident to WORD */ } LOP(O_SORT); |