Commit Graph

510 Commits

Author SHA1 Message Date
bde
f0f4692d65 Bury this properly. 1997-07-01 21:38:49 +00:00
bde
dd35364e4d This commit was generated by cvs2svn to compensate for changes in r27159,
which included commits to RCS files with non-trunk default branches.
1997-07-01 21:34:30 +00:00
bde
28560072c7 Import this unwanted file from Lite-original so that it doesn't
get imported with Lite2 (there was only one missing file in src/bin,
other than tags files and obj links).
1997-07-01 21:34:30 +00:00
charnier
46627309b6 Remove lines inside #ifdef 0/#endif. 1997-06-30 11:10:18 +00:00
pst
1b991716a4 NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
1997-06-29 06:03:42 +00:00
charnier
a300c51544 Document the use of `ls -lo' to see flags.
Obtained from: OpenBSD.
1997-06-24 06:57:11 +00:00
jkh
e5f80c5114 Back out previous fix - this bug's got diplomatic immunity as a registered
political issue.
1997-06-19 17:57:06 +00:00
jkh
7f875c5f66 >Number: 3780
>Category:       bin
>Synopsis:       WEXITSTATUS() may return nagative value, which causes sh to generate bad $?

PR:		3780
Submitted by:	sanewo@ba2.so-net.or.jp
1997-06-19 15:14:01 +00:00
jdp
49bea63523 Try again to explain the existence of lchown() and the absence of
lchmod() and lutimes().
1997-06-19 01:07:05 +00:00
jdp
8ebc7b7d49 Update some text to reflect the fact that symbolic links now have
owner and group attributes.
1997-06-14 18:44:03 +00:00
ache
837346c6cf Now [^abc] means the same as [!abc] like bash and *csh already does 1997-06-06 23:04:33 +00:00
charnier
eb1ddf1705 Typo in usage string. Looks like the man page now. 1997-06-06 06:48:35 +00:00
charnier
958b099adb Err(3) was locally defined (for portability reasons). Use #ifdef 0/#endif
to hide this so libc is kept instead.
1997-06-06 06:46:27 +00:00
charnier
ae739990eb Correct usage string. Man page don't reflect reality for now. 1997-06-06 06:43:19 +00:00
charnier
ae2a236f86 Cosmetic change in usage string. 1997-06-06 06:40:06 +00:00
charnier
58f66f5d2c Do not use __progname. 1997-06-06 06:32:09 +00:00
charnier
8f3a4f49b1 Revert part of previous patch: Don't use __progname. 1997-06-04 06:27:30 +00:00
charnier
3c20fa7d91 Revert part of previous patch: Don't use __progname. 1997-06-04 06:21:44 +00:00
charnier
0213963bae Add xref to lchown(2) and symlink(2).
Obtained from: {Net|Open}BSD
1997-06-03 06:27:44 +00:00
charnier
0bb19f3d59 Signal # NSIG (32) is invalid.
Obtained from: {Net|Open}BSD
1997-06-03 06:24:50 +00:00
charnier
ce6e94241d /etc/netstart -> /etc/rc.network
Use __progname in usage string. Change usage string to match the man page.
1997-06-03 06:21:45 +00:00
charnier
0d7619c59e /etc/netstart -> /etc/rc.network
Add usage() and use __progname. Change usage string to match man page.
1997-06-03 06:19:04 +00:00
max
0a57ddf89d Add X-reference to ch(4). 1997-06-02 20:57:52 +00:00
charnier
e43a7ca060 Typo fix. 1997-06-02 06:40:08 +00:00
charnier
d3f2a54d03 Typo (the the -> the). 1997-06-02 06:32:26 +00:00
charnier
961f5b3e1a Off by 1 adjustment. Properly NUL terminate after strncpy.
Obtained from: {Net|Open}BSD
1997-06-02 06:30:06 +00:00
charnier
9b043dcc94 Off by 1 adjustment. 1997-06-02 06:27:00 +00:00
charnier
0d4c498faf Remove unused variables. Suppress -Wall warnings. Check for potential buffer
overflow. Display available command in usage string.
Obtained from: {Net|Open}BSD
1997-06-02 06:25:19 +00:00
julian
68081e32bc Submitted by: Whistle Communications (archie Cobbs)
These changes add the ability to specify that a UFS file/directory
cannot be unlinked. This is basically a scaled back version
of the IMMUTABLE flag. The reason is to allow an administrator
to create a directory hierarchy that a group of users
can arbitrarily add/delete files from, but that the hierarchy
itself is safe from removal by them.
If the NOUNLINK definition is set to 0
then this results in no change to what happens normally.
(and results in identical binary (in the kernel)).
It can be proven that if this bit is never set by the admin,
no new behaviour is introduced..
Several "good idea" comments from reviewers plus one grumble
about creeping featurism.

This code is in production in 2.2 based systems
1997-06-02 06:24:52 +00:00
steve
27968b9dee Make sh(1) less aware of the bit fields returned by wait by
using the WIF* macros in sys/wait.h.

PR: bin/3668
Submitted by:	dholland@eecs.harvard.edu
1997-05-24 21:04:55 +00:00
steve
bc7339d881 Remove y.tab.h from the beforedepend target. Also add a
rule that shows the dependency of arith_lex.[co] on y.tab.h.

Suggested by: Bruce Evans <bde@zeta.org.au>
1997-05-21 03:23:23 +00:00
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
joerg
9904a8c9de Ensure string termination after strncpy().
PR:		2997
Submitted by:	Philippe Charnier <charnier@xp11.frmug.org>
1997-05-09 16:00:35 +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
bde
68962748a6 Fixed overflow for attempts to seek to offsets > ULONG_MAX. See the
OpenBSD version for more complete fixes.  E.g., to seek to offsets >
INT_MAX using a block size of 1, block numbers need to be off_t's
instead of u_long's.
1997-04-30 17:51:29 +00:00
dfr
559a468aae Enable whiteout code since we now have the lite2 support for them. 1997-04-29 10:03:10 +00:00
jkh
e2ef6a625f Dynamically adjust size of displayed username to the longest username which
appears, not the longest _maximum_ username (this should probably also go
into 2.2, for the day when we bump up the username length there too).

Submitted-By: Terry Lambert <terry@lambert.org>
1997-04-29 05:26:05 +00:00
steve
fadc8fc0f2 Change spelling of ECBDIC to EBCDIC. Closes PR #3402
Submitted by:	h-nokubi@nmit.mt.nec.co.jp
1997-04-28 04:07:29 +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
jdp
563d27a55f When "-c" is specified, don't pad the command with spaces if it is
the last field on the line.  "ps -axlc" was needlessly wrapping
around on 80-character windows.
1997-04-16 16:08:11 +00:00
danny
15afdcdb78 Fix typo in comment; Document in an example that years beyond 1999
are handled; fix typo in same example.
1997-04-16 05:59:21 +00:00
mpp
760778bbe9 Provide examples of how to remove file names that begin with
a dash in non-getopt implementations.  E.g.:
	rm /home/mpp/-filename
	rm ./-filename

Requested by: bde
1997-04-09 05:04:43 +00:00
mpp
dd5458250f Improve the wording in the NOTES section. Closes PR# 3223. 1997-04-08 20:27:48 +00:00
mpp
c785109c06 Fix several problems with mkdir:
1)  Fix mkdir -p to exit with the proper exit status and issue an error
    message if it was unable to create all of the specified directories
    and they did not previously exist.  POSIX says:

    The mkdir utility shall exit with one of the following values:

    0  All the specified directories were created successfully or the
       -p option was specified and all the specified directories now
       exist.

    E.g.

    % mkdir -p /var/mkdir
    mkdir: /var/mkdir: Permission denied

    % touch /tmp/file
    % mkdir -p /tmp/file/dir
    mkdir: /tmp/file: Not a directory

    Previously the above examples would exit with a zero exit status
    and no error message.  Something like the following run as a
    normal user will still not produce an error:

    % id
    uid=629(mpp) gid=629(mpp)....
    % mkdir -p /usr/local/etc
    % ls -ld /usr/local/etc
    drwxr-xr-x  4 bin  bin  512 Dec 26 14:55 /usr/local/etc/

2)  Cleaned up the mode handling to be more efficient when multiple
    directories are being created.

3) Fixed a problem where directories could be created with the wrong mode
   if the the -p option was specified and the build() routine returned
   and error.  It would leave the umask set incorrectly at this point.

4) Removed an unused variable.

Closes PR# 2304.
1997-04-01 23:46:22 +00:00
imp
141381e1cb compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +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
obrien
4c9cebcc51 make usage() and SYNOPSIS agree with each other and add missing options
documented in the DESCRIPTION section.
1997-03-26 17:48:40 +00:00
imp
a1b85d3196 Use mkstemp rather than mktemp to prevent races.
Obtained from: OpenBSD
1997-03-24 05:45:29 +00:00
bde
55186ebb5b Merged from Lite2. The -t option is now handled better. The only visible
change should be that the usage message now actually matches the man page.
1997-03-13 17:41:37 +00:00
bde
9924e3c671 Merged from Lite2. The man page no longer attempts to list all the
vfs types.

Fixed ordering of FreeBSD `k' option in synopsis.
1997-03-13 17:32:39 +00:00
bde
2eaf7f70e5 Merge from Lite2. Straightforward changes. 1997-03-13 17:29:08 +00:00
mpp
c0650ef68d Correct the self reference in the description of the "tabs" option.
It should really refer to "oxtabs".

Obtained from: NetBSD-bugs mailing list PR# 3320
1997-03-12 15:59:22 +00:00
guido
bb4c208876 Fix buffer overflow 1997-03-10 19:52:12 +00:00
guido
2f74bc969e This is a funny one: df for a device that was not mounted used to fail
for root only.
1997-03-10 19:39:43 +00:00
guido
b27e3f2aef Fix buffer overflow (probably unexploitable). 1997-03-10 19:10:08 +00:00
guido
7645c8bdd7 Make mv more robust. A race has been fixed, as well as an extra warning
added when sbits are cleared.
Fixes PR 1351 and 1377 (I hope).
1997-03-08 16:05:44 +00:00
mpp
fc6cc96bc4 Typo fix. 1997-03-07 01:58:56 +00:00
joerg
cf12351a85 Acitvate chio(1). 1997-03-06 15:30:53 +00:00
joerg
8686d8e4ac This commit was generated by cvs2svn to compensate for changes in r23449,
which included commits to RCS files with non-trunk default branches.
1997-03-06 15:30:06 +00:00
joerg
22817fb6a1 Import Jason Thorpe's contribution for an updated SCSI media changer
device (now, finally!).
1997-03-06 15:30:06 +00:00
ache
264293aa5c Big usernames fixes 1997-03-04 00:33:56 +00:00
ache
648176d7b8 Use MAXLOGNAME-1 for width because MAXLOGNAME includes NUL 1997-03-03 08:20:28 +00:00
mpp
75dbc4794f Add a missing period in the -o option description.
Document the depreciated -g option.

