summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/lpr')
-rw-r--r--usr.sbin/lpr/common_source/common.c4
-rw-r--r--usr.sbin/lpr/common_source/displayq.c4
-rw-r--r--usr.sbin/lpr/common_source/lp.h4
-rw-r--r--usr.sbin/lpr/common_source/rmjob.c8
-rw-r--r--usr.sbin/lpr/lpc/cmds.c6
-rw-r--r--usr.sbin/lpr/lpd/printjob.c14
6 files changed, 20 insertions, 20 deletions
diff --git a/usr.sbin/lpr/common_source/common.c b/usr.sbin/lpr/common_source/common.c
index bc7c88cf981..bdf5691dccd 100644
--- a/usr.sbin/lpr/common_source/common.c
+++ b/usr.sbin/lpr/common_source/common.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: common.c,v 1.33 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: common.c,v 1.34 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: common.c,v 1.21 2000/08/09 14:28:50 itojun Exp $ */
/*
@@ -199,7 +199,7 @@ retryport:
* Returns 0 at EOF or the number of characters read.
*/
int
-getline(FILE *cfp)
+get_line(FILE *cfp)
{
int linel = 0;
char *lp = line;
diff --git a/usr.sbin/lpr/common_source/displayq.c b/usr.sbin/lpr/common_source/displayq.c
index 2f37e6c758e..3f8dec20f19 100644
--- a/usr.sbin/lpr/common_source/displayq.c
+++ b/usr.sbin/lpr/common_source/displayq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: displayq.c,v 1.31 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: displayq.c,v 1.32 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: displayq.c,v 1.21 2001/08/30 00:51:50 itojun Exp $ */
/*
@@ -352,7 +352,7 @@ inform(char *cf, int rank)
}
j = 0;
- while (getline(cfp)) {
+ while (get_line(cfp)) {
switch (line[0]) {
case 'P': /* Was this file specified in the user's list? */
if (!inlist(line+1, cf)) {
diff --git a/usr.sbin/lpr/common_source/lp.h b/usr.sbin/lpr/common_source/lp.h
index b6b20c6ceb3..09f914f976c 100644
--- a/usr.sbin/lpr/common_source/lp.h
+++ b/usr.sbin/lpr/common_source/lp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: lp.h,v 1.14 2003/06/02 23:36:53 millert Exp $ */
+/* $OpenBSD: lp.h,v 1.15 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: lp.h,v 1.14 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -130,7 +130,7 @@ void displayq(int);
void dump(char *, char *, int);
__dead void fatal(const char *, ...)
__attribute__((__format__(__printf__, 1, 2)));
-int getline(FILE *);
+int get_line(FILE *);
int getport(char *, int);
int getq(struct queue ***);
void header(void);
diff --git a/usr.sbin/lpr/common_source/rmjob.c b/usr.sbin/lpr/common_source/rmjob.c
index 3fb97b1281c..526523c7b4d 100644
--- a/usr.sbin/lpr/common_source/rmjob.c
+++ b/usr.sbin/lpr/common_source/rmjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rmjob.c,v 1.18 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: rmjob.c,v 1.19 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: rmjob.c,v 1.16 2000/04/16 14:43:58 mrg Exp $ */
/*
@@ -171,7 +171,7 @@ lockchk(char *s)
else
return(0);
}
- if (!getline(fp)) {
+ if (!get_line(fp)) {
(void)fclose(fp);
return(0); /* no daemon present */
}
@@ -211,7 +211,7 @@ process(char *file)
close(fd);
fatal("cannot open %s", file);
}
- while (getline(cfp)) {
+ while (get_line(cfp)) {
switch (line[0]) {
case 'U': /* unlink associated files */
if (strchr(line+1, '/') || strncmp(line+1, "df", 2))
@@ -266,7 +266,7 @@ chk(char *file)
close(fd);
return(0);
}
- while (getline(cfp)) {
+ while (get_line(cfp)) {
if (line[0] == 'P')
break;
}
diff --git a/usr.sbin/lpr/lpc/cmds.c b/usr.sbin/lpr/lpc/cmds.c
index acffabdfe51..b964ae679c3 100644
--- a/usr.sbin/lpr/lpc/cmds.c
+++ b/usr.sbin/lpr/lpc/cmds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmds.c,v 1.21 2009/10/29 20:11:09 sobrado Exp $ */
+/* $OpenBSD: cmds.c,v 1.22 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: cmds.c,v 1.12 1997/10/05 15:12:06 mrg Exp $ */
/*
@@ -165,7 +165,7 @@ abortpr(int dis)
printf("\tcannot open lock file\n");
goto out;
}
- if (!getline(fp) || flock(fileno(fp), LOCK_SH|LOCK_NB) == 0) {
+ if (!get_line(fp) || flock(fileno(fp), LOCK_SH|LOCK_NB) == 0) {
(void)fclose(fp); /* unlocks as well */
printf("\tno daemon to abort\n");
goto out;
@@ -1098,7 +1098,7 @@ doarg(char *job)
close(fd);
continue;
}
- while (getline(fp) > 0)
+ while (get_line(fp) > 0)
if (line[0] == 'P')
break;
(void)fclose(fp);
diff --git a/usr.sbin/lpr/lpd/printjob.c b/usr.sbin/lpr/lpd/printjob.c
index 27108a49112..04f36895ee5 100644
--- a/usr.sbin/lpr/lpd/printjob.c
+++ b/usr.sbin/lpr/lpd/printjob.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printjob.c,v 1.46 2010/03/22 16:50:38 deraadt Exp $ */
+/* $OpenBSD: printjob.c,v 1.47 2012/03/04 04:05:15 fgsch Exp $ */
/* $NetBSD: printjob.c,v 1.31 2002/01/21 14:42:30 wiz Exp $ */
/*
@@ -387,12 +387,12 @@ printit(char *file)
* (after we print it. (Pass 2 only)).
* M -- "mail" to user when done printing
*
- * getline reads a line and expands tabs to blanks
+ * get_line reads a line and expands tabs to blanks
*/
/* pass 1 */
- while (getline(cfp))
+ while (get_line(cfp))
switch (line[0]) {
case 'H':
strlcpy(fromhost, line+1, sizeof(fromhost));
@@ -493,7 +493,7 @@ printit(char *file)
pass2:
fseek(cfp, 0L, SEEK_SET);
- while (getline(cfp))
+ while (get_line(cfp))
switch (line[0]) {
case 'L': /* identification line */
if (!SH && HL)
@@ -808,7 +808,7 @@ sendit(char *file)
/*
* pass 1
*/
- while (getline(cfp)) {
+ while (get_line(cfp)) {
again:
if (line[0] == 'S') {
cp = line+1;
@@ -825,7 +825,7 @@ sendit(char *file)
}
if (line[0] >= 'a' && line[0] <= 'z') {
strlcpy(last, line, sizeof(last));
- while ((i = getline(cfp)) != 0)
+ while ((i = get_line(cfp)) != 0)
if (strcmp(last, line))
break;
switch (sendfile('\3', last+1)) {
@@ -852,7 +852,7 @@ sendit(char *file)
* pass 2
*/
fseek(cfp, 0L, SEEK_SET);
- while (getline(cfp))
+ while (get_line(cfp))
if (line[0] == 'U' && strchr(line+1, '/') == 0)
(void)unlink(line+1);
/*