ins_ajbh@jhunix.HCF.JHU.EDU (JABBA) (03/16/89)
Is there some easy way to convert the executioner format images on umn-cs.cs.umn.edu into real gif pictures under UNIX? Thanx -- jim "Work is the Curse of the Drinking Class"
naughton%wind@Sun.COM (Patrick Naughton) (03/17/89)
In article <1143@jhunix.HCF.JHU.EDU> ins_ajbh@jhunix.HCF.JHU.EDU (JABBA) writes: >Is there some easy way to convert the executioner format >images on umn-cs.cs.umn.edu into real gif pictures under >UNIX? > >jim Sure... I looked at the files there for a second and wrote this little hack. have fun. -Patrick --start of included file iigif.c-------------------------------------------- /* iigif.c - converts Apple II "executioner" format GIF images to binary */ #include <stdio.h> main() { char buffer[81]; char *val = "xx"; int i, len, n; do { fgets(buffer, 80, stdin); fprintf(stderr, "%s", buffer); } while (strcmp(buffer, "F00G\n") && (!feof(stdin))); while (!feof(stdin)) { fgets(buffer, 80, stdin); len = strlen(buffer); for (i = 0; i < len - 2; i += 2) { val[0] = buffer[i]; val[1] = buffer[i + 1]; sscanf(val, "%x", &n); printf("%c", n); } } exit(0); } --end of included file iigif.c---------------------------------------------- ______________________________________________________________________ Patrick J. Naughton ARPA: naughton@Sun.COM Window Systems Group UUCP: ...!sun!naughton Sun Microsystems, Inc. AT&T: (415) 336 - 1080