Show
Ignore:
Timestamp:
02/04/07 22:03:12 (6 years ago)
Author:
khali
Message:

Drop function hexchar(). What was the point of reinventing printf?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lm-sensors/trunk/prog/dump/isadump.c

    r4316 r4317  
    4747unsigned long isa_io_base = 0; /* XXX for now */ 
    4848#endif /* __powerpc__ */ 
    49  
    50 char hexchar(int i) 
    51 { 
    52         if ((i >= 0) && (i <= 9)) 
    53                 return '0' + i; 
    54         else if (i <= 15) 
    55                 return 'a' - 10 + i; 
    56         else 
    57                 return 'X'; 
    58 } 
    5949 
    6050void help(void) 
     
    306296                                res = inb(datareg); 
    307297                        } 
    308                         printf("%c%c ", hexchar(res/16), hexchar(res%16)); 
     298                        printf("%02x ", res); 
    309299                } 
    310300                printf("\n");