2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
8 int main(int argc
, char *argv
[])
10 unsigned char buf
[256];
11 FILE *in
= NULL
, *out
= NULL
;
17 fprintf(stderr
, "Too few args\n");
21 in
= fopen(argv
[1], "r");
23 fprintf(stderr
, "Could not open input file %s\n", argv
[1]);
28 if (1 != fread(buf
, 256, 1, in
)) {
29 fprintf(stderr
, "Could not read from input file\n");
34 for (i
= 0; i
< 256; i
++) {
40 printf("#define DEF_TAB_SIZE %d\n", tabsize
);
41 printf("const UBYTE deftable[] = {\n");
42 printf("\t 0x%02x", buf
[0]);
43 for (i
= 1; i
< tabsize
; i
++) {
44 printf(", 0x%02x", buf
[i
]);
46 if ((i
+ 1) % 10 == 0) {