Subject: /usr/games/bcd bug update
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Dyane Bruce <db@diana.ocunix.on.ca>
List: netbsd-bugs
Date: 11/05/1993 09:50:07
This bug was found in netbsd-0.9, also noticed on my SUN 3/60
I realized I goofed with the patch file, and in checking it over
I found two other errors in the table. The other two errors
in the table are masked by the fact that the input is converted
to upper case before conversion. I admit that for some reason I thought it
was only a 128 byte table (Even though it quite clearly
says it is 256 bytes). I assummed he was not bothering
converting the input to upper case and thought I correcting
the lower case bit map entry, when I was actually correcting the
"high bit" set upper case.
*** bcd.c.org Fri Nov 5 09:09:55 1993
--- bcd.c Fri Nov 5 09:30:08 1993
***************
*** 60,65 ****
--- 60,80 ----
* Steve Hayman
* sahayman@iuvax.cs.indiana.edu
* 1989 11 30
+ *
+ * I found an error in the table. The same error is found in
+ * the SUNOS 4.1.1 version of bcd. It has apparently been around
+ * a long time. The error caused 'Q' and 'R' to have the same
+ * punch code. I only noticed the error due to someone pointing
+ * it out to me when the program was used to print a cover for
+ * an APA!
+ *
+ * The table was wrong in 4 places. The other error was masked
+ * by the fact that the input is converted to upper case before
+ * lookup.
+ *
+ * Dyane Bruce
+ * db@diana.ocunix.on.ca
+ * Nov 5, 1993
*/
#include <sys/types.h>
***************
*** 77,87 ****
0x002, 0x001, 0x012, 0x40a, 0x80a, 0x212, 0x00a, 0x006,
0x022, 0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804,
0x802, 0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408,
! 0x404, 0x402, 0x402, 0x280, 0x240, 0x220, 0x210, 0x208,
0x204, 0x202, 0x201, 0x082, 0x822, 0x600, 0x282, 0x30f,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x402, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
--- 92,102 ----
0x002, 0x001, 0x012, 0x40a, 0x80a, 0x212, 0x00a, 0x006,
0x022, 0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804,
0x802, 0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408,
! 0x404, 0x402, 0x401, 0x280, 0x240, 0x220, 0x210, 0x208,
0x204, 0x202, 0x201, 0x082, 0x822, 0x600, 0x282, 0x30f,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x401, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
***************
*** 93,103 ****
0x001, 0x012, 0x40a, 0x80a, 0x212, 0x00a, 0x006, 0x022,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x402, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x30f,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x402, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0
};
--- 108,118 ----
0x001, 0x012, 0x40a, 0x80a, 0x212, 0x00a, 0x006, 0x022,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x401, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x30f,
0x900, 0x880, 0x840, 0x820, 0x810, 0x808, 0x804, 0x802,
0x801, 0x500, 0x480, 0x440, 0x420, 0x410, 0x408, 0x404,
! 0x402, 0x401, 0x280, 0x240, 0x220, 0x210, 0x208, 0x204,
0x202, 0x201, 0x082, 0x806, 0x822, 0x600, 0x282, 0x0
};
--
Dyane Bruce db@diana.ocunix.on.ca
29 Vanson Ave. Nepean On, K2E 6A9 Am I the only one who has trouble
613-225-9920 thinking up witty sayings for here?
------------------------------------------------------------------------------