little dectshark changes
git-svn-id: https://dedected.org/svn/trunk@83 8d8ab74c-27aa-4a3d-9bde-523a2bc1f624
This commit is contained in:
parent
9e4a12118c
commit
606f577b64
|
@ -38,6 +38,9 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void printnil(char *,...)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -24,3 +24,13 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
extern config cfg;
|
extern config cfg;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void printnil(char *,...);
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
#define LOG printf
|
||||||
|
#else
|
||||||
|
#define LOG printnil
|
||||||
|
#endif
|
||||||
|
|
|
@ -26,7 +26,7 @@ void print_gui::work()
|
||||||
{
|
{
|
||||||
case 'q':
|
case 'q':
|
||||||
cfg.stop();
|
cfg.stop();
|
||||||
goto end;
|
exit(0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,14 +47,12 @@ void print_gui::work()
|
||||||
case SNIFFMODE_SCAN:
|
case SNIFFMODE_SCAN:
|
||||||
break;
|
break;
|
||||||
case SNIFFMODE_SYNC:
|
case SNIFFMODE_SYNC:
|
||||||
gui=new syncmode_gui(SW,SH);
|
gui=new syncmode_gui(COLS>=80?COLS:80,LINES>=25?LINES:25);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
end: return;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,7 +69,9 @@ void print_gui::initcurses()
|
||||||
init_pair(5,COLOR_YELLOW,COLOR_GREEN);
|
init_pair(5,COLOR_YELLOW,COLOR_GREEN);
|
||||||
init_pair(6,COLOR_RED,COLOR_GREEN);
|
init_pair(6,COLOR_RED,COLOR_GREEN);
|
||||||
|
|
||||||
gui=new scanmode_gui(SW,SH);
|
|
||||||
|
|
||||||
|
gui=new scanmode_gui(COLS>=80?COLS:80,LINES>=25?LINES:25);
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_gui::refreshscreen()
|
void print_gui::refreshscreen()
|
||||||
|
|
|
@ -6,9 +6,6 @@
|
||||||
#include "scanmode_gui.h"
|
#include "scanmode_gui.h"
|
||||||
#include "syncmode_gui.h"
|
#include "syncmode_gui.h"
|
||||||
|
|
||||||
#define SW 80
|
|
||||||
#define SH 25
|
|
||||||
|
|
||||||
|
|
||||||
class print_gui
|
class print_gui
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,19 +3,20 @@
|
||||||
|
|
||||||
#include "dectshark.h"
|
#include "dectshark.h"
|
||||||
|
|
||||||
|
|
||||||
class mode_gui
|
class mode_gui
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
mode_gui() {printf("ARRRR1!\n");}
|
mode_gui() {LOG("ARRRR1!\n");}
|
||||||
mode_gui(int x,int y) {printf("ARRRR2!\n");}
|
mode_gui(int x,int y) {LOG("ARRRR2!\n");}
|
||||||
virtual ~mode_gui() {printf("ARRRR3!\n");}
|
virtual ~mode_gui() {LOG("ARRRR3!\n");}
|
||||||
|
|
||||||
virtual WINDOW *getmainwin() {printf("ARRRR4!\n");return NULL;}
|
virtual WINDOW *getmainwin() {LOG("ARRRR4!\n");return NULL;}
|
||||||
|
|
||||||
virtual void tick() {printf("ARRRR5!\n");}
|
virtual void tick() {LOG("ARRRR5!\n");}
|
||||||
virtual unsigned int keypressed(int key) {printf("ARRRR6!\n");return 0;}
|
virtual unsigned int keypressed(int key) {LOG("ARRRR6!\n");return 0;}
|
||||||
|
|
||||||
virtual void refreshscreen() {printf("ARRRR7!\n");}
|
virtual void refreshscreen() {LOG("ARRRR7!\n");}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue