/* rdhx.c 0.10 15-Mar-2007 J.G.Harston */ /* convert hexfile from stdin to stdout */ /* input is :nnaaaattdddd....ddcc */ #include main() int h,l; char s[80]; char *p; { while (1) { s[0] = 0; gets(s); if (*s == ':') { p=s+9; while (*(p+2)) { h=(*p++)-'0'; if (h>9) h=h-7; l=(*p++)-'0'; if (l>9) l=l-7; putc(h*16+l, stdout); } } } }