/* rdump.tc - lrb - 5/17/9, 1/29/10, 3/21/10 /* Usage: .rdump "filename.typ" ctoh int c;char a(0) [int i i=c/16;if (i<10) a(0)=i+'0';else a(0)=(i-10)+'A' i=c%16;if (i<10) a(1)=i+'0';else a(1)=(i-10)+'A' ] rdump char fn(0) [ /* dump file in hex and ascii char file(80*128),a(2),b(1),foo(16) int i,j,k,bytes pl "";ps "rdump.tc - tct - 3/21/10";pl "" if ((bytes=readfile(fn,file,file+80*128-1,1))<0) exit pl "Rec ";pn 0;pl "";pl "" for (i=0;i=' ')*(b(0)<='~')) strcat(foo,b) else strcat(foo,".") ctoh(j,a);ps a;ps " " ] if ((j=strlen(foo))==16) [ps " ";ps foo] else if (j) [ while (j<16) [++j;ps " "] ps " ";ps foo ] pl "" ]