summaryrefslogtreecommitdiffstats
path: root/contrib/groff/grolj4
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
committerru <ru@FreeBSD.org>2000-12-05 18:49:44 +0000
commita812d8b090bc4edc23150bff257717b24f282e41 (patch)
tree19d4540966cb92612af25d5154efcc062eefb5c5 /contrib/groff/grolj4
parent2e2c9047c3a8b5b6fdcdcd4585d5b114f31cd386 (diff)
downloadFreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.zip
FreeBSD-src-a812d8b090bc4edc23150bff257717b24f282e41.tar.gz
Virgin import of FSF groff v1.16.1
Diffstat (limited to 'contrib/groff/grolj4')
-rw-r--r--contrib/groff/grolj4/Makefile.sub2
-rw-r--r--contrib/groff/grolj4/grolj4.man67
-rw-r--r--contrib/groff/grolj4/lj4.cc19
3 files changed, 59 insertions, 29 deletions
diff --git a/contrib/groff/grolj4/Makefile.sub b/contrib/groff/grolj4/Makefile.sub
index 83b5712..bbb0cff 100644
--- a/contrib/groff/grolj4/Makefile.sub
+++ b/contrib/groff/grolj4/Makefile.sub
@@ -3,4 +3,4 @@ MAN1=grolj4.n
XLIBS=$(LIBDRIVER) $(LIBGROFF)
MLIB=$(LIBM)
OBJS=lj4.o
-CCSRCS=lj4.cc
+CCSRCS=$(srcdir)/lj4.cc
diff --git a/contrib/groff/grolj4/grolj4.man b/contrib/groff/grolj4/grolj4.man
index 9a7c7fd..e2d5826 100644
--- a/contrib/groff/grolj4/grolj4.man
+++ b/contrib/groff/grolj4/grolj4.man
@@ -1,5 +1,5 @@
.ig \"-*- nroff -*-
-Copyright (C) 1994, 1995, 1999 Free Software Foundation, Inc.
+Copyright (C) 1994-2000 Free Software Foundation, Inc.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -26,24 +26,28 @@ the original English.
.SH NAME
grolj4 \- groff driver for HP Laserjet 4 family
.SH SYNOPSIS
+.nr a \n(.j
+.ad l
+.nr i \n(.i
+.in +\w'\fBgrolj4 'u
+.ti \niu
.B grolj4
-[
-.B \-lv
-] [
-.B \-d
-[\c
-.IR n ]
-] [
-.BI \-c n
-] [
-.BI \-p paper_size
-] [
-.BI \-w n
-] [
-.BI \-F dir
-] [
-.IR files \|.\|.\|.
-]
+.de OP
+.ie \\n(.$-1 .RI "[\ \fB\\$1\fP" "\\$2" "\ ]"
+.el .RB "[\ " "\\$1" "\ ]"
+..
+.OP \-lv
+.OP \-d \fR[\fPn\fR]\fP
+.OP \-c n
+.OP \-p paper_size
+.OP \-w n
+.OP \-F dir
+.RI "[\ " files\|.\|.\|. "\ ]"
+.br
+.ad \na
+.PP
+It is possible to have whitespace between a command line option and its
+parameter.
.SH DESCRIPTION
.B grolj4
is a driver for
@@ -96,12 +100,34 @@ thousandths of an em.
Search directory
.IB dir /devlj4
for font and device description files.
+.LP
+The following four commands are available additionally in the
+.B DESC
+file:
+.TP
+.BI pclweight \ N
+The integer value
+.I N
+must be in the range -7 to +7; default is 0.
+.TP
+.BI pclstyle \ N
+The integer value
+.I N
+must be in the range 0 to 32767; default is 0.
+.TP
+.BI pclproportional \ N
+A boolean flag which can be either 0 or 1; default is 0.
+.TP
+.BI pcltypeface \ N
+The integer value
+.I N
+must be in the range 0 to 65535; default is 0.
.SH FILES
.TP
.B @FONTDIR@/devlj4/DESC
Device description file.
.TP
-.B @FONTDIR@/devlj4/ F
+.BI @FONTDIR@/devlj4/ F
Font description file for font
.IR F .
.TP
@@ -113,7 +139,6 @@ Small dots.
.SH "SEE ALSO"
.BR groff (@MAN1EXT@),
.BR @g@troff (@MAN1EXT@),
-.BR @g@eqn (@MAN1EXT@),
.BR groff_out (@MAN5EXT@),
.BR groff_font (@MAN5EXT@),
-.BR groff_char (@MAN7EXT@),
+.BR groff_char (@MAN7EXT@)
diff --git a/contrib/groff/grolj4/lj4.cc b/contrib/groff/grolj4/lj4.cc
index 002503a..0c23a45 100644
--- a/contrib/groff/grolj4/lj4.cc
+++ b/contrib/groff/grolj4/lj4.cc
@@ -33,6 +33,7 @@ X command to include bitmap graphics
*/
#include "driver.h"
+#include "nonposix.h"
static struct {
const char *name;
@@ -567,11 +568,11 @@ printer *make_printer()
static
int lookup_paper_size(const char *s)
{
- for (int i = 0; i < sizeof(paper_table)/sizeof(paper_table[0]); i++)
- // FIXME Do this case-insensitively.
- // Perhaps allow unique prefix.
- if (strcmp(s, paper_table[i].name) == 0)
+ for (int i = 0; i < sizeof(paper_table)/sizeof(paper_table[0]); i++) {
+ // FIXME Perhaps allow unique prefix.
+ if (strcasecmp(s, paper_table[i].name) == 0)
return i;
+ }
return -1;
}
@@ -596,6 +597,8 @@ void handle_unknown_desc_command(const char *command, const char *arg,
static void usage();
+extern "C" int optopt, optind;
+
int main(int argc, char **argv)
{
program_name = argv[0];
@@ -603,7 +606,6 @@ int main(int argc, char **argv)
setbuf(stderr, stderr_buf);
font::set_unknown_desc_command_handler(handle_unknown_desc_command);
int c;
- extern int optopt, optind;
while ((c = getopt(argc, argv, ":F:p:d:lvw:c:")) != EOF)
switch(c) {
case 'l':
@@ -637,8 +639,8 @@ int main(int argc, char **argv)
}
case 'v':
{
- extern const char *version_string;
- fprintf(stderr, "grolj4 version %s\n", version_string);
+ extern const char *Version_string;
+ fprintf(stderr, "grolj4 version %s\n", Version_string);
fflush(stderr);
break;
}
@@ -675,6 +677,9 @@ int main(int argc, char **argv)
default:
assert(0);
}
+#ifdef SET_BINARY
+ SET_BINARY(fileno(stdout));
+#endif
if (optind >= argc)
do_file("-");
else {
OpenPOWER on IntegriCloud