summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2021-08-01 14:56:54 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2021-08-02 07:54:41 -0700
commit6c22fc002e2b5a08c8678db673afa32fefea07a3 (patch)
tree3e45be31aeb5f0faaf1556e1571333cecb692e61
parent9d9a64e094e4eb8ec5f391b7dd131231f9106dd6 (diff)
Remove support for Digital LA100 dot matrix printer
This DEC printer from the early 1980's is not widely used today. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--xdpr.man3
-rw-r--r--xpr.c110
-rw-r--r--xpr.h2
-rw-r--r--xpr.man10
4 files changed, 5 insertions, 120 deletions
diff --git a/xdpr.man b/xdpr.man
index 1931c16..0dbf6ee 100644
--- a/xdpr.man
+++ b/xdpr.man
@@ -67,9 +67,6 @@ Specifies the device on which the file will be printed. Currently supported:
.RS 12
.PD 0
.TP
-.B la100
-Digital LA100
-.TP
.B ljet
HP LaserJet series and other monochrome PCL devices
such as ThinkJet, QuietJet, RuggedWriter, \s-1HP\s+12560 series,
diff --git a/xpr.c b/xpr.c
index 8562e52..8ef99bd 100644
--- a/xpr.c
+++ b/xpr.c
@@ -243,8 +243,6 @@ void ln03_setup(
const char *header,
const char *trailer);
static void ln03_finish(void);
-static void la100_setup(int iw, int ih, int scale);
-static void la100_finish(void);
static void dump_prolog(int flags);
static int points(int n);
static char *escape(const char *s);
@@ -271,11 +269,6 @@ void ln03_output_sixels(
int scale,
int top_margin,
int left_margin);
-static void la100_output_sixels(
- unsigned char (*sixmap)[],
- int iw,
- int ih,
- int nosixopt);
static void ps_output_bits(
int iw,
int ih,
@@ -444,10 +437,6 @@ int main(int argc, char **argv)
ln03_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT), split,
scale, top_margin, left_margin);
ln03_finish();
- } else if (device == LA100) {
- la100_setup(iw, ih, scale);
- la100_output_sixels(sixmap, iw, ih, (flags & F_NOSIXOPT));
- la100_finish();
} else if (device == PS) {
ps_setup(iw, ih, orientation, scale, left, top,
flags, header, trailer, w_name);
@@ -465,7 +454,7 @@ int main(int argc, char **argv)
fprintf(stderr, "Orientation: %s, Scale: %d\n",
(orientation==PORTRAIT) ? "Portrait" : "Landscape", scale);
}
- if (((device == LN03) || (device == LA100)) && (flags & F_DUMP))
+ if ((device == LN03) && (flags & F_DUMP))
dump_sixmap(sixmap, iw, ih);
exit(EXIT_SUCCESS);
}
@@ -498,7 +487,7 @@ usage(void)
fprintf(stderr, "usage: %s [options] [file]\n%s", progname,
" -append <file> -noff -output <file>\n"
" -compact\n"
- " -device {ln03 | la100 | ps | lw | pp | ljet | pjet | pjetxl}\n"
+ " -device {ln03 | ps | lw | pp | ljet | pjet | pjetxl}\n"
" -dump\n"
" -gamma <correction>\n"
" -gray {2 | 3 | 4}\n"
@@ -592,8 +581,6 @@ void parse_args(
if (argc == 0) missing_arg(arg);
if (!strcmp(*argv, "ln03")) {
*device = LN03;
- } else if (!strcmp(*argv, "la100")) {
- *device = LA100;
} else if (!strcmp(*argv, "ps")) {
*device = PS;
} else if (!strcmp(*argv, "lw")) {
@@ -777,7 +764,7 @@ void setup_layout(
h_scale = h_max / win_height;
*scale = min(w_scale, h_scale);
}
- } else { /* device == LA100 */
+ } else {
*orientation = PORTRAIT;
*scale = W_MAX / win_width;
}
@@ -1159,35 +1146,6 @@ void ln03_finish(void)
write(1, buf, bp-buf);
}
-/*ARGSUSED*/
-static
-void la100_setup(int iw, int ih, int scale)
-{
- char buf[256];
- register char *bp;
- int lm, tm;
-
- bp = buf;
- lm = ((80 - (int)((double)iw / 6.6)) / 2) - 1;
- if (lm < 1) lm = 1;
- tm = ((66 - (int)((double)ih / 2)) / 2) - 1;
- if (tm < 1) tm = 1;
- sprintf(bp, "\033[%d;%ds", lm, 81-lm); bp += strlen(bp);
- sprintf(bp, "\033[?7l"); bp += 5;
- sprintf(bp, "\033[%dd", tm); bp += strlen(bp);
- sprintf(bp, "\033[%d`", lm); bp += strlen(bp);
- sprintf(bp, "\033P0q"); bp += 4;
- write(1, buf, bp-buf);
-}
-
-#define LA100_RESET "\033[1;80s\033[?7h"
-
-static
-void la100_finish(void)
-{
- write(1, LA100_RESET, sizeof LA100_RESET - 1);
-}
-
#define COMMENTVERSION "PS-Adobe-1.0"
#ifdef XPROLOG
@@ -1566,68 +1524,6 @@ void ln03_output_sixels(
write(1, (char *)buf, bp-buf);
}
-/*ARGSUSED*/
-static
-void la100_output_sixels(
- unsigned char (*sixmap)[],
- int iw,
- int ih,
- int nosixopt)
-{
- unsigned char *buf;
- register unsigned char *bp;
- int i;
- register int j, k;
- register unsigned char *c;
- register int lastc;
- register int count;
- char snum[6];
-
- bp = (unsigned char *)malloc((unsigned)(iw*ih+512));
- buf = bp;
- count = 0;
- lastc = -1;
- c = (unsigned char *)sixmap;
-
- for (i = 0; i < ih; i++) {
- for (j = 0; j < iw; j++) {
- if (*c == lastc && (j+1) < iw) {
- count++;
- c++;
- continue;
- }
- if (count >= 2) {
- bp -= 2;
- count = 2 * (count + 1);
- *bp++ = '!';
- k = 0;
- while (count > 0) {
- snum[k++] = (count % 10) + '0';
- count /= 10;
- }
- while (--k >= 0) *bp++ = snum[k];
- *bp++ = (~lastc & 0x3F) + 0x3F;
- count = 0;
- } else if (count > 0) {
- lastc = (~lastc & 0x3F) + 0x3F;
- do {
- *bp++ = lastc;
- *bp++ = lastc;
- } while (--count > 0);
- }
- lastc = (~*c & 0x3F) + 0x3F;
- *bp++ = lastc;
- *bp++ = lastc;
- lastc = *c++;
- }
- *bp++ = '-'; /* New line */
- lastc = -1;
- }
-
- sprintf((char *)bp, LN_ST); bp += sizeof LN_ST - 1;
- *bp++ = '\f';
- write(1, (char *)buf, bp-buf);
-}
#define LINELEN 72 /* number of CHARS (bytes*2) per line of bitmap output */
diff --git a/xpr.h b/xpr.h
index a7d09c1..ef9f5b4 100644
--- a/xpr.h
+++ b/xpr.h
@@ -29,7 +29,7 @@ enum orientation {
LANDSCAPE_LEFT = 3
};
-enum device {LN01, LN03, LA100, PS, PP, LJET, PJET, PJETXL};
+enum device {LN01, LN03, PS, PP, LJET, PJET, PJETXL};
/* Global variables */
extern const char *progname;
diff --git a/xpr.man b/xpr.man
index 89b5487..b279503 100644
--- a/xpr.man
+++ b/xpr.man
@@ -79,7 +79,7 @@ xpr \- print an X window dump
.I xpr
takes as input a window dump file produced by
.IR xwd(1)
-and formats it for output on PostScript printers, the Digital LN03 or LA100,
+and formats it for output on PostScript printers, the Digital LN03,
the IBM PP3812 page printer, the HP LaserJet (or other PCL printers),
or the HP PaintJet. If no file
argument is given, the standard input is used. By default, \fIxpr\fP
@@ -99,9 +99,6 @@ Specifies the device on which the file will be printed. Currently supported:
.RS 12
.PD 0
.TP
-.B la100
-Digital LA100
-.TP
.B ljet
\s-1HP\s+1 LaserJet series and other monochrome PCL devices
such as ThinkJet, QuietJet, RuggedWriter, \s-1HP\s+12560 series,
@@ -238,11 +235,6 @@ split the picture into two or more pages. It may flash the number
It will probably be necessary to either cut and paste, or to rework the
application to produce a less complex picture.
-There are several limitations on the LA100 support:
-the picture will always be printed in
-portrait mode, there is no scaling,
-and the aspect ratio will be slightly off.
-
Support for PostScript output currently cannot handle the \fB-append\fP,
\fB-noff\fP or \fB-split\fP options.