From f8c8826dd2c7591ec37ae56e78d6ead1844f8b7f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Wed, 12 Nov 1997 21:34:36 +0000 Subject: [PATCH] Ready to ship. --- Makefile | 4 ++-- ascii.c | 21 ++++++++++++--------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 09657c9..6ad611d 100644 --- a/Makefile +++ b/Makefile @@ -4,14 +4,14 @@ # the RPM spec file and LSM V=2.3 +CFLAGS = -O + ascii: ascii.o ascii.o: ascii.c splashscreen.h splashscreen.h: splashscreen sed splashscreen.h -e 's/\\/\\\\/g' -e 's/"/\\"/' -e 's/.*/P("&");/' -CFLAGS = -O - clean: rm -f ascii ascii.tar* ascii.shar ascii.o splashscreen.h diff --git a/ascii.c b/ascii.c index 5bd8e79..934fae3 100644 --- a/ascii.c +++ b/ascii.c @@ -8,6 +8,7 @@ * v2.0 December 1995 -- Interpret ISO-style code table escapes. * v2.1 August 1997 -- merge in changes by Ioannis Tambouras. * v2.2 November 1997 -- merge in more changes by Ioannis Tambouras. + * v2.3 November 1997 -- incorporated Colin Plumb's splash-screen idea. * * Tries to interpret arguments as names or aliases of ascii characters * and dumps out *all* the aliases of each. Accepts literal characters, @@ -24,7 +25,7 @@ */ -#define REVISION "$Revision: 1.8 $" +#define REVISION "$Revision: 1.9 $" #include #include @@ -511,15 +512,17 @@ char *str; else if (tolower(str[0]) == 'b') bval = atob(str + 1); - /* OK, now output only unique values */ + /* OK, now output all values */ if (hval > -1) - { speak(hval & 0xff); return; } - if (dval > -1 && dval != hval) - { speak(dval & 0xff); return; } - if (oval > -1 && oval != dval && oval != hval) - { speak(oval & 0xff); return; } - if (bval > -1 && bval != oval && bval != dval && bval != hval) - { speak(bval & 0xff); return; } + speak(hval & 0xff); + if (dval > -1) + speak(dval & 0xff); + if (oval > -1) + speak(oval & 0xff); + if (bval > -1) + speak(bval & 0xff); + if (hval > 1 || dval > -1 || oval > -1 || bval > -1) + return; } if (sscanf(str, "%d/%d", &hi, &lo) == 2) /* code table reference? */ -- 2.43.0