summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Fix handling of -o and -a operators in the 3 argument case.steve1996-12-251-2/+2
| | | | Submitted by: Tom Rush <tarush@mindspring.com>
* With these changes sh(1)'s trap command should be POSIX-compliant,steve1996-12-241-49/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Oops, it needs little more caulk to get it right.steve1996-12-231-2/+2
|
* Apply a little dab of bit caulk to keep those beggarssteve1996-12-231-6/+2
| | | | | | from leaking out. Noticed by: bde
* Don't use _POSIX_PATH_MAX to limit the size of the path, insteadsteve1996-12-231-3/+3
| | | | | | use 'getcwd(NULL, 0)' just as pwd(1) does. Suggested by: bde
* Make sh(1) a little braver in the face of adversity. sh(1)steve1996-12-214-169/+21
| | | | | | | 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.
* This doesn't change any behavior, but may be a slightsteve1996-12-211-2/+2
| | | | | | optimization. (num-- > 0) --> (--num >= 0). Obtained from: NetBSD
* Remove extra #undef.steve1996-12-211-2/+1
|
* Fix a problem caused by finger failure on my part. The builtinsteve1996-12-211-3/+7
| | | | | | | | 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
* Merge in NetBSD mods and -Wall cleaning.steve1996-12-1443-491/+908
| | | | Obtained from: NetBSD, me
* -Wall cleaning.steve1996-12-1410-26/+26
|
* Cleanup man page and -Wall cleaning.steve1996-12-144-16/+27
|
* -Wall cleaning and implement -p commandline option.steve1996-12-142-23/+61
| | | | -p mod obtained from: NetBSD
* Merge Lite2 mods, and -Wall cleaning. Unimplemented undelete(2)steve1996-12-142-38/+113
| | | | | cruft is protected by a #ifdef (BSD4_4_LITE) that should be removed when this is supported by the kernel.
* -Wall cleaning.steve1996-12-1441-99/+105
|
* Merge Lite2 mods, cleanup man page, and -Wall cleaning.steve1996-12-142-9/+9
|
* Cleanup man page and -Wall cleaning.steve1996-12-142-6/+6
|
* Merge Lite2 mods, and -Wall cleaning. undelete(2) cruftsteve1996-12-147-19/+63
| | | | | | not yet implemented is protected by a define (BSD4_4_LITE) that should be removed when this call is supported by the kernel.
* Merge Lite2 mods, and -Wall cleaning.steve1996-12-142-57/+122
|
* Merge Lite2 mods, -Wall cleaning, and show usage ifsteve1996-12-142-12/+22
| | | | | | incorrectly called. Incorrect usage mod obtained from: NetBSD
* Merge Lite2 mods, cleanup man page, and -Wall cleaning.steve1996-12-142-9/+9
|
* Merge Lite2 mods, fix incorrect default string, cleanupsteve1996-12-143-13/+16
| | | | use of .Nm macros, and -Wall cleaning.
* Merge Lite2 mods and -Wall cleaning.steve1996-12-145-20/+26
|
* Cleanup man page and -Wall cleaning.steve1996-12-142-5/+6
|
* The manual page of df called cd9660 file systems by the namejkh1996-12-112-4/+9
| | | | | | | | | | | 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>
* Fixed `stty [-]extproc'. It set extproc to a semi-random state (alwaysbde1996-12-071-2/+2
| | | | | off if there are no other options, always (?) on if another option that changes the state is processed earlier).
* Bruce says: "You have been programming in the kernel for too long :-)."phk1996-11-135-40/+25
| | | | | | | | | | | | | | | | | 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
* Increase precision of duration to milliseconds.phk1996-11-125-14/+34
| | | | Some heuristics to avoid overflow in calculation attempted.
* Back out rev 1.7 which was to fix PR#1206 (to be reopened).peter1996-11-121-19/+2
| | | | | | | | | | 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
* Remove unneeded #include <sys/proc.h>.hsu1996-11-101-2/+1
|
* Replace collate_range_cmp call with its codeache1996-10-311-2/+19
|
* 1) define STATIC as static and not emptyache1996-10-312-4/+22
| | | | 2) replace collate_range_cmp call with its code
* Add the -p (privileged) commandline switchsteve1996-10-294-8/+31
| | | | | | found in bash, zsh, and friends. Reviewed by: joerg
* Build intermediate object files for mkinit, mknodes and mksyntaxbde1996-10-251-6/+19
| | | | | | | | 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.
* Close PR# 1206. sh(1) now ignores SIGINT and SIGQUITsteve1996-10-221-3/+19
| | | | | | | when a child is forked and the -c commandline switch has been specified. Reviewed by: joerg
* Implement a -c option to ps to display the short command name instead ofpeter1996-10-214-11/+24
| | | | | | | | | 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).
* Benign | --> || correction.steve1996-10-161-2/+2
|
* Fix a problem with sh that conflicts with the -esteve1996-10-061-2/+5
| | | | | | | | | 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>
* delete doubled words, e.g.: "the the" -> "the"wosch1996-10-053-6/+6
|
* re-activate the printf builtin now that src/usr.bin/printf.c has beenpeter1996-10-011-2/+2
| | | | | tweaked to work as a builtin better (ie: calls the real printf formatting code, not sh's cut-down out1fmt() function)
* Activate LC_CTYPE locale and additionly use !isprint() for 8bit charactersache1996-09-301-2/+5
|
* Merge in the NetBSD changes to cat.c. These appear to have come fromimp1996-09-281-4/+4
| | | | | | | 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.
* Close files up to getdtablesize() instead of up to NOFILE.bde1996-09-281-3/+3
| | | | csh was one of the 3 programs in /usr/src that (mis)used NOFILE.
* add forgotten $Id$wosch1996-09-224-0/+7
|
* ts_sec -> tv_secnate1996-09-201-3/+3
| | | | ts_nsec -> tv_nsec
* Mend 'exit' without breaking 'exit 1'adam1996-09-121-3/+4
| | | | | | *blush* %-\ Pointed out by: bruce
* Backed out last change. It broke even `exit 1'.bde1996-09-121-4/+2
|
* Ok, lets try this again, shall we? It was definatly my mistake, notpeter1996-09-102-17/+33
| | | | Steve's.. :-]
* ack! back these out so I can see what I did wrong. It looks like apeter1996-09-102-31/+15
| | | | patch-by-hand botch, but it sig-11's during make world.
* Fix for PR#1248, sh doesn't expand past ${9}peter1996-09-102-17/+33
| | | | Submitted by: Steve Price <sprice@hiwaay.net>
OpenPOWER on IntegriCloud