home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume13 / nroff-driver / tabljet.c < prev   
Encoding:
C/C++ Source or Header  |  1988-01-31  |  9.6 KB  |  295 lines

  1.      /*****************************************************************
  2.     *                                                                *
  3.     *   The following is an initialization for an HP Laserjet+ with  *
  4.     *   a Math Elite font cartridge.  The produced table will make   *
  5.     *   nroff(1) behave very similar to troff(1) except that only    *
  6.     *   one font size is available in nroff(1).  So, for instance,   *
  7.     *   is underlining (.ul and .cu) replaced by italic since this   *
  8.         *   is what troff(1) does.  Maximum allowed nroff(1) resolution  *
  9.     *   (1/240 inch) is utilized.  Pity, since Laserjet+ really has  *
  10.     *   1/720 inch resolution.                                       *
  11.     *                                                                *
  12.     *   This version is for fixed character spacing.                 *
  13.     *                                                                *
  14.     *   1987-10-31 -- Bo Thide', Swedish Institute of Space Physics, *
  15.     *   S-755 90 Uppsala, Sweden.  UUCP: ....enea!kuling!irfu!bt     *
  16.     *                                                                *
  17.     *****************************************************************/
  18.  
  19. #ifndef    INCH
  20. #define    INCH    240
  21. #endif
  22.  
  23. struct t {
  24.     int bset;
  25.     int breset;
  26.     int Hor;
  27.     int Vert;
  28.     int Newline;
  29.     int Char;
  30. #ifdef KANJI
  31.     int Kchar;
  32. #endif KANJI
  33.     int Em;
  34.     int Halfline;
  35.     int Adj;
  36.     char *twinit;
  37.     char *twrest;
  38.     char *twnl;
  39.     char *hlr;
  40.     char *hlf;
  41.     char *flr;
  42.     char *bdon;
  43.     char *bdoff;
  44.     char *iton;
  45.     char *itoff;
  46.     char *ploton;
  47.     char *plotoff;
  48.     char *up;
  49.     char *down;
  50.     char *right;
  51.     char *left;
  52.     char *codetab[256-32];
  53.     char *zzz;
  54. } t =    {
  55. /*bset    */        00,
  56. /*breset  */        054,
  57. /*Hor     */        1,
  58. /*Vert    */        1,
  59. /*Newline */        40,
  60. /*Char    */        20,
  61. #ifdef KANJI
  62. /*Kchar   */        40,
  63. #endif KANJI
  64. /*Em      */        20,
  65. /*Halfline*/        20,
  66. /*Adj     */        20,
  67. /*twinit  */        "\033&l0O\033&l66F\033&l6D\033&l3E\033&a0L\033(8U\033)0A",
  68. /*twrest  */        "\033&l6D",
  69. /*twnl    */        "\n",
  70. /*hlr     */        "\033&a-.5R",
  71. /*hlf     */        "\033=",
  72. /*flr     */        "\033&a-1R",
  73. /*bdon    */        "\033(ss5B",
  74. /*bdoff   */        "\033(s0B",
  75. /*iton    */        "\033(sb1S",
  76. /*itoff   */        "\033(s0S",
  77. /*ploton  */        "\033&l6D",
  78. /*plotoff */        "\033&l6D",
  79. /*up      */        "\033&a-3V",
  80. /*down    */        "\033&a+3V",
  81. /*right   */        "\033&a+3H",
  82. /*left    */        "\033&a-3H",
  83. /* space */             "\001 ",
  84. /* ! */                 "\201!",
  85. /* " */                 "\201\"",
  86. /* # */                 "\201#",
  87. /* $ */                 "\201$",
  88. /* % */                 "\201%",
  89. /* & */                 "\201&",
  90. /* ' close */           "\201'",
  91. /* ( */                 "\201(",
  92. /* ) */                 "\201)",
  93. /* * */                 "\001*",
  94. /* + */                 "\001+",
  95. /* , */                 "\201,",
  96. /* - hyphen */          "\001-",
  97. /* . */                 "\001.",
  98. /* / */                 "\201/",
  99. /* 0 */                 "\0010",
  100. /* 1 */                 "\0011",
  101. /* 2 */                 "\0012",
  102. /* 3 */                 "\0013",
  103. /* 4 */                 "\0014",
  104. /* 5 */                 "\0015",
  105. /* 6 */                 "\0016",
  106. /* 7 */                 "\0017",
  107. /* 8 */                 "\0018",
  108. /* 9 */                 "\0019",
  109. /* : */                 "\201:",
  110. /* ; */                 "\201;",
  111. /* < */                 "\001<",
  112. /* = */                 "\001=",
  113. /* > */                 "\001>",
  114. /* ? */                 "\201?",
  115. /* @ */                 "\201@",
  116. /* A */                 "\201A",
  117. /* B */                 "\201B",
  118. /* C */                 "\201C",
  119. /* D */                 "\201D",
  120. /* E */                 "\201E",
  121. /* F */                 "\201F",
  122. /* G */                 "\201G",
  123. /* H */                 "\201H",
  124. /* I */                 "\201I",
  125. /* J */                 "\201J",
  126. /* K */                 "\201K",
  127. /* L */                 "\201L",
  128. /* M */                 "\201M",
  129. /* N */                 "\201N",
  130. /* O */                 "\201O",
  131. /* P */                 "\201P",
  132. /* Q */                 "\201Q",
  133. /* R */                 "\201R",
  134. /* S */                 "\201S",
  135. /* T */                 "\201T",
  136. /* U */                 "\201U",
  137. /* V */                 "\201V",
  138. /* W */                 "\201W",
  139. /* X */                 "\201X",
  140. /* Y */                 "\201Y",
  141. /* Z */                 "\201Z",
  142. /* [ */                 "\001[",
  143. /* \ */                 "\001\\",
  144. /* ] */                 "\001]",
  145. /* ^ */                 "\201^",
  146. /* _ dash */            "\201_",
  147. /* ` open */            "\201`",
  148. /* a */                 "\201a",
  149. /* b */                 "\201b",
  150. /* c */                 "\201c",
  151. /* d */                 "\201d",
  152. /* e */                 "\201e",
  153. /* f */                 "\201f",
  154. /* g */                 "\201g",
  155. /* h */                 "\201h",
  156. /* i */                 "\201i",
  157. /* j */                 "\201j",
  158. /* k */                 "\201k",
  159. /* l */                 "\201l",
  160. /* m */                 "\201m",
  161. /* n */                 "\201n",
  162. /* o */                 "\201o",
  163. /* p */                 "\201p",
  164. /* q */                 "\201q",
  165. /* r */                 "\201r",
  166. /* s */                 "\201s",
  167. /* t */                 "\201t",
  168. /* u */                 "\201u",
  169. /* v */                 "\201v",
  170. /* w */                 "\201w",
  171. /* x */                 "\201x",
  172. /* y */                 "\201y",
  173. /* z */                 "\201z",
  174. /* { */                 "\001{",
  175. /* | */                 "\201|",
  176. /* } */                 "\001}",
  177. /* ~ */                 "\201~",
  178. /* narrow sp */         "\200",
  179. /* hyphen */            "\001-",
  180. /* bullet */            "\001\033(1QL\033(0@",
  181. /* square */            "\001\033(2Ql\033(0@",
  182. /* 3/4 em */            "\001\033(0Q-\033(0@",
  183. /* rule */              "\001_",
  184. /* 1/4 */               "\001\033(0Ew\033(0@",
  185. /* 1/2 */               "\001\033(0Ex\033(0@",
  186. /* 3/4 */               "\0033/4",
  187. /* minus */             "\001\033(0Q-\033(0@",
  188. /* fi */                "\202fi",
  189. /* fl */                "\202fl",
  190. /* ff */                "\202ff",
  191. /* ffi */               "\203ffi",
  192. /* ffl */               "\203ffl",
  193. /* degree */            "\001\033(0Q#\033(0@",
  194. /* dagger */            "\001\016>\017",
  195. /* section */           "\001\033(0E=\033(0@",
  196. /* foot mark */         "\001\033(0Q'\033(0@",
  197. /* acute accent */      "\001'",
  198. /* grave accent */      "\001`",
  199. /* underrule */         "\001_",
  200. /* slash (longer) */    "\001/",
  201. /* half narrow space */    "\200",
  202. /* unpaddable space */    "\001 ",
  203. /* alpha */             "\001\016a\017",
  204. /* beta */              "\001\016b\017",
  205. /* gamma */             "\001\016q\017",
  206. /* delta */             "\001\016w\017",
  207. /* epsilon */           "\001\016e\017",
  208. /* zeta */              "\001\016z\017",
  209. /* eta */               "\001\016h\017",
  210. /* theta */             "\001\033(0Qh\033(0@",
  211. /* iota */              "\001\016i\017",
  212. /* kappa */             "\001\016k\017",
  213. /* lambda */            "\001\016g\017",
  214. /* mu */                "\001\016m\017",
  215. /* nu */                "\001\016n\017",
  216. /* xi */                "\001\016u\017",
  217. /* omicron */           "\001\033(0Qo\033(0@",
  218. /* pi */                "\001\016p\017",
  219. /* rho */               "\001\016o\017",
  220. /* sigma */             "\001\016s\017",
  221. /* tau */               "\001\016t\017",
  222. /* upsilon */           "\001\016y\017",
  223. /* phi */               "\001\016d\017",
  224. /* chi */               "\001\016k\017",
  225. /* psi */               "\001\016c\017",
  226. /* omega */             "\001\016l\017",
  227. /* Gamma */             "\001\016+\017",
  228. /* Delta */             "\001\016v\017",
  229. /* Theta */             "\001\016j\017",
  230. /* Lambda */            "\001\016;\017",
  231. /* Xi */                "\001\016/\017",
  232. /* Pi */                "\001\016*\017",
  233. /* Sigma */             "\001\016?\017",
  234. /* Tau */               "\001T",
  235. /* Upsilon */           "\001\016]\017",
  236. /* Phi */               "\001\016.\017",
  237. /* Psi */               "\001\016,\017",
  238. /* Omega */             "\001\016:\017",
  239. /* square root */       "\001\016!\017",
  240. /* terminal sigma */    "\001\033(0Q[\033(0@",
  241. /* root en */           "\001\033(1Q0\033(0@",
  242. /* >= */                "\001\033(0Q^\033(0@",
  243. /* <= */                "\001\033(0Q\\\033(0@",
  244. /* identically equal */    "\001\016-\017",
  245. /* equation minus */    "\001\033(0Q-\033(0@",
  246. /* approx = */          "\001\033(0Q?\033(0@",
  247. /* approximates */      "\001~",
  248. /* not equal */         "\001\033(0Q]\033(0@",
  249. /* right arrow */       "\001\016|\017",
  250. /* left arrow */        "\001\016~\017",
  251. /* up arrow */          "\001\016{\017",
  252. /* down arrow */        "\001\016_\017",
  253. /* eqn equals */        "\001=",
  254. /* multiply */          "\001\033(0Q*\033(0@",
  255. /* divide */            "\001\016(\017",
  256. /* plus-minus */        "\001\016%\017",
  257. /* cup (union) */       "\001\033(1Q5\033(0@",
  258. /* cap (intersection) */    "\001\033(1Q6\033(0@",
  259. /* subset of */         "\001\033(1Q:\033(0@",
  260. /* superset of */       "\001\033(1Q;\033(0@",
  261. /* improper subset */    "\001\033(1Q>\033(0@",
  262. /*  improper superset */    "\001\033(1Q?\033(0@",
  263. /* infinity */          "\001\016<\017",
  264. /* pt deriv */          "\001\016F\017",
  265. /* gradient */          "\001\016$\017",
  266. /* not */               "\001\033(1QH\033(0@",
  267. /* integral */          "\001\033(1QU\033(0@",
  268. /* proportional to */    "\001\016&\017",
  269. /* empty set */         "\001\033(1QX\033(0@",
  270. /* member of */         "\001\033(1Q7\033(0@",
  271. /* equation plus */     "\001+",
  272. /* registration mk */    "\001\033(2Q,\033(0@",
  273. /* copyright mk */      "\001\033(2Q-\033(0@",
  274. /* box rule */          "\001\033(1Qv\033(0@",
  275. /* cent sign */         "\001\033(0E?\033(0@",
  276. /* dbl dagger */        "\001\033(1QO\033(0@",
  277. /* right hand */        "\001\033(1Q&\033(0@",
  278. /* left hand */         "\001\033(1Q(\033(0@",
  279. /* math *  */           "\001*",
  280. /* bell system sign */    "\001\033(2QS\033(0@",
  281. /* or (was star) */     "\001|",
  282. /* circle */            "\001\033(1QM\033(0@",
  283. /* left top of big curly */    "\001\033(1Qb\033(0@",
  284. /* left bottom of big curly */    "\001\033(1Qd\033(0@",
  285. /* right top of big curly */    "\001\033(1Qr\033(0@",
  286. /* right bottom of big curly */    "\001\033(1Qt\033(0@",
  287. /* left center of big curly */    "\001\033(1Qc\033(0@",
  288. /* right center of big curly */    "\001\033(1Qs\033(0@",
  289. /* bold vertical rule */    "\001\033(1Qu\033(0@",
  290. /* left bottom of big bracket */    "\001\033(1Qa\033(0@",
  291. /* right bottom of big bracket */    "\001\033(1Qq\033(0@",
  292. /* left top of big bracket */    "\001\033(1Q`\033(0@",
  293. /* right top of big bracket */    "\001\033(1Qp\033(0@",
  294. };
  295.