lp: handle HTML files with html2ms | troff in process/generic
This commit is contained in:
parent
2fd758bf2a
commit
f6dd4bb5ee
1 changed files with 4 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
# Tries to determine what type of file you are printing and do the correct
|
# Tries to determine what type of file you are printing and do the correct
|
||||||
# thing with it.
|
# thing with it.
|
||||||
# It currently knows about images, troff intermediate, and ascii files.
|
# It currently knows about images, troff intermediate, HTML and ascii files.
|
||||||
rfork e
|
rfork e
|
||||||
temp=/tmp/lp$pid
|
temp=/tmp/lp$pid
|
||||||
fn sigexit { rm -f $temp }
|
fn sigexit { rm -f $temp }
|
||||||
|
@ -194,7 +194,7 @@ case empty
|
||||||
case cannot
|
case cannot
|
||||||
echo cannot open file >[1=2]
|
echo cannot open file >[1=2]
|
||||||
case English short extended alef limbo [Aa]scii assembler c latin rc sh \
|
case English short extended alef limbo [Aa]scii assembler c latin rc sh \
|
||||||
as mail email message/rfc822 manual HTML
|
as mail email message/rfc822 manual
|
||||||
switch ($LPCLASS) {
|
switch ($LPCLASS) {
|
||||||
case *post*
|
case *post*
|
||||||
$proc/ppost <$temp
|
$proc/ppost <$temp
|
||||||
|
@ -207,6 +207,8 @@ case English short extended alef limbo [Aa]scii assembler c latin rc sh \
|
||||||
case *
|
case *
|
||||||
echo Unrecognized class of line printer for $LPDEST >[1=2]
|
echo Unrecognized class of line printer for $LPDEST >[1=2]
|
||||||
}
|
}
|
||||||
|
case HTML
|
||||||
|
uhtml <$temp | html2ms | troff -ms | $proc/generic
|
||||||
case *
|
case *
|
||||||
echo $type(2) file is improper for $LPDEST >[1=2]
|
echo $type(2) file is improper for $LPDEST >[1=2]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue