From b538df16667c3965853f30e9af88fa7193b5d95f Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 21 Aug 1998 18:08:46 +0000 Subject: [PATCH] Fix ``lp=port@machine'' syntax and mention it in printcap(5). --- usr.sbin/lpr/lpd/printjob.c | 4 ++-- usr.sbin/lpr/lpr/printcap.5 | 13 ++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c index 929d6a318016..ea3d2fc94969 100644 --- a/usr.sbin/lpr/lpd/printjob.c +++ b/usr.sbin/lpr/lpd/printjob.c @@ -43,7 +43,7 @@ static const char copyright[] = static char sccsid[] = "@(#)printjob.c 8.7 (Berkeley) 5/10/95"; */ static const char rcsid[] = - "$Id$"; + "$Id: printjob.c,v 1.18 1997/12/02 20:45:58 wollman Exp $"; #endif /* not lint */ @@ -1462,7 +1462,7 @@ opennet(pp) void (*savealrm)(int); port = strtoul(pp->lp, &ep, 0); - if (*ep != ':' || port > 65536) { + if (*ep != '@' || port > 65535) { syslog(LOG_ERR, "%s: bad port number: %s", pp->printer, pp->lp); exit(1); diff --git a/usr.sbin/lpr/lpr/printcap.5 b/usr.sbin/lpr/lpr/printcap.5 index 219ebc1533b9..2fbb04407b27 100644 --- a/usr.sbin/lpr/lpr/printcap.5 +++ b/usr.sbin/lpr/lpr/printcap.5 @@ -30,7 +30,7 @@ .\" SUCH DAMAGE. .\" .\" @(#)printcap.5 8.2 (Berkeley) 12/11/93 -.\" $Id: printcap.5,v 1.13 1997/12/02 21:41:40 wollman Exp $ +.\" $Id: printcap.5,v 1.14 1998/06/10 12:34:26 phk Exp $ .\" .Dd December 11, 1993 .Dt PRINTCAP 5 @@ -317,6 +317,17 @@ Any input filtering via will therefore happen before .Xr pr 1 is executed rather than afterwards. +.Pp +If +.Cm lp +is specified as +.Em port Ns No @ Ns Em machine +(and +.Cm rm +is not in use), printing will be send directly to the given +.Em port +on the given +.Em machine . .Sh LOGGING Error messages generated by the line printer programs themselves (that is, the