home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d473
/
cnewssrc
/
cnews_src.lzh
/
libamiga
/
unctrl.c
< prev
next >
Wrap
Text File
|
1990-12-25
|
2KB
|
53 lines
/* Copyright 1990 Frank J. Edwards */
/* All Rights Reserved. */
#define SIZEOF(x) (sizeof(x) / sizeof((x)[0]))
char *_unctrl[] = {
"EOF",
"^@", "^A", "^B", "^C", "^D", "^E", "^F", "^G",
"\\b", "\\t", "\\n", "^K", "\\f", "\\r", "^N", "^O",
"^P", "^Q", "^R", "^S", "^T", "^U", "^V", "^W",
"^X", "^Y", "^Z", "\\E", "^\\", "^]", "^^", "^_",
" ", "!", "\"", "#", "$", "%", "&", "'",
"(", ")", "*", "+", ",", "-", ".", "/",
"0", "1", "2", "3", "4", "5", "6", "7",
"8", "9", ":", ";", "<", "=", ">", "?",
"@", "A", "B", "C", "D", "E", "F", "G",
"H", "I", "J", "K", "L", "M", "N", "O",
"P", "Q", "R", "S", "T", "U", "V", "W",
"X", "Y", "Z", "[", "\\", "]", "^", "_",
"`", "a", "b", "c", "d", "e", "f", "g",
"h", "i", "j", "k", "l", "m", "n", "o",
"p", "q", "r", "s", "t", "u", "v", "w",
"x", "y", "z", "{", "|", "}", "~", "DEL",
/* Top bit set on these values, so precede with "~" */
"~^@", "~^A", "~^B", "~^C", "~^D", "~^E", "~^F", "~^G",
"~\\b", "~\\t", "~\\n", "~^K", "~\\f", "~\\r", "~^N", "~^O",
"~^P", "~^Q", "~^R", "~^S", "~^T", "~^U", "~^V", "~^W",
"~^X", "~^Y", "~^Z", "~\\E", "~^\\", "~^]", "~^^", "~^_",
"~ ", "~!", "~\"", "~#", "~$", "~%", "~&", "~'",
"~(", "~)", "~*", "~+", "~,", "~-", "~.", "~/",
"~0", "~1", "~2", "~3", "~4", "~5", "~6", "~7",
"~8", "~9", "~:", "~;", "~<", "~=", "~>", "~?",
"~@", "~A", "~B", "~C", "~D", "~E", "~F", "~G",
"~H", "~I", "~J", "~K", "~L", "~M", "~N", "~O",
"~P", "~Q", "~R", "~S", "~T", "~U", "~V", "~W",
"~X", "~Y", "~Z", "~[", "~\\", "~]", "~^", "~_",
"~`", "~a", "~b", "~c", "~d", "~e", "~f", "~g",
"~h", "~i", "~j", "~k", "~l", "~m", "~n", "~o",
"~p", "~q", "~r", "~s", "~t", "~u", "~v", "~w",
"~x", "~y", "~z", "~{", "~|", "~}", "~~", "~DEL" };
char *unctrl(int ch)
{
return( (++ch < 0 || ch > SIZEOF(_unctrl)) ? 0 : _unctrl[ ch ] );
}