Commits
- Commit:
6fd4e901ce48f2e056c505c81320f786175588ff
- From:
- Russ Cox <rsc@swtch.com>
- Date:
lib9: add close
More preparation for opendir.
- Commit:
58fdc083addda3f95eb8895f474da5a52f145be0
- From:
- Russ Cox <rsc@swtch.com>
- Date:
lib9: merge create, open, dirread into open.c
Preparation for using opendir.
- Commit:
bd6f12068b28ba7eb96a3cd495e2201c852682b7
- From:
- Kurt H Maier <khm@pnnl.gov>
- Via:
- Dan Cross <crossd@gmail.com>
- Date:
fmt: adjust GCC version check
atomics were added in GCC 4.9: https://gcc.gnu.org/gcc-4.9/changes.html
- Commit:
5802b09e9d8ceadd2cefdccfd0391c04e492369b
- From:
- Ben Huntsman <BHuntsman@mail2.cu-portland.edu>
- Via:
- Russ Cox <rsc@swtch.com>
- Date:
all: fix #includes for AIX, add a few AIX "implementation" files
- Commit:
f84d54a0337f9e101c8baeb51272f33b05b2a0e1
- From:
- Ben Huntsman <BHuntsman@mail2.cu-portland.edu>
- Via:
- Russ Cox <rsc@swtch.com>
- Date:
mk: support Big Archive Format under AIX
- Commit:
4982d4ebc3bd4924d73f2f2ad584309e9ec97435
- From:
- Ben Huntsman <BHuntsman@mail2.cu-portland.edu>
- Via:
- Russ Cox <rsc@swtch.com>
- Date:
all: update build scripts to fix AIX XL/C compatibility
- Commit:
c3c9c7b6ae7c6a8bf9c6d040d3af89e020fd92de
- From:
- Russ Cox <rsc@swtch.com>
- Date:
fmt: disable use of stdatomic on AIX XL C and old GCC
C11 is apparently too new for these systems.
Fixes #55.
- Commit:
acffdcb6eed3385e1566c0ac86fb6b4bc130664b
- From:
- Russ Cox <rsc@swtch.com>
- Date:
9term.app: respect user-set shell instead of forcing bash
- Commit:
b962b25ecaf6ddb11a36235d4a9849a147b4f6a3
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc(1): mention /etc/shells in BUGS section
- Commit:
601e07b63653d0fed91594ebba261b733d017653
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc: clean up parser levels, disallow free carats on lists
- Commit:
ff74f7cdda7b08da6fe7c8bbcca990305fd6b547
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc: allow unquoted = in command arguments
dd fans rejoice!
Also helps with commands like go test -run=x.
- Commit:
7d6a248f2c68d70f58387afc69e73e695c3d940c
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc: move free carat handling into parser
This fixes at least one shell script (printfont) that expected
'x'`{y}'z'
to mean
'x'^`{y}^'z'
as it now does. Before it meant:
'x'^`{y} 'z'
One surprise is that adjacent lists get a free carat:
(x y z)(1 2 3)
is
(x1 y2 z3)
This doesn't affect any rc script in Plan 9 or plan9port.
- Commit:
3caf5c238a886d06b438ec6d42f2609b8625463f
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc: move newline handling into parser
- Commit:
47d4646eebac34c0b94951cfcf1b81ed2ca513e1
- From:
- Russ Cox <rsc@swtch.com>
- Date:
rc: add recursive descent parser
The old yacc-based parser is available with the -Y flag,
which will probably be removed at some point.
The new -D flag dumps a parse tree of the input,
without executing it. This allows comparing the output
of rc -D and rc -DY on different scripts to see that the
two parsers behave the same.
The rc paper ends by saying:
It is remarkable that in the four most recent editions of the UNIX
system programmer’s manual the Bourne shell grammar described in the
manual page does not admit the command who|wc. This is surely an
oversight, but it suggests something darker: nobody really knows what
the Bourne shell’s grammar is. Even examination of the source code is
little help. The parser is implemented by recursive descent, but the
routines corresponding to the syntactic categories all have a flag
argument that subtly changes their operation depending on the context.
Rc’s parser is implemented using yacc, so I can say precisely what the
grammar is.
The new recursive descent parser here has no such flags.
It is a straightforward translation of the yacc.
The new parser will make it easier to handle free carats
in more generality as well as potentially allow the use of
unquoted = as a word character.
Going through this exercise has highlighted a few
dark corners here as well. For example, I was surprised to
find that
x >f | y
>f x | y
are different commands (the latter redirects y's output).
It is similarly surprising that
a=b x | y
sets a during the execution of y.
It is also a bit counter-intuitive
x | y | z
x | if(c) y | z
are not both 3-phase pipelines.
These are certainly not things we should change, but they
are not entirely obvious from the man page description,
undercutting the quoted claim a bit.
On the other hand, who | wc is clearly accepted by the grammar
in the manual page, and the new parser still handles that test case.
- Commit:
c1c1b5267fd5e14be531a4b22ed0124b35d427cb
- From:
- sean <phonologus@gmail.com>
- Via:
- David du Colombier <0intro@gmail.com>
- Date:
9c: added explicit -fcommon to gcc defaults.
Version 10 of gcc enforces -fno-common which breaks a lot of things.
This fix reverts to the pre-10 behaviour. The real fix is to clean up
stray redefinitions which should be declarations.