Test coverage - 100% score.c
[open-adventure.git] / common.c
1 #include <stdlib.h>
2 #include <stdio.h>
3 #include "common.h"
4
5 const char advent_to_ascii[] = {
6     ' ', '!', '\"', '\'', '(', ')', '*', '+', ',', '-',
7     '.', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I',
8     'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
9     'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c',
10     'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
11     'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w',
12     'x', 'y', 'z', '%', '0', '1', '2', '3', '4', '5',
13     '6', '7', '8', '9', '\x00', '\x01', '\x02', '\x03', '\x04', '\x05',
14     '\x06', '\x07', '\x08', '\x00', '\x00', '\x0b', '\x0c', '\r', '\x0e', '\x0f',
15     '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', '\x18', '\x19',
16     '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', '#', '$', '&', '/',
17     ':', ';', '<', '=', '>', '?', '@', '[', '\\', ']',
18     '^', '_', '`', '{', '|', '}', '~', '\x00',
19 };
20
21 /* Rendered from the now-gone MPINIT() function */
22 const char ascii_to_advent[] = {
23     74, 75, 76, 77, 78, 79, 80, 81, 82, 0,
24     0, 85, 86, 87, 88, 89, 90, 91, 92, 93,
25     94, 95, 96, 97, 98, 99, 100, 101, 102, 103,
26     104, 105, 0, 1, 2, 106, 107, 63, 108, 3,
27     4, 5, 6, 7, 8, 9, 10, 109, 64, 65,
28     66, 67, 68, 69, 70, 71, 72, 73, 110, 111,
29     112, 113, 114, 115, 116, 11, 12, 13, 14, 15,
30     16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
31     26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
32     36, 117, 118, 119, 120, 121, 122, 37, 38, 39,
33     40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
34     50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
35     60, 61, 62, 123, 124, 125, 126, 83,
36 };