Commit Graph

10 Commits

Author SHA1 Message Date
Garance A Drosehn
e550d65c85 Fixes to chkprintcap:
- Check the return from a call to malloc() in skim_printcap(), and
  return a NULL if that fails.
- Fix a small memory leak in main() that happens if skim_printcap()
  returns an error, including the new error-return of NULL.

Submitted by:	Tom Rix <trix@juniper.net>
Reviewed by:	pfg, ngie
MFC after:	4 weeks
Sponsored by:	Dell EMC Isilon, Juniper
Differential Revision:	D9954, D9982
2017-03-20 22:36:28 +00:00
Pedro F. Giffuni
bc17d12da3 lpr: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	gad
2016-04-10 23:47:40 +00:00
Garance A Drosehn
8e36ed92f2 (Hopefully) Last set of changes so all of lpr uses __FBSDID() for
setting rcsids, and uses a consistent format for 'sccsid' lines.

Reviewed by:	discussed with bde and obrien
MFC after:	15 days
2003-07-15 08:48:30 +00:00
Garance A Drosehn
43323a1d21 Add another level of checking to 'chkprintcap', which is done by
"skimming thru" the printcap file looking for some common mistakes that
people make.  These are the kinds of mistakes where the printcap file
probably looks correct to human eyes, but is wrong in some subtle way
which causes a problem in some queue definitions.  The program treats
these as "warnings" not "errors".
    Note that I'm flexible on the m.f.c. schedule, if people would rather
this waited until after 4.5-release.

Reviewed by:	no screams from freebsd-audit freebsd-print@bostonradio.org
MFC after:	4 days
2001-12-15 23:35:55 +00:00
Poul-Henning Kamp
2673ed4725 Use macro API to <sys/queue.h>
Submitted by:	"Jason" <jsmethers@pdq.net>
Reviewed by:	/sbin/md5
2000-12-30 20:56:04 +00:00
Jake Burkholder
e39756439c Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
Jake Burkholder
740a1973a6 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
John Polstra
9aa446f543 Add missing argument to warn() call. 1997-12-06 05:37:18 +00:00
Garrett Wollman
4a1a0dbedb Mega lpd/lpd upgrade, part I:
- Get rid of a lot of the static variables which were shared by
  many routines and programs in the suite.
- Create an abstract interface to the printcap database, so that
  other retrieval and iteration mechanisms could be developed
  (e.g., YP, Hesiod, or automatic retrieval from a trusted server).
- Give each capability a human-readable name in addition to the historic
  two-character one.
- Otherwise generally clean up a lot of dark corners.  Many still remain.
- When submitting jobs, use the official login name record (from getlogin())
  if there is one, rather than reverse-mapping the uid.

More to come...
1997-12-02 20:46:22 +00:00