Commit Graph

54 Commits

Author SHA1 Message Date
wiz
c15af5889a Fix fd leak in error cases. Found by cppcheck. 2011-01-04 09:43:39 +00:00
roy
98eb889579 Userland now builds and uses terminfo instead of termcap.
OK: core@, jdc@
2010-02-03 15:34:37 +00:00
roy
7027866a09 Rename internal getline() function to get_line() so it does
conflict with the soon to be added getline(3) libc function.
2009-07-13 19:05:39 +00:00
lukem
f5a433a737 fix -Wsign-compare issues 2009-01-18 09:57:26 +00:00
jnemeth
482b1c26bf PR/40117 - Bug Hunting -- new line, new sentence; punctuation 2008-12-06 02:28:58 +00:00
lukem
9c1945664c Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 13:36:57 +00:00
christos
03687f1fb0 remove null test; it is not necessary as we always look at the next element.
from Anon Ymous
2007-10-03 19:07:43 +00:00
christos
0bfe3e6189 - int -> size_t
- off by one in \n printing [Anon Ymous]
- return when the end of the array is reached.
2007-10-03 17:45:47 +00:00
christos
f6a7372b60 use c99 initializers 2006-10-22 21:09:47 +00:00
christos
ddd7ee439d Coverity CID 830: Avoid NULL deref. 2006-05-25 00:21:52 +00:00
christos
db1dbe6ce9 Coverity CID 1225: Don't close negative fd. While here fix fd leak. 2006-03-21 22:49:43 +00:00
is
def92bcab5 Fix obvious error, hopefully correctly. 2006-01-15 13:17:15 +00:00
garbled
606b04818e sizeof(char) is unneccesary. 2006-01-12 18:06:25 +00:00
garbled
53df3fea02 Add libedit command line history capability to lpc(8). 2006-01-12 17:53:03 +00:00
christos
04723c3ffc - WARNS = 4
- factor out commonly used code.
- constify
- use warn/warnx instead of printf
2005-11-28 03:26:06 +00:00
dsl
75ba9fc767 Add (unsigned char) cast to ctype functions
Some of this code could usefully be converted to use strtoul() and/or
some small helper functions.
2004-10-30 08:44:25 +00:00
agc
326b2259b7 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22366, verified by myself.
2003-08-07 11:25:11 +00:00
itojun
85da88227f use strlcpy/strlcat.
[fix off-by-one in displayq.c]
2003-05-17 20:46:42 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant
eda9e509bb sweep of errx/warnx, remove unnecessary trailing \n 2002-07-20 08:40:16 +00:00
wiz
895dc72a69 Unifdef __STDC__. Remove __P(). ANSIfy. 2002-07-14 15:27:58 +00:00
wiz
01ff6324be Make ngroups, which is the size of a static array, static too. From
Todd Miller in bin/16871.
2002-05-19 17:38:36 +00:00
wiz
d8081e42ef Sort SEE ALSO and sections. 2002-01-19 03:22:19 +00:00
enami
6737e7d6b2 Test absense of command differently to avoid null pointer deference
when only whitespaces are given.
2001-11-14 03:01:15 +00:00
wiz
8357706e0f lowercase Lpq in xref, and some whitespace fixes. 2001-04-09 12:50:59 +00:00
sommerfeld
c829aa7773 Fix ingroup() to not check gid against trailing groups not set by
getgroups().

Reported to security-officer, but not a security hole, since
"operator" is not gid 0.
2000-08-24 17:40:16 +00:00
mrg
dd28a6c6dd make scandir(3)'s 3rd argument take a function that takes a *const*
struct dirent *, rather than non-const.  this makes scandir(3) the
same as the scandir implementations in libiberty and glibc, and the
select function has no need to modify the dirent.
2000-04-16 14:43:56 +00:00
mycroft
68d6f4bf44 Remove spurious .ne's. 1999-03-24 06:27:49 +00:00
garbled
d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
erh
0f61c6801e Add missing .El line. 1999-03-10 08:17:35 +00:00
mycroft
d77575d3c8 Clean up SYNOPSIS formatting. 1999-03-07 11:58:22 +00:00
lukem
0acf0ef008 only compile common_source/* once (25% faster), remove unused printcap.c 1997-10-10 09:26:35 +00:00
mrg
1bb06f8aab fix alpha compile warnings. 1997-10-05 16:45:43 +00:00
mrg
fe7ed7ce37 - WARNS?=1
- be safe with unlinking files (from freebsd)
- remove register
- clean up $NetBSD$'s.
- use inet_ntoa() in one place (from openbsd)
- nul terminate after a bunch of strncpy()'s
- #ifdef __STDC__ rather than #if (from freebsd)
- be safe with a bunch of string operations (from freebsd)
- use warn()/err() over home grown versions (some from freebsd)
- rename warn() to nodaemon() to remove conflict with above
- check errno from failed kill(2) against ESRCH (from freebsd)
- use getopt() rather than home grown versions (from freebsd)
- clean up a bunch of man pages (some from freebsd)
- check for hostname spoof (from freebsd)
- use POSIX wait() interfaces
- use sysconf(_SC_OPEN_MAX) in preference to NOFILE (from freebsd)
- deal with fork() failure
- index/rindex -> strchr/strrchr (some from freebsd)
- add B57600 and B115200 speeds (from freebsd)
- some KNF
- be safe with files passed in over the network (some from freebsd)
- check return value of malloc(), calloc() and strdup()
1997-10-05 15:11:58 +00:00
mrg
e6a91a0997 merge 4.4 lite2 1997-10-05 11:52:17 +00:00
mikel
b38a221a9e oops 1997-07-10 06:09:27 +00:00
mikel
0b0a21a5e8 clarify assignments used as conditionals (gcc -Wall) 1997-07-10 05:38:54 +00:00
mikel
7d65d1af46 clarify conditional in for-loop (gcc -Wall) 1997-07-10 05:34:48 +00:00
jtc
afdf5dcf23 Changed /var/spool/* to /var/spool/output/*, to be consistant with reality. 1997-07-09 02:04:26 +00:00
gwr
10e180cc49 Back out the .PATH.c changes. The .depend problem (and others)
will be fixed using the new .NOPATH make feature instead.
1997-05-08 21:11:01 +00:00
gwr
012e528f2e Use .PATH.c: ... 1997-05-06 20:44:56 +00:00
mrg
077acf5088 remove unsafe calls to strcpy(), strcat(), and sprintf(). some KNF. 1996-12-09 09:57:40 +00:00
hpeyerl
8c4481f80c More descriptive message for printer status. Addresses PR #509. 1996-01-14 17:25:21 +00:00
pk
b965d4ffe4 Add RCSIDs 1995-11-15 22:27:27 +00:00
hpeyerl
8e41ca8016 -- convert sgtty to termios. From: Scott Bartram <scottb@iis.net>
-- Use seteuid() to only give lpr, lprm, lpq and lpc root when they
   need it from matthew green <mrg@mame.mu.oz.au>
1995-10-03 15:02:17 +00:00
cgd
d8806814a6 specify man pages the new way. 1994-12-22 11:32:57 +00:00
cgd
f881d1d4fe clean up that import. no rcsids yet. 1994-05-18 01:25:37 +00:00
cgd
64c78025ff lpr from 4.4-Lite 1994-05-18 01:12:10 +00:00
jtc
2a4121e39d Fix spelling errors 1994-01-14 16:22:25 +00:00
jtc
3ccb82400b Upgraded to use <dirent.h>. 1993-12-08 00:47:01 +00:00