3 /* If it turns out that we need to make this conditional on config.sh derived
4 values, it might be easier just to rip out the use of strerrer(). */
6 /* If a platform doesn't support errno.h, it's probably so strange that
7 "hello world" won't port easily to it. */
10 static const char PL_uuemap[]
11 = "`!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_";
13 typedef unsigned char U8;
15 /* This will ensure it is all zeros. */
16 static char PL_uudmap[256];
18 int main(int argc, char **argv) {
23 if (argc < 2 || argv[1][0] == '\0') {
24 fprintf(stderr, "Usage: %s uudemap.h\n", argv[0]);
28 if (!(uudmap_out = fopen(argv[1], "w"))) {
29 fprintf(stderr, "%s: Could not open '%s': %s\n", argv[0], argv[1],
34 for (i = 0; i < sizeof(PL_uuemap) - 1; ++i)
35 PL_uudmap[(U8)PL_uuemap[i]] = (char)i;
37 * Because ' ' and '`' map to the same value,
38 * we need to decode them both the same.
40 PL_uudmap[(U8)' '] = 0;
42 i = sizeof(PL_uudmap);
45 fputs("{\n ", uudmap_out);
47 fprintf(uudmap_out, "%d", *p);
50 fputs(", ", uudmap_out);
52 fputs("\n ", uudmap_out);
56 fputs("\n}\n", uudmap_out);
58 if (fclose(uudmap_out)) {
59 fprintf(stderr, "%s: Could not close '%s': %s\n", argv[0], argv[1],