]> thyrsus.com Git - ascii.git/commitdiff
Ready to ship.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 1997 21:34:36 +0000 (21:34 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 12 Nov 1997 21:34:36 +0000 (21:34 +0000)
Makefile
ascii.c

index 09657c93f659c85eb34f7957bfc5b63dc8b0391a..6ad611dfe970ad72398d0b613f3822bdaaeb1a99 100644 (file)
--- 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 >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 5bd8e791d9c84dcfcd810a76f3dab297775019be..934fae32038544d52e437ff2a57020f1dd3b0ab8 100644 (file)
--- 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 <unistd.h>
 #include <stdio.h>
@@ -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?  */