Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/lpr/lpd printer of "" becomes the DEFLP (the defaul...



details:   https://anonhg.NetBSD.org/src/rev/120806be5a19
branches:  trunk
changeset: 511715:120806be5a19
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Jun 25 15:29:12 2001 +0000

description:
printer of "" becomes the DEFLP (the default printer, "lp")

diffstat:

 usr.sbin/lpr/lpd/lpd.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (52 lines):

diff -r 3b6a0884399a -r 120806be5a19 usr.sbin/lpr/lpd/lpd.c
--- a/usr.sbin/lpr/lpd/lpd.c    Mon Jun 25 14:11:34 2001 +0000
+++ b/usr.sbin/lpr/lpd/lpd.c    Mon Jun 25 15:29:12 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpd.c,v 1.28 2001/03/28 03:17:42 simonb Exp $  */
+/*     $NetBSD: lpd.c,v 1.29 2001/06/25 15:29:12 mrg Exp $     */
 
 /*
  * Copyright (c) 1983, 1993, 1994
@@ -45,7 +45,7 @@
 #if 0
 static char sccsid[] = "@(#)lpd.c      8.7 (Berkeley) 5/10/95";
 #else
-__RCSID("$NetBSD: lpd.c,v 1.28 2001/03/28 03:17:42 simonb Exp $");
+__RCSID("$NetBSD: lpd.c,v 1.29 2001/06/25 15:29:12 mrg Exp $");
 #endif
 #endif /* not lint */
 
@@ -459,6 +459,8 @@
                switch (*cp++) {
                case '\1':      /* check the queue and print any jobs there */
                        printer = cp;
+                       if (*printer == '\0')
+                               printer = DEFLP;
                        printjob();
                        break;
                case '\2':      /* receive files to be queued */
@@ -467,11 +469,15 @@
                                exit(1);
                        }
                        printer = cp;
+                       if (*printer == '\0')
+                               printer = DEFLP;
                        recvjob();
                        break;
                case '\3':      /* display the queue (short form) */
                case '\4':      /* display the queue (long form) */
                        printer = cp;
+                       if (*printer == '\0')
+                               printer = DEFLP;
                        while (*cp) {
                                if (*cp != ' ') {
                                        cp++;
@@ -500,6 +506,8 @@
                                exit(1);
                        }
                        printer = cp;
+                       if (*printer == '\0')
+                               printer = DEFLP;
                        while (*cp && *cp != ' ')
                                cp++;
                        if (!*cp)



Home | Main Index | Thread Index | Old Index