--- sbbs/sbbs2/scfg/scfgnode.c 2018/04/24 16:37:52 1.1.1.1 +++ sbbs/sbbs2/scfg/scfgnode.c 2018/04/24 16:39:23 1.1.1.2 @@ -1,2163 +1,2163 @@ -#line 2 "SCFGNODE.C" - -/* Developed 1990-1997 by Rob Swindell; PO Box 501, Yorba Linda, CA 92885 */ - -/****************************************************************************/ -/* Synchronet configuration utility */ -/****************************************************************************/ - -#include "scfg.h" -#include "spawno.h" - -int com_type() -{ - int i; - -i=0; -strcpy(opt[0],"UART"); -strcpy(opt[1],"FOSSIL Int 14h"); -strcpy(opt[2],"PC BIOS Int 14h"); -strcpy(opt[3],"PS/2 BIOS Int 14h"); -strcpy(opt[4],"DigiBoard Int 14h"); -opt[5][0]=0; -SETHELP(WHERE); -/* -COM Port Type: - -Select the type of serial COM port for this node. If you are unsure, -select UART. If you have a FOSSIL driver installed, you do not have to -select FOSSIL unless you specifically want to override Synchronet's -internal COM functions. -*/ -i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0 - ,"COM Port Type",opt); -if(i==-1) - return(0); -changes=1; -if(i) { - com_irq=com_port-1; - if(i==1) { - savnum=0; - umsg("WARNING: This is not a recommended setting for most systems"); - umsg("The default DSZ command lines will not work with this setting"); - com_base=0xf; } - else if(i==2) - com_base=0xb; - else if(i==3) - com_base=0xe; - else if(i==4) - com_base=0xd; } - -else { /* UART */ - if(com_port && com_port<5) { - i=0; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; - SETHELP(WHERE); -/* -Use Default UART IRQ and I/O Address: - -If your COM Port's UART is using the normal IRQ and Base I/O Address -for the configured COM Port number, select Yes. If your COM Port -is using a non-standard IRQ or I/O Address, select No and be sure -to set the UART IRQ and UART I/O Address options. If you are not -sure what IRQ and I/O Address your COM Port is using, select Yes. -*/ - i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0 - ,"Use Default UART IRQ and I/O Address" - ,opt); - if(i==0) { - switch(com_port) { - case 1: - com_irq=4; - com_base=0x3f8; - break; - case 2: - com_irq=3; - com_base=0x2f8; - break; - case 3: - com_irq=4; - com_base=0x3e8; - break; - case 4: - com_irq=3; - com_base=0x2e8; - break; } - changes=1; - return(1); } } - else { - if(com_base<0x100) - com_base=0x100; - if(com_irq<2 || com_irq>15) - com_irq=5; } } -return(0); -} - -void node_menu() -{ - char done,str[81],savnode=0; - int i,j; - static int node_menu_dflt,node_bar; - -while(1) { - for(i=0;i1) - j|=WIN_DEL|WIN_GET; - if(sys_nodes0) { - if(str[strlen(str)-1]!='\\') - strcat(str,"\\"); - strcat(str,"CTRL\\"); - strcpy(ctrl_dir,str); } - break; - case 10: - strcpy(str,text_dir); - if(strstr(str,"\\TEXT\\")!=NULL) - *strstr(str,"\\TEXT\\")=0; -SETHELP(WHERE); -/* -Text Directory Parent: - -Your text directory contains read-only text files. Synchronet never -writes to any files in this directory so it CAN be placed on a RAM -disk or other volatile media. This directory contains the system's menus -and other important text files, so be sure the files and directories are -moved to this directory if you decide to change it. - -This option allows you to change the parent of your control directory. -The \TEXT\ suffix (sub-directory) cannot be changed or removed. -*/ - if(uinput(WIN_MID|WIN_SAV,0,10,"Text Dir Parent" - ,str,50,K_EDIT|K_UPPER)>0) { - if(str[strlen(str)-1]!='\\') - strcat(str,"\\"); - strcat(str,"TEXT\\"); - strcpy(text_dir,str); } - break; - case 11: - strcpy(str,temp_dir); -SETHELP(WHERE); -/* -Temp Directory: - -Your temp directory is where Synchronet stores files of a temporary -nature for this node. Each node MUST have its own unique temp directory. -This directory can exist on a RAM disk or other volatile media. For -the best batch upload performance, it should be located on the same -drive as the majority of your upload directories. -*/ - uinput(WIN_MID|WIN_SAV,0,10,"Temp Directory" - ,str,50,K_EDIT|K_UPPER); - if(!strlen(str)) - umsg("Temp directory cannot be blank"); - else - strcpy(temp_dir,str); - break; - case 12: - strcpy(str,node_swapdir); -SETHELP(WHERE); -/* -Swap Directory: - -Your swap directory is where Synchronet will swap out to if you have -swapping enabled, and it is necessary to swap to disk. The default is -the node directory. If you do specify a swap directory, it must not -be a relative path (i.e. "..\etc"). Specify the entire path and include -the drive letter specification (i.e. "D:\SBBS\SWAP"). -*/ - uinput(WIN_MID|WIN_SAV,0,10,"Swap Directory" - ,str,50,K_EDIT|K_UPPER); - if(str[0] && strcmp(str,".") && strcmp(str,".\\") - && (strstr(str,"..") || str[1]!=':' - || str[2]!='\\')) - umsg("Must specify full path"); - else - strcpy(node_swapdir,str); - break; } } - break; - case 11: -SETHELP(WHERE); -/* -Wait for Call Number Key Commands: - -Each of the number keys (0 through 9) can be assigned a command to -execute when entered at the wait for call screen. This is a list of -those keys and the assigned commands. Since Synchronet is still in -memory when these command are executed, the number keys should be used -for small program execution or command lines with small memory -requirements. - -If you have a program or command line with large memory requirements, -use a Wait for Call Function Key Command. -*/ - j=0; - while(1) { - for(i=0;i<10;i++) - sprintf(opt[i],"%d %s",i,wfc_cmd[i]); - opt[i][0]=0; - savnum=0; - - i=ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,50,&j,0 - ,"Number Key Commands",opt); - if(i==-1) - break; - sprintf(str,"%d Key Command Line",i); - uinput(WIN_MID|WIN_SAV,0,0,str,wfc_cmd[i],50,K_EDIT); } - break; - case 12: -SETHELP(WHERE); -/* -Wait for Call Function Key Commands: - -Each of the function keys (F1 through F12) can be assigned a command to -execute when entered at the wait for call screen. This is a list of -those keys and the currently assigned commands. Synchronet will shrink -to 16K of RAM before executing one of these command lines. - -If you have a command line with small memory requirements, you should -probably use a Wait for Call Number Key Command for faster execution. -*/ - j=0; - while(1) { - for(i=0;i<12;i++) - sprintf(opt[i],"F%-2d %s",i+1,wfc_scmd[i]); - opt[i][0]=0; - savnum=0; - i=ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,50,&j,0 - ,"Function Key (Shrinking) Commands",opt); - if(i==-1) - break; - sprintf(str,"F%d Key Command Line",i+1); - uinput(WIN_MID|WIN_SAV,0,0,str,wfc_scmd[i],50,K_EDIT); } - break; - case 10: - done=0; - while(!done) { - i=0; - sprintf(opt[i++],"%-27.27s%s","COM Port" - ,com_port ? itoa(com_port,tmp,10) : "Disabled"); - sprintf(opt[i++],"%-27.27s%u" - ,com_base && com_base<0x100 ? "COM Channel" - :"UART IRQ Line" - ,com_irq); - if(com_base==0xd) - strcpy(str,"DigiBoard"); - else if(com_base==0xf) - strcpy(str,"FOSSIL"); - else if(com_base==0xb) - strcpy(str,"PC BIOS"); - else if(com_base==0xe) - strcpy(str,"PS/2 BIOS"); - else - sprintf(str,"%Xh",com_base); - sprintf(opt[i++],"%-27.27s%s" - ,com_base<0x100 ? "COM Type":"UART I/O Address",str); - sprintf(opt[i++],"%-27.27s%lu","DTE Rate",com_rate); - sprintf(opt[i++],"%-27.27s%s","Fixed DTE Rate" - ,mdm_misc&MDM_STAYHIGH ? "Yes" : "No"); - if(!(mdm_misc&(MDM_RTS|MDM_CTS))) - strcpy(str,"None"); - else { - if(mdm_misc&MDM_CTS) { - strcpy(str,"CTS"); - if(mdm_misc&MDM_RTS) - strcat(str,"/"); } - else str[0]=0; - if(mdm_misc&MDM_RTS) - strcat(str,"RTS"); } - sprintf(opt[i++],"%-27.27s%s","Hardware Flow Control",str); - sprintf(opt[i++],"%-27.27s%u ring%c","Answer After" - ,mdm_rings,mdm_rings>1 ? 's':' '); - sprintf(opt[i++],"%-27.27s%u second%c","Answer Delay" - ,mdm_ansdelay,mdm_ansdelay>1 ? 's':' '); - sprintf(opt[i++],"%-27.27s%s","Reinitialization Timer" - ,mdm_reinit ? itoa(mdm_reinit,tmp,10) : "Disabled"); - strcpy(opt[i++],"Result Codes..."); - strcpy(opt[i++],"Toggle Options..."); - strcpy(opt[i++],"Control Strings..."); - strcpy(opt[i++],"Auto-Configuration..."); - strcpy(opt[i++],"Import Configuration..."); - strcpy(opt[i++],"Export Configuration..."); - opt[i][0]=0; - savnum=0; -SETHELP(WHERE); -/* -Modem Configuration Menu: - -This menu contains the configuration options for this node's modem. -If you do not have a modem attached to this node or do not want to use -an attached modem, you can disable the Synchronet modem communications -by setting the COM Port to 0. - -If your modem is listed in the Auto-Configuration, you should probably -just set the COM Port and run the auto-configuration for your modem -type. -*/ - switch(ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,44,&mdm_dflt,0 - ,"Modem Configuration",opt)) { - case -1: - done=1; - break; - case 0: - itoa(com_port,str,10); -SETHELP(WHERE); -/* -COM Port: - -This is the serial communications port that the modem for this node is -connected to. If you do not have a modem connected to this node, or -do not wish to use a connected modem, you can disable the Synchronet -modem communications by setting this value to 0. -*/ - if(uinput(WIN_MID|WIN_SAV,0,10,"COM Port (0=Disabled)" - ,str,2,K_EDIT|K_NUMBER)==-1) - break; - com_port=atoi(str); - if(!com_port) - break; - savnum=1; - com_type(); - break; - case 1: - itoa(com_irq,str,10); -SETHELP(WHERE); -/* -UART IRQ Line or Channel Number: - -If you are using a standard UART serial interface for this COM port, -this is the IRQ line that your COM Port's UART is using. If you have -configured your COM Port and selected the default IRQ and I/O address, -you should not need to change the value of this option. - -If this COM port is accessed via Int 14h, this is the channel number -for this COM port (normally, the COM port number minus one). -*/ - uinput(WIN_MID|WIN_SAV,0,10 - ,com_base && com_base<0x100 ? "Channel" - : "UART IRQ Line" - ,str,2,K_EDIT|K_NUMBER); - com_irq=atoi(str); - break; - case 2: - savnum=1; - if(com_type() || com_base<0x100) - break; -SETHELP(WHERE); -/* -UART I/O Address in Hex: - -This is the base I/O address of your COM Port's UART. If you have -configured your COM Port and selected the default IRQ and I/O address, -you should not need to change the value of this option. If this node's -COM Port's UART is using a non-standard I/O address, enter that address -(in hexadecimal) using this option. -*/ - itoa(com_base,str,16); - strupr(str); - uinput(WIN_MID|WIN_SAV,0,10 - ,"UART I/O Address in Hex" - ,str,4,K_EDIT|K_UPPER); - com_base=ahtoul(str); - break; - case 3: - savnum=1; -SETHELP(WHERE); -/* -UART (DTE) Rate: - -This is the data transfer rate between your COM Port's UART (Data -Terminal Equipment) and your modem. This is NOT the connect rate of -your modem (Data Communications Equipment). Most high-speed (9600bps+) -modems use a fixed DTE rate that is higher than the highest DCE rate to -allow for data compression and error correction. This value should be -set to the highest DTE rate your modem supports. If you have a 1200 or -2400bps modem without data compression capabilities, this value should -be set to 1200 or 2400 respectively. If you have a high-speed modem, -refer to the modem's manual to find the highest supported DTE rate. -*/ - i=0; - strcpy(opt[i++],"300"); - strcpy(opt[i++],"1200"); - strcpy(opt[i++],"2400"); - strcpy(opt[i++],"4800"); - strcpy(opt[i++],"9600"); - strcpy(opt[i++],"19200"); - strcpy(opt[i++],"38400"); - strcpy(opt[i++],"57600"); - strcpy(opt[i++],"115200"); - opt[i][0]=0; - switch(com_rate) { - default: - i=0; - break; - case 1200: - i=1; - break; - case 2400: - i=2; - break; - case 4800: - i=3; - break; - case 9600: - i=4; - break; - case 19200: - i=5; - break; - case 38400: - i=6; - break; - case 57600: - i=7; - break; - case 115200L: - i=8; - break; } - i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"UART (DTE) Rate" - ,opt); - if(i==-1) - break; - changes=1; - switch(i) { - default: - com_rate=300; - break; - case 1: - com_rate=1200; - break; - case 2: - com_rate=2400; - break; - case 3: - com_rate=4800; - break; - case 4: - com_rate=9600; - break; - case 5: - com_rate=19200; - break; - case 6: - com_rate=38400; - break; - case 7: - com_rate=57600; - break; - case 8: - com_rate=115200L; - break; } - break; - case 4: - i=1; - savnum=1; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Use Fixed DTE Rate: - -If this node is using a modem with error correction or data compression -capabilities, set this option to Yes. If you are using a 2400bps or -slower modem, it is most likely this value should be set to No. -*/ - i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"Use Fixed " - "DTE Rate",opt); - if(i==0 && !(mdm_misc&MDM_STAYHIGH)) { - mdm_misc|=MDM_STAYHIGH; - changes=1; } - else if(i==1 && mdm_misc&MDM_STAYHIGH) { - mdm_misc&=~MDM_STAYHIGH; - changes=1; } - break; - case 5: - i=1; - savnum=1; - strcpy(opt[0],"Both"); - strcpy(opt[1],"CTS Only"); - strcpy(opt[2],"RTS Only"); - strcpy(opt[3],"None"); - opt[4][0]=0; - i=0; -SETHELP(WHERE); -/* -Hardware Flow Control (CTS/RTS): - -If your modem supports the use of hardware flow control via CTS/RTS -(Clear to Send/Request to Send), set this option to Both. If are using -a high-speed modem or a modem with data compression or error correction -capabilities, it is most likely this option should be set to Both. If -you are using a 2400bps or slower modem without data compression or -error correction capabilities, set this option to None. -*/ - i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"Hardware " - "Flow Control (CTS/RTS)",opt); - if(i==0 - && (mdm_misc&(MDM_CTS|MDM_RTS)) - !=(MDM_CTS|MDM_RTS)) { - mdm_misc|=(MDM_CTS|MDM_RTS); - changes=1; } - else if(i==1 - && (mdm_misc&(MDM_CTS|MDM_RTS))!=MDM_CTS) { - mdm_misc|=MDM_CTS; - mdm_misc&=~MDM_RTS; - changes=1; } - else if(i==2 - && (mdm_misc&(MDM_CTS|MDM_RTS))!=MDM_RTS) { - mdm_misc|=MDM_RTS; - mdm_misc&=~MDM_CTS; - changes=1; } - else if(i==3 - && mdm_misc&(MDM_CTS|MDM_RTS)) { - mdm_misc&=~(MDM_RTS|MDM_CTS); - changes=1; } - break; - - case 6: -SETHELP(WHERE); -/* -Number of Rings to Answer After: - -This is the number of rings to let pass before answering the phone. -*/ - itoa(mdm_rings,str,10); - uinput(WIN_MID|WIN_SAV,0,0 - ,"Number of Rings to Answer After" - ,str,2,K_EDIT|K_NUMBER); - mdm_rings=atoi(str); - if(!mdm_rings) - mdm_rings=1; - break; - - case 7: -SETHELP(WHERE); -/* -Seconds to Delay after Answer: - -This is the length of time (in seconds) to delay after connection and -before the terminal detection sequence is trasmitted to the remote user -and the logon prompt is displayed. -*/ - itoa(mdm_ansdelay,str,10); - uinput(WIN_MID|WIN_SAV,0,0 - ,"Answer Delay (in seconds)" - ,str,4,K_EDIT|K_NUMBER); - mdm_ansdelay=atoi(str); - break; - - case 8: -SETHELP(WHERE); -/* -Minutes Between Reinitialization: - -If you want your modem to be periodically reinitialized while waiting -for a caller, set this option to the maximum number of minutes between -initializations. Setting this value to 0 disables this feature. -*/ - itoa(mdm_reinit,str,10); - uinput(WIN_MID|WIN_SAV,0,0 - ,"Minutes Between Reinitialization (0=Disabled)" - ,str,4,K_EDIT|K_NUMBER); - mdm_reinit=atoi(str); - break; - case 9: - dflt=bar=0; - while(1) { - for(i=0;i1) - i|=WIN_DEL; - savnum=1; -SETHELP(WHERE); -/* -Modem Result Codes: - -This is the list of configured numeric connection result codes that this -node's modem supports. If this node is getting Invalid Result Code -errors when answer incoming calls, those result codes should be added -to this list. Refer to your modem's manual for a list of supported -result codes. Using the Auto-Configuration option automatically -configures this list for you. -To add a result code, hit  INS . - -To delete a result code, select it using the arrow keys and hit  DEL . -*/ - i=ulist(i,0,0,34,&dflt,&bar - ,"Modem Result Codes",opt); - if(i==-1) - break; - if((i&MSK_ON)==MSK_DEL) { - i&=MSK_OFF; - mdm_results--; - while(ii;j--) - mdm_result[j]=mdm_result[j-1]; - mdm_result[i]=mdm_result[i+1]; - mdm_results++; - changes=1; - continue; } - results(dflt); } - break; - case 10: /* Toggle Options */ - dflt=0; - while(1) { - savnum=1; - i=0; - sprintf(opt[i++],"%-27.27s%s" - ,"Caller Identification" - ,mdm_misc&MDM_CALLERID ? "Yes" : "No"); - sprintf(opt[i++],"%-27.27s%s" - ,"Dumb Modem Connection" - ,mdm_misc&MDM_DUMB ? "Yes" : "No"); - sprintf(opt[i++],"%-27.27s%s" - ,"Drop DTR to Hang Up" - ,mdm_misc&MDM_NODTR ? "No" : "Yes"); - sprintf(opt[i++],"%-27.27s%s" - ,"Use Verbal Result Codes" - ,mdm_misc&MDM_VERBAL ? "Yes" : "No"); - sprintf(opt[i++],"%-27.27s%s" - ,"Allow Unknown Result Codes" - ,mdm_misc&MDM_KNOWNRES ? "No" : "Yes"); - opt[i][0]=0; - i=ulist(WIN_SAV|WIN_ACT,0,0,0,&dflt,0 - ,"Modem Toggle Options",opt); - savnum=2; - if(i==-1) - break; - if(i==0) { - i=1; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Caller Identification: - -If your modem supports Caller ID and is configured to return caller -number delivery messages, set this option to Yes. - -If this option is set to Yes, Synchronet will log caller number delivery -messages. If a caller attempts to connect with a number listed in the -file TEXT\CID.CAN, they will be displayed TEXT\BADCID.MSG (if it exists) -and disconnected. Each user will have their most recent caller ID number -stored in their note field. -*/ - i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0 - ,"Caller ID",opt); - if(i==0 && !(mdm_misc&MDM_CALLERID)) { - mdm_misc|=MDM_CALLERID; - changes=1; } - else if(i==1 && mdm_misc&MDM_CALLERID) { - mdm_misc&=~MDM_CALLERID; - changes=1; } } - else if(i==1) { - i=1; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Dumb Modem Connection: - -If this node is connected to a serial line through a dumb modem, set -this option to Yes to disable all modem commands and answer calls when -DCD is raised. -*/ - i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 - ,"Dumb Modem",opt); - if(i==0 && !(mdm_misc&MDM_DUMB)) { - mdm_misc|=MDM_DUMB; - changes=1; } - else if(i==1 && mdm_misc&MDM_DUMB) { - mdm_misc&=~MDM_DUMB; - changes=1; } } - else if(i==2) { - i=0; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Drop DTR to Hang Up: - -If you wish to have the BBS drop DTR to hang up the modem, set this -option to Yes. If this option is set to No, the Hang Up String is sent -to modem instead. -*/ - i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 - ,"Drop DTR to Hang Up",opt); - if(i==0 && mdm_misc&MDM_NODTR) { - mdm_misc&=~MDM_NODTR; - changes=1; } - else if(i==1 && !(mdm_misc&MDM_NODTR)) { - mdm_misc|=MDM_NODTR; - changes=1; } } - else if(i==3) { - i=1; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Use Verbal Result Codes: - -If you wish to have the BBS expect verbal (or verbose) result codes -from the modem instead of numeric (non-verbose) result codes, set this -option to Yes. - -This option can be useful for modems that insist on returning multiple -result codes upon connection (CARRIER, PROTOCOL, etc) or modems that -do not report numeric result codes correctly. While this option is more -flexible than numeric result codes, it may not be as accurate in -describing the connection or estimating the CPS rate of the connection. - -If this option is set to Yes, the configured result code list will not -be used (you may remove all entries from the list if you wish). The -connection rate, description, and estimated CPS will be automatically -generated by the BBS. -*/ - i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 - ,"Use Verbal Result Codes",opt); - if(i==0 && !(mdm_misc&MDM_VERBAL)) { - mdm_misc|=MDM_VERBAL; - changes=1; } - else if(i==1 && mdm_misc&MDM_VERBAL) { - mdm_misc&=~MDM_VERBAL; - changes=1; } } - else if(i==4) { - i=0; - strcpy(opt[0],"Yes"); - strcpy(opt[1],"No"); - opt[2][0]=0; -SETHELP(WHERE); -/* -Allow Unknown Result Codes: - -If you wish to have the BBS allow modem connections with an unknown -(un-configured) numeric result code by using the last known (configured) -result code information by default, set this option to Yes. - -This option has no effect if Verbal Result Codes are used. -*/ - i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 - ,"Allow Unknown Result Codes",opt); - if(i==0 && mdm_misc&MDM_KNOWNRES) { - mdm_misc&=~MDM_KNOWNRES; - changes=1; } - else if(i==1 && !(mdm_misc&MDM_KNOWNRES)) { - mdm_misc|=MDM_KNOWNRES; - changes=1; } } - } - break; - case 11: -SETHELP(WHERE); -/* -Modem Control Strings: - -This menu contains a list of available modem control strings. It is usually -not necessary to modify these except under special circumstances. -*/ - j=0; - while(1) { - i=0; - savnum=1; - sprintf(opt[i++],"%-27.27s%.40s" - ,"Initialization String",mdm_init); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Special Init String",mdm_spec); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Terminal Init String",mdm_term); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Dial String",mdm_dial); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Off Hook String",mdm_offh); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Answer String",mdm_answ); - sprintf(opt[i++],"%-27.27s%.40s" - ,"Hang Up String",mdm_hang); - opt[i][0]=0; - j=ulist(WIN_ACT|WIN_MID|WIN_SAV,0,0,60,&j,0 - ,"Modem Control Strings",opt); - if(j==-1) - break; - switch(j) { - case 0: -SETHELP(WHERE); -/* -Initialization String: - -This is one of the strings of characters sent to your modem upon -modem initialization. If you find it necessary to send additional -commands to the modem during initialization, use the Special Init String -for that purpose. -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Initialization" - ,mdm_init,50,K_EDIT|K_UPPER); - break; - case 1: -SETHELP(WHERE); -/* -Special Init String: - -This is an additional optional string of characters to be sent to your -modem during initialization. Many of the Auto-Configuration options -automatically set this string. It is used for sending commands that are -particular to this modem type. If you find it necessary to send -additional commands to your modem during initialization, use this option -for that purpose. -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Special Init" - ,mdm_spec,50,K_EDIT|K_UPPER); - break; - case 2: -SETHELP(WHERE); -/* -Terminal Init String: - -This is the string of characters sent to your modem when terminal mode -is entered from the Synchronet wait for call screen. -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Terminal Init" - ,mdm_term,50,K_EDIT|K_UPPER); - break; - case 3: -SETHELP(WHERE); -/* -Dial String: - -This is the string used to dial the modem in Synchronet Callback -(an optional callback verification module). -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Dial String",mdm_dial,40 - ,K_EDIT|K_UPPER); - break; - case 4: -SETHELP(WHERE); -/* -Off Hook String: - -This is the string of characters sent to your modem to take it off hook -(make busy). -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Off Hook String",mdm_offh - ,40,K_EDIT|K_UPPER); - break; - case 5: -SETHELP(WHERE); -/* -Answer String: - -This is the string of characters sent to your modem to answer an -incoming call. -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Answer String",mdm_answ,40 - ,K_EDIT|K_UPPER); - break; - case 6: -SETHELP(WHERE); -/* -Hang Up String: - -This is the string of characters sent to your modem to hang up the -phone line (go on-hook). -*/ - uinput(WIN_MID|WIN_SAV,0,0 - ,"Hang Up String",mdm_hang,40 - ,K_EDIT|K_UPPER); - break; - } } - break; - case 12: - dflt=bar=0; - while(1) { - for(i=0;i15) + com_irq=5; } } +return(0); +} + +void node_menu() +{ + char done,str[81],savnode=0; + int i,j; + static int node_menu_dflt,node_bar; + +while(1) { + for(i=0;i1) + j|=WIN_DEL|WIN_GET; + if(sys_nodes0) { + if(str[strlen(str)-1]!='\\') + strcat(str,"\\"); + strcat(str,"CTRL\\"); + strcpy(ctrl_dir,str); } + break; + case 10: + strcpy(str,text_dir); + if(strstr(str,"\\TEXT\\")!=NULL) + *strstr(str,"\\TEXT\\")=0; +SETHELP(WHERE); +/* +Text Directory Parent: + +Your text directory contains read-only text files. Synchronet never +writes to any files in this directory so it CAN be placed on a RAM +disk or other volatile media. This directory contains the system's menus +and other important text files, so be sure the files and directories are +moved to this directory if you decide to change it. + +This option allows you to change the parent of your control directory. +The \TEXT\ suffix (sub-directory) cannot be changed or removed. +*/ + if(uinput(WIN_MID|WIN_SAV,0,10,"Text Dir Parent" + ,str,50,K_EDIT|K_UPPER)>0) { + if(str[strlen(str)-1]!='\\') + strcat(str,"\\"); + strcat(str,"TEXT\\"); + strcpy(text_dir,str); } + break; + case 11: + strcpy(str,temp_dir); +SETHELP(WHERE); +/* +Temp Directory: + +Your temp directory is where Synchronet stores files of a temporary +nature for this node. Each node MUST have its own unique temp directory. +This directory can exist on a RAM disk or other volatile media. For +the best batch upload performance, it should be located on the same +drive as the majority of your upload directories. +*/ + uinput(WIN_MID|WIN_SAV,0,10,"Temp Directory" + ,str,50,K_EDIT|K_UPPER); + if(!strlen(str)) + umsg("Temp directory cannot be blank"); + else + strcpy(temp_dir,str); + break; + case 12: + strcpy(str,node_swapdir); +SETHELP(WHERE); +/* +Swap Directory: + +Your swap directory is where Synchronet will swap out to if you have +swapping enabled, and it is necessary to swap to disk. The default is +the node directory. If you do specify a swap directory, it must not +be a relative path (i.e. "..\etc"). Specify the entire path and include +the drive letter specification (i.e. "D:\SBBS\SWAP"). +*/ + uinput(WIN_MID|WIN_SAV,0,10,"Swap Directory" + ,str,50,K_EDIT|K_UPPER); + if(str[0] && strcmp(str,".") && strcmp(str,".\\") + && (strstr(str,"..") || str[1]!=':' + || str[2]!='\\')) + umsg("Must specify full path"); + else + strcpy(node_swapdir,str); + break; } } + break; + case 11: +SETHELP(WHERE); +/* +Wait for Call Number Key Commands: + +Each of the number keys (0 through 9) can be assigned a command to +execute when entered at the wait for call screen. This is a list of +those keys and the assigned commands. Since Synchronet is still in +memory when these command are executed, the number keys should be used +for small program execution or command lines with small memory +requirements. + +If you have a program or command line with large memory requirements, +use a Wait for Call Function Key Command. +*/ + j=0; + while(1) { + for(i=0;i<10;i++) + sprintf(opt[i],"%d %s",i,wfc_cmd[i]); + opt[i][0]=0; + savnum=0; + + i=ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,50,&j,0 + ,"Number Key Commands",opt); + if(i==-1) + break; + sprintf(str,"%d Key Command Line",i); + uinput(WIN_MID|WIN_SAV,0,0,str,wfc_cmd[i],50,K_EDIT); } + break; + case 12: +SETHELP(WHERE); +/* +Wait for Call Function Key Commands: + +Each of the function keys (F1 through F12) can be assigned a command to +execute when entered at the wait for call screen. This is a list of +those keys and the currently assigned commands. Synchronet will shrink +to 16K of RAM before executing one of these command lines. + +If you have a command line with small memory requirements, you should +probably use a Wait for Call Number Key Command for faster execution. +*/ + j=0; + while(1) { + for(i=0;i<12;i++) + sprintf(opt[i],"F%-2d %s",i+1,wfc_scmd[i]); + opt[i][0]=0; + savnum=0; + i=ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,50,&j,0 + ,"Function Key (Shrinking) Commands",opt); + if(i==-1) + break; + sprintf(str,"F%d Key Command Line",i+1); + uinput(WIN_MID|WIN_SAV,0,0,str,wfc_scmd[i],50,K_EDIT); } + break; + case 10: + done=0; + while(!done) { + i=0; + sprintf(opt[i++],"%-27.27s%s","COM Port" + ,com_port ? itoa(com_port,tmp,10) : "Disabled"); + sprintf(opt[i++],"%-27.27s%u" + ,com_base && com_base<0x100 ? "COM Channel" + :"UART IRQ Line" + ,com_irq); + if(com_base==0xd) + strcpy(str,"DigiBoard"); + else if(com_base==0xf) + strcpy(str,"FOSSIL"); + else if(com_base==0xb) + strcpy(str,"PC BIOS"); + else if(com_base==0xe) + strcpy(str,"PS/2 BIOS"); + else + sprintf(str,"%Xh",com_base); + sprintf(opt[i++],"%-27.27s%s" + ,com_base<0x100 ? "COM Type":"UART I/O Address",str); + sprintf(opt[i++],"%-27.27s%lu","DTE Rate",com_rate); + sprintf(opt[i++],"%-27.27s%s","Fixed DTE Rate" + ,mdm_misc&MDM_STAYHIGH ? "Yes" : "No"); + if(!(mdm_misc&(MDM_RTS|MDM_CTS))) + strcpy(str,"None"); + else { + if(mdm_misc&MDM_CTS) { + strcpy(str,"CTS"); + if(mdm_misc&MDM_RTS) + strcat(str,"/"); } + else str[0]=0; + if(mdm_misc&MDM_RTS) + strcat(str,"RTS"); } + sprintf(opt[i++],"%-27.27s%s","Hardware Flow Control",str); + sprintf(opt[i++],"%-27.27s%u ring%c","Answer After" + ,mdm_rings,mdm_rings>1 ? 's':' '); + sprintf(opt[i++],"%-27.27s%u second%c","Answer Delay" + ,mdm_ansdelay,mdm_ansdelay>1 ? 's':' '); + sprintf(opt[i++],"%-27.27s%s","Reinitialization Timer" + ,mdm_reinit ? itoa(mdm_reinit,tmp,10) : "Disabled"); + strcpy(opt[i++],"Result Codes..."); + strcpy(opt[i++],"Toggle Options..."); + strcpy(opt[i++],"Control Strings..."); + strcpy(opt[i++],"Auto-Configuration..."); + strcpy(opt[i++],"Import Configuration..."); + strcpy(opt[i++],"Export Configuration..."); + opt[i][0]=0; + savnum=0; +SETHELP(WHERE); +/* +Modem Configuration Menu: + +This menu contains the configuration options for this node's modem. +If you do not have a modem attached to this node or do not want to use +an attached modem, you can disable the Synchronet modem communications +by setting the COM Port to 0. + +If your modem is listed in the Auto-Configuration, you should probably +just set the COM Port and run the auto-configuration for your modem +type. +*/ + switch(ulist(WIN_T2B|WIN_RHT|WIN_ACT|WIN_SAV,2,0,44,&mdm_dflt,0 + ,"Modem Configuration",opt)) { + case -1: + done=1; + break; + case 0: + itoa(com_port,str,10); +SETHELP(WHERE); +/* +COM Port: + +This is the serial communications port that the modem for this node is +connected to. If you do not have a modem connected to this node, or +do not wish to use a connected modem, you can disable the Synchronet +modem communications by setting this value to 0. +*/ + if(uinput(WIN_MID|WIN_SAV,0,10,"COM Port (0=Disabled)" + ,str,2,K_EDIT|K_NUMBER)==-1) + break; + com_port=atoi(str); + if(!com_port) + break; + savnum=1; + com_type(); + break; + case 1: + itoa(com_irq,str,10); +SETHELP(WHERE); +/* +UART IRQ Line or Channel Number: + +If you are using a standard UART serial interface for this COM port, +this is the IRQ line that your COM Port's UART is using. If you have +configured your COM Port and selected the default IRQ and I/O address, +you should not need to change the value of this option. + +If this COM port is accessed via Int 14h, this is the channel number +for this COM port (normally, the COM port number minus one). +*/ + uinput(WIN_MID|WIN_SAV,0,10 + ,com_base && com_base<0x100 ? "Channel" + : "UART IRQ Line" + ,str,2,K_EDIT|K_NUMBER); + com_irq=atoi(str); + break; + case 2: + savnum=1; + if(com_type() || com_base<0x100) + break; +SETHELP(WHERE); +/* +UART I/O Address in Hex: + +This is the base I/O address of your COM Port's UART. If you have +configured your COM Port and selected the default IRQ and I/O address, +you should not need to change the value of this option. If this node's +COM Port's UART is using a non-standard I/O address, enter that address +(in hexadecimal) using this option. +*/ + itoa(com_base,str,16); + strupr(str); + uinput(WIN_MID|WIN_SAV,0,10 + ,"UART I/O Address in Hex" + ,str,4,K_EDIT|K_UPPER); + com_base=ahtoul(str); + break; + case 3: + savnum=1; +SETHELP(WHERE); +/* +UART (DTE) Rate: + +This is the data transfer rate between your COM Port's UART (Data +Terminal Equipment) and your modem. This is NOT the connect rate of +your modem (Data Communications Equipment). Most high-speed (9600bps+) +modems use a fixed DTE rate that is higher than the highest DCE rate to +allow for data compression and error correction. This value should be +set to the highest DTE rate your modem supports. If you have a 1200 or +2400bps modem without data compression capabilities, this value should +be set to 1200 or 2400 respectively. If you have a high-speed modem, +refer to the modem's manual to find the highest supported DTE rate. +*/ + i=0; + strcpy(opt[i++],"300"); + strcpy(opt[i++],"1200"); + strcpy(opt[i++],"2400"); + strcpy(opt[i++],"4800"); + strcpy(opt[i++],"9600"); + strcpy(opt[i++],"19200"); + strcpy(opt[i++],"38400"); + strcpy(opt[i++],"57600"); + strcpy(opt[i++],"115200"); + opt[i][0]=0; + switch(com_rate) { + default: + i=0; + break; + case 1200: + i=1; + break; + case 2400: + i=2; + break; + case 4800: + i=3; + break; + case 9600: + i=4; + break; + case 19200: + i=5; + break; + case 38400: + i=6; + break; + case 57600: + i=7; + break; + case 115200L: + i=8; + break; } + i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"UART (DTE) Rate" + ,opt); + if(i==-1) + break; + changes=1; + switch(i) { + default: + com_rate=300; + break; + case 1: + com_rate=1200; + break; + case 2: + com_rate=2400; + break; + case 3: + com_rate=4800; + break; + case 4: + com_rate=9600; + break; + case 5: + com_rate=19200; + break; + case 6: + com_rate=38400; + break; + case 7: + com_rate=57600; + break; + case 8: + com_rate=115200L; + break; } + break; + case 4: + i=1; + savnum=1; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Use Fixed DTE Rate: + +If this node is using a modem with error correction or data compression +capabilities, set this option to Yes. If you are using a 2400bps or +slower modem, it is most likely this value should be set to No. +*/ + i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"Use Fixed " + "DTE Rate",opt); + if(i==0 && !(mdm_misc&MDM_STAYHIGH)) { + mdm_misc|=MDM_STAYHIGH; + changes=1; } + else if(i==1 && mdm_misc&MDM_STAYHIGH) { + mdm_misc&=~MDM_STAYHIGH; + changes=1; } + break; + case 5: + i=1; + savnum=1; + strcpy(opt[0],"Both"); + strcpy(opt[1],"CTS Only"); + strcpy(opt[2],"RTS Only"); + strcpy(opt[3],"None"); + opt[4][0]=0; + i=0; +SETHELP(WHERE); +/* +Hardware Flow Control (CTS/RTS): + +If your modem supports the use of hardware flow control via CTS/RTS +(Clear to Send/Request to Send), set this option to Both. If are using +a high-speed modem or a modem with data compression or error correction +capabilities, it is most likely this option should be set to Both. If +you are using a 2400bps or slower modem without data compression or +error correction capabilities, set this option to None. +*/ + i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0,"Hardware " + "Flow Control (CTS/RTS)",opt); + if(i==0 + && (mdm_misc&(MDM_CTS|MDM_RTS)) + !=(MDM_CTS|MDM_RTS)) { + mdm_misc|=(MDM_CTS|MDM_RTS); + changes=1; } + else if(i==1 + && (mdm_misc&(MDM_CTS|MDM_RTS))!=MDM_CTS) { + mdm_misc|=MDM_CTS; + mdm_misc&=~MDM_RTS; + changes=1; } + else if(i==2 + && (mdm_misc&(MDM_CTS|MDM_RTS))!=MDM_RTS) { + mdm_misc|=MDM_RTS; + mdm_misc&=~MDM_CTS; + changes=1; } + else if(i==3 + && mdm_misc&(MDM_CTS|MDM_RTS)) { + mdm_misc&=~(MDM_RTS|MDM_CTS); + changes=1; } + break; + + case 6: +SETHELP(WHERE); +/* +Number of Rings to Answer After: + +This is the number of rings to let pass before answering the phone. +*/ + itoa(mdm_rings,str,10); + uinput(WIN_MID|WIN_SAV,0,0 + ,"Number of Rings to Answer After" + ,str,2,K_EDIT|K_NUMBER); + mdm_rings=atoi(str); + if(!mdm_rings) + mdm_rings=1; + break; + + case 7: +SETHELP(WHERE); +/* +Seconds to Delay after Answer: + +This is the length of time (in seconds) to delay after connection and +before the terminal detection sequence is trasmitted to the remote user +and the logon prompt is displayed. +*/ + itoa(mdm_ansdelay,str,10); + uinput(WIN_MID|WIN_SAV,0,0 + ,"Answer Delay (in seconds)" + ,str,4,K_EDIT|K_NUMBER); + mdm_ansdelay=atoi(str); + break; + + case 8: +SETHELP(WHERE); +/* +Minutes Between Reinitialization: + +If you want your modem to be periodically reinitialized while waiting +for a caller, set this option to the maximum number of minutes between +initializations. Setting this value to 0 disables this feature. +*/ + itoa(mdm_reinit,str,10); + uinput(WIN_MID|WIN_SAV,0,0 + ,"Minutes Between Reinitialization (0=Disabled)" + ,str,4,K_EDIT|K_NUMBER); + mdm_reinit=atoi(str); + break; + case 9: + dflt=bar=0; + while(1) { + for(i=0;i1) + i|=WIN_DEL; + savnum=1; +SETHELP(WHERE); +/* +Modem Result Codes: + +This is the list of configured numeric connection result codes that this +node's modem supports. If this node is getting Invalid Result Code +errors when answer incoming calls, those result codes should be added +to this list. Refer to your modem's manual for a list of supported +result codes. Using the Auto-Configuration option automatically +configures this list for you. +To add a result code, hit  INS . + +To delete a result code, select it using the arrow keys and hit  DEL . +*/ + i=ulist(i,0,0,34,&dflt,&bar + ,"Modem Result Codes",opt); + if(i==-1) + break; + if((i&MSK_ON)==MSK_DEL) { + i&=MSK_OFF; + mdm_results--; + while(ii;j--) + mdm_result[j]=mdm_result[j-1]; + mdm_result[i]=mdm_result[i+1]; + mdm_results++; + changes=1; + continue; } + results(dflt); } + break; + case 10: /* Toggle Options */ + dflt=0; + while(1) { + savnum=1; + i=0; + sprintf(opt[i++],"%-27.27s%s" + ,"Caller Identification" + ,mdm_misc&MDM_CALLERID ? "Yes" : "No"); + sprintf(opt[i++],"%-27.27s%s" + ,"Dumb Modem Connection" + ,mdm_misc&MDM_DUMB ? "Yes" : "No"); + sprintf(opt[i++],"%-27.27s%s" + ,"Drop DTR to Hang Up" + ,mdm_misc&MDM_NODTR ? "No" : "Yes"); + sprintf(opt[i++],"%-27.27s%s" + ,"Use Verbal Result Codes" + ,mdm_misc&MDM_VERBAL ? "Yes" : "No"); + sprintf(opt[i++],"%-27.27s%s" + ,"Allow Unknown Result Codes" + ,mdm_misc&MDM_KNOWNRES ? "No" : "Yes"); + opt[i][0]=0; + i=ulist(WIN_SAV|WIN_ACT,0,0,0,&dflt,0 + ,"Modem Toggle Options",opt); + savnum=2; + if(i==-1) + break; + if(i==0) { + i=1; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Caller Identification: + +If your modem supports Caller ID and is configured to return caller +number delivery messages, set this option to Yes. + +If this option is set to Yes, Synchronet will log caller number delivery +messages. If a caller attempts to connect with a number listed in the +file TEXT\CID.CAN, they will be displayed TEXT\BADCID.MSG (if it exists) +and disconnected. Each user will have their most recent caller ID number +stored in their note field. +*/ + i=ulist(WIN_MID|WIN_SAV,0,0,0,&i,0 + ,"Caller ID",opt); + if(i==0 && !(mdm_misc&MDM_CALLERID)) { + mdm_misc|=MDM_CALLERID; + changes=1; } + else if(i==1 && mdm_misc&MDM_CALLERID) { + mdm_misc&=~MDM_CALLERID; + changes=1; } } + else if(i==1) { + i=1; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Dumb Modem Connection: + +If this node is connected to a serial line through a dumb modem, set +this option to Yes to disable all modem commands and answer calls when +DCD is raised. +*/ + i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 + ,"Dumb Modem",opt); + if(i==0 && !(mdm_misc&MDM_DUMB)) { + mdm_misc|=MDM_DUMB; + changes=1; } + else if(i==1 && mdm_misc&MDM_DUMB) { + mdm_misc&=~MDM_DUMB; + changes=1; } } + else if(i==2) { + i=0; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Drop DTR to Hang Up: + +If you wish to have the BBS drop DTR to hang up the modem, set this +option to Yes. If this option is set to No, the Hang Up String is sent +to modem instead. +*/ + i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 + ,"Drop DTR to Hang Up",opt); + if(i==0 && mdm_misc&MDM_NODTR) { + mdm_misc&=~MDM_NODTR; + changes=1; } + else if(i==1 && !(mdm_misc&MDM_NODTR)) { + mdm_misc|=MDM_NODTR; + changes=1; } } + else if(i==3) { + i=1; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Use Verbal Result Codes: + +If you wish to have the BBS expect verbal (or verbose) result codes +from the modem instead of numeric (non-verbose) result codes, set this +option to Yes. + +This option can be useful for modems that insist on returning multiple +result codes upon connection (CARRIER, PROTOCOL, etc) or modems that +do not report numeric result codes correctly. While this option is more +flexible than numeric result codes, it may not be as accurate in +describing the connection or estimating the CPS rate of the connection. + +If this option is set to Yes, the configured result code list will not +be used (you may remove all entries from the list if you wish). The +connection rate, description, and estimated CPS will be automatically +generated by the BBS. +*/ + i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 + ,"Use Verbal Result Codes",opt); + if(i==0 && !(mdm_misc&MDM_VERBAL)) { + mdm_misc|=MDM_VERBAL; + changes=1; } + else if(i==1 && mdm_misc&MDM_VERBAL) { + mdm_misc&=~MDM_VERBAL; + changes=1; } } + else if(i==4) { + i=0; + strcpy(opt[0],"Yes"); + strcpy(opt[1],"No"); + opt[2][0]=0; +SETHELP(WHERE); +/* +Allow Unknown Result Codes: + +If you wish to have the BBS allow modem connections with an unknown +(un-configured) numeric result code by using the last known (configured) +result code information by default, set this option to Yes. + +This option has no effect if Verbal Result Codes are used. +*/ + i=ulist(WIN_SAV|WIN_MID,0,0,0,&i,0 + ,"Allow Unknown Result Codes",opt); + if(i==0 && mdm_misc&MDM_KNOWNRES) { + mdm_misc&=~MDM_KNOWNRES; + changes=1; } + else if(i==1 && !(mdm_misc&MDM_KNOWNRES)) { + mdm_misc|=MDM_KNOWNRES; + changes=1; } } + } + break; + case 11: +SETHELP(WHERE); +/* +Modem Control Strings: + +This menu contains a list of available modem control strings. It is usually +not necessary to modify these except under special circumstances. +*/ + j=0; + while(1) { + i=0; + savnum=1; + sprintf(opt[i++],"%-27.27s%.40s" + ,"Initialization String",mdm_init); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Special Init String",mdm_spec); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Terminal Init String",mdm_term); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Dial String",mdm_dial); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Off Hook String",mdm_offh); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Answer String",mdm_answ); + sprintf(opt[i++],"%-27.27s%.40s" + ,"Hang Up String",mdm_hang); + opt[i][0]=0; + j=ulist(WIN_ACT|WIN_MID|WIN_SAV,0,0,60,&j,0 + ,"Modem Control Strings",opt); + if(j==-1) + break; + switch(j) { + case 0: +SETHELP(WHERE); +/* +Initialization String: + +This is one of the strings of characters sent to your modem upon +modem initialization. If you find it necessary to send additional +commands to the modem during initialization, use the Special Init String +for that purpose. +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Initialization" + ,mdm_init,50,K_EDIT|K_UPPER); + break; + case 1: +SETHELP(WHERE); +/* +Special Init String: + +This is an additional optional string of characters to be sent to your +modem during initialization. Many of the Auto-Configuration options +automatically set this string. It is used for sending commands that are +particular to this modem type. If you find it necessary to send +additional commands to your modem during initialization, use this option +for that purpose. +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Special Init" + ,mdm_spec,50,K_EDIT|K_UPPER); + break; + case 2: +SETHELP(WHERE); +/* +Terminal Init String: + +This is the string of characters sent to your modem when terminal mode +is entered from the Synchronet wait for call screen. +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Terminal Init" + ,mdm_term,50,K_EDIT|K_UPPER); + break; + case 3: +SETHELP(WHERE); +/* +Dial String: + +This is the string used to dial the modem in Synchronet Callback +(an optional callback verification module). +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Dial String",mdm_dial,40 + ,K_EDIT|K_UPPER); + break; + case 4: +SETHELP(WHERE); +/* +Off Hook String: + +This is the string of characters sent to your modem to take it off hook +(make busy). +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Off Hook String",mdm_offh + ,40,K_EDIT|K_UPPER); + break; + case 5: +SETHELP(WHERE); +/* +Answer String: + +This is the string of characters sent to your modem to answer an +incoming call. +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Answer String",mdm_answ,40 + ,K_EDIT|K_UPPER); + break; + case 6: +SETHELP(WHERE); +/* +Hang Up String: + +This is the string of characters sent to your modem to hang up the +phone line (go on-hook). +*/ + uinput(WIN_MID|WIN_SAV,0,0 + ,"Hang Up String",mdm_hang,40 + ,K_EDIT|K_UPPER); + break; + } } + break; + case 12: + dflt=bar=0; + while(1) { + for(i=0;i