summaryrefslogtreecommitdiff
path: root/usr.sbin/lpr/common_source
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2012-03-04 04:05:16 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2012-03-04 04:05:16 +0000
commitea5319421a589ebd8583734a461346e1f0d91bec (patch)
treef5bd7462d5be00f2b6c3ea91c579bd03d2ef6dce /usr.sbin/lpr/common_source
parentc90e6f8af6e01b6bd2b8ec8057571ae41b0ddb00 (diff)
In preparation for getline and getdelim additions to libc, rename getline()
occurrences to get_line(). Based on a diff from Jan Klemkow <j-dot-klemkow-at-wemelug-dot-de> to tech.
Diffstat (limited to 'usr.sbin/lpr/common_source')
-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
4 files changed, 10 insertions, 10 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;
}