diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-07 22:22:10 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-10-07 22:22:10 +0000 |
commit | 5e564530def28ebbc20b5181f3b021c299384e72 (patch) | |
tree | 1a12bf47ffbb98c2ae2e0d07ce5c45b5b37be7b9 /mdoc_man.c | |
parent | 3caebfc076a37ac9a0c295ca05509a0c1598cf1d (diff) | |
download | mandoc-5e564530def28ebbc20b5181f3b021c299384e72.tar.gz |
Printf size_t vars with %zu, not %ld;
from Antonio Huete Jimenez <tuxillo at quantumachine dot net>
via Franco Fichtner (both DragonFly).
Diffstat (limited to 'mdoc_man.c')
-rw-r--r-- | mdoc_man.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -442,7 +442,7 @@ print_offs(const char *v) if (Bl_stack_len) sz += Bl_stack[Bl_stack_len - 1]; - snprintf(buf, sizeof(buf), "%ldn", sz); + snprintf(buf, sizeof(buf), "%zun", sz); print_word(buf); outflags |= MMAN_nl; } @@ -495,7 +495,7 @@ print_width(const char *v, const struct mdoc_node *child, size_t defsz) remain = sz + 2; } if (numeric) { - snprintf(buf, sizeof(buf), "%ldn", sz + 2); + snprintf(buf, sizeof(buf), "%zun", sz + 2); print_word(buf); } else print_word(v); @@ -1294,7 +1294,7 @@ mid_it(void) /* Restore the indentation of the enclosing list. */ print_line(".RS", MMAN_Bk_susp); - snprintf(buf, sizeof(buf), "%ldn", Bl_stack[Bl_stack_len - 1]); + snprintf(buf, sizeof(buf), "%zun", Bl_stack[Bl_stack_len - 1]); print_word(buf); /* Remeber to close out this .RS block later. */ @@ -1419,7 +1419,7 @@ pre_nm(DECL_ARGS) if (NULL == n->parent->prev) outflags |= MMAN_sp; print_block(".HP", 0); - printf(" %ldn", strlen(name) + 1); + printf(" %zun", strlen(name) + 1); outflags |= MMAN_nl; } font_push('B'); |