From: Eric S. Raymond Date: Tue, 5 Dec 1995 20:45:16 +0000 (+0000) Subject: Ready to ship. X-Git-Tag: 2-1~11 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=63900a9c58f0000980d25ba05815881285a221ae;p=ascii.git Ready to ship. --- diff --git a/Makefile b/Makefile index af94e61..0f16b4a 100644 --- a/Makefile +++ b/Makefile @@ -7,11 +7,11 @@ CFLAGS = -O clean: rm -f ascii ascii.tar* ascii.shar -ascii-1.3.tar: Makefile ascii.c ascii.1 ascii.lsm - tar cvf ascii-1.3.tar Makefile ascii.c ascii.1 ascii.lsm +ascii-2.0.tar: Makefile ascii.c ascii.1 ascii.lsm + tar cvf ascii-2.0.tar Makefile ascii.c ascii.1 ascii.lsm -ascii-1.3.tar.gz: ascii-1.3.tar - gzip ascii-1.3.tar +ascii-2.0.tar.gz: ascii-2.0.tar + gzip ascii-2.0.tar -ascii-1.3.shar: - shar Makefile ascii.c ascii.1 ascii.lsm >ascii-1.3.shar +ascii-2.0.shar: + shar Makefile ascii.c ascii.1 ascii.lsm >ascii-2.0.shar diff --git a/ascii.c b/ascii.c index 86e3e16..4aeb911 100644 --- a/ascii.c +++ b/ascii.c @@ -1,10 +1,11 @@ /* * ascii.c -- quick crossreference for ASCII character aliases * - * by Eric S. Raymond , v1.0 March 1990 + * by Eric S. Raymond , v1.0 March 1990 * v1.1 November 1990 -- revised `slang' from the 2.2 pronunciation guide * v1.2 March 1995 -- Fixed a core-dump bug * v1.3 October 1995 -- Fixed a bug that shows up only under ELF. + * v2.0 December 1995 -- Interpret ISO-style code table escapes. * * Tries to interpret arguments as names or aliases of ascii characters * and dumps out *all* the aliases of each. Accepts literal characters, @@ -360,7 +361,7 @@ register char *s, *t; static void ascii(str) char *str; { - int ch; + int ch, hi, lo; char **ptr; int len = strlen(str); @@ -451,7 +452,9 @@ char *str; speak(bval & 0xff); } - if (len >= 4 && isalpha(str[0])) /* OK, try to match long names */ + if (sscanf(str, "%d/%d", &hi, &lo) == 2) /* code table reference? */ + speak(hi*16 + lo); + else if (len >= 4 && isalpha(str[0])) /* try to match long names */ { char canbuf[BUFSIZ], *ep; int i; diff --git a/ascii.xml b/ascii.xml index fb03ea3..c73eb91 100644 --- a/ascii.xml +++ b/ascii.xml @@ -26,6 +26,9 @@ Its printed form (for printables). Its full official name in English. .TP 3 * +Its ISO/ECMA code table reference. +.TP 3 +* Slang and other names in wide use for it among hackers. .P This utility accepts command-line strings and tries to interpret them as