+ #
+ # This is complicated. `bc' emits numbers split over multiple lines with
+ # backslashes. It also doesn't pad to an even number of digits, which the
+ # test rig is expecting, or use lower-case, which looks nicer.
+ #
+ # The first bit matches a line ending with a backslash. If it finds one,
+ # it appends the next line, removes the backslash/newline pair, and loops
+ # around to the top.
+ #
+ # The next substitution translates the whole kaboodle into lower-case.
+ #
+ # The next one looks for an off number of hex digits and prepends a zero if
+ # it finds one.
+ #
+ # The one after that just indents by two spaces. The final one sticks a
+ # semicolon on the end.
+
+ bc = "bc | sed '\
+:top\n\
+/\\\\$/ {\n\
+ N\n\
+ s/\\\\\\\n\
+//;\n\
+ b top;\n\
+}\n\
+y/ABCDEF/abcdef/\n\
+s/^[0-9a-f]\\([0-9a-f][0-9a-f]\\)*$/0&/\n\
+s/^/ /\n\
+$ s/$/;/'";