From 0046f814aabf119e6bdd3e1284cfca278c57db72 Mon Sep 17 00:00:00 2001 From: arrow zhang Date: Thu, 10 Jan 2008 23:26:47 +0800 Subject: [PATCH] up, now can resize window --- mysql/test/compile.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/mysql/test/compile.c b/mysql/test/compile.c index e367256..2a8930a 100644 --- a/mysql/test/compile.c +++ b/mysql/test/compile.c @@ -40,8 +40,20 @@ static void app_init(void) static void app_exit(void) { + int ch; + refresh(); - getch(); + for (;;) { + ch = getch(); + if (ch == KEY_RESIZE) { + clear(); + app_init(); + mysql(); + refresh(); + continue; + } + break; /* will exit */ + } endwin(); } @@ -102,7 +114,7 @@ static void mysql_show_data(MYSQL *mysql) result = mysql_store_result(mysql); seep("\n"); while (((i ++) < row - 6) && (record = mysql_fetch_row(result))) { - seep("%s - %s - %s - %s \n", record[0], record[1], record[2], record[3]); + seep("%s - %s - %s\n", record[0], record[2], record[3]); } mysql_free_result(result); -- 2.11.4.GIT