-
Notifications
You must be signed in to change notification settings - Fork 0
/
mzprintw
executable file
·31 lines (28 loc) · 1.07 KB
/
mzprintw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! ./bin/sh
# Print script for mz800em.
# Copyright 1998,1999 Matthias K"oppe
#
# We are processing EPSON-style escape codes using `sed'.
# We use BEL (\a) as enscript special escape.
#
#
# You must have Ghostscript installed.
# Change the following path to point to the `gswin32c' executable,
# if necessary.
#
GHOSTSCRIPT=/gstools/gs5.50/gswin32c
#
# No user serviceable parts beyond this point.
#
export ENSCRIPT_LIBRARY=./share/enscript
export PATH=bin:.:$PATH
xyzzy=$RANDOM
while [ -f /tmp/t$xyzzy.esc ]; do
xyzzy=$RANDOM
done
echo mzprintw: Writing to /tmp/t$xyzzy...
bin/tee /tmp/t$xyzzy.esc | bin/sed $'s/\e[0-2].//g;s/\e[-ltxmk].//g;s/\eS.2\eT/\375/g;s/\eS.\([3-9]\)\eT/^\\1/g;s/\eE/\afont{Courier-Bold@10}/g;s/\eF/\afont{Courier@10}/g;s/\eg/\afont{Courier@7}/g;s/\eh/\afont{Courier@10}/g;' | bin/enscript --no-header --escapes=7 --no-job-header --encoding=ibmpc --non-printable-format=space --margins=72:72:72:72 --output=/tmp/t$xyzzy.ps || true
$GHOSTSCRIPT -q -dNOPAUSE -sDEVICE=mswinpr2 -sOutputFile='\\spool\Standarddrucker' /tmp/t$xyzzy.ps || true
#
# mzprintw ends here
#