enabled 'q' for quitting

This commit is contained in:
Arnout Engelen
2004-07-02 10:50:51 +00:00
parent 64717eca86
commit 01bca55737
2 changed files with 11 additions and 2 deletions

View File

@@ -1,5 +1,8 @@
Changelog
2/07/04 (Arnout)
-enabled 'q' for quitting
29/06/04 (Fabian) <-> 0.5.1
-Adding forceExit when device is ifdown
(handle was null => segfault)

View File

@@ -24,7 +24,7 @@ extern "C" {
#include "process.h"
#include "refresh.h"
bool needrefresh = false;
bool needrefresh = true;
unsigned refreshdelay = 1;
const char version[] = " version " VERSION "." SUBVERSION "." MINORVERSION;
@@ -123,10 +123,11 @@ int main (int argc, char** argv)
}
#if DEBUG
#else
initscr();
WINDOW * screen = initscr();
raw();
noecho();
cbreak();
nodelay(screen, TRUE);
#endif
getLocal(dev);
@@ -152,6 +153,11 @@ int main (int argc, char** argv)
while (1)
{
pcap_dispatch (handle, -1, process, NULL);
switch (getch()) {
case 'q':
quit_cb(0);
break;
}
if (needrefresh)
{
do_refresh();