Inspired by: OpenBSD PR# 119
1997-02-25 00:26:53 +00:00
peter
83b3c2c161 Revert $FreeBSD$ to $Id$ 1997-02-22 14:13:04 +00:00
mpp
ebf34cb494 Use the .Bx macro in the HISTORY section. 1997-02-19 07:14:30 +00:00
obrien
78b845fbdb Add history section. Follows chflags(2). 1997-02-19 00:32:35 +00:00
jkh
f8cd22bf39 Include <ufs/ufs/ufsmount.h>. 1997-02-17 05:26:08 +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
alex
a3118e8c68 Sweep through the tree fixing mmap() usage:
- Use MAP_FAILED instead of the constant -1 to indicate
    failure (required by POSIX).
  - Removed flag arguments of '0' (required by POSIX).
  - Fixed code which expected an error return of 0.
  - Fixed code which thought any address with the high bit set
    was an error.
  - Check for failure where no checks were present.

Discussed with:	bde
1997-01-16 21:58:40 +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
wosch
71f5160702 Sort cross references. 1997-01-13 00:25:51 +00:00
mpp
00e77cfa21 Minor mdoc cleanup. 1997-01-11 19:47:07 +00:00
mpp
b6cd43973e Add a blurb describing the fact that ls will print the
year in place of the hour/minute fields if the time is
more than 6 months in the past or future.

Also some minor mdoc cleanup.
1997-01-11 19:24:22 +00:00
mpp
290bb61e14 Make ls include the year when displaying times that are more than
6 months into the future.  Closes PR# 1657.

Submitted by:	Sakari Jalowaara <sja.home.tekla.fi>
1997-01-11 19:15:53 +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
wosch
b772239a12 add some string examples, eg. test "" -o "" 1996-12-28 13:31:29 +00:00
ache
a7a2d1e16c Use strcoll instead of strcmp for file names comparation
Should be in 2.2
1996-12-28 03:46:27 +00:00
steve
9079a13346 Fix handling of -o and -a operators in the 3 argument case.
Submitted by: Tom Rush <tarush@mindspring.com>
1996-12-25 00:08:10 +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
steve
a958416f1b -Wall cleaning. 1996-12-14 06:16:51 +00:00
steve
1c6d77453c Cleanup man page and -Wall cleaning. 1996-12-14 06:14:32 +00:00
steve
bf5151c8fc -Wall cleaning and implement -p commandline option.
-p mod obtained from: NetBSD
1996-12-14 06:13:51 +00:00
steve
2aae101b54 Merge Lite2 mods, and -Wall cleaning. Unimplemented undelete(2)
cruft is protected by a #ifdef (BSD4_4_LITE) that should be
removed when this is supported by the kernel.
1996-12-14 06:11:53 +00:00
steve
c5d0f9cb39 -Wall cleaning. 1996-12-14 06:08:03 +00:00
steve
0aef04187c Merge Lite2 mods, cleanup man page, and -Wall cleaning. 1996-12-14 06:07:30 +00:00
steve
69e648985f Cleanup man page and -Wall cleaning. 1996-12-14 06:04:06 +00:00
steve
69ca26a305 Merge Lite2 mods, and -Wall cleaning. undelete(2) cruft
not yet implemented is protected by a define (BSD4_4_LITE)
that should be removed when this call is supported by the
kernel.
1996-12-14 06:03:29 +00:00
steve
bf89557b96 Merge Lite2 mods, and -Wall cleaning. 1996-12-14 06:01:00 +00:00
steve
1dd75e9822 Merge Lite2 mods, -Wall cleaning, and show usage if
incorrectly called.

Incorrect usage mod obtained from: NetBSD
1996-12-14 05:59:58 +00:00
steve
88dfe6ac44 Merge Lite2 mods, cleanup man page, and -Wall cleaning. 1996-12-14 05:56:03 +00:00
steve
e3fc14f868 Merge Lite2 mods, fix incorrect default string, cleanup
use of .Nm macros, and -Wall cleaning.
1996-12-14 05:54:15 +00:00
steve
78e21244f4 Merge Lite2 mods and -Wall cleaning. 1996-12-14 05:51:58 +00:00
steve
151124272c Cleanup man page and -Wall cleaning. 1996-12-14 05:51:20 +00:00
jkh
25f273a087 The manual page of df called cd9660 file systems by the name
isofs while the df command itself used the name iso9660fs or
        cdfs. Both of these were inconsistent with the name cd9660 which
        is used by the mount command. I modified df to recognize all of
        the names cd9660, cdfs, isofs, and iso9660fs, and take them all
        to refer to the same thing. Naturally I added a note of this
        behaviour in the manual page too.

Submitted-By: Jukka Ukkonen <jau@jau.csc.fi>
1996-12-11 10:01:56 +00:00
bde
42c8b8b49c Fixed `stty [-]extproc'. It set extproc to a semi-random state (always
off if there are no other options, always (?) on if another option that
changes the state is processed earlier).
1996-12-07 11:07:20 +00:00
phk
6c0fd53b32 Bruce says: "You have been programming in the kernel for too long :-)."
and he's right ... I forgot about this floating point stuff you can
use in user-land :-)

Increase precision of duration to microseconds.
No heuristics to avoid overflow in calculation needed - just depend
on DBL_MAX being a bit larger than LONG_MAX.

Use double instead of `struct timeval' in dd.h so that everything
doesn't have to include <sys/time.h>.

Fixed style bugs in recent and old FreeBSD changes.

Reviewed by:	phk
Submitted by:	bde
1996-11-13 20:00:03 +00:00
phk
74bda8433b Increase precision of duration to milliseconds.
Some heuristics to avoid overflow in calculation attempted.
1996-11-12 23:09:15 +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
hsu
5b38eecfbf Remove unneeded #include <sys/proc.h>. 1996-11-10 06:13:12 +00:00
ache
357edcf415 Replace collate_range_cmp call with its code 1996-10-31 07:22:48 +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
peter
8fd01a136e Implement a -c option to ps to display the short command name instead of
the full argument vector.

I've bumped into a few things that expected this switch to be present,
the most recent was the snmp package in ports.  I'm not 100% sure of the
origins of this, but Linux has it, so does the "BSD-compatable" version
of ps on our SVR4 systems (so I assume SunOS has it too).
1996-10-21 07:30:26 +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
wosch
000fb64288 delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +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
ache
b516626583 Activate LC_CTYPE locale and additionly use !isprint() for 8bit characters 1996-09-30 15:45:36 +00:00
imp
87f4f38d8e Merge in the NetBSD changes to cat.c. These appear to have come from
the 4.4 lite 2 tape as well.  There are now only two diffs between
NetBSD's cat and FreeBSD's cat:
	getopt return value is -1 on NetBSD and EOF on FreeBSD.
	NetBSD has added setlocale calls before anything else.
1996-09-28 21:19:27 +00:00
bde
45b84eb11a Close files up to getdtablesize() instead of up to NOFILE.
csh was one of the 3 programs in /usr/src that (mis)used NOFILE.
1996-09-28 14:32:01 +00:00
wosch
361a15b8f4 add forgotten $Id$ 1996-09-22 21:56:57 +00:00
nate
754710fca5 ts_sec -> tv_sec
ts_nsec -> tv_nsec
1996-09-20 04:45:59 +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
peter
0692a293b6 Misc cleanups and fixes from Bruce:
- don't put \n on error() calls, error adds it already.
 - don't prepend "ulimit" on error() calls in miscbltin.c.
 - getopt typo on ulimit -p -> -u conversion
 - get/setrlimit() calls were not being error checked

ulimit formatting cleanup from me, use same wording as bash on Bruce's
suggestion.  Add ulimit arg to output on Joerg's suggestion.
1996-09-03 13:35:11 +00:00
peter
a0316ac070 oops, I didn't mean for the unconditional DEBUG code to go in, it's been
off in FreeBSD for some time.  I realised this a few seconds after the
commit started..
1996-09-01 10:27:49 +00:00
peter
5195be912e Merge of 4.4-Lite2 sh source, plus some gcc -Wall cleaning. This is a
merge of parallel duplicate work by Steve Price and myself. :-]

There are some changes to the build that are my fault...  mkinit.c was
trying (poorly) to duplicate some of the work that make(1) is designed to
do.  The Makefile hackery is my fault too, the depend list was incomplete
because of some explicit OBJS+= entries, so mkdep wasn't picking up their
source file #includes.

This closes a pile of /bin/sh PR's, but not all of them..

Submitted by: Steve Price <steve@bonsai.hiwaay.net>, peter
1996-09-01 10:22:36 +00:00