gno/bin/vi/charset.c
gdr-ftp 784e3de7cd Initial checkin of aroff, binprint, center, less, ls, make, makemake,
passwd, ps, purge, shutdown, stty, upper, and vi.  These sources are
for the versions of the utils shipped with GNO v2.0.4.
1998-03-09 08:30:21 +00:00

375 lines
9.9 KiB
C

/*
* STEVIE - Simply Try this Editor for VI Enthusiasts
*
* Code Contributions By : Tim Thompson twitch!tjt
* Tony Andrews onecom!wldrdg!tony
* G. R. (Fred) Walter watmath!grwalter
*/
#include "stevie.h"
/*
* This file shows how to display characters on the screen. This is approach
* is something of an overkill. It's a remnant from the original code that
* isn't worth messing with for now. TABS are special-cased depending on the
* value of the "list" parameter.
*/
struct charinfo chars[] = {
/* 0 */ 0, 0, /* both must be zero */
/* 1 */ 2, "^A",
/* 2 */ 2, "^B",
/* 3 */ 2, "^C",
/* 4 */ 2, "^D",
/* 5 */ 2, "^E",
/* 6 */ 2, "^F",
/* 7 */ 2, "^G",
/* 8 */ 2, "^H",
/* 9 */ 2, "^I",
/* 10 */ 7, "[ERROR]", /* shouldn't happen */
/* 11 */ 2, "^K",
/* 12 */ 2, "^L",
/* 13 */ 2, "^M",
/* 14 */ 2, "^N",
/* 15 */ 2, "^O",
/* 16 */ 2, "^P",
/* 17 */ 2, "^Q",
/* 18 */ 2, "^R",
/* 19 */ 2, "^S",
/* 20 */ 2, "^T",
/* 21 */ 2, "^U",
/* 22 */ 2, "^V",
/* 23 */ 2, "^W",
/* 24 */ 2, "^X",
/* 25 */ 2, "^Y",
/* 26 */ 2, "^Z",
/* 27 */ 2, "^[",
/* 28 */ 2, "^\\",
/* 29 */ 2, "^]",
/* 30 */ 2, "^^",
/* 31 */ 2, "^_",
/* 32 */ 1, " ",
/* 33 */ 1, "!",
/* 34 */ 1, "\"",
/* 35 */ 1, "#",
/* 36 */ 1, "$",
/* 37 */ 1, "%",
/* 38 */ 1, "&",
/* 39 */ 1, "'",
/* 40 */ 1, "(",
/* 41 */ 1, ")",
/* 42 */ 1, "*",
/* 43 */ 1, "+",
/* 44 */ 1, ",",
/* 45 */ 1, "-",
/* 46 */ 1, ".",
/* 47 */ 1, "/",
/* 48 */ 1, "0",
/* 49 */ 1, "1",
/* 50 */ 1, "2",
/* 51 */ 1, "3",
/* 52 */ 1, "4",
/* 53 */ 1, "5",
/* 54 */ 1, "6",
/* 55 */ 1, "7",
/* 56 */ 1, "8",
/* 57 */ 1, "9",
/* 58 */ 1, ":",
/* 59 */ 1, ";",
/* 60 */ 1, "<",
/* 61 */ 1, "=",
/* 62 */ 1, ">",
/* 63 */ 1, "?",
/* 64 */ 1, "@",
/* 65 */ 1, "A",
/* 66 */ 1, "B",
/* 67 */ 1, "C",
/* 68 */ 1, "D",
/* 69 */ 1, "E",
/* 70 */ 1, "F",
/* 71 */ 1, "G",
/* 72 */ 1, "H",
/* 73 */ 1, "I",
/* 74 */ 1, "J",
/* 75 */ 1, "K",
/* 76 */ 1, "L",
/* 77 */ 1, "M",
/* 78 */ 1, "N",
/* 79 */ 1, "O",
/* 80 */ 1, "P",
/* 81 */ 1, "Q",
/* 82 */ 1, "R",
/* 83 */ 1, "S",
/* 84 */ 1, "T",
/* 85 */ 1, "U",
/* 86 */ 1, "V",
/* 87 */ 1, "W",
/* 88 */ 1, "X",
/* 89 */ 1, "Y",
/* 90 */ 1, "Z",
/* 91 */ 1, "[",
/* 92 */ 1, "\\",
/* 93 */ 1, "]",
/* 94 */ 1, "^",
/* 95 */ 1, "_",
/* 96 */ 1, "`",
/* 97 */ 1, "a",
/* 98 */ 1, "b",
/* 99 */ 1, "c",
/* 100 */ 1, "d",
/* 101 */ 1, "e",
/* 102 */ 1, "f",
/* 103 */ 1, "g",
/* 104 */ 1, "h",
/* 105 */ 1, "i",
/* 106 */ 1, "j",
/* 107 */ 1, "k",
/* 108 */ 1, "l",
/* 109 */ 1, "m",
/* 110 */ 1, "n",
/* 111 */ 1, "o",
/* 112 */ 1, "p",
/* 113 */ 1, "q",
/* 114 */ 1, "r",
/* 115 */ 1, "s",
/* 116 */ 1, "t",
/* 117 */ 1, "u",
/* 118 */ 1, "v",
/* 119 */ 1, "w",
/* 120 */ 1, "x",
/* 121 */ 1, "y",
/* 122 */ 1, "z",
/* 123 */ 1, "{",
/* 124 */ 1, "|",
/* 125 */ 1, "}",
/* 126 */ 1, "~",
/* 127 */ 2, "^?",
/* 128 */ 5, "[128]",
/* 129 */ 5, "[129]",
/* 130 */ 5, "[130]",
/* 131 */ 5, "[131]",
/* 132 */ 5, "[132]",
/* 133 */ 5, "[133]",
/* 134 */ 5, "[134]",
/* 135 */ 5, "[135]",
/* 136 */ 5, "[136]",
/* 137 */ 5, "[137]",
/* 138 */ 5, "[138]",
/* 139 */ 5, "[139]",
/* 140 */ 5, "[140]",
/* 141 */ 5, "[141]",
/* 142 */ 5, "[142]",
/* 143 */ 5, "[143]",
/* 144 */ 5, "[144]",
/* 145 */ 5, "[145]",
/* 146 */ 5, "[146]",
/* 147 */ 5, "[147]",
/* 148 */ 5, "[148]",
/* 149 */ 5, "[149]",
/* 150 */ 5, "[150]",
/* 151 */ 5, "[151]",
/* 152 */ 5, "[152]",
/* 153 */ 5, "[153]",
/* 154 */ 5, "[154]",
/* 155 */ 5, "[155]",
/* 156 */ 5, "[156]",
/* 157 */ 5, "[157]",
/* 158 */ 5, "[158]",
/* 159 */ 5, "[159]",
#ifdef AMIGA
/* 160 */ 1, "\240",
/* 161 */ 1, "\241",
/* 162 */ 1, "\242",
/* 163 */ 1, "\243",
/* 164 */ 1, "\244",
/* 165 */ 1, "\245",
/* 166 */ 1, "\246",
/* 167 */ 1, "\247",
/* 168 */ 1, "\250",
/* 169 */ 1, "\251",
/* 170 */ 1, "\252",
/* 171 */ 1, "\253",
/* 172 */ 1, "\254",
/* 173 */ 1, "\255",
/* 174 */ 1, "\256",
/* 175 */ 1, "\257",
/* 176 */ 1, "\260",
/* 177 */ 1, "\261",
/* 178 */ 1, "\262",
/* 179 */ 1, "\263",
/* 180 */ 1, "\264",
/* 181 */ 1, "\265",
/* 182 */ 1, "\266",
/* 183 */ 1, "\267",
/* 184 */ 1, "\270",
/* 185 */ 1, "\271",
/* 186 */ 1, "\272",
/* 187 */ 1, "\273",
/* 188 */ 1, "\274",
/* 189 */ 1, "\275",
/* 190 */ 1, "\276",
/* 191 */ 1, "\277",
/* 192 */ 1, "\300",
/* 193 */ 1, "\301",
/* 194 */ 1, "\302",
/* 195 */ 1, "\303",
/* 196 */ 1, "\304",
/* 197 */ 1, "\305",
/* 198 */ 1, "\306",
/* 199 */ 1, "\307",
/* 200 */ 1, "\310",
/* 201 */ 1, "\311",
/* 202 */ 1, "\312",
/* 203 */ 1, "\313",
/* 204 */ 1, "\314",
/* 205 */ 1, "\315",
/* 206 */ 1, "\316",
/* 207 */ 1, "\317",
/* 208 */ 1, "\320",
/* 209 */ 1, "\321",
/* 210 */ 1, "\322",
/* 211 */ 1, "\323",
/* 212 */ 1, "\324",
/* 213 */ 1, "\325",
/* 214 */ 1, "\326",
/* 215 */ 1, "\327",
/* 216 */ 1, "\330",
/* 217 */ 1, "\331",
/* 218 */ 1, "\332",
/* 219 */ 1, "\333",
/* 220 */ 1, "\334",
/* 221 */ 1, "\335",
/* 222 */ 1, "\336",
/* 223 */ 1, "\337",
/* 224 */ 1, "\340",
/* 225 */ 1, "\341",
/* 226 */ 1, "\342",
/* 227 */ 1, "\343",
/* 228 */ 1, "\344",
/* 229 */ 1, "\345",
/* 230 */ 1, "\346",
/* 231 */ 1, "\347",
/* 232 */ 1, "\350",
/* 233 */ 1, "\351",
/* 234 */ 1, "\352",
/* 235 */ 1, "\353",
/* 236 */ 1, "\354",
/* 237 */ 1, "\355",
/* 238 */ 1, "\356",
/* 239 */ 1, "\357",
/* 240 */ 1, "\360",
/* 241 */ 1, "\361",
/* 242 */ 1, "\362",
/* 243 */ 1, "\363",
/* 244 */ 1, "\364",
/* 245 */ 1, "\365",
/* 246 */ 1, "\366",
/* 247 */ 1, "\367",
/* 248 */ 1, "\370",
/* 249 */ 1, "\371",
/* 250 */ 1, "\372",
/* 251 */ 1, "\373",
/* 252 */ 1, "\374",
/* 253 */ 1, "\375",
/* 254 */ 1, "\376",
/* 255 */ 1, "\377"
#else
/* 160 */ 5, "[160]",
/* 161 */ 5, "[161]",
/* 162 */ 5, "[162]",
/* 163 */ 5, "[163]",
/* 164 */ 5, "[164]",
/* 165 */ 5, "[165]",
/* 166 */ 5, "[166]",
/* 167 */ 5, "[167]",
/* 168 */ 5, "[168]",
/* 169 */ 5, "[169]",
/* 170 */ 5, "[170]",
/* 171 */ 5, "[171]",
/* 172 */ 5, "[172]",
/* 173 */ 5, "[173]",
/* 174 */ 5, "[174]",
/* 175 */ 5, "[175]",
/* 176 */ 5, "[176]",
/* 177 */ 5, "[177]",
/* 178 */ 5, "[178]",
/* 179 */ 5, "[179]",
/* 180 */ 5, "[180]",
/* 181 */ 5, "[181]",
/* 182 */ 5, "[182]",
/* 183 */ 5, "[183]",
/* 184 */ 5, "[184]",
/* 185 */ 5, "[185]",
/* 186 */ 5, "[186]",
/* 187 */ 5, "[187]",
/* 188 */ 5, "[188]",
/* 189 */ 5, "[189]",
/* 190 */ 5, "[190]",
/* 191 */ 5, "[191]",
/* 192 */ 5, "[192]",
/* 193 */ 5, "[193]",
/* 194 */ 5, "[194]",
/* 195 */ 5, "[195]",
/* 196 */ 5, "[196]",
/* 197 */ 5, "[197]",
/* 198 */ 5, "[198]",
/* 199 */ 5, "[199]",
/* 200 */ 5, "[200]",
/* 201 */ 5, "[201]",
/* 202 */ 5, "[202]",
/* 203 */ 5, "[203]",
/* 204 */ 5, "[204]",
/* 205 */ 5, "[205]",
/* 206 */ 5, "[206]",
/* 207 */ 5, "[207]",
/* 208 */ 5, "[208]",
/* 209 */ 5, "[209]",
/* 210 */ 5, "[210]",
/* 211 */ 5, "[211]",
/* 212 */ 5, "[212]",
/* 213 */ 5, "[213]",
/* 214 */ 5, "[214]",
/* 215 */ 5, "[215]",
/* 216 */ 5, "[216]",
/* 217 */ 5, "[217]",
/* 218 */ 5, "[218]",
/* 219 */ 5, "[219]",
/* 220 */ 5, "[220]",
/* 221 */ 5, "[221]",
/* 222 */ 5, "[222]",
/* 223 */ 5, "[223]",
/* 224 */ 5, "[224]",
/* 225 */ 5, "[225]",
/* 226 */ 5, "[226]",
/* 227 */ 5, "[227]",
/* 228 */ 5, "[228]",
/* 229 */ 5, "[229]",
/* 230 */ 5, "[230]",
/* 231 */ 5, "[231]",
/* 232 */ 5, "[232]",
/* 233 */ 5, "[233]",
/* 234 */ 5, "[234]",
/* 235 */ 5, "[235]",
/* 236 */ 5, "[236]",
/* 237 */ 5, "[237]",
/* 238 */ 5, "[238]",
/* 239 */ 5, "[239]",
/* 240 */ 5, "[240]",
/* 241 */ 5, "[241]",
/* 242 */ 5, "[242]",
/* 243 */ 5, "[243]",
/* 244 */ 5, "[244]",
/* 245 */ 5, "[245]",
/* 246 */ 5, "[246]",
/* 247 */ 5, "[247]",
/* 248 */ 5, "[248]",
/* 249 */ 5, "[249]",
/* 250 */ 5, "[250]",
/* 251 */ 5, "[251]",
/* 252 */ 5, "[252]",
/* 253 */ 5, "[253]",
/* 254 */ 5, "[254]",
/* 255 */ 5, "[255]"
#endif
};