DOTMATRIX

Section: User Commands (1)
Updated: Feb 23, 1988
Index Return to Main Contents
 

NAME

dotmatrix - make driver table and postprocessor for dot-matrix printer  

SYNOPSIS

dotmatrix [ -nvtpdq ] [ postprocessor-name ]

 

DESCRIPTION

This utility interprets a file containing various directives specifying character set graphics, highlight sequences, and the like. By default, it produces as output the following files:
tab.mx80
a ditroff-format driver file
mx80.c
a postprocessor for use with nroff
mx80.test
a test file that exercises the driver and postprocessor.

If a command line argument is given, it is taken as the name for the generated postprocessor and substituted for the `mx80' in the default names above.

The directives file format is all-ASCII, line oriented, and similar to that of a ditroff table. In fact, everything up to and including a line reading `charset' is passed through unaltered to the driver table (except that comments beginning with # are stripped out).

Following the charset directive, the normal character set table is replaced by a sequence of comment, mode, toggle, overstrike and picture directives. Comments beginning with # may be present anywhere but in the body of a picture section and will be discarded (except that comments trailing a picture directive are include in the appropriate place in the generated test file).

The directives are as follows:  

comment <text>

Text following a comment directive is embedded in a comment in the generated postprocessor source. It is recommended that you use this feature to identify the font and its author and explain any special features it may have.  

mode <name> <height> <format>

Declares a print mode. The first argument must be a mode name of 10 or fewer letters. The second must be a decimal numeric height in pixels. The third must be a printf-style string with the following escapes defined:

%h
high byte of graphic length in pixels
%l
low byte of graphic length in pixels
%c
graphic raster by column, leftmost column first All normal C-style escapes and the \e convention for ESC are also accepted.
 

toggle <escape> <on> <off>

Declares a given escape to be a toggle in the postprocessor, and gives the two on and off strings that will implement it.  

overstrike <escape> <char>

Declares a given escape to be an overstrike toggle in the postprocessor, and gives the overstrike character to use.  

picture <name> <em-width> <mode> <width>

The picture directive takes four arguments. The first is the nroff escape name, the second is the picture's width in ems. The third must match a declared mode, and the fourth should be a decimal numeric width.

Each picture directive must be followed by an 8-line bit image for the escape. Asterisk characters will be read as `on'. Trailing non-asterisks designating bits off may be omitted.

The -n option prevents dotmatrix(1) from trying to put any knowledge of the printer into the driver; only standard escapes for the generated postprocessor will be generated (see the NOTE below).

The -v option causes the program to echo each input line along with remarks about how it's being processed. The -q option makes the program extra quiet, suppressing normal messages about which special characters and highlights need to be handled in the postprocessor and which will be emitted through the driver table alone.

The -t, -p and -d options suppress creation of the test, postprocessor source and driver table files respectively.

When creating new picture files, it is recommended that you start from an existing file and modify it, rather than starting from scratch.  

DIAGNOSTICS

Various self-explanatory diagnostics may be emitted to stderr. 0 is returned from a correct run, 1 if a parse error terminated translation of the input file, 2 if some output file could not be opened.  

FILES

post.proto
prototype C code for the printer-specific postprocessor
 

NOTE

Nroff barfs on nuls in escape strings. This is what makes the postprocessor necessary. In place of escapes that would include nuls, the generated driver table will emit strings to the postprocessor of the form SI + <char> + SO (so they'll pass through col(1) correctly without the -p option).

If you use col, <data> must be printable; this effectively limits you to at most 96 escapes containing NULs (though dotmatrix(1) will generate escapes with <char> 128 to 255 without complaining). Using col probably also means you want to use a driver table generated with the the -n option, to force all the nonprintable-character emission into the postprocessor.  

AUTHOR

Eric S. Raymond (...!rutgers!vu-vlsi!snark!eric) Feb 1988  

SEE ALSO

convtab(1), term(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
comment <text>
mode <name> <height> <format>
toggle <escape> <on> <off>
overstrike <escape> <char>
picture <name> <em-width> <mode> <width>
DIAGNOSTICS
FILES
NOTE
AUTHOR
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 06:32:59 GMT, December 12, 2024