home *** CD-ROM | disk | FTP | other *** search
- #include <math.h>
- #include <stdio.h>
-
- unsigned char decode (unsigned char *txt);
-
- main()
- {
- FILE *in, *out;
- unsigned char buffer[250], *where;
- unsigned char vl;
- in = fopen ("nohiss.fnt", "rb");
- out = fopen ("nh.", "wb");
- fgets (buffer, 250, in);
- fprintf (out, "%s\r\n", buffer);
- fgets (buffer, 250, in);
- while (!feof(in))
- {
- vl=decode (buffer);
- where = (char *)strchr(buffer, 13);
- *where = 0;
- if (strlen(buffer) > 16) fprintf (out, "%3u, %s\r\n", vl, buffer+5);
- else fprintf (out, "%s\r\n", buffer);
- fgets (buffer, 250, in);
- }
- fcloseall();
- remove ("nohiss.fnt");
- rename ("nh", "nohiss.fnt");
- return;
- }
-
- unsigned char decode (unsigned char *txt)
- {
- char add[]={ 128, 64, 32, 16, 8, 4, 2, 1 };
- unsigned char x, val;
- val=0;
- for (x=0; x<8; x++)
- {
- if (*(txt+9+x)!='.' &&
- *(txt+9+x)!=250) val=val+add[x];
- }
- return val;
- }
-
-
-
-
-