1 /*- 2 * %sccs.include.proprietary.c% 3 * 4 * @(#)tabitoh12.c 4.2 (Berkeley) 04/18/91 5 */ 6 7 #define INCH 240 8 /* 9 * C:Itoh Prowriter (dot matrix) 12 pitch 10 * nroff driving table 11 * by G. Rochlin, 15feb83 12 * Because the c:itoh will backspace only in incremental mode, 13 * need to write a program to place commands Esc[ and Esc] around ^H. 14 * If you want true underline mode instead of _^Hx_^Hy, etc., 15 * have the script first replace _^Hx with EscXxEscY, etc. 16 * Further refinements are possible to clean up files and 17 * minimize throughput (e.g., delete all EscYEscX pairs). 18 * In the terminal initialization (twinit) and exit (twrest) 19 * strings, EscE sets 12-pitch. Twrest clears by commanding 20 * Esc Y, Esc", and Esc$ to clear ul, bold, and "greek", 21 * Esc] to restore logic-seek print, Escf and EscT24 to restore 22 * forward linefeed at 6 lines/inch, Esc< for bidirectional 23 * print, EscE, and ^M (\015) to clear the print buffer. 24 * Since the itoh has no keyboard, you have to run it through 25 * a video terminal or micro printer port. 26 * The first twinit code (Esc`) and the last twrest code 27 * (Esca) set the (proper) "transparent" or "buffered" print 28 * mode for tvi950 and tvi925 and Freedom 100. This mode 29 * is necessary on intelligent terminals to keep all the Esc 30 * codes in the driver tables from scrambling the terminal's 31 * brains. (If you have a dumb terminal, almost any print 32 * mode should be safe. Smart terminals without buffered print, 33 * such as the tvi920, present problems.) 34 * If you have a different terminal, 35 * the shell script should also replace these codes with those 36 * appropriate for your machine. If you are using an sed 37 * stream for the script, make sure to use single quotes to 38 * isolate the ` from the shell. 39 */ 40 #define INCH 240 41 struct { 42 int bset; 43 int breset; 44 int Hor; 45 int Vert; 46 int Newline; 47 int Char; 48 int Em; 49 int Halfline; 50 int Adj; 51 char *twinit; 52 char *twrest; 53 char *twnl; 54 char *hlr; 55 char *hlf; 56 char *flr; 57 char *bdon; 58 char *bdoff; 59 char *ploton; 60 char *plotoff; 61 char *up; 62 char *down; 63 char *right; 64 char *left; 65 char *codetab[256-32]; 66 int zzz; 67 } t = { 68 /*bset*/ 0, 69 /*breset*/ 0177420, 70 /*Hor*/ INCH/24, 71 /*Vert*/ INCH/48, 72 /*Newline*/ INCH/6, 73 /*Char*/ INCH/12, 74 /*Em*/ INCH/12, 75 /*Halfline*/ INCH/12, 76 /*Adj*/ INCH/12, 77 /*twinit*/ "\033`\015\033E", 78 /*twrest*/ "\033Y\033\042\033$\033]\033f\033T24\033<\033E\015\033a\n", 79 /*twnl*/ "\015\n", 80 /*hlr*/ "\033[\033T12\033r\n\033T24\033]\033f", 81 /*hlf*/ "\033[\033T12\n\033T24\033]", 82 /*flr*/ "\033[\033r\n\033f\033]", 83 /*bdon*/ "\033!", 84 /*bdoff*/ "\033\042", 85 /*ploton*/ "\033>\033T03", 86 /*plotoff*/ "\033<\033T24", 87 /*up*/ "\033[\033r\n\033f\033]", 88 /*down*/ "\033[\n\033]", 89 /*right*/ "\033P \033E", 90 /*left*/ "\b\033P \033E", 91 /*codetab*/ 92 #include "code.itoh" 93