Add manpages,
fix quoting to avoid breaking script, fix vgrindefs parsing, remove need for preprocessor in jenscript.
This commit is contained in:
parent
4f0a61cfc9
commit
fa6246db34
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2000/04/22 23:42:40 espie Exp $
|
||||
# $OpenBSD: Makefile,v 1.2 2000/04/23 15:43:17 espie Exp $
|
||||
|
||||
CATEGORIES=japanese print
|
||||
|
||||
@ -50,5 +50,7 @@ do-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR}/kanjips.readme
|
||||
${INSTALL_DATA} ${WRKDIST}/jenscript/README ${DOCDIR}/jenscript.readme
|
||||
${INSTALL_SCRIPT} ${WRKDIST}/mp/README ${DOCDIR}/mp-j.readme
|
||||
${INSTALL_MAN} ${FILESDIR}/jenscript.1 ${PREFIX}/man/man1
|
||||
${INSTALL_MAN} ${FILESDIR}/kanjips.1 ${PREFIX}/man/man1
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1 +1 @@
|
||||
s,\$(\(.*?\)),=$1,g;
|
||||
s,\$(\(.*?\)),===$1,g;
|
||||
|
133
japanese/kanjips/files/jenscript.1
Normal file
133
japanese/kanjips/files/jenscript.1
Normal file
@ -0,0 +1,133 @@
|
||||
.\" $OpenBSD: jenscript.1,v 1.1 2000/04/23 15:43:17 espie Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 Marc Espie
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
|
||||
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd April 23, 2000
|
||||
.Dt JENSCRIPT 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm jenscript
|
||||
.Nd convert japanese text to PostScript
|
||||
.Sh SYNOPSIS
|
||||
.Nm jenscript
|
||||
.Op Fl EGMdknsx
|
||||
.Op Ar -columns
|
||||
.Op Fl F Ar afont
|
||||
.Op Fl L Ar lines
|
||||
.Op Fl P Ar printpage
|
||||
.Op Fl S Ar fontsize
|
||||
.Op Fl b Ar header
|
||||
.Op Fl f Ar kfont
|
||||
.Op Fl l Ar language
|
||||
.Ar files ...
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
prints
|
||||
.Ar files
|
||||
as a PostScript file. The result will hold japanese font names,
|
||||
and may need post-processing through
|
||||
.Xr kanjips 1
|
||||
to be printed.
|
||||
.Pp
|
||||
The options are as follows:
|
||||
.Bl -tag -width indent
|
||||
.It Fl E
|
||||
Assume EUC encoding for the input files,
|
||||
instead of the default JIS/SJIS encodings.
|
||||
Note that
|
||||
.Nm
|
||||
does not handle automatic encoding recognition. You should use
|
||||
a tool such as
|
||||
.Xr nkf 1
|
||||
for that.
|
||||
.It Fl G
|
||||
Display a banner on top of each page.
|
||||
.It Fl M
|
||||
Set manual feed.
|
||||
.It Fl d
|
||||
Debug mode.
|
||||
.It Fl k
|
||||
Encode character data as octal, for transmission on 7-bit lines.
|
||||
.It Fl n
|
||||
Suppress PS-Adobe-2.0 in header.
|
||||
.It Fl s
|
||||
Use A4 paper size instead of the default US letter size.
|
||||
.It Fl x
|
||||
Use fixed width fonts for roman characters.
|
||||
This replaces Times-Roman, Times-Bold, and Times-Italic with Courier,
|
||||
Courier-Bold and Courier-Oblique.
|
||||
.It Ar -columns
|
||||
Output
|
||||
.Ar columns
|
||||
columns on each page. By default,
|
||||
.Nm
|
||||
outputs one single column.
|
||||
.It Fl F Ar afont
|
||||
Use the single PostScript font
|
||||
.Ar afont
|
||||
instead of the default roman fonts.
|
||||
.It Fl L Ar lines
|
||||
Output
|
||||
.Ar lines
|
||||
lines in each column. By default, the number of lines is computed
|
||||
from the font size.
|
||||
.It Fl P Ar printpage
|
||||
Start printing from page
|
||||
.Ar printpage .
|
||||
.It Fl S Ar fontsize
|
||||
Use
|
||||
.Ar fontsize
|
||||
as the roman character font size. By default, 6 points.
|
||||
.It Fl b Ar header
|
||||
Print
|
||||
.Ar header
|
||||
in the header line instead of the current file name.
|
||||
This only makes sense if
|
||||
.Fl g
|
||||
is also used.
|
||||
.It Fl f Ar kfont
|
||||
Use
|
||||
.Ar kfont
|
||||
as a japanese kanji font.
|
||||
.It Fl l Ar language
|
||||
Format text according to
|
||||
.Xr vgrind 1
|
||||
specs for
|
||||
.Ar language
|
||||
.El
|
||||
.Pp
|
||||
The choice of japanese font and japanese font sizes are normally
|
||||
automatic from the roman font size. Sizes of 6 points, 8 points and 12
|
||||
points correspond to the jis24, jis32 and jis48 fonts, respectively.
|
||||
Since those are bitmap fonts, using other sizes will only affect the
|
||||
roman characters sizes.
|
||||
.Sh FILES
|
||||
.Bl -tag -compact -width /usr/local/share/kanjips_fonts
|
||||
.It Pa /usr/local/share/kanjips_fonts
|
||||
Where the jis24, jis32, jis48 fonts are used.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr kanjips 1 ,
|
||||
.Xr nkf 1 ,
|
||||
.Xr vgrind 1
|
66
japanese/kanjips/files/kanjips.1
Normal file
66
japanese/kanjips/files/kanjips.1
Normal file
@ -0,0 +1,66 @@
|
||||
.\" $OpenBSD: kanjips.1,v 1.1 2000/04/23 15:43:17 espie Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 2000 Marc Espie
|
||||
.\"
|
||||
.\" Redistribution and use in source and binary forms, with or without
|
||||
.\" modification, are permitted provided that the following conditions
|
||||
.\" are met:
|
||||
.\" 1. Redistributions of source code must retain the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer.
|
||||
.\" 2. Redistributions in binary form must reproduce the above copyright
|
||||
.\" notice, this list of conditions and the following disclaimer in the
|
||||
.\" documentation and/or other materials provided with the distribution.
|
||||
.\"
|
||||
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
|
||||
.\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
|
||||
.\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
.\" SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd April 23, 2000
|
||||
.Dt KANJIPS 1
|
||||
.Os
|
||||
.Sh NAME
|
||||
.Nm kanjips
|
||||
.Nd "scan convert japanese fonts to bitmap fonts in a PostScript document"
|
||||
.Sh SYNOPSIS
|
||||
.Nm kanjips
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
is a filter that reads PostScript files with Japanese fonts, and converts
|
||||
the fonts to a bitmap representation that is suitable for printing on
|
||||
a simple PostScript printer.
|
||||
.Pp
|
||||
Even if Japanese PostScript fonts are available, it may be unadvisable
|
||||
to download megabytes of data just to print a single page in draft mode.
|
||||
.Sh FILES
|
||||
.Bl -tag -compact -width /usr/local/share/kanjips_fonts
|
||||
.It Pa /usr/local/share/kanjips_fonts
|
||||
Path to the bitmap fonts jis24, jis32, jis48.
|
||||
.El
|
||||
.Sh LIMITATIONS
|
||||
.Nm
|
||||
is only configured to use bitmap fonts. It would also be able to use
|
||||
bdf X11 fonts or metafont pk fonts, but not, for instance, pcf fonts,
|
||||
which is what X11 currently uses.
|
||||
.Pp
|
||||
.Nm
|
||||
is fairly simplistic in its recognition of japanese strings. The only
|
||||
program outputting PostScript that
|
||||
.Nm
|
||||
can process is probably
|
||||
.Xr jenscript 1 .
|
||||
.Pp
|
||||
.Nm
|
||||
uses a simple strategy and encodes bitmap fonts on a page basis.
|
||||
Hence, it does not cache data from printed page to printed page.
|
||||
Hence, it does only work with structured PostScript documents that
|
||||
use proper page boundaries.
|
||||
.Sh SEE ALSO
|
||||
.Xr jenscript 1
|
@ -1 +1 @@
|
||||
s,\=(\(.*?\)),\$$1,g;
|
||||
s,\=\=\=(\(.*?\)),\$$1,g;
|
||||
|
@ -1,7 +1,23 @@
|
||||
$OpenBSD: patch-jenscript_jenscript_SH,v 1.1.1.1 2000/04/22 23:42:40 espie Exp $
|
||||
--- jenscript/jenscript.SH.orig Sun Apr 23 01:04:52 2000
|
||||
+++ jenscript/jenscript.SH Sun Apr 23 01:12:23 2000
|
||||
@@ -88,15 +88,15 @@ $xflag ? ("Courier", "Courier-Bold", "Co
|
||||
$OpenBSD: patch-jenscript_jenscript_SH,v 1.2 2000/04/23 15:43:17 espie Exp $
|
||||
--- jenscript/jenscript.SH.orig Tue Jan 16 18:20:31 1990
|
||||
+++ jenscript/jenscript.SH Sun Apr 23 17:33:16 2000
|
||||
@@ -20,14 +20,12 @@ echo "Extracting jenscript (with variabl
|
||||
: Protect any dollar signs and backticks that you do not want interpreted
|
||||
: by putting a backslash in front. You may delete these comments.
|
||||
$spitshell >jenscript <<!GROK!THIS!
|
||||
-#!$perlloc -P
|
||||
+#!$perlloc
|
||||
#
|
||||
# Convert Text Files into PostScript Format
|
||||
#
|
||||
# 1989 3/28 MASUI Toshiyuki
|
||||
#
|
||||
-eval "exec $perlloc -P -S \$0 \$*"
|
||||
- if \$Shell_cannot_understand;
|
||||
!GROK!THIS!
|
||||
|
||||
: In the following dollars and backticks do not need the extra backslash.
|
||||
@@ -88,26 +86,27 @@ $xflag ? ("Courier", "Courier-Bold", "Co
|
||||
("Times-Roman", "Times-Bold", "Times-Italic", "Times-Roman", "Times-Roman");
|
||||
|
||||
($height, $width, $offsetx, $offsety) =
|
||||
@ -21,12 +37,30 @@ $OpenBSD: patch-jenscript_jenscript_SH,v 1.1.1.1 2000/04/22 23:42:40 espie Exp $
|
||||
$_ = $kfont;
|
||||
$texfont = /^jisj/ || /^dmj/ || /^dgj/ ;
|
||||
|
||||
@@ -107,7 +107,7 @@ $texfont = /^jisj/ || /^dmj/ || /^dgj/ ;
|
||||
#define KEYWORD 4
|
||||
-#define NORMAL 0
|
||||
-#define COMMENT 1
|
||||
-#define STRING 2
|
||||
-#define LITERAL 3
|
||||
-#define KEYWORD 4
|
||||
+
|
||||
+use constant NORMAL => 0;
|
||||
+use constant COMMENT => 1;
|
||||
+use constant STRING => 2;
|
||||
+use constant LITERAL => 3;
|
||||
+use constant KEYWORD => 4;
|
||||
+use constant VGRINDEFS => '/usr/share/misc/vgrindefs';
|
||||
$mode = $outmode = NORMAL;
|
||||
|
||||
-#define VGRINDEFS "/usr/lib/vgrindefs"
|
||||
+#define VGRINDEFS "/usr/share/misc/vgrindefs"
|
||||
if(! open(vdef,VGRINDEFS)){
|
||||
$language = "";
|
||||
}
|
||||
@@ -132,6 +131,8 @@ if($language){
|
||||
s/\\:/<COLON>/g;
|
||||
split(/:/);
|
||||
$pat = $_[0];
|
||||
+ # handle C++
|
||||
+ $pat =~ s/\+/\\+/g;
|
||||
shift(@_);
|
||||
next if $language !~ /^($pat)$/;
|
||||
$pb = $bb = $be = $cb = $ce = $sb =
|
||||
|
@ -1,7 +1,9 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2000/04/22 23:42:40 espie Exp $
|
||||
@comment $OpenBSD: PLIST,v 1.2 2000/04/23 15:43:17 espie Exp $
|
||||
bin/jenscript
|
||||
bin/kanjips
|
||||
bin/mp-j
|
||||
man/man1/jenscript.1
|
||||
man/man1/kanjips.1
|
||||
share/doc/kanjips/jenscript.readme
|
||||
share/doc/kanjips/kanjips.readme
|
||||
share/doc/kanjips/mp-j.readme
|
||||
|
Loading…
x
Reference in New Issue
Block a user