+#ifndef lint
+char copyright[] =
+"@(#) Copyright (c) 1989 The Regents of the University of California.\n\
+ All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static char sccsid[] = "@(#)bcd.c 4.3 (Berkeley) %G%";
+#endif /* not lint */
+
+/*
+ * bcd --
+ *
+ * Read one line of standard input and produce something that looks like a
+ * punch card. An attempt to reimplement /usr/games/bcd. All I looked at
+ * was the man page.
+ *
+ * I couldn't find a BCD table handy so I wrote a shell script to deduce what
+ * the patterns were that the old bcd was using for each possible 8-bit
+ * character. These are the results -- the low order 12 bits represent the
+ * holes. (A 1 bit is a hole.) These may be wrong, but they match the old
+ * program!
+ *
+ * Steve Hayman
+ * sahayman@iuvax.cs.indiana.edu
+ * 1989 11 30
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <ctype.h>
+
+u_short holes[256] = {
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x206, 0x20a, 0x042, 0x442, 0x222, 0x800, 0x406,
+ 0x812, 0x412, 0x422, 0xa00, 0x242, 0x400, 0x842, 0x300,
+ 0x200, 0x100, 0x080, 0x040, 0x020, 0x010, 0x008, 0x004,
+ 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,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x206, 0x20a, 0x042, 0x442, 0x222, 0x800, 0x406, 0x812,
+ 0x412, 0x422, 0xa00, 0x242, 0x400, 0x842, 0x300, 0x200,
+ 0x100, 0x080, 0x040, 0x020, 0x010, 0x008, 0x004, 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, 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