1 /*
2  *	(c) Copyright 1990, Kim Fabricius Storm.  All rights reserved.
3  *      Copyright (c) 1996-2003 Michael T Pins.  All rights reserved.
4  *
5  *	Convert help-files to binary.
6  *	;:X	->	^X (control X)
7  */
8 
9 #include <stdio.h>
10 #include <stdlib.h>
11 
12 int
main(void)13 main(void)
14 {
15     register int    c;
16 
17     while ((c = getchar()) != EOF) {
18 	if (c == ';') {
19 	    c = getchar();
20 	    if (c == ':') {
21 		c = getchar();
22 		putchar(c & 0xf);
23 		continue;
24 	    }
25 	    putchar(';');
26 	    putchar(c);
27 	    continue;
28 	}
29 	if (c >= 1 && c <= 7) {
30 	    putchar(';');
31 	    putchar(':');
32 	    putchar(c | 0x40);
33 	    continue;
34 	}
35 	putchar(c);
36     }
37 
38     exit(0);
39 }
40