Commit 5c1b42a1 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

Handle Ctrl-Z and Ctrl-T.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1590 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9d9ce4d9
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <curses.h> #include <curses.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <signal.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
...@@ -142,17 +143,24 @@ do_curses(struct varnish_stats *VSL_stats, int delay) ...@@ -142,17 +143,24 @@ do_curses(struct varnish_stats *VSL_stats, int delay)
case KEY_RESIZE: case KEY_RESIZE:
erase(); erase();
break; break;
case '\014': case '\014': /* Ctrl-L */
case '\024': /* Ctrl-T */
redrawwin(stdscr); redrawwin(stdscr);
refresh(); refresh();
break; break;
case '\003': /* Ctrl-C */ case '\003': /* Ctrl-C */
raise(SIGINT);
break;
case '\032': /* Ctrl-Z */
raise(SIGTSTP);
break;
case '\021': /* Ctrl-Q */ case '\021': /* Ctrl-Q */
case 'Q': case 'Q':
case 'q': case 'q':
endwin(); endwin();
return; exit(0);
default: default:
beep();
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment