History log of /openbsd-current/usr.sbin/lpr/common_source/displayq.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.41 23-Apr-2024 jsg

correct indentation; no functional change
ok tb@


Revision tags: OPENBSD_6_4_BASE OPENBSD_6_5_BASE OPENBSD_6_6_BASE OPENBSD_6_7_BASE OPENBSD_6_8_BASE OPENBSD_6_9_BASE OPENBSD_7_0_BASE OPENBSD_7_1_BASE OPENBSD_7_2_BASE OPENBSD_7_3_BASE OPENBSD_7_4_BASE OPENBSD_7_5_BASE
# 1.40 26-Apr-2018 guenther

Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.39 17-Mar-2016 bentley

Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.

Previously behaviors were all over the map. This changes them to
use COLUMNS first, and either terminal width or a hardcoded value
(typically 80) as appropriate.

ok deraadt@; man bits ok jmc@


Revision tags: OPENBSD_5_9_BASE
# 1.38 12-Jan-2016 tb

Move prototypes of local functions from lp.h to the .c files and make
functions static if possible. Move delay() to lpd/printjob.c and fix
an annoying typo.

ok deraadt@


# 1.37 20-Aug-2015 deraadt

stdlib.h is in scope; do not cast malloc/calloc/realloc*


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.36 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


Revision tags: OPENBSD_5_6_BASE
# 1.35 21-May-2014 pascal

stat(2) on the spool file needs privileges. Fixes file size reported by
lpq -l.

ok millert@


Revision tags: OPENBSD_5_5_BASE
# 1.34 24-Nov-2013 deraadt

more ctype cleanups
checked by jca


# 1.33 27-Oct-2013 guenther

If a constant string needs a name, use a static const array instead of a
pointer or non-const array, as that minimizes the symbols, maximizes the
placement into read-only memory, and avoids warnings from gcc -Wformat=2
when they're used as format strings.

ok deraadt@


Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.32 04-Mar-2012 fgsch

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.31 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_6_BASE
# 1.30 03-Mar-2009 stevesk

spaces


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.29 08-Apr-2007 stevesk

I have an HP LaserJet (P2015dn) whose LPR implementation may not end
the send queue state command stream with '\n'; check for this case
and print '\n' if needed. Without this you may see something like:

$ lpq
queue empty$

ok millert@


# 1.28 07-Apr-2007 stevesk

trailing "\n" not needed in fatal(); ok millert@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.27 08-Apr-2006 ray

Plug memory leak when nitems == 0.

From NetBSD from Coverity CID 1752.

OK jaredy@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.26 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.25 13-May-2003 pjanzen

Don't reformat output beyond a minimum terminal width (60).
millert@ ok


# 1.24 12-May-2003 pjanzen

Do vis()-cleaning when displaying the print queue.
ok deraadt@, ian@


# 1.23 05-Apr-2003 avsm

trivial strlcat, tedu@ ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.22 09-Jun-2002 millert

Better fix for correct queue printing when things have been moved around.


# 1.21 09-Jun-2002 millert

Don't print jobs in transit to a remote queue as being "active"


# 1.20 09-Jun-2002 millert

o Kill "garbage" global (unused)
o Kill "rank" global (doesn't need to be global)
o Make inform() static (local to displayq.c)
o Pass in rank to inform() based on index within sorted mtime array
o Simplify compar()


# 1.19 08-Jun-2002 millert

o Replace some hard-coded octal constants w/ S_I*
o Remove some unneeded casts to char * when calling free()


# 1.18 08-Jun-2002 millert

Remove setuid root from lp*. lpr needs to be setuid daemon so the
files it creates are not owned by the user spooling them but the
others (lpc, lpq, lprm) can get away with setgid daemon. lpd runs
as user daemon for most things, only changing its uid to 0 for
things that must be done as root.

For the time being, don't require connections to come from a reserved
port since lpq/lpr/lprm can't acquire that w/o setuid root. In the
near future we will have a mechanism for select non-root processes
to grab reserved ports.

The upshot of this is that spool directories must be writable by
group daemon and the files within the spool dirs must be owned by
daemon.


# 1.17 28-May-2002 millert

Remove useless sigaddset()


# 1.16 20-May-2002 millert

Pull in useful bits from NetBSD and make our lp* easier to diff and
do some minor cleanup of my own:

o IPv6 support
o ANSI function headers
o use getopt()
o synce usage() with man pages
o passes -Wall on both 32bit and 64bit platforms
o add an option to set the max number of children lpd will fork off
o add an lpd option to bind to specific addresses instead of INADDR_ANY.
o allow user to specify how long to wait for a connection to remote servers
o more strlcpy() and snprintf() usage
o Use FOO_FILENO constants instead of hard-coding 0-2
o Add some keeps to man the page SYNOPSIS to avoid options being split


Revision tags: OPENBSD_3_1_BASE
# 1.15 01-Nov-2001 mickey

displayq to honor the terminal width; millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.14 30-Aug-2001 millert

o kill register
o add const to rcsid and copyright strings
o placate -Wall


# 1.13 30-Aug-2001 millert

Use NAME_MAX, not MAXPATHLEN for buffer sizes since they are not
full paths (cannot contain a slash). From discussion with drosih@rpi.edu


# 1.12 29-Aug-2001 millert

Fix buffer oflow reading from queue file. While we are at it, crank
the size of buffers that can hold filenames to MAXPATHLEN.


# 1.11 22-Jun-2001 lebel

use strlcpy vs strncpy+a[len-1]='\0'


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.10 23-Jun-1998 millert

branches: 1.10.10; 1.10.12;
Fix snprintf return value usage.


Revision tags: OPENBSD_2_3_BASE
# 1.9 27-Feb-1998 deraadt

be more paranoid.
By the way, the lp* tools are in need of a full test sometime in the
next two weeks. I want to hear from someone who is running all of them
that they work 100% fine. I do not own a printer, so I'm going to rely
on someone out there to take care of this..


Revision tags: OPENBSD_2_2_BASE
# 1.8 23-Jul-1997 deraadt

1 byte oflows; millert


# 1.7 17-Jul-1997 deraadt

Wall


Revision tags: OPENBSD_2_1_BASE
# 1.6 17-Jan-1997 millert

Possible buf oflow.


# 1.5 25-Oct-1996 deraadt

proactive bounds checking; help from millert


Revision tags: OPENBSD_2_0_BASE
# 1.4 04-Jul-1996 tholo

Integrated 4.4Lite2 source
Fixed potential problem pointed out by bitblt


# 1.3 22-Nov-1995 deraadt

from netbsd; {} mania


# 1.2 13-Nov-1995 deraadt

lprm failed to delete all files; from thomas@cevis.uni-Bremen.de; netbsd pr#1756


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


# 1.40 26-Apr-2018 guenther

Use <fcntl.h> instead of <sys/file.h> for open() and friends.
Delete a bunch of unnecessary #includes and sort to match style(9)
while doing the above cleanup.

ok deraadt@ krw@


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE OPENBSD_6_3_BASE
# 1.39 17-Mar-2016 bentley

Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.

Previously behaviors were all over the map. This changes them to
use COLUMNS first, and either terminal width or a hardcoded value
(typically 80) as appropriate.

ok deraadt@; man bits ok jmc@


Revision tags: OPENBSD_5_9_BASE
# 1.38 12-Jan-2016 tb

Move prototypes of local functions from lp.h to the .c files and make
functions static if possible. Move delay() to lpd/printjob.c and fix
an annoying typo.

ok deraadt@


# 1.37 20-Aug-2015 deraadt

stdlib.h is in scope; do not cast malloc/calloc/realloc*


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.36 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


Revision tags: OPENBSD_5_6_BASE
# 1.35 21-May-2014 pascal

stat(2) on the spool file needs privileges. Fixes file size reported by
lpq -l.

ok millert@


Revision tags: OPENBSD_5_5_BASE
# 1.34 24-Nov-2013 deraadt

more ctype cleanups
checked by jca


# 1.33 27-Oct-2013 guenther

If a constant string needs a name, use a static const array instead of a
pointer or non-const array, as that minimizes the symbols, maximizes the
placement into read-only memory, and avoids warnings from gcc -Wformat=2
when they're used as format strings.

ok deraadt@


Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.32 04-Mar-2012 fgsch

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.31 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_6_BASE
# 1.30 03-Mar-2009 stevesk

spaces


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.29 08-Apr-2007 stevesk

I have an HP LaserJet (P2015dn) whose LPR implementation may not end
the send queue state command stream with '\n'; check for this case
and print '\n' if needed. Without this you may see something like:

$ lpq
queue empty$

ok millert@


# 1.28 07-Apr-2007 stevesk

trailing "\n" not needed in fatal(); ok millert@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.27 08-Apr-2006 ray

Plug memory leak when nitems == 0.

From NetBSD from Coverity CID 1752.

OK jaredy@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.26 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.25 13-May-2003 pjanzen

Don't reformat output beyond a minimum terminal width (60).
millert@ ok


# 1.24 12-May-2003 pjanzen

Do vis()-cleaning when displaying the print queue.
ok deraadt@, ian@


# 1.23 05-Apr-2003 avsm

trivial strlcat, tedu@ ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.22 09-Jun-2002 millert

Better fix for correct queue printing when things have been moved around.


# 1.21 09-Jun-2002 millert

Don't print jobs in transit to a remote queue as being "active"


# 1.20 09-Jun-2002 millert

o Kill "garbage" global (unused)
o Kill "rank" global (doesn't need to be global)
o Make inform() static (local to displayq.c)
o Pass in rank to inform() based on index within sorted mtime array
o Simplify compar()


# 1.19 08-Jun-2002 millert

o Replace some hard-coded octal constants w/ S_I*
o Remove some unneeded casts to char * when calling free()


# 1.18 08-Jun-2002 millert

Remove setuid root from lp*. lpr needs to be setuid daemon so the
files it creates are not owned by the user spooling them but the
others (lpc, lpq, lprm) can get away with setgid daemon. lpd runs
as user daemon for most things, only changing its uid to 0 for
things that must be done as root.

For the time being, don't require connections to come from a reserved
port since lpq/lpr/lprm can't acquire that w/o setuid root. In the
near future we will have a mechanism for select non-root processes
to grab reserved ports.

The upshot of this is that spool directories must be writable by
group daemon and the files within the spool dirs must be owned by
daemon.


# 1.17 28-May-2002 millert

Remove useless sigaddset()


# 1.16 20-May-2002 millert

Pull in useful bits from NetBSD and make our lp* easier to diff and
do some minor cleanup of my own:

o IPv6 support
o ANSI function headers
o use getopt()
o synce usage() with man pages
o passes -Wall on both 32bit and 64bit platforms
o add an option to set the max number of children lpd will fork off
o add an lpd option to bind to specific addresses instead of INADDR_ANY.
o allow user to specify how long to wait for a connection to remote servers
o more strlcpy() and snprintf() usage
o Use FOO_FILENO constants instead of hard-coding 0-2
o Add some keeps to man the page SYNOPSIS to avoid options being split


Revision tags: OPENBSD_3_1_BASE
# 1.15 01-Nov-2001 mickey

displayq to honor the terminal width; millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.14 30-Aug-2001 millert

o kill register
o add const to rcsid and copyright strings
o placate -Wall


# 1.13 30-Aug-2001 millert

Use NAME_MAX, not MAXPATHLEN for buffer sizes since they are not
full paths (cannot contain a slash). From discussion with drosih@rpi.edu


# 1.12 29-Aug-2001 millert

Fix buffer oflow reading from queue file. While we are at it, crank
the size of buffers that can hold filenames to MAXPATHLEN.


# 1.11 22-Jun-2001 lebel

use strlcpy vs strncpy+a[len-1]='\0'


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.10 23-Jun-1998 millert

branches: 1.10.10; 1.10.12;
Fix snprintf return value usage.


Revision tags: OPENBSD_2_3_BASE
# 1.9 27-Feb-1998 deraadt

be more paranoid.
By the way, the lp* tools are in need of a full test sometime in the
next two weeks. I want to hear from someone who is running all of them
that they work 100% fine. I do not own a printer, so I'm going to rely
on someone out there to take care of this..


Revision tags: OPENBSD_2_2_BASE
# 1.8 23-Jul-1997 deraadt

1 byte oflows; millert


# 1.7 17-Jul-1997 deraadt

Wall


Revision tags: OPENBSD_2_1_BASE
# 1.6 17-Jan-1997 millert

Possible buf oflow.


# 1.5 25-Oct-1996 deraadt

proactive bounds checking; help from millert


Revision tags: OPENBSD_2_0_BASE
# 1.4 04-Jul-1996 tholo

Integrated 4.4Lite2 source
Fixed potential problem pointed out by bitblt


# 1.3 22-Nov-1995 deraadt

from netbsd; {} mania


# 1.2 13-Nov-1995 deraadt

lprm failed to delete all files; from thomas@cevis.uni-Bremen.de; netbsd pr#1756


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision


Revision tags: OPENBSD_6_0_BASE OPENBSD_6_1_BASE OPENBSD_6_2_BASE
# 1.39 17-Mar-2016 bentley

Switch (non-curses, non-ksh) programs that use COLUMNS to a single idiom.

Previously behaviors were all over the map. This changes them to
use COLUMNS first, and either terminal width or a hardcoded value
(typically 80) as appropriate.

ok deraadt@; man bits ok jmc@


Revision tags: OPENBSD_5_9_BASE
# 1.38 12-Jan-2016 tb

Move prototypes of local functions from lp.h to the .c files and make
functions static if possible. Move delay() to lpd/printjob.c and fix
an annoying typo.

ok deraadt@


# 1.37 20-Aug-2015 deraadt

stdlib.h is in scope; do not cast malloc/calloc/realloc*


Revision tags: OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.36 16-Jan-2015 deraadt

Replace <sys/param.h> with <limits.h> and other less dirty headers where
possible. Annotate <sys/param.h> lines with their current reasons. Switch
to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change
MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where
sensible to avoid pulling in the pollution. These are the files confirmed
through binary verification.
ok guenther, millert, doug (helped with the verification protocol)


Revision tags: OPENBSD_5_6_BASE
# 1.35 21-May-2014 pascal

stat(2) on the spool file needs privileges. Fixes file size reported by
lpq -l.

ok millert@


Revision tags: OPENBSD_5_5_BASE
# 1.34 24-Nov-2013 deraadt

more ctype cleanups
checked by jca


# 1.33 27-Oct-2013 guenther

If a constant string needs a name, use a static const array instead of a
pointer or non-const array, as that minimizes the symbols, maximizes the
placement into read-only memory, and avoids warnings from gcc -Wformat=2
when they're used as format strings.

ok deraadt@


Revision tags: OPENBSD_5_2_BASE OPENBSD_5_3_BASE OPENBSD_5_4_BASE
# 1.32 04-Mar-2012 fgsch

In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line().
Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.


Revision tags: OPENBSD_4_7_BASE OPENBSD_4_8_BASE OPENBSD_4_9_BASE OPENBSD_5_0_BASE OPENBSD_5_1_BASE
# 1.31 27-Oct-2009 deraadt

rcsid[] and sccsid[] and copyright[] are essentially unmaintained (and
unmaintainable). these days, people use source. these id's do not provide
any benefit, and do hurt the small install media
(the 33,000 line diff is essentially mechanical)
ok with the idea millert, ok dms


Revision tags: OPENBSD_4_6_BASE
# 1.30 03-Mar-2009 stevesk

spaces


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE
# 1.29 08-Apr-2007 stevesk

I have an HP LaserJet (P2015dn) whose LPR implementation may not end
the send queue state command stream with '\n'; check for this case
and print '\n' if needed. Without this you may see something like:

$ lpq
queue empty$

ok millert@


# 1.28 07-Apr-2007 stevesk

trailing "\n" not needed in fatal(); ok millert@


Revision tags: OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.27 08-Apr-2006 ray

Plug memory leak when nitems == 0.

From NetBSD from Coverity CID 1752.

OK jaredy@


Revision tags: OPENBSD_3_4_BASE OPENBSD_3_5_BASE OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE
# 1.26 02-Jun-2003 millert

Remove the advertising clause in the UCB license which Berkeley
rescinded 22 July 1999. Proofed by myself and Theo.


# 1.25 13-May-2003 pjanzen

Don't reformat output beyond a minimum terminal width (60).
millert@ ok


# 1.24 12-May-2003 pjanzen

Do vis()-cleaning when displaying the print queue.
ok deraadt@, ian@


# 1.23 05-Apr-2003 avsm

trivial strlcat, tedu@ ok


Revision tags: OPENBSD_3_2_BASE OPENBSD_3_3_BASE
# 1.22 09-Jun-2002 millert

Better fix for correct queue printing when things have been moved around.


# 1.21 09-Jun-2002 millert

Don't print jobs in transit to a remote queue as being "active"


# 1.20 09-Jun-2002 millert

o Kill "garbage" global (unused)
o Kill "rank" global (doesn't need to be global)
o Make inform() static (local to displayq.c)
o Pass in rank to inform() based on index within sorted mtime array
o Simplify compar()


# 1.19 08-Jun-2002 millert

o Replace some hard-coded octal constants w/ S_I*
o Remove some unneeded casts to char * when calling free()


# 1.18 08-Jun-2002 millert

Remove setuid root from lp*. lpr needs to be setuid daemon so the
files it creates are not owned by the user spooling them but the
others (lpc, lpq, lprm) can get away with setgid daemon. lpd runs
as user daemon for most things, only changing its uid to 0 for
things that must be done as root.

For the time being, don't require connections to come from a reserved
port since lpq/lpr/lprm can't acquire that w/o setuid root. In the
near future we will have a mechanism for select non-root processes
to grab reserved ports.

The upshot of this is that spool directories must be writable by
group daemon and the files within the spool dirs must be owned by
daemon.


# 1.17 28-May-2002 millert

Remove useless sigaddset()


# 1.16 20-May-2002 millert

Pull in useful bits from NetBSD and make our lp* easier to diff and
do some minor cleanup of my own:

o IPv6 support
o ANSI function headers
o use getopt()
o synce usage() with man pages
o passes -Wall on both 32bit and 64bit platforms
o add an option to set the max number of children lpd will fork off
o add an lpd option to bind to specific addresses instead of INADDR_ANY.
o allow user to specify how long to wait for a connection to remote servers
o more strlcpy() and snprintf() usage
o Use FOO_FILENO constants instead of hard-coding 0-2
o Add some keeps to man the page SYNOPSIS to avoid options being split


Revision tags: OPENBSD_3_1_BASE
# 1.15 01-Nov-2001 mickey

displayq to honor the terminal width; millert@ ok


Revision tags: OPENBSD_3_0_BASE
# 1.14 30-Aug-2001 millert

o kill register
o add const to rcsid and copyright strings
o placate -Wall


# 1.13 30-Aug-2001 millert

Use NAME_MAX, not MAXPATHLEN for buffer sizes since they are not
full paths (cannot contain a slash). From discussion with drosih@rpi.edu


# 1.12 29-Aug-2001 millert

Fix buffer oflow reading from queue file. While we are at it, crank
the size of buffers that can hold filenames to MAXPATHLEN.


# 1.11 22-Jun-2001 lebel

use strlcpy vs strncpy+a[len-1]='\0'


Revision tags: OPENBSD_2_4_BASE OPENBSD_2_5_BASE OPENBSD_2_6_BASE OPENBSD_2_7_BASE OPENBSD_2_8_BASE OPENBSD_2_9_BASE
# 1.10 23-Jun-1998 millert

branches: 1.10.10; 1.10.12;
Fix snprintf return value usage.


Revision tags: OPENBSD_2_3_BASE
# 1.9 27-Feb-1998 deraadt

be more paranoid.
By the way, the lp* tools are in need of a full test sometime in the
next two weeks. I want to hear from someone who is running all of them
that they work 100% fine. I do not own a printer, so I'm going to rely
on someone out there to take care of this..


Revision tags: OPENBSD_2_2_BASE
# 1.8 23-Jul-1997 deraadt

1 byte oflows; millert


# 1.7 17-Jul-1997 deraadt

Wall


Revision tags: OPENBSD_2_1_BASE
# 1.6 17-Jan-1997 millert

Possible buf oflow.


# 1.5 25-Oct-1996 deraadt

proactive bounds checking; help from millert


Revision tags: OPENBSD_2_0_BASE
# 1.4 04-Jul-1996 tholo

Integrated 4.4Lite2 source
Fixed potential problem pointed out by bitblt


# 1.3 22-Nov-1995 deraadt

from netbsd; {} mania


# 1.2 13-Nov-1995 deraadt

lprm failed to delete all files; from thomas@cevis.uni-Bremen.de; netbsd pr#1756


# 1.1 18-Oct-1995 deraadt

branches: 1.1.1;
Initial revision