5 printf("bin2hex - converts a file into a hex string\n"
6 "he output is written to stdout\n"
11 int main(int argc
, char** argv
) {
12 if(argc
!= 2) return syntax();
13 FILE *f
= fopen(argv
[1], "r");
14 if(!f
) { perror("fopen"); return 1; }
16 while(fread(buf
, 1, 1, f
)) {
17 printf("%02x", buf
[0]);