Skip to content
Snippets Groups Projects
Commit bb588d90 authored by rswindell's avatar rswindell
Browse files

Deuce's support for FLTK cross-platform C/C++ GUI framework.

Plus my modification to use -T (instead of -G) to disable GUI mode.
parent 63ac92e2
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,7 @@ int main(int argc, char **argv) ...@@ -79,6 +79,7 @@ int main(int argc, char **argv)
int i,j,main_dflt=0,chat_dflt=0; int i,j,main_dflt=0,chat_dflt=0;
char str[129]; char str[129];
char exepath[MAX_PATH+1]; char exepath[MAX_PATH+1];
BOOL gui_mode=TRUE;
BOOL door_mode=FALSE; BOOL door_mode=FALSE;
printf("\r\nSynchronet Configuration Utility (%s) v%s Copyright 2002 " printf("\r\nSynchronet Configuration Utility (%s) v%s Copyright 2002 "
...@@ -102,8 +103,6 @@ int main(int argc, char **argv) ...@@ -102,8 +103,6 @@ int main(int argc, char **argv)
switch(toupper(argv[i][1])) { switch(toupper(argv[i][1])) {
case 'M': /* Show free mem */ case 'M': /* Show free mem */
case 'N': /* No EMS */ case 'N': /* No EMS */
case 'T': /* Windows/OS2 time slice API */
/* do nothing */
continue; continue;
case 'C': case 'C':
uifc.mode|=UIFC_COLOR; uifc.mode|=UIFC_COLOR;
...@@ -132,11 +131,14 @@ int main(int argc, char **argv) ...@@ -132,11 +131,14 @@ int main(int argc, char **argv)
case 'E': case 'E':
uifc.esc_delay=atoi(argv[i]+2); uifc.esc_delay=atoi(argv[i]+2);
break; break;
case 'T':
gui_mode=FALSE;
break;
case 'I': case 'I':
uifc.mode|=UIFC_IBM; uifc.mode|=UIFC_IBM;
break; break;
case 'V': case 'V':
#if !defined(__unix__) #if !defined(__unix__) && !defined(_MSC_VER)
textmode(atoi(argv[i]+2)); textmode(atoi(argv[i]+2));
#endif #endif
break; break;
...@@ -148,16 +150,20 @@ int main(int argc, char **argv) ...@@ -148,16 +150,20 @@ int main(int argc, char **argv)
"-u = update all message base status headers\r\n" "-u = update all message base status headers\r\n"
"-h = don't update message base status headers\r\n" "-h = don't update message base status headers\r\n"
"-d = run in standard input/output/door mode\r\n" "-d = run in standard input/output/door mode\r\n"
#ifdef USE_FLTK
"-t = use text/terminal user interface (disable GUI)\r\n"
#endif
"-c = force color mode\r\n" "-c = force color mode\r\n"
#ifdef USE_CURSES #ifdef USE_CURSES
"-e# = set escape delay to #msec\r\n" "-e# = set escape delay to #msec\r\n"
"-i = force IBM charset\r\n" "-i = force IBM charset\r\n"
#endif #endif
#if !defined(__unix__) #if !defined(__unix__) && !defined(_MSC_VER)
"-v# = set video mode to #\r\n" "-v# = set video mode to # (default=auto)\r\n"
#endif #endif
"-l# = set screen lines to #\r\n" "-l# = set screen lines to # (default=auto-detect)\r\n"
"-b# = set automatic back-up level (default=3 max=10)\r\n" "-b# = set automatic back-up level (default=%d)\r\n"
,backup_level
); );
exit(0); exit(0);
} }
...@@ -176,6 +182,15 @@ if(chdir(cfg.ctrl_dir)!=0) { ...@@ -176,6 +182,15 @@ if(chdir(cfg.ctrl_dir)!=0) {
} }
uifc.size=sizeof(uifc); uifc.size=sizeof(uifc);
#if defined(USE_FLTK)
if(!door_mode && gui_mode==TRUE
#if defined(__unix__)
&& (getenv("DISPLAY")!=NULL)
#endif
)
i=uifcinifltk(&uifc); /* dialog */
else
#endif
#if defined(USE_DIALOG) #if defined(USE_DIALOG)
if(!door_mode) if(!door_mode)
i=uifcinid(&uifc); /* dialog */ i=uifcinid(&uifc); /* dialog */
...@@ -184,7 +199,7 @@ else ...@@ -184,7 +199,7 @@ else
if(!door_mode) if(!door_mode)
i=uifcinic(&uifc); /* curses */ i=uifcinic(&uifc); /* curses */
else else
#elif !defined(__unix__) #elif !defined(__unix__) && !defined(_MSC_VER)
if(!door_mode) if(!door_mode)
i=uifcini(&uifc); /* conio */ i=uifcini(&uifc); /* conio */
else else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment