usage();
}
- if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
+ if (printer == NULL) {
+ char *p;
+
printer = DEFLP;
+ if ((p = getenv("PRINTER"))
+ printer = p;
+ }
for (argc -= optind, argv += optind; argc; --argc, ++argv)
if (isdigit(argv[0][0])) {
-/* $OpenBSD: lpr.c,v 1.2 1996/04/21 23:40:42 deraadt Exp $ */
+/* $OpenBSD: lpr.c,v 1.3 1996/05/04 11:52:55 deraadt Exp $ */
/* $NetBSD: lpr.c,v 1.10 1996/03/21 18:12:25 jtc Exp $ */
/*
}
}
}
- if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
+
+ if (printer == NULL) {
+ char *p;
+
printer = DEFLP;
+ if ((p = getenv("PRINTER"))
+ printer = p;
+ }
chkprinter(printer);
if (SC && ncopies > 1)
fatal2("multiple copies are not allowed");
}
}
}
- if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
+ if (printer == NULL) {
+ char *p;
+
printer = DEFLP;
+ if ((p = getenv("PRINTER"))
+ printer = p;
+ }
rmjob();
exit(0);
-/* $OpenBSD: pac.c,v 1.3 1996/04/21 23:40:48 deraadt Exp $ */
+/* $OpenBSD: pac.c,v 1.4 1996/05/04 11:53:05 deraadt Exp $ */
/* $NetBSD: pac.c,v 1.7 1996/03/21 18:21:20 jtc Exp $ */
/*
(void) enter(--cp);
allflag = 0;
}
- if (printer == NULL && (printer = getenv("PRINTER")) == NULL)
+ if (printer == NULL) {
+ char *p;
+
printer = DEFLP;
+ if ((p = getenv("PRINTER"))
+ printer = p;
+ }
if (!chkprinter(printer)) {
printf("pac: unknown printer %s\n", printer);
exit(2);