aboutsummaryrefslogtreecommitdiff
path: root/print/lprps/files
diff options
context:
space:
mode:
Diffstat (limited to 'print/lprps/files')
-rw-r--r--print/lprps/files/patch-Makefile59
-rw-r--r--print/lprps/files/patch-ae64
-rw-r--r--print/lprps/files/patch-lprps.c60
-rw-r--r--print/lprps/files/patch-psif.c10
-rw-r--r--print/lprps/files/patch-psof.c26
-rw-r--r--print/lprps/files/patch-psrev.c31
-rw-r--r--print/lprps/files/patch-textps.c54
7 files changed, 304 insertions, 0 deletions
diff --git a/print/lprps/files/patch-Makefile b/print/lprps/files/patch-Makefile
new file mode 100644
index 000000000000..1b474346f1b2
--- /dev/null
+++ b/print/lprps/files/patch-Makefile
@@ -0,0 +1,59 @@
+--- Makefile.orig 1993-02-22 21:45:50.000000000 +0900
++++ Makefile 2013-04-27 22:53:50.000000000 +0900
+@@ -3,21 +3,21 @@
+ # Define IIg to enable a workaround for a bug in the serial
+ # driver of the Laserwriter IIf and IIg; this requires the POSIX
+ # tcdrain() function. (I haven't tested this personally.)
+-DEFINES=-DA4 #-DIIg
+-PREFIX=/usr/local
++DEFINES=
+ # Where to install public executables.
+ BINDIR=$(PREFIX)/bin
+ # Where to install private executables.
+-LIBDIR=$(PREFIX)/lib
++LIBDIR=$(PREFIX)/libexec
+ # Define REV_COMMAND to be empty if documents don't need to
+ # be printed in reverse order.
+-REV_COMMAND=$(BINDIR)/psrev |
++#REV_COMMAND=$(BINDIR)/psrev |
++REV_COMMAND=
+ # Where to install the filter for text files.
+ TEXT_FILTER=$(LIBDIR)/psif-text
+ # Where to install the filter for PostScript files.
+ PS_FILTER=$(LIBDIR)/psif-ps
+ # Where to install PostScript banner printing code
+-BANNER=$(LIBDIR)/banner.ps
++BANNER=$(PREFIX)/share/misc/banner.ps
+ # Filter to convert text to PostScript. You can use your own instead.
+ # It must be able to read from standard input.
+ TEXT_TO_PS=$(BINDIR)/textps
+@@ -29,15 +29,15 @@
+ MAN8EXT=8
+ MAN8DIR=$(MANROOT)/man$(MAN8EXT)
+
+-CC=cc
+-CFLAGS=-O $(DEFINES)
++CC?=cc
++CFLAGS+=-I${LOCALBASE}/include $(DEFINES)
+ #CFLAGS=-g -Bstatic $(DEFINES)
+ # Command for installing programs.
+-INSTALL_PROGRAM=install
++INSTALL_PROGRAM=${BSD_INSTALL_PROGRAM}
+ # Command for installing man pages.
+-INSTALL_DATA=install -m 0444
++INSTALL_DATA=${BSD_INSTALL_DATA}
+
+-SHELL=/bin/sh
++SHELL=${SH}
+ # Uncomment the next line for Ultrix.
+ #SHELL=/bin/sh5
+
+@@ -89,7 +89,7 @@
+ -DPS_FILTER=\"$(PS_FILTER)\" -o $@ psif.c
+
+ textps: textps.c
+- $(CC) $(CFLAGS) -o $@ textps.c
++ $(CC) $(CFLAGS) -o $@ textps.c -lpaper -L${LOCALBASE}/lib
+
+ psrev: psrev.c
+ $(CC) $(CFLAGS) -o $@ psrev.c
diff --git a/print/lprps/files/patch-ae b/print/lprps/files/patch-ae
new file mode 100644
index 000000000000..919ad1f5ced3
--- /dev/null
+++ b/print/lprps/files/patch-ae
@@ -0,0 +1,64 @@
+--- INSTALL.orig Mon Feb 22 04:46:07 1993
++++ INSTALL Sat May 24 21:46:37 1997
+@@ -8,23 +8,23 @@
+ You need to add an entry in /etc/printcap. Here's the entry I use:
+
+ lp|ps:\
+- :br#38400:lp=/dev/ttya:mx#0:sf:sh:rw:sb:\
++ :br#38400:lp=/dev/ttyd0:mx#0:sf:sh:rw:sb:\
+ :fc#0177777:fs#003:ms=-isig,igncr,cstopb,-echok:\
+- :af=/usr/adm/psacct:lf=/usr/adm/pslog:sd=/usr/spool/pslpd:\
+- :if=/usr/local/lib/psif:
++ :af=/var/log/psacct:lf=/var/log/pslog:sd=/var/spool/output/pslpd:\
++ :if=/usr/local/libexec/psif:
+
+-This entry would be appropriate if you were using /dev/ttya and a baud
++This entry would be appropriate if you were using /dev/ttyd0 and a baud
+ rate of 38400. Note that the `sf', `rw' and `sb' capabilities are
+-essential. You need to create the spool directory (/usr/spool/pslpd),
+-the accounting file (/usr/adm/psacct), and the log file
+-(/usr/adm/pslog). The spool directory and the accounting file should
++essential. You need to create the spool directory (/var/spool/output/pslpd),
++the accounting file (/var/log/psacct), and the log file
++(/var/log/pslog). The spool directory and the accounting file should
+ be owned by daemon, the log file by root. You can use other names if
+ you want. The `ms' capabability is a Sun extension. If you decide to
+ make use of the patches in lpr.diff, you should also add the `ex'
+ boolean capability (the patches also add the `ms' capability.)
+
+ If you wish to have banner printing, then you should add
+-`of=/usr/local/lib/psof', and remove the `sh' capability. You will
++`of=/usr/local/libexec/psof', and remove the `sh' capability. You will
+ probably also wnat to modify the banner printing code in banner.ps.
+ As distributed, it provides a fairly minimalist banner page. Note
+ that psof requires the `sb' capability. If your printer stacks face
+@@ -35,12 +35,12 @@
+ You can add easily add other filters. For example, suppose you want to
+ add a filter for dvi files. Then add an entry to /etc/printcap:
+
+- :df=/usr/local/lib/psdf:
++ :df=/usr/local/libexec/psdf:
+
+-Then create a shell script /usr/local/lib/psdf
++Then create a shell script /usr/local/libexec/psdf
+
+ #!/bin/sh
+-/usr/local/bin/dvitops | /usr/local/lib/lprps "$@"
++/usr/local/bin/dvitops | /usr/local/libexec/lprps "$@"
+
+ Replace `/usr/local/bin/dvitops' by the name of your favourite dvi to
+ ps program (it must be able to read from the standard input). Then you
+@@ -49,11 +49,11 @@
+ You must also set the printer's communication parameters. Make sure
+ you have an entry like this in /etc/remote:
+
+- ttya:dv=/dev/ttya:br#1200:el=^D:
++ ttyd0:dv=/dev/ttyd0:br#1200:el=^D:
+
+ Set the switch on your printer to position labelled 1200 or 0. Then
+
+- tip ttya
++ tip ttyd0
+
+ (*)Now carefully type
+
diff --git a/print/lprps/files/patch-lprps.c b/print/lprps/files/patch-lprps.c
new file mode 100644
index 000000000000..08f4e761355f
--- /dev/null
+++ b/print/lprps/files/patch-lprps.c
@@ -0,0 +1,60 @@
+--- lprps.c.orig 1993-02-22 21:46:10.000000000 +0900
++++ lprps.c 2013-04-27 23:00:32.000000000 +0900
+@@ -5,7 +5,9 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
++#include <string.h>
+ #include <strings.h>
+ #include <sys/types.h>
+ #include <sys/ioctl.h>
+@@ -15,8 +17,13 @@
+ #include <sys/time.h>
+ #include <signal.h>
+ #include <syslog.h>
++#include <unistd.h>
+ #include <errno.h>
+
++#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
++#include <sys/param.h>
++#endif
++
+ #ifndef errno
+ extern int errno;
+ #endif
+@@ -27,7 +34,13 @@
+ #define VOLATILE /* as nothing */
+ #endif
+
+-#define SENDMAIL "/usr/lib/sendmail"
++#ifndef SENDMAIL
++# if (defined(BSD) && (BSD >= 199103))
++# define SENDMAIL "/usr/sbin/sendmail"
++# else
++# define SENDMAIL "/usr/lib/sendmail"
++# endif
++#endif
+
+ #define EXIT_SUCCESS 0
+ #define EXIT_REPRINT 1
+@@ -43,8 +56,6 @@
+ char ctrl_d = '\004';
+ char ctrl_t = '\024';
+
+-char *malloc();
+-
+ /* user's login name */
+ char *login = 0;
+ /* user's host */
+@@ -346,7 +357,9 @@
+ char *strsignal(n)
+ int n;
+ {
++# if !(defined(BSD) && (BSD >= 199103))
+ extern char *sys_siglist[];
++# endif
+ static char buf[32];
+ if (n >= 0 && n < NSIG)
+ return sys_siglist[n];
diff --git a/print/lprps/files/patch-psif.c b/print/lprps/files/patch-psif.c
new file mode 100644
index 000000000000..374330a22587
--- /dev/null
+++ b/print/lprps/files/patch-psif.c
@@ -0,0 +1,10 @@
+--- psif.c.orig 2013-04-27 22:58:26.000000000 +0900
++++ psif.c 2013-04-27 22:58:42.000000000 +0900
+@@ -5,6 +5,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
diff --git a/print/lprps/files/patch-psof.c b/print/lprps/files/patch-psof.c
new file mode 100644
index 000000000000..54197b8d20cd
--- /dev/null
+++ b/print/lprps/files/patch-psof.c
@@ -0,0 +1,26 @@
+--- psof.c.orig 1993-02-22 21:46:11.000000000 +0900
++++ psof.c 2013-04-27 23:05:56.000000000 +0900
+@@ -11,11 +11,14 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
+ #include <strings.h>
+ #include <signal.h>
+ #include <syslog.h>
+ #include <errno.h>
+ #include <ctype.h>
++#include <unistd.h>
+
+ #ifndef errno
+ extern int errno;
+@@ -216,7 +219,7 @@
+ if ((status & 0xff) != 0) {
+ int sig = status & 0x7f;
+ if (sig < NSIG) {
+- extern char *sys_siglist[];
++ /* extern char *sys_siglist[]; */
+ syslog(LOG_ERR, "%s: %s%s", LPRPS, sys_siglist[sig],
+ (status & 0x80) ? " (core dumped)" : "");
+ }
diff --git a/print/lprps/files/patch-psrev.c b/print/lprps/files/patch-psrev.c
new file mode 100644
index 000000000000..2c59b7001dfb
--- /dev/null
+++ b/print/lprps/files/patch-psrev.c
@@ -0,0 +1,31 @@
+--- psrev.c.orig 1993-02-22 21:46:09.000000000 +0900
++++ psrev.c 2013-04-27 22:56:35.000000000 +0900
+@@ -5,6 +5,7 @@
+ #endif
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -14,9 +15,6 @@
+ extern int errno;
+ #endif
+
+-char *malloc();
+-char *realloc();
+-
+ char *xmalloc();
+ char *xrealloc();
+ char *prog;
+@@ -24,8 +22,8 @@
+ void sys_error(message, arg)
+ char *message, *arg;
+ {
+- extern char *sys_errlist[];
+- extern int sys_nerr;
++ /* extern char *sys_errlist[]; */
++ /* extern int sys_nerr; */
+ int en;
+
+ en = errno;
diff --git a/print/lprps/files/patch-textps.c b/print/lprps/files/patch-textps.c
new file mode 100644
index 000000000000..3e8cfe11dfc3
--- /dev/null
+++ b/print/lprps/files/patch-textps.c
@@ -0,0 +1,54 @@
+--- textps.c.orig 1993-02-22 21:46:10.000000000 +0900
++++ textps.c 2013-04-27 23:04:41.000000000 +0900
+@@ -41,10 +41,12 @@
+ #endif /* not BOLD_FONT */
+
+ #include <stdio.h>
++#include <stdlib.h>
+ #include <ctype.h>
+ #include <string.h>
+
+-extern char *malloc();
++#include <paper.h>
++
+ extern char *optarg;
+ extern int optind;
+
+@@ -86,10 +88,24 @@
+ exit(1);
+ }
+
++const struct paper *findpaper(char *name)
++{
++ const struct paper *pp;
++
++ paperinit();
++ for (pp = paperfirst(); pp; pp = papernext(pp)) {
++ if (strcmp(name, papername(pp)) == 0)
++ return (pp);
++ }
++ return (NULL);
++}
++
+ main(argc, argv)
+ int argc;
+ char **argv;
+ {
++ const struct paper *pp;
++ char *name;
+ int bad_files = 0;
+ double cpi = 12.0; /* characters per inch */
+ int opt;
+@@ -124,6 +140,12 @@
+ abort();
+ }
+
++ name = (char *)systempapername();
++ if (name == NULL)
++ name = (char *)defaultpapername();
++ if ((pp = findpaper(name)) != NULL)
++ page_length = paperpsheight(pp);
++
+ char_width = 72.0/cpi;
+ prologue();
+ if (optind >= argc)