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

Added support for XTRN_NOECHO, for native stdio apps that handle their own

echoing of input.
parent c5429408
No related branches found
No related tags found
No related merge requests found
...@@ -400,6 +400,7 @@ typedef enum { /* Values for xtrn_t.event */ ...@@ -400,6 +400,7 @@ typedef enum { /* Values for xtrn_t.event */
#define XTRN_LWRCASE (1<<17) /* Use lowercase drop-file names */ #define XTRN_LWRCASE (1<<17) /* Use lowercase drop-file names */
#define XTRN_SH (1<<18) /* Use command shell to execute */ #define XTRN_SH (1<<18) /* Use command shell to execute */
#define XTRN_PAUSE (1<<19) /* Force a screen pause on exit */ #define XTRN_PAUSE (1<<19) /* Force a screen pause on exit */
#define XTRN_NOECHO (1<<20) /* Don't echo stdin to stdout */
/* Bits in cfg.xtrn_misc */ /* Bits in cfg.xtrn_misc */
#define XTRN_NO_MUTEX (1<<0) /* Do not use exec_mutex for FOSSIL VXD */ #define XTRN_NO_MUTEX (1<<0) /* Do not use exec_mutex for FOSSIL VXD */
...@@ -740,14 +741,15 @@ enum { /* readmail and delmailidx which types */ ...@@ -740,14 +741,15 @@ enum { /* readmail and delmailidx which types */
#define EX_OUTR (1<<1) /* Copy DOS output to remote */ #define EX_OUTR (1<<1) /* Copy DOS output to remote */
#define EX_OUTL (1<<2) /* Use _lputc() for local DOS output */ #define EX_OUTL (1<<2) /* Use _lputc() for local DOS output */
#define EX_INR (1<<3) /* Trap int 16h keyboard input requests */ #define EX_INR (1<<3) /* Trap int 16h keyboard input requests */
#define EX_WWIV (1<<4) /* Expand WWIV color codes to ANSI sequence */ #define EX_WWIV WWIVCOLOR /* Expand WWIV color codes to ANSI sequence */
#define EX_SWAP (1<<5) /* Swap out for this external */ #define EX_SWAP (1<<5) /* Swap out for this external (*legacy*) */
#define EX_POPEN (1<<7) /* Leave COM port open */ #define EX_POPEN (1<<7) /* Leave COM port open (*legacy*) */
#define EX_OFFLINE (1<<8) /* Run this program offline */ #define EX_OFFLINE (1<<8) /* Run this program offline */
#define EX_BG (1<<10) /* Back-ground/detached process */ #define EX_BG (1<<10) /* Back-ground/detached process */
#define EX_BIN (1<<11) /* Binary mode (no Unix LF to CRLF) */ #define EX_BIN (1<<11) /* Binary mode (no Unix LF to CRLF) */
#define EX_NATIVE (1<<14) /* Native 32-bit application (XTRN_NATIVE) */ #define EX_NATIVE XTRN_NATIVE /* Native 32-bit application */
#define EX_CHKTIME (1<<16) /* Check time left (XTRN_CHKTIME) */ #define EX_CHKTIME XTRN_CHKTIME /* Check time left */
#define EX_NOECHO XTRN_NOECHO /* Don't echo stdin to stdout */
#if defined(__unix) #if defined(__unix)
#define EX_WILDCARD EX_SH /* Expand wildcards using 'sh' on Unix */ #define EX_WILDCARD EX_SH /* Expand wildcards using 'sh' on Unix */
......
...@@ -788,7 +788,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir) ...@@ -788,7 +788,7 @@ int sbbs_t::external(const char* cmdline, long mode, const char* startup_dir)
&& WriteFile(wrslot,bp,wr,&len,NULL)==TRUE) { && WriteFile(wrslot,bp,wr,&len,NULL)==TRUE) {
RingBufRead(&inbuf, NULL, len); RingBufRead(&inbuf, NULL, len);
wr=len; wr=len;
if(use_pipes) { if(use_pipes && !(mode&EX_NOECHO)) {
/* echo */ /* echo */
RingBufWrite(&outbuf, bp, wr); RingBufWrite(&outbuf, bp, wr);
} }
......
...@@ -1678,14 +1678,7 @@ bool sbbs_t::exec_xtrn(uint xtrnnum) ...@@ -1678,14 +1678,7 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
mode|=EX_SH; mode|=EX_SH;
if(cfg.xtrn[xtrnnum]->misc&IO_INTS) if(cfg.xtrn[xtrnnum]->misc&IO_INTS)
mode|=(EX_OUTR|EX_INR|EX_OUTL); mode|=(EX_OUTR|EX_INR|EX_OUTL);
if(cfg.xtrn[xtrnnum]->misc&WWIVCOLOR) mode|=(cfg.xtrn[xtrnnum]->misc&(XTRN_CHKTIME|XTRN_NATIVE|XTRN_NOECHO|WWIVCOLOR));
mode|=EX_WWIV;
if(cfg.xtrn[xtrnnum]->misc&SWAP)
mode|=EX_SWAP;
if(cfg.xtrn[xtrnnum]->misc&XTRN_NATIVE)
mode|=EX_NATIVE;
if(cfg.xtrn[xtrnnum]->misc&XTRN_CHKTIME)
mode|=EX_CHKTIME;
if(cfg.xtrn[xtrnnum]->misc&MODUSERDAT) { /* Delete MODUSER.DAT */ if(cfg.xtrn[xtrnnum]->misc&MODUSERDAT) { /* Delete MODUSER.DAT */
sprintf(str,"%sMODUSER.DAT",dropdir); /* if for some weird */ sprintf(str,"%sMODUSER.DAT",dropdir); /* if for some weird */
remove(str); /* reason it's there */ remove(str); /* reason it's there */
...@@ -1693,11 +1686,7 @@ bool sbbs_t::exec_xtrn(uint xtrnnum) ...@@ -1693,11 +1686,7 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
start=time(NULL); start=time(NULL);
external(cmdstr(cfg.xtrn[xtrnnum]->cmd,path external(cmdstr(cfg.xtrn[xtrnnum]->cmd,path
#if 0 /* old way */
,dropdir
#else /* new way, as of Feb-20-2003 */
,cfg.xtrn[xtrnnum]->path ,cfg.xtrn[xtrnnum]->path
#endif
,NULL) ,NULL)
,mode ,mode
,cfg.xtrn[xtrnnum]->path); ,cfg.xtrn[xtrnnum]->path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment