lpr(1).

--steffen

Index: usr.sbin/lpr/common_source/common.c
===================================================================
RCS file: 
/Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/common_source/common.c,v
retrieving revision 1.33
diff -a -p -u -r1.33 common.c
--- usr.sbin/lpr/common_source/common.c 27 Oct 2009 23:59:51 -0000      1.33
+++ usr.sbin/lpr/common_source/common.c 25 Feb 2012 13:33:26 -0000
@@ -199,7 +199,7 @@ retryport:
  * Returns 0 at EOF or the number of characters read.
  */
 int
-getline(FILE *cfp)
+lpgetline(FILE *cfp)
 {
        int linel = 0;
        char *lp = line;
Index: usr.sbin/lpr/common_source/displayq.c
===================================================================
RCS file: 
/Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/common_source/displayq.c,v
retrieving revision 1.31
diff -a -p -u -r1.31 displayq.c
--- usr.sbin/lpr/common_source/displayq.c       27 Oct 2009 23:59:51 -0000      
1.31
+++ usr.sbin/lpr/common_source/displayq.c       25 Feb 2012 13:40:04 -0000
@@ -352,7 +352,7 @@ inform(char *cf, int rank)
        }
 
        j = 0;
-       while (getline(cfp)) {
+       while (lpgetline(cfp)) {
                switch (line[0]) {
                case 'P': /* Was this file specified in the user's list? */
                        if (!inlist(line+1, cf)) {
Index: usr.sbin/lpr/common_source/lp.h
===================================================================
RCS file: 
/Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/common_source/lp.h,v
retrieving revision 1.14
diff -a -p -u -r1.14 lp.h
--- usr.sbin/lpr/common_source/lp.h     2 Jun 2003 23:36:53 -0000       1.14
+++ usr.sbin/lpr/common_source/lp.h     25 Feb 2012 13:34:08 -0000
@@ -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     lpgetline(FILE *);
 int     getport(char *, int);
 int     getq(struct queue ***);
 void     header(void);
Index: usr.sbin/lpr/common_source/rmjob.c
===================================================================
RCS file: 
/Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/common_source/rmjob.c,v
retrieving revision 1.18
diff -a -p -u -r1.18 rmjob.c
--- usr.sbin/lpr/common_source/rmjob.c  27 Oct 2009 23:59:51 -0000      1.18
+++ usr.sbin/lpr/common_source/rmjob.c  25 Feb 2012 13:33:55 -0000
@@ -171,7 +171,7 @@ lockchk(char *s)
                else
                        return(0);
        }
-       if (!getline(fp)) {
+       if (!lpgetline(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 (lpgetline(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 (lpgetline(cfp)) {
                if (line[0] == 'P')
                        break;
        }
Index: usr.sbin/lpr/lpc/cmds.c
===================================================================
RCS file: /Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/lpc/cmds.c,v
retrieving revision 1.21
diff -a -p -u -r1.21 cmds.c
--- usr.sbin/lpr/lpc/cmds.c     29 Oct 2009 20:11:09 -0000      1.21
+++ usr.sbin/lpr/lpc/cmds.c     25 Feb 2012 13:33:48 -0000
@@ -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 (!lpgetline(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 (lpgetline(fp) > 0)
                        if (line[0] == 'P')
                                break;
                (void)fclose(fp);
Index: usr.sbin/lpr/lpd/printjob.c
===================================================================
RCS file: /Users/steffen/arena/code.openbsd/src/usr.sbin/lpr/lpd/printjob.c,v
retrieving revision 1.46
diff -a -p -u -r1.46 printjob.c
--- usr.sbin/lpr/lpd/printjob.c 22 Mar 2010 16:50:38 -0000      1.46
+++ usr.sbin/lpr/lpd/printjob.c 25 Feb 2012 13:33:40 -0000
@@ -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
+        *      lpgetline reads a line and expands tabs to blanks
         */
 
        /* pass 1 */
 
-       while (getline(cfp))
+       while (lpgetline(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 (lpgetline(cfp))
                switch (line[0]) {
                case 'L':       /* identification line */
                        if (!SH && HL)
@@ -808,7 +808,7 @@ sendit(char *file)
        /*
         * pass 1
         */
-       while (getline(cfp)) {
+       while (lpgetline(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 = lpgetline(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 (lpgetline(cfp))
                if (line[0] == 'U' && strchr(line+1, '/') == 0)
                        (void)unlink(line+1);
        /*

Reply via email to