summaryrefslogtreecommitdiffstats
path: root/usr.bin/msgs/msgs.c
Commit message (Collapse)AuthorAgeFilesLines
* Never use getenv("HOME") without checking for NULL and non-zerokevlo2007-10-301-2/+7
| | | | Obtained from: OpenBSD
* Cleanup:delphij2005-01-171-17/+17
| | | | | - Change signedness of nxtfld() to make msgs(1) WARNS=6 clean - Add several static's
* Fixed misspellings of '\0' as NULL.bde2004-03-111-4/+4
|
* Fix singular/plural confusion in a printf.mike2003-02-061-1/+2
| | | | | | PR: 47953 Submitted by: Volker Stolz <stolz@i2.informatik.rwth-aachen.de> MFC after: 3 days
* ANSIify function definitions.dwmalone2002-09-041-21/+12
| | | | | | | | | 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
* Remove local prototypes for main().jmallett2002-08-191-1/+0
|
* Fixed some style bugs:bde2002-04-181-3/+4
| | | | | | | - ifdefs around vendor sccsid were left reversed after switching to __FBSDID(). - vertical whitespace after some of the non-FALLTHROUGH cases was lost. - too much vertical whitespace before prototypes.
* Backed out the style bugs in rev.1.17:bde2002-04-181-41/+41
| | | | | | | | | | - don't use unusual indentation for 39 lines of declarations when only 2 of the lines benefit from it. - don't use __DECONST(). This was the one use of it in the tree, and it was just wrong. It was used to hide the warning about tgetnum() having the wrong prototype (missing a `const') due to libncurses being misconfigured. libncurses has been fixed, so the original code now compiles cleanly with WARNS=4.
* Document that only superuser can use -c option. Add FBSDID. Make use of uid_tcharnier2002-04-121-10/+16
| | | | | to silent lint. fprintf -> err conversion. Add some FALLTHROUGH and NOTREACHED comment to silent lint.
* remove __Pimp2002-03-221-10/+10
|
* File positions are off_t nowdays, not long, so:ache2001-09-031-13/+13
| | | | | | | | | | | | | | fseek -> fseeko ftell -> ftello fseek(x, 0L, 0) -> rewind(x) NOTE: that fseek/ftell not works for >long offsets per POSIX: [EOVERFLOW] For fseek( ), the resulting file offset would be a value which cannot be represented correctly in an object of type long. [EOVERFLOW] For ftell ( ), the current file offset cannot be represented correctly in an object of type long.
* Fix WARNS=2 warnings on alpha and i386 and clamp it downkris2001-05-261-43/+44
|
* MFS: Don't allow printf directives in PAGERkris2000-07-071-1/+1
| | | | Obtained from: OpenBSD
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Apply suggested patch- seems reasonable.mjacob1999-07-241-3/+18
| | | | | PR: 12020 Submitted by: Matthew D. Fuller <fullermd@futuresouth.com>
* Revert "POSIX saved uids change". seteuid(2) is not POSIX, andghelmer1998-07-141-3/+2
| | | | | | FreeBSD does not have _POSIX_SAVED_IDS enabled. Thanks to Warner Losh and Ollivier Robert for pointing this out, and Bruce Evans for explaining the role of _POSIX_SAVED_IDS.
* Security and minor functionality changes based on OpenBSD msgs.c:ghelmer1998-07-091-14/+30
| | | | | | tmp file (mktemp changed to mkstemp), saved POSIX uids, buffer overflow, and use PAGER environment variable if set. Obtained from: OpenBSD
* Previous fix didn't make it past the Bruce filter. Clean upjkh1998-07-071-5/+2
| | | | non-KNF indentation and use err() properly.
* msgs -p (and maybe other flags, too) gives misleading error messages,jkh1998-07-071-1/+7
| | | | | | | | | | especially on a new install, where /var/msgs/bounds doesn't exist. I moved my bounds file out of the way to create this before and after on a quick 'n' dirty hack, which is probably the 23rd best way to do it, but it works: PR: 6963 Submitted by: Matthew Fuller <fullermd@mortis.futuresouth.com>
* Use err(3).charnier1997-07-291-45/+59
| | | | | | | sprintf -> snprintf from OpenBSD. Add usage(), prototypes. Use MAXPATHLEN instead of 128 from OpenBSD. Obtained from: OpenBSD
* Eliminated includes of the "temporary" backwards compatibility headerbde1996-09-241-2/+2
| | | | | | <sys/dir.h> in applications. Maintained existing (inadequate) ifdefs for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any new ones.
* Localize itache1995-12-131-4/+5
|
* Initialize some uninitialized variables to fix a bug that sometimesdg1995-12-061-1/+1
| | | | | resulted in msgs doing strange things, including getting stuck in an infinite loop.
* Default file creation mask was 666 (allow othres write anythingache1995-11-191-2/+2
| | | | to msgs directory), change it to 644
* Remove trailing whitespace.rgrimes1995-05-301-1/+1
|
* Fix nested comments for -Wcomment warnings.rgrimes1995-05-091-2/+2
|
* Use tcflush(), eliminate libcompat.wollman1995-02-211-5/+4
|
* BSD 4.4 Lite Usr.bin Sourcesrgrimes1994-05-271-0/+863
OpenPOWER on IntegriCloud