version 1.15, 2016/01/13 22:47:45 |
version 1.16, 2016/01/26 01:51:06 |
|
|
funcname(type num, char *buf, size_t len) \ |
funcname(type num, char *buf, size_t len) \ |
{ \ |
{ \ |
int neg = (num < 0); \ |
int neg = (num < 0); \ |
char tbuf[INT_STRLEN_BOUND(num)+2]; \ |
char tbuf[23]; \ |
char *s = tbuf + sizeof (tbuf); \ |
char *s = tbuf + sizeof (tbuf); \ |
if (neg) \ |
if (neg) \ |
num = -num; \ |
num = -num; \ |
|
|
static int |
static int |
iprint_int(int num) |
iprint_int(int num) |
{ |
{ |
char buf[INT_STRLEN_BOUND(num)]; |
char buf[11]; |
|
|
inttoa(num, buf, sizeof (buf)); |
inttoa(num, buf, sizeof (buf)); |
putstr(buf); |
putstr(buf); |
|
|
static int |
static int |
iprint_linenum(off_t num) |
iprint_linenum(off_t num) |
{ |
{ |
char buf[INT_STRLEN_BOUND(num)]; |
char buf[21]; |
|
|
postoa(num, buf, sizeof(buf)); |
postoa(num, buf, sizeof(buf)); |
putstr(buf); |
putstr(buf); |