diff options
Diffstat (limited to 'xpr.c')
-rw-r--r-- | xpr.c | 110 |
1 files changed, 3 insertions, 107 deletions
@@ -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 */ |