|
|
1.1 ! root 1: /* ! 2: * table.c ! 3: * Nroff/Troff. ! 4: * Tables. ! 5: */ ! 6: ! 7: #include "roff.h" ! 8: ! 9: /* ! 10: * Map escaped character. ! 11: */ ! 12: char esctab[ASCSIZE] ={ ! 13: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x00 to 0x07 */ ! 14: ENUL, ENUL, EIGN, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x08 to 0x0F */ ! 15: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x10 to 0x17 */ ! 16: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x18 to 0x1F */ ! 17: EUNP, ETLI, ECOM, ENUL, EARG, EHYP, ENOP, EACA, /* 0x20 to 0x27 */ ! 18: ECHR, ENUL, ESTR, ENUL, ENUL, EMIN, ENUL, ENUL, /* 0x28 to 0x2F */ ! 19: EDWS, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x30 to 0x37 */ ! 20: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x38 to 0x3F */ ! 21: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x40 to 0x47 */ ! 22: ENUL, ENUL, ENUL, ENUL, EVLF, ENUL, ENUL, ENUL, /* 0x48 to 0x4F */ ! 23: ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, ENUL, /* 0x50 to 0x57 */ ! 24: EHEX, ENUL, ENUL, ENUL, ENUL, ENUL, EM12, ENUL, /* 0x58 to 0x5F */ ! 25: EGRA, ELDR, EBRA, EINT, EVNF, EESC, EFON, ENUL, /* 0x60 to 0x67 */ ! 26: EHMT, ENUL, ENUL, EMAR, EHLF, ENUL, ENUM, EOVS, /* 0x68 to 0x6F */ ! 27: ESPR, ENUL, EVRM, EPSZ, ETAB, EVRN, EVMT, EWID, /* 0x70 to 0x77 */ ! 28: EXLS, ENUL, EZWD, EBEG, EM06, EEND, ENUL, ENUL /* 0x78 to 0x7F */ ! 29: }; ! 30: ! 31: /* ! 32: * Map numeric font index 0-9 to font name. ! 33: */ ! 34: char *mapfont[10] = { "P", "R", "B", "I", "\0", "\0", "\0", "\0", "\0", "\0" }; ! 35: ! 36: /* ! 37: * Translation table, initialized in main.c. ! 38: */ ! 39: char trantab[NWIDTH]; ! 40: ! 41: /* ! 42: * For forming registers containing requests. ! 43: */ ! 44: REQ reqtab[] ={ ! 45: 'a', 'b', req_ab, ! 46: 'a', 'd', req_ad, ! 47: 'a', 'f', req_af, ! 48: 'a', 'm', req_am, ! 49: 'a', 's', req_as, ! 50: 'b', 'd', req_bd, ! 51: 'b', 'o', req_bo, ! 52: 'b', 'p', req_bp, ! 53: 'b', 'r', req_br, ! 54: 'c', '2', req_c2, ! 55: 'c', 'c', req_cc, ! 56: 'c', 'e', req_ce, ! 57: 'c', 'h', req_ch, ! 58: 'c', 'o', req_co, ! 59: 'c', 's', req_cs, ! 60: 'c', 'u', req_cu, ! 61: 'd', 'a', req_da, ! 62: 'd', 'c', req_dc, ! 63: 'd', 'e', req_de, ! 64: 'd', 'i', req_di, ! 65: 'd', 's', req_ds, ! 66: 'd', 't', req_dt, ! 67: 'e', 'c', req_ec, ! 68: 'e', 'l', req_el, ! 69: 'e', 'm', req_em, ! 70: 'e', 'o', req_eo, ! 71: 'e', 'v', req_ev, ! 72: 'e', 'x', req_ex, ! 73: 'f', 'b', req_fb, ! 74: 'f', 'c', req_fc, ! 75: 'f', 'd', req_fd, ! 76: 'f', 'i', req_fi, ! 77: 'f', 'l', req_fl, ! 78: 'f', 'p', req_fp, ! 79: 'f', 't', req_ft, ! 80: 'f', 'z', req_fz, ! 81: 'h', 'c', req_hc, ! 82: 'h', 'w', req_hw, ! 83: 'h', 'y', req_hy, ! 84: 'i', 'e', req_ie, ! 85: 'i', 'f', req_if, ! 86: 'i', 'g', req_ig, ! 87: 'i', 'n', req_in, ! 88: 'i', 't', req_it, ! 89: 'l', 'c', req_lc, ! 90: 'l', 'f', req_lf, ! 91: 'l', 'g', req_lg, ! 92: 'l', 'l', req_ll, ! 93: 'l', 's', req_ls, ! 94: 'l', 't', req_lt, ! 95: 'm', 'c', req_mc, ! 96: 'm', 'k', req_mk, ! 97: 'n', 'a', req_na, ! 98: 'n', 'b', req_nb, ! 99: 'n', 'e', req_ne, ! 100: 'n', 'f', req_nf, ! 101: 'n', 'h', req_nh, ! 102: 'n', 'm', req_nm, ! 103: 'n', 'n', req_nn, ! 104: 'n', 'r', req_nr, ! 105: 'n', 's', req_ns, ! 106: 'n', 'x', req_nx, ! 107: 'o', 's', req_os, ! 108: 'p', 'c', req_pc, ! 109: 'p', 'i', req_pi, ! 110: 'p', 'l', req_pl, ! 111: 'p', 'm', req_pm, ! 112: 'p', 'n', req_pn, ! 113: 'p', 'o', req_po, ! 114: 'p', 's', req_ps, ! 115: 'r', 'b', req_rb, ! 116: 'r', 'd', req_rd, ! 117: 'r', 'f', req_rf, ! 118: 'r', 'm', req_rm, ! 119: 'r', 'n', req_rn, ! 120: 'r', 'p', req_rp, ! 121: 'r', 'r', req_rr, ! 122: 'r', 's', req_rs, ! 123: 'r', 't', req_rt, ! 124: 's', 'o', req_so, ! 125: 's', 'p', req_sp, ! 126: 's', 's', req_ss, ! 127: 's', 'v', req_sv, ! 128: 't', 'a', req_ta, ! 129: 't', 'c', req_tc, ! 130: 't', 'i', req_ti, ! 131: 't', 'l', req_tl, ! 132: 't', 'm', req_tm, ! 133: 't', 'r', req_tr, ! 134: 'u', 'f', req_uf, ! 135: 'u', 'l', req_ul, ! 136: 'v', 's', req_vs, ! 137: 'w', 'h', req_wh, ! 138: '\0', '\0', NULL ! 139: }; ! 140: ! 141: /* ! 142: * Table for putting out roman numerals. ! 143: */ ! 144: ROM romtab[10] ={ ! 145: 0, 0, ! 146: 0, 0, ! 147: 0, 1, ! 148: 0, 2, ! 149: 1, 1, ! 150: 1, 0, ! 151: 0, 5, ! 152: 0, 6, ! 153: 0, 7, ! 154: 2, 1 ! 155: }; ! 156: ! 157: /* end of table.c */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.