line_cursor_move: more portable, dont use c99 size_t format string - sob - simple output bar
(HTM) git clone git://git.codemadness.org/sob
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 74da8c1cfc20e7ea947d7d6fb1c97258a3e65b21
(DIR) parent 527078b1efa4cc09042c4521e07ff7dc8c5d6c8e
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 31 Oct 2014 13:36:03 +0000
line_cursor_move: more portable, dont use c99 size_t format string
Diffstat:
M sob.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/sob.c b/sob.c
@@ -294,7 +294,7 @@ line_cursor_move(size_t newpos)
y = (x - (x % cols)) / cols;
x %= cols;
}
- fprintf(outfp, "\x1b[%zu;%zuH", y + 1, x + 1);
+ fprintf(outfp, "\x1b[%lu;%luH", (unsigned long)y + 1, (unsigned long)x + 1);
fflush(outfp);
}