ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / arch / cris / kernel / hexify.c
1 #include <stdio.h>
2
3
4 void main()
5 {
6         int c;
7         int comma=0;
8         int count=0;
9         while((c=getchar())!=EOF)
10         {
11                 unsigned char x=c;
12                 if(comma)
13                         printf(",");
14                 else
15                         comma=1;
16                 if(count==8)
17                 {
18                         count=0;
19                         printf("\n");
20                 }
21                 if(count==0)
22                         printf("\t");
23                 printf("0x%02X",c);
24                 count++;
25         }
26         if(count)
27                 printf("\n");
28         exit(0);
29 }
30
31