root/arch/i386/kernel/hexify.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 #include <stdio.h>
   2 
   3 
   4 void main()
     /* [<][>][^][v][top][bottom][index][help] */
   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                 

/* [<][>][^][v][top][bottom][index][help] */