4 main(int argc, char *argv[])
11 printf("TXB2TEX V1.0 Copyright (c) Bryan Aamot, 1995\n"
12 "Modified by Bradley Bell, 2002\n"
13 "TXB to Text converter for Descent HOG files.\n"
14 "Converts a *.txb descent hog file to an ascii file.\n"
15 "Usage: TXB2TEX <txb file name> <text file name>\n"
16 "Example: TEX2TXB briefing.txb briefing.tex\n");
19 file = fopen(argv[1], "rb");
21 printf("Can't open txb file (%s)\n", argv[1]);
24 outfile = fopen(argv[2], "wb");
26 printf("Can't open file (%s)\n", argv[2]);
32 if (feof(file)) break;
34 fprintf(outfile, "\x0d\x0a");
36 ch = ( ( (code&0x3f) << 2 ) + ( (code&0xc0) >> 6 ) ) ^ 0xa7;
37 fprintf(outfile, "%c", ch);