-#define DORETURN 0 /* absorb fork error */
-#define DOABORT 1 /* abort if dofork fails */
-
-static char title[80]; /* ``pr'' title */
-static FILE *cfp; /* control file */
-static int pfd; /* printer file descriptor */
-static int ofd; /* output filter file descriptor */
-static int lfd; /* lock file descriptor */
-static int pid; /* pid of lpd process */
-static int prchild; /* id of pr process */
-static int child; /* id of any filters */
-static int ofilter; /* id of output filter, if any */
-static int tof; /* true if at top of form */
-static int count; /* Number of files actually printed */
-static int remote; /* true if sending files to remote */
-
-static char fromhost[32]; /* user's host machine */
-static char logname[32]; /* user's login name */
-static char jobname[100]; /* job or file name */
-static char class[32]; /* classification field */
-static char width[10] = "-w"; /* page width in characters */
-static char length[10] = "-l"; /* page length in lines */
-static char pxwidth[10] = "-x"; /* page width in pixels */
-static char pxlength[10] = "-y"; /* page length in pixels */
-static char indent[10] = "-i0"; /* indentation size in characters */
-static char tmpfile[] = "errsXXXXXX"; /* file name for filter output */
+#define DORETURN 0 /* absorb fork error */
+#define DOABORT 1 /* abort if dofork fails */
+
+/*
+ * Error tokens
+ */
+#define REPRINT -2
+#define ERROR -1
+#define OK 0
+#define FATALERR 1
+#define NOACCT 2
+#define FILTERERR 3
+#define ACCESS 4
+
+char title[80]; /* ``pr'' title */
+FILE *cfp; /* control file */
+int pfd; /* printer file descriptor */
+int ofd; /* output filter file descriptor */
+int lfd; /* lock file descriptor */
+int pid; /* pid of lpd process */
+int prchild; /* id of pr process */
+int child; /* id of any filters */
+int ofilter; /* id of output filter, if any */
+int tof; /* true if at top of form */
+int remote; /* true if sending files to remote */
+dev_t fdev; /* device of file pointed to by symlink */
+ino_t fino; /* inode of file pointed to by symlink */
+
+char fromhost[32]; /* user's host machine */
+char logname[32]; /* user's login name */
+char jobname[100]; /* job or file name */
+char class[32]; /* classification field */
+char width[10] = "-w"; /* page width in characters */
+char length[10] = "-l"; /* page length in lines */
+char pxwidth[10] = "-x"; /* page width in pixels */
+char pxlength[10] = "-y"; /* page length in pixels */
+char indent[10] = "-i0"; /* indentation size in characters */
+char tempfile[] = "errsXXXXXX"; /* file name for filter output */