commit 200c1a92277ddc3daf0cde1f4957090f5887b423
Author: Jan Klemkow <[email protected]>
AuthorDate: Mon Apr 20 22:08:47 2020 +0200
Commit: Jan Klemkow <[email protected]>
CommitDate: Mon Apr 20 22:08:47 2020 +0200
add additional information in die calls for debugging
diff --git a/scroll.c b/scroll.c
index f5f79f7..46fe5c0 100644
--- a/scroll.c
+++ b/scroll.c
@@ -231,10 +231,10 @@ getcursorposition(int *x, int *y)
input[n] = '\0';
if (sscanf(input, "\033[%d;%dR", x, y) != 2)
- die("parsing cursor position");
+ die("parsing cursor position: %s", input);
if (x <= 0 || y <= 0)
- die("invalid cursor position");
+ die("invalid cursor position: x=%d y=%d", x, y);
}
void