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

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4317 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2007-02-04 21:03:12 +00:00
1 parent a441a7710c
commit 0545ac0ba3
1 file changed
+1 -11
+1 -11
View File
@@ -47,16 +47,6 @@
unsigned long isa_io_base = 0; /* XXX for now */
#endif /* __powerpc__ */
char hexchar(int i)
{
if ((i >= 0) && (i <= 9))
return '0' + i;
else if (i <= 15)
return 'a' - 10 + i;
else
return 'X';
}
void help(void)
{
fprintf(stderr,
@@ -305,7 +295,7 @@ int main(int argc, char *argv[])
outb(i+j, addrreg);
res = inb(datareg);
}
printf("%c%c ", hexchar(res/16), hexchar(res%16));
printf("%02x ", res);
}
printf("\n");
}