aboutsummaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/util.c b/util.c
index 6ca83fe..a3c336b 100644
--- a/util.c
+++ b/util.c
@@ -13,10 +13,19 @@ void allLower(char* str)
}
void print_string(const char* str) /* print string, slowly */
{
+ int window_height;
+ int junk;
+ getmaxyx(stdscr, window_height, junk);
int i=0;
while(str[i])
{
addch(str[i]);
+ int cursx, cursy;
+ getyx(stdscr, cursy, cursx);
+ if(cursy==window_height)
+ {
+ scroll(stdscr);
+ }
usleep(SLEEP_TIME);
refresh();
++i;