aboutsummaryrefslogtreecommitdiff
path: root/share/examples/printing
diff options
context:
space:
mode:
Diffstat (limited to 'share/examples/printing')
-rw-r--r--share/examples/printing/diablo-if-net7
-rw-r--r--share/examples/printing/hpdf59
-rw-r--r--share/examples/printing/hpif11
-rw-r--r--share/examples/printing/hpof8
-rw-r--r--share/examples/printing/hprf8
-rw-r--r--share/examples/printing/hpvf10
-rw-r--r--share/examples/printing/if-simple9
-rw-r--r--share/examples/printing/if-simpleX10
-rw-r--r--share/examples/printing/ifhp32
-rw-r--r--share/examples/printing/make-ps-header79
-rw-r--r--share/examples/printing/netprint24
-rw-r--r--share/examples/printing/psdf8
-rw-r--r--share/examples/printing/psdfX31
-rw-r--r--share/examples/printing/psif23
-rw-r--r--share/examples/printing/pstf6
-rw-r--r--share/examples/printing/pstfX6
16 files changed, 0 insertions, 331 deletions
diff --git a/share/examples/printing/diablo-if-net b/share/examples/printing/diablo-if-net
deleted file mode 100644
index b2ba028f2343..000000000000
--- a/share/examples/printing/diablo-if-net
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-#
-# diablo-if-net - Text filter for Diablo printer `scrivener' listening
-# on port 5100. Installed in /usr/local/libexec/diablo-if-net
-#
-
-exec /usr/libexec/lpr/lpf "$@" | /usr/local/libexec/netprint scrivener 5100
diff --git a/share/examples/printing/hpdf b/share/examples/printing/hpdf
deleted file mode 100644
index d03c3ac70dfd..000000000000
--- a/share/examples/printing/hpdf
+++ /dev/null
@@ -1,59 +0,0 @@
-#!/bin/sh
-#
-# hpdf - Print DVI data on HP/PCL printer
-# Installed in /usr/local/libexec/hpdf
-
-PATH=/usr/local/bin:$PATH; export PATH
-
-#
-# Define a function to clean up our temporary files. These exist
-# in the current directory, which will be the spooling directory
-# for the printer.
-#
-cleanup() {
- rm -f hpdf$$.dvi
-}
-
-#
-# Define a function to handle fatal errors: print the given message
-# and exit 2. Exiting with 2 tells LPD to do not try to reprint the
-# job.
-#
-fatal() {
- echo "$@" 1>&2
- cleanup
- exit 2
-}
-
-#
-# If user removes the job, LPD will send SIGINT, so trap SIGINT
-# (and a few other signals) to clean up after ourselves.
-#
-trap cleanup 1 2 15
-
-#
-# Make sure we are not colliding with any existing files.
-#
-cleanup
-
-#
-# Link the DVI input file to standard input (the file to print).
-#
-ln -s /dev/fd/0 hpdf$$.dvi || fatal "Cannot symlink /dev/fd/0"
-
-#
-# Make LF = CR+LF
-#
-printf "\033&k2G" || fatal "Cannot initialize printer"
-
-#
-# Convert and print. Return value from dvilj2p does not seem to be
-# reliable, so we ignore it.
-#
-dvilj2p -M1 -q -e- dfhp$$.dvi
-
-#
-# Clean up and exit
-#
-cleanup
-exit 0
diff --git a/share/examples/printing/hpif b/share/examples/printing/hpif
deleted file mode 100644
index 69f1f34c55fd..000000000000
--- a/share/examples/printing/hpif
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-#
-# hpif - Simple text input filter for lpd for HP-PCL based printers
-# Installed in /usr/local/libexec/hpif
-#
-# Simply copies stdin to stdout. Ignores all filter arguments.
-# Tells printer to treat LF as CR+LF. Writes a form feed character
-# after printing job.
-
-printf "\033&k2G" && cat && printf "\f" && exit 0
-exit 2
diff --git a/share/examples/printing/hpof b/share/examples/printing/hpof
deleted file mode 100644
index 691b07f95d16..000000000000
--- a/share/examples/printing/hpof
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# hpof - Output filter for Hewlett Packard PCL-compatible printers
-# Installed in /usr/local/libexec/hpof
-
-
-printf "\033&k2G" || exit 2
-exec /usr/libexec/lpr/lpf
diff --git a/share/examples/printing/hprf b/share/examples/printing/hprf
deleted file mode 100644
index 37ad583fd9e1..000000000000
--- a/share/examples/printing/hprf
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-#
-# hprf - FORTRAN text filter for LaserJet 3si:
-# Installed in /usr/local/libexec/hprf
-#
-
-printf "\033&k2G" && fpr && printf "\f" && exit 0
-exit 2
diff --git a/share/examples/printing/hpvf b/share/examples/printing/hpvf
deleted file mode 100644
index 233de809745b..000000000000
--- a/share/examples/printing/hpvf
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# hpvf - Convert GIF files into HP/PCL, then print
-# Installed in /usr/local/libexec/hpvf
-
-PATH=/usr/X11R6/bin:$PATH; export PATH
-
-giftopnm | ppmtopgm | pgmtopbm | pbmtolj -resolution 300 \
- && exit 0 \
- || exit 2
diff --git a/share/examples/printing/if-simple b/share/examples/printing/if-simple
deleted file mode 100644
index 7a5bf97ab38f..000000000000
--- a/share/examples/printing/if-simple
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-#
-# if-simple - Simple text input filter for lpd
-# Installed in /usr/local/libexec/if-simple
-#
-# Simply copies stdin to stdout. Ignores all filter arguments.
-
-/bin/cat && exit 0
-exit 2
diff --git a/share/examples/printing/if-simpleX b/share/examples/printing/if-simpleX
deleted file mode 100644
index c14b4a25d12b..000000000000
--- a/share/examples/printing/if-simpleX
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-#
-# if-simple - Simple text input filter for lpd
-# Installed in /usr/local/libexec/if-simple
-#
-# Simply copies stdin to stdout. Ignores all filter arguments.
-# Writes a form feed character (\f) after printing job.
-
-/bin/cat && printf "\f" && exit 0
-exit 2
diff --git a/share/examples/printing/ifhp b/share/examples/printing/ifhp
deleted file mode 100644
index 21e6643473e3..000000000000
--- a/share/examples/printing/ifhp
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# ifhp - Print Ghostscript-simulated PostScript on a DesJet 500
-# Installed in /usr/local/libexec/hpif
-
-#
-# Treat LF as CR+LF:
-#
-printf "\033&k2G" || exit 2
-
-#
-# Read first two characters of the file
-#
-read first_line
-first_two_chars=`expr "$first_line" : '\(..\)'`
-
-if [ "$first_two_chars" = "%!" ]; then
- #
- # It is PostScript; use Ghostscript to scan-convert and print it
- #
- /usr/local/bin/gs -dSAFER -dNOPAUSE -q -sDEVICE=djet500 -sOutputFile=- - \
- && exit 0
-
-else
- #
- # Plain text or HP/PCL, so just print it directly; print a form
- # at the end to eject the last page.
- #
- echo $first_line && cat && printf "\f" && exit 2
-fi
-
-exit 2
diff --git a/share/examples/printing/make-ps-header b/share/examples/printing/make-ps-header
deleted file mode 100644
index 19e38ab7c779..000000000000
--- a/share/examples/printing/make-ps-header
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-# make-ps-header - make a PostScript header page on stdout
-# Installed in /usr/local/libexec/make-ps-header
-#
-
-#
-# These are PostScript units (72 to the inch). Modify for A4 or
-# whatever size paper you are using:
-#
-page_width=612
-page_height=792
-border=72
-
-#
-# Check arguments
-#
-if [ $# -ne 3 ]; then
- echo "Usage: `basename $0` <user> <host> <job>" 1>&2
- exit 1
-fi
-
-#
-# Save these, mostly for readability in the PostScript, below.
-#
-user=$1
-host=$2
-job=$3
-date=`date`
-
-#
-# Send the PostScript code to stdout.
-#
-exec cat <<EOF
-%!PS
-
-%
-% Make sure we do not interfere with user's job that will follow
-%
-save
-
-%
-% Make a thick, unpleasant border around the edge of the paper.
-%
-$border $border moveto
-$page_width $border 2 mul sub 0 rlineto
-0 $page_height $border 2 mul sub rlineto
-currentscreen 3 -1 roll pop 100 3 1 roll setscreen
-$border 2 mul $page_width sub 0 rlineto closepath
-0.8 setgray 10 setlinewidth stroke 0 setgray
-
-%
-% Display user's login name, nice and large and prominent
-%
-/Helvetica-Bold findfont 64 scalefont setfont
-$page_width ($user) stringwidth pop sub 2 div $page_height 200 sub moveto
-($user) show
-
-%
-% Now show the boring particulars
-%
-/Helvetica findfont 14 scalefont setfont
-/y 200 def
-[ (Job:) (Host:) (Date:) ] {
- 200 y moveto show /y y 18 sub def
-} forall
-
-/Helvetica-Bold findfont 14 scalefont setfont
-/y 200 def
-[ ($job) ($host) ($date) ] {
- 270 y moveto show /y y 18 sub def
-} forall
-
-%
-% That is it
-%
-restore
-showpage
-EOF
diff --git a/share/examples/printing/netprint b/share/examples/printing/netprint
deleted file mode 100644
index 9b5010cc8cc5..000000000000
--- a/share/examples/printing/netprint
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/usr/bin/perl
-#
-# netprint - Text filter for printer attached to network
-# Installed in /usr/local/libexec/netprint
-#
-
-$#ARGV eq 1 || die "Usage: $0 <printer-hostname> <port-number>";
-
-$printer_host = $ARGV[0];
-$printer_port = $ARGV[1];
-
-require 'sys/socket.ph';
-
-($ignore, $ignore, $protocol) = getprotobyname('tcp');
-($ignore, $ignore, $ignore, $ignore, $address)
- = gethostbyname($printer_host);
-
-$sockaddr = pack('S n a4 x8', &AF_INET, $printer_port, $address);
-
-socket(PRINTER, &PF_INET, &SOCK_STREAM, $protocol)
- || die "Can't create TCP/IP stream socket: $!";
-connect(PRINTER, $sockaddr) || die "Can't contact $printer_host: $!";
-while (<STDIN>) { print PRINTER; }
-exit 0;
diff --git a/share/examples/printing/psdf b/share/examples/printing/psdf
deleted file mode 100644
index e0d429b953c2..000000000000
--- a/share/examples/printing/psdf
+++ /dev/null
@@ -1,8 +0,0 @@
-#!bin/sh
-#
-# psdf - DVI to PostScript printer filter
-# Installed in /usr/local/libexec/psdf
-#
-# Invoked by lpd when user runs lpr -d
-#
-exec /usr/local/bin/dvips -f | /usr/local/libexec/lprps "$@"
diff --git a/share/examples/printing/psdfX b/share/examples/printing/psdfX
deleted file mode 100644
index 43bdc4100bdb..000000000000
--- a/share/examples/printing/psdfX
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-#
-# psdf - DVI to PostScript printer filter
-# Installed in /usr/local/libexec/psdf
-#
-# Invoked by lpd when user runs lpr -d
-#
-
-orig_args="$@"
-
-fail() {
- echo "$@" 1>&2
- exit 2
-}
-
-while getopts "x:y:n:h:" option; do
- case $option in
- x|y) ;; # Ignore
- n) login=$OPTARG ;;
- h) host=$OPTARG ;;
- *) echo "LPD started `basename $0` wrong." 1>&2
- exit 2
- ;;
- esac
-done
-
-[ "$login" ] || fail "No login name"
-[ "$host" ] || fail "No host name"
-
-( /u/kelly/freebsd/printing/filters/make-ps-header $login $host "DVI File"
- /usr/local/bin/dvips -f ) | eval /usr/local/libexec/lprps $orig_args
diff --git a/share/examples/printing/psif b/share/examples/printing/psif
deleted file mode 100644
index 2a657e01aae7..000000000000
--- a/share/examples/printing/psif
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-#
-# psif - Print PostScript or plain text on a PostScript printer
-# Script version; NOT the version that comes with lprps
-# Installed in /usr/local/libexec/psif
-#
-
-read first_line
-first_two_chars=`expr "$first_line" : '\(..\)'`
-
-if [ "$first_two_chars" = "%!" ]; then
- #
- # PostScript job, print it.
- #
- echo $first_line && cat && printf "\004" && exit 0
- exit 2
-else
- #
- # Plain text, convert it, then print it.
- #
- ( echo $first_line; cat ) | /usr/local/bin/textps && printf "\004" && exit 0
- exit 2
-fi
diff --git a/share/examples/printing/pstf b/share/examples/printing/pstf
deleted file mode 100644
index 308adc19e2ab..000000000000
--- a/share/examples/printing/pstf
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# pstf - Convert groff's troff data into PS, then print.
-# Installed in /usr/local/libexec/pstf
-#
-exec grops | /usr/local/libexec/lprps "$@"
diff --git a/share/examples/printing/pstfX b/share/examples/printing/pstfX
deleted file mode 100644
index 1af7134223c2..000000000000
--- a/share/examples/printing/pstfX
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/bin/sh
-#
-# pstf - Convert groff's troff data into PS, then print.
-# Installed in /usr/local/libexec/pstf
-#
-exec grops