summaryrefslogtreecommitdiffstats
path: root/bin
Commit message (Collapse)AuthorAgeFilesLines
* Staticify for lint.markm2002-10-181-2/+2
|
* Constify and staticify for lint.markm2002-10-183-6/+6
|
* Print non-printing characters in directory names, as well as file names,tjr2002-10-183-5/+9
| | | | | | | as `?' or `\ooo', depending on whether the -b or -B flags were used. PR: 43995 MFC after: 1 month
* Avoid accidentally making "-h" a synonym for "fc".tjr2002-10-181-1/+1
| | | | Obtained from: NetBSD
* Output "human-readable" values with a non-0 precision wheredd2002-10-181-7/+9
| | | | | | | | appropriate. Before this, a 2.9 GB file was misleadingly reported as "2G". This mostly brings unit_adjust() in line with what is in du(1). Reviewed by: jmallett Approved by: nik
* Dekerberise. The corresponding userland stuff has been dekerberisedmarkm2002-10-163-169/+6
| | | | for ages, and no-one seems to have noticed. Viva PAM!
* Do not strip CTL* escapes from redirection filenames in argstr(); theytjr2002-10-081-1/+1
| | | | | | | | are later stripped with rmescapes() in expandarg(). If the filename has already been unescaped, doing it again in rmescapes() can walk off the end of the string, leading to memory corruption and eventually SIGSEGV. Noticed by: kris
* Clean up use of <stdarg.h> macros: always call va_end after va_start,tjr2002-10-061-2/+6
| | | | | | reset with a call to va_start before each use of the va_list. Obtained from: NetBSD
* Ensure all va_starts have a matching va_end.tjr2002-10-061-1/+1
| | | | Obtained from: NetBSD
* While removing a memory leak, rev 1.32 introduced acharnier2002-10-061-16/+11
| | | | | free-memory-and-reuse-it-after. Correct both problems and make rcp -r work again under /etc/malloc.conf -> AJ.
* /dev/sa0 is the default tape device, not /dev/rst0.tjr2002-10-062-6/+6
|
* Disallow empty condition parts of "if", "while" and "until" compoundtjr2002-10-061-3/+6
| | | | | | commands. Commands like "if then ... fi" and "while do ... done" are no longer accepted. Bodies of compound commands are still allowed to be empty, because even though POSIX does not allow them, most shells do.
* Use %jd in format string and cast argument to intmax_t instead of usingtjr2002-10-062-4/+3
| | | | | | | %qd to print struct stat.st_size. Remove WARNS=0 and WFORMAT=0 from Makefile. Tested on: alpha, sparc64, i386
* Fix format string errors relating mainly to the use of %qu to print off_t's.tjr2002-10-064-9/+15
| | | | | | | | | Instead use %ju and cast the argument. WFORMAT=0 is still required in the Makefile because gcc warns about some strftime() calls (I don't think this behaviour is useful.) Tested on: sparc64, alpha, i386
* Oops, the previous version was a last minute test version with off_tbde2002-10-031-1/+1
| | | | | | replaced by int instead of size_t. Spotted by: fanf
* Use a non-bogus type for representing the values of offsets in structs.bde2002-10-031-1/+1
| | | | | | | off_t is for offsets in files, and it is signed so it was no better than the original type of int for avoiding warnings from broken lints, except accidentally on machines like i386's where size_t is smaller than off_t.
* Fix some twelve hour clock braindamage. The range for hours is 0-23 not 1-12.fanf2002-10-031-1/+1
| | | | MFC After: 1 week
* Catch up to SMTX -> SLOCK changes.jhb2002-10-024-25/+22
|
* Use %d in a printf() format string and cast the argument to int instead oftjr2002-10-021-1/+1
| | | | | using %td when we know that the number is between 0 and 9; mksyntax is a build tool and needs to work on -stable.
* Return the ``u''trhodes2002-10-011-1/+1
|
* Back out experimental changes to fmtstr() that I didn't mean to includetjr2002-10-011-1/+9
| | | | in the previous commit.
* Replace a home-grown printf() clone with a fwopen() wrapper aroundtjr2002-10-011-190/+23
| | | | | libc's vfprintf() that writes to a `struct output' instead of a file. Inspired by NetBSD's similar changes (they used asprintf() instead).
* It is now safe to remove WARNS=0 and WFORMAT=0.mux2002-10-011-2/+0
| | | | Tested on: alpha, i386, sparc64
* Restore "not found" error message when searching for (or executing)tjr2002-10-011-2/+8
| | | | | | a program fails because the file or a path component does not exist. Suggested by: bde
* - Don't use quad_t when we really mean rlim_t.mux2002-10-011-5/+6
| | | | | | | | - Cast rlim_t to intmax_t when printing it. This should fix the last format errors in sh(1). Tested on: i386, sparc64
* Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format stringtjr2002-10-011-0/+2
| | | | errors with %qd formats.
* Use the %t format modifier to print differences betweenmux2002-10-012-2/+2
| | | | | | | | | | | pointers. This fixes two format warnings on 64 bits archs which are fatal now that WFORMAT=0 has been removed. It doesn't fully fix the sh(1) build on 64 bits platforms though, there is still some quad_t issues that need to be fixed. Tested on: i386, sparc64
* Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2tjr2002-10-011-2/+0
| | | | | on at least i386. If there are warnings on other archs, I'd rather hear about them than pretend they didn't exist.
* Remove some kind of profiling support that required the 4.2BSD monitor()tjr2002-10-011-12/+0
| | | | function in libc.
* Remove bits and pieces of support for atty, which was made obsolete bytjr2002-10-014-41/+1
| | | | | | adding history and vi/emacs-style line editing to the shell itself. Atty was a user-mode terminal emulator (like screen and window) that did line editing and history.
* Callers of error() don't need to supply a program name prefix in thetjr2002-09-301-6/+6
| | | | error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
* Allow a left parenthesis before patterns in case blocks. POSIX requirestjr2002-09-301-0/+2
| | | | us to accept this, but I've never seen a script that uses it.
* Allow empty case/esac statements; POSIX requires this, and recent versionstjr2002-09-301-2/+2
| | | | | | | of autoconf are generating scripts that use this feature. PR: 43275 35879 Submitted by: Dan Nelson <dnelson@allantgroup.com>
* Remove dead code which supported systems without O_APPEND, O_CREAT or SIGTSTP.tjr2002-09-292-34/+0
|
* Convert the remaining callers of errmsg() to use strerror(), and removetjr2002-09-294-111/+13
| | | | errmsg() and its table of error messages.
* Mark the signo as __unused in a lazy signal handler.jmallett2002-09-291-1/+1
|
* s/behaviour/behavior/ in the chmod(1) manualtrhodes2002-09-281-1/+1
|
* List valid keywords, ala kill(1), rather than the csh builtin kill, whichjmallett2002-09-271-2/+5
| | | | | | | tells people to type kill -l, when no valid ones are specified. Sponsored by: Bright Path Solutions MFC after: 4 days
* Ala kill(1), tell people to type 'ps -L' for a list of format keywords.jmallett2002-09-271-1/+1
| | | | | Sponsored by: Rachel Hestilow <rachel@jerkcity.com> MFC after: 2 weeks
* cp -p could report success even if a file copy failed. This was due tomckay2002-09-221-3/+4
| | | | | | | | | | | the cumulative exit status being overwritten when directory permissions were being set. This was particularly bad when called from mv(1) to perform a cross-device move as the original files were deleted even if the copy failed. Reported by: Slaven Rezic <slaven.rezic@berlin.de> Patch by: bde PR: 42789
* Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the structwollman2002-09-212-4/+4
| | | | | | | | | | | | | | | | hack, thereby allowing future extensions to the structure (e.g., for extended attributes) without rebreaking the ABI. FTSENT now contains a pointer to the parent stream, which fts_compar() can then take advantage of, avoiding the undefined behavior previously warned about. As a consequence of this change, the prototype of the comparison function passed to fts_open() has changed to reflect the required amount of constness for its use. All callers in the tree are updated to use the correct prototype. Comparison functions can now make use of the new parent pointer to access the new stream-specific private data pointer, which is intended to assist creation of reentrant library routines which use fts(3) internally. Not objected to in spirit by: -arch
* Rename new PLONG type to PGTOK as the conversion is more important than thejmallett2002-09-173-4/+4
| | | | | | size (which is mostly undefined anyway). Submitted by: bde
* Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't thinkjmallett2002-09-174-23/+6
| | | | | of a better name, except PINT, but I decided to go with assuming LONG to be safe, rather than assuming INT.
* Perform keyword.c:1.27 properly, implement -orss in the New World Order ofjmallett2002-09-163-2/+12
| | | | | | | | ps(1) formatting, using pgtok() to get the value in K, rather than printing it in pages. This is consistent with behaviour before keyword.c:1.26 (et al) which exists in STABLE today, and which uses the same metric as VSZ. Submitted by: bde
* Remove some NOTINUSE stuff. Good housekeeping.jmallett2002-09-161-9/+0
|
* Do not risk using the kernel pgtok() which assumes the page size ispeter2002-09-131-6/+2
| | | | constant.
* Correct a usage of fnctl that could not be right and results in anectar2002-09-111-1/+1
| | | | no-op. I assume it was meant that the close-on-exec flag be set here.
* ANSIify function definitions.dwmalone2002-09-041-4/+2
| | | | | | | | | Add some constness to avoid some warnings. Remove use register keyword. Deal with missing/unneeded extern/prototypes. Some minor type changes/casts to avoid warnings. Reviewed by: md5
* Prevent ps(1) from doing idiotic munging of things in a -ofmt= string.jmallett2002-09-031-1/+8
| | | | God I hate the backwards compatability crap here.
* Fix a warning of "possibly used before initialisation".keramida2002-08-291-2/+1
| | | | Reviewed by: tjr
OpenPOWER on IntegriCloud