steve
cc4887cc10
Add explicit y.tab.h rule so that 'make depend clean all' does
...
not fail with an "don't know how to make y.tab.h" error.
1997-05-19 00:29:29 +00:00
steve
2f84314766
Use the __unused attribute where warranted.
1997-05-19 00:18:52 +00:00
steve
a5235db275
Miscellaneous sorting and addition of rules for object files that
...
depend on generated headers.
Reviewed by: Bruce Evans <bde@zeta.org.au>
1997-05-19 00:16:27 +00:00
steve
360ef2058c
Revise the section that explains how to protect parts of an $ENV script
...
from being executed in non-interactive mode.
Suggested and Reviewed by: Brian Somers <brian@freebsd.org>
1997-05-07 11:42:00 +00:00
steve
ed817524a2
Don't source $ENV unless this is an interactive shell.
1997-05-05 03:45:17 +00:00
steve
c2743ee837
Turn on the new type builtin.
1997-04-28 03:50:07 +00:00
steve
9b0ffd7cdc
Sync with NetBSD's revision 1.29 of this file.
...
Obtained from: NetBSD
1997-04-28 03:28:43 +00:00
steve
6186f8a0bf
Remove an extra semicolon and nuke register keyword usage.
1997-04-28 03:27:12 +00:00
steve
1601bfa863
Fix redirection of unopened file descriptors and nuke register
...
keyword usage.
Obtained from: NetBSD
1997-04-28 03:25:13 +00:00
steve
bd025769ba
Revert changes from rev 1.16 to 1.17 for now. Closes PR 2879.
1997-04-28 03:22:09 +00:00
steve
4636b4b5ee
mdoc-ify and cleanup UNIMPLEMENTED messages. Closes PR 2880.
1997-04-28 03:20:09 +00:00
steve
f781548b1d
Reorder declarations slightly.
1997-04-28 03:17:51 +00:00
steve
1da8ca45aa
Avoid a possible NULL pointer dereference, nuke register usage,
...
and remove an unnecessary reset.
Obtained from: NetBSD
1997-04-28 03:16:12 +00:00
steve
a503bbc21f
Nuke register keyword usage, #if -> #ifdef, and avoid void *
...
arithmetic.
Obtained from: NetBSD
1997-04-28 03:14:04 +00:00
steve
6ce1ec6c04
Nuke register keyword usage, rename pread to preadfd, and open
...
input files FD_CLOEXEC.
Obtained from: NetBSD
1997-04-28 03:11:52 +00:00
steve
101652d621
When NO_HISTORY is defined and the history command is used
...
show an error message.
Inspired by: NetBSD
1997-04-28 03:10:31 +00:00
steve
d13866ebb9
Add a type builtin and nuke register keyword usage.
...
Obtained from: NetBSD
1997-04-28 03:08:38 +00:00
steve
2b784fa564
Nuke register keyword usage and #if -> #ifdef.
...
Obtained from: NetBSD
1997-04-28 03:06:52 +00:00
steve
9c7a4e1848
Shamelessly pilfer most of NetBSD's Makefile so that the
...
problem with 'make -j n' and no .depend file goes away.
I think Bruce mentioned this somewhere on one of the
mailing lists.
Obtained from: NetBSD
1997-04-28 03:03:23 +00:00
imp
054f35c222
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-28 15:24:41 +00:00
peter
83b3c2c161
Revert $FreeBSD$ to $Id$
1997-02-22 14:13:04 +00:00
steve
45d17b0093
Fix a expansion bug that caused the result of echo $((1 << 30))
...
to get truncated.
Submitted by: bde
1997-02-16 01:54:19 +00:00
jkh
808a36ef65
Make the long-awaited change from $Id$ to $FreeBSD$
...
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.
Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
steve
774419801b
Fix a problem that caused some foreground pipelines to die with:
...
tcsetpgrp failed, errno=1
Discovered and Reviewed by: joerg
1997-01-06 01:26:44 +00:00
steve
5936b56fef
Make sh(1) think and be in the same place at the same time. This closes
...
PR#2331: strange output of sh's pwd on symlinked directories.
1997-01-04 19:14:29 +00:00
steve
3d5f13bf93
With these changes sh(1)'s trap command should be POSIX-compliant,
...
while remaining (becoming :) compatible with other popular shells.
Specifically these changes include:
1) Implement 'trap -l' to get a list of valid signals names. This
is useful if you wanted to do something like reset all signal
handlers to there defaults values, in which case something like
this will do the trick.
trap `trap -l`
2) Reformat the output of 'trap' so it can be saved and later eval'd
to restore the saved settings.
3) Allow the use of signal names as well as signal numbers.
4) Fix trap handling of SIGCHLD so that commands like the following
(albeit, contrived) won't cause sh(1) to recurse ad infinitum.
trap uname 0 20
5) Make variables static that are used only in trap.c.
6) Minor 'style(9) police' mods.
1996-12-24 23:59:53 +00:00
steve
dfe5d3d364
Oops, it needs little more caulk to get it right.
1996-12-23 22:29:03 +00:00
steve
6da76fc1dd
Apply a little dab of bit caulk to keep those beggars
...
from leaking out.
Noticed by: bde
1996-12-23 22:16:35 +00:00
steve
c9faf62a80
Don't use _POSIX_PATH_MAX to limit the size of the path, instead
...
use 'getcwd(NULL, 0)' just as pwd(1) does.
Suggested by: bde
1996-12-23 05:31:48 +00:00
steve
cd89de39c0
Make sh(1) a little braver in the face of adversity. sh(1)
...
now handles the getpwd() init problem the same way as bash
and ksh do. Also while I was in here, I cleaned up the format
a little, removed some unnnecessary #if SYMLINKS cruft, and
changed the pwd builtin to use getcwd(3) as Joerg suggested.
1996-12-21 22:09:40 +00:00
steve
705d04d9c4
This doesn't change any behavior, but may be a slight
...
optimization. (num-- > 0) --> (--num >= 0).
Obtained from: NetBSD
1996-12-21 15:16:32 +00:00
steve
1b5cb4ee0a
Remove extra #undef.
1996-12-21 14:57:38 +00:00
steve
f831af1d64
Fix a problem caused by finger failure on my part. The builtin
...
getopts should now work as expected. This fix was in the NetBSD
code that I was merging from but missed getting into FreeBSD's
version because of 'drain bamage' on my part.
Submitted by: NetBSD, joerg
1996-12-21 13:21:57 +00:00
steve
c58aca035e
Merge in NetBSD mods and -Wall cleaning.
...
Obtained from: NetBSD, me
1996-12-14 06:20:03 +00:00
peter
5ec5b27841
Back out rev 1.7 which was to fix PR#1206 (to be reopened).
...
This patch causes too many side effects, one of which bites hard is
when interrupting a 'make fetch' in the ports tree (PR#1990).
This whole area is a real can of worms....
This most definately should go into 2.2
Reviewed by: steve, bde
1996-11-12 18:35:06 +00:00
ache
3bd90e16be
1) define STATIC as static and not empty
...
2) replace collate_range_cmp call with its code
1996-10-31 07:15:57 +00:00
steve
ac82f35222
Add the -p (privileged) commandline switch
...
found in bash, zsh, and friends.
Reviewed by: joerg
1996-10-29 03:12:51 +00:00
bde
e638a9f05e
Build intermediate object files for mkinit, mknodes and mksyntax
...
so that simple regresssion tests based on `cmp' work. mkdep still
doesn't work right for these tools. They should probably be in
separate directories.
Sorted dependencies.
1996-10-25 14:49:24 +00:00
steve
0fef6071c4
Close PR# 1206. sh(1) now ignores SIGINT and SIGQUIT
...
when a child is forked and the -c commandline switch
has been specified.
Reviewed by: joerg
1996-10-22 03:02:07 +00:00
steve
0b67136d65
Benign | --> || correction.
1996-10-16 02:30:39 +00:00
steve
b5b97925c5
Fix a problem with sh that conflicts with the -e
...
flag text in the man page. Now this will work
correctly:
/bin/sh -ec 'false && true; echo hi'
Obtained from: VaX#n8 <vax@linkdead.paranoia.com>
1996-10-06 15:17:19 +00:00
peter
943436c3c8
re-activate the printf builtin now that src/usr.bin/printf.c has been
...
tweaked to work as a builtin better (ie: calls the real printf formatting
code, not sh's cut-down out1fmt() function)
1996-10-01 04:59:13 +00:00
adam
ee00aff02c
Mend 'exit' without breaking 'exit 1'
...
*blush* %-\
Pointed out by: bruce
1996-09-12 12:41:46 +00:00
bde
073456f615
Backed out last change. It broke even `exit 1'.
1996-09-12 02:23:33 +00:00
peter
614a655c28
Ok, lets try this again, shall we? It was definatly my mistake, not
...
Steve's.. :-]
1996-09-10 02:42:33 +00:00
peter
3d58e0bf86
ack! back these out so I can see what I did wrong. It looks like a
...
patch-by-hand botch, but it sig-11's during make world.
1996-09-10 02:07:27 +00:00
peter
aae29b5fef
Fix for PR#1248, sh doesn't expand past ${9}
...
Submitted by: Steve Price <sprice@hiwaay.net>
1996-09-10 01:24:11 +00:00
adam
84c0874422
let the "exit" command return status when it is implicit
1996-09-08 03:12:22 +00:00
peter
ad9b91037f
eek, how did that happen? I must have committed something left over from
...
when I was experimenting looking for an alternate format. *blush*
1996-09-03 14:24:44 +00:00
peter
0475c084c2
Fix for PR#1287. This makes sh behave sensibly in case statements in the
...
face of aliases. Note, bash doesn't do aliases while running scripts, but
"real" ksh does..
Also:
Reduce redundant .Nm macros in (unused) bltin/echo.1
nuke error2, it's hardly used.
More -Wall cleanups
dont do certain history operations if NO_HISTORY defined
handle quad_t's from resource limits
Submitted by: Steve Price <sprice@hiwaay.net> (minor tweaks by me)
1996-09-03 14:16:06 +00:00