new function PUTX2 to display an int as an 8 bits hexadecimal
This commit is contained in:
@@ -190,6 +190,13 @@ void PUTI(OBUF *o, int i)
|
||||
PUTS(o, s);
|
||||
}
|
||||
|
||||
void PUTX2(OBUF *o, int i)
|
||||
{
|
||||
char s[64];
|
||||
sprintf(s, "%2.2x", i);
|
||||
PUTS(o, s);
|
||||
}
|
||||
|
||||
void PUTUL(OBUF *o, unsigned long l)
|
||||
{
|
||||
char s[128];
|
||||
|
||||
@@ -44,6 +44,7 @@ void PUTC(OBUF *o, char c);
|
||||
void PUTS(OBUF *o, char *s);
|
||||
void PUTS_CLEAN(OBUF *o, char *s);
|
||||
void PUTI(OBUF *o, int i);
|
||||
void PUTX2(OBUF *o, int i);
|
||||
void PUTUL(OBUF *o, unsigned long i);
|
||||
|
||||
#endif /* _UTILS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user