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
......@@ -400,6 +400,7 @@ typedef enum { /* Values for xtrn_t.event */
#define XTRN_LWRCASE (1<<17) /* Use lowercase drop-file names */
#define XTRN_SH (1<<18) /* Use command shell to execute */
#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 */
#define XTRN_NO_MUTEX (1<<0) /* Do not use exec_mutex for FOSSIL VXD */
......@@ -740,14 +741,15 @@ enum { /* readmail and delmailidx which types */
#define EX_OUTR (1<<1) /* Copy DOS output to remote */
#define EX_OUTL (1<<2) /* Use _lputc() for local DOS output */
#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_SWAP (1<<5) /* Swap out for this external */
#define EX_POPEN (1<<7) /* Leave COM port open */
#define EX_WWIV WWIVCOLOR /* Expand WWIV color codes to ANSI sequence */
#define EX_SWAP (1<<5) /* Swap out for this external (*legacy*) */
#define EX_POPEN (1<<7) /* Leave COM port open (*legacy*) */
#define EX_OFFLINE (1<<8) /* Run this program offline */
#define EX_BG (1<<10) /* Back-ground/detached process */
#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_CHKTIME (1<<16) /* Check time left (XTRN_CHKTIME) */
#define EX_NATIVE XTRN_NATIVE /* Native 32-bit application */
#define EX_CHKTIME XTRN_CHKTIME /* Check time left */
#define EX_NOECHO XTRN_NOECHO /* Don't echo stdin to stdout */
#if defined(__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)
&& WriteFile(wrslot,bp,wr,&len,NULL)==TRUE) {
RingBufRead(&inbuf, NULL, len);
wr=len;
if(use_pipes) {
if(use_pipes && !(mode&EX_NOECHO)) {
/* echo */
RingBufWrite(&outbuf, bp, wr);
}
......
......@@ -1678,26 +1678,15 @@ bool sbbs_t::exec_xtrn(uint xtrnnum)
mode|=EX_SH;
if(cfg.xtrn[xtrnnum]->misc&IO_INTS)
mode|=(EX_OUTR|EX_INR|EX_OUTL);
if(cfg.xtrn[xtrnnum]->misc&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 */
mode|=(cfg.xtrn[xtrnnum]->misc&(XTRN_CHKTIME|XTRN_NATIVE|XTRN_NOECHO|WWIVCOLOR));
if(cfg.xtrn[xtrnnum]->misc&MODUSERDAT) { /* Delete MODUSER.DAT */
sprintf(str,"%sMODUSER.DAT",dropdir); /* if for some weird */
remove(str); /* reason it's there */
}
start=time(NULL);
external(cmdstr(cfg.xtrn[xtrnnum]->cmd,path
#if 0 /* old way */
,dropdir
#else /* new way, as of Feb-20-2003 */
,cfg.xtrn[xtrnnum]->path
#endif
,NULL)
,mode
,cfg.xtrn[xtrnnum]->path);
......
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