Commit Graph

294 Commits

Author SHA1 Message Date
Steve Price
113b529fc5 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 Price
8a166df9c3 Merge Lite2 mods, cleanup man page, and -Wall cleaning. 1996-12-14 05:56:03 +00:00
Steve Price
42dbcdca0f Merge Lite2 mods, fix incorrect default string, cleanup
use of .Nm macros, and -Wall cleaning.
1996-12-14 05:54:15 +00:00
Steve Price
890acb9554 Merge Lite2 mods and -Wall cleaning. 1996-12-14 05:51:58 +00:00
Steve Price
1686b60268 Cleanup man page and -Wall cleaning. 1996-12-14 05:51:20 +00:00
Jordan K. Hubbard
2ffc1ec6ca 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
Bruce Evans
a68e018a5e 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
Poul-Henning Kamp
ad66f7ee71 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
Poul-Henning Kamp
77dfeccef6 Increase precision of duration to milliseconds.
Some heuristics to avoid overflow in calculation attempted.
1996-11-12 23:09:15 +00:00
Peter Wemm
7a2ce49ee0 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
Jeffrey Hsu
03fd7487d6 Remove unneeded #include <sys/proc.h>. 1996-11-10 06:13:12 +00:00
Andrey A. Chernov
a082293830 Replace collate_range_cmp call with its code 1996-10-31 07:22:48 +00:00
Andrey A. Chernov
3cd859a7f1 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 Price
621a31c6ff Add the -p (privileged) commandline switch
found in bash, zsh, and friends.

Reviewed by: joerg
1996-10-29 03:12:51 +00:00
Bruce Evans
aedfda0f82 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 Price
b9ab560398 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 Wemm
db91faacb6 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 Price
856541b91f Benign | --> || correction. 1996-10-16 02:30:39 +00:00
Steve Price
d1e9927277 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
Wolfram Schneider
e83201b43a delete doubled words, e.g.: "the the" -> "the" 1996-10-05 22:27:30 +00:00
Peter Wemm
7081f1bc92 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
Andrey A. Chernov
3043192bc6 Activate LC_CTYPE locale and additionly use !isprint() for 8bit characters 1996-09-30 15:45:36 +00:00
Warner Losh
8d72a3d7f6 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
Bruce Evans
e56fdba452 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
Wolfram Schneider
148531ef1e add forgotten $Id$ 1996-09-22 21:56:57 +00:00
Nate Williams
2b240fd84f ts_sec -> tv_sec
ts_nsec -> tv_nsec
1996-09-20 04:45:59 +00:00
Adam David
5ff36b379e Mend 'exit' without breaking 'exit 1'
*blush* %-\

Pointed out by: bruce
1996-09-12 12:41:46 +00:00
Bruce Evans
4d55cbc522 Backed out last change. It broke even `exit 1'. 1996-09-12 02:23:33 +00:00
Peter Wemm
5c817731db Ok, lets try this again, shall we? It was definatly my mistake, not
Steve's.. :-]
1996-09-10 02:42:33 +00:00
Peter Wemm
1018bd8d3c 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 Wemm
18e4c9579e 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 David
279de1f97b let the "exit" command return status when it is implicit 1996-09-08 03:12:22 +00:00
Peter Wemm
4e4e09596d 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 Wemm
4417f6297d 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 Wemm
16992ff483 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 Wemm
8a8c5e4e92 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 Wemm
aa9caaf657 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
Wolfram Schneider
b8923d4cc0 [HISTORY] command appeared in Version 1 AT&T UNIX
Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41
1996-08-29 18:06:19 +00:00
Adam David
fb1000d678 set error status on exit, to be consistent with manpage and standard commands. 1996-08-27 21:51:48 +00:00
Wolfram Schneider
5a80fb277e sync copyright with /usr/share/examples/etc/bsd-style-copyright 1996-08-27 20:04:45 +00:00
Wolfram Schneider
a09e5604c5 [HISTORY]
cat command appeared in Version 1 AT&T UNIX, not Version 6
	Apparently the cat man page was the first written man page

	Obtained from: A Quarter Century of UNIX, Peter H. Salus
[BUGS]
	fix a typo
1996-08-22 16:54:12 +00:00
Andrey A. Chernov
c07cbf9cf8 Take out 0201-0207 range - those characters abused by sh 1996-08-12 22:14:50 +00:00
Andrey A. Chernov
a1a0a1f9c7 Convert to newly added collate compare function 1996-08-12 21:32:15 +00:00
Andrey A. Chernov
c906f8d406 Convert to newly added collate compare function 1996-08-12 19:31:11 +00:00
Andrey A. Chernov
917de9be32 Simplify expression 1996-08-12 12:31:28 +00:00
Andrey A. Chernov
072acff80a Use collate for alpha character ranges 1996-08-12 02:08:43 +00:00
Andrey A. Chernov
b4814a03fc Fix unsetenv of locale variable 1996-08-11 23:10:38 +00:00
Andrey A. Chernov
ba726b8a91 Localize it 1996-08-11 22:51:00 +00:00
Andrey A. Chernov
6e0d255e4b Pick collate info for RE character ranges 1996-08-11 16:59:27 +00:00
Andrey A. Chernov
de727e7d02 Localize it
8bit cleanup
1996-08-11 16:48:11 +00:00