Annotation of sbbs/sbbs3/scfg/scfgsub.c, revision 1.1.1.1

1.1       root        1: /* scfgsub.c */
                      2: 
                      3: /* $Id: scfgsub.c,v 1.25 2004/09/25 21:20:26 rswindell Exp $ */
                      4: 
                      5: /****************************************************************************
                      6:  * @format.tab-size 4          (Plain Text/Source Code File Header)                    *
                      7:  * @format.use-tabs true       (see http://www.synchro.net/ptsc_hdr.html)              *
                      8:  *                                                                                                                                                     *
                      9:  * Copyright 2004 Rob Swindell - http://www.synchro.net/copyright.html         *
                     10:  *                                                                                                                                                     *
                     11:  * This program is free software; you can redistribute it and/or                       *
                     12:  * modify it under the terms of the GNU General Public License                         *
                     13:  * as published by the Free Software Foundation; either version 2                      *
                     14:  * of the License, or (at your option) any later version.                                      *
                     15:  * See the GNU General Public License for more details: gpl.txt or                     *
                     16:  * http://www.fsf.org/copyleft/gpl.html                                                                                *
                     17:  *                                                                                                                                                     *
                     18:  * Anonymous FTP access to the most recent released source is available at     *
                     19:  * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net     *
                     20:  *                                                                                                                                                     *
                     21:  * Anonymous CVS access to the development source and modification history     *
                     22:  * is available at cvs.synchro.net:/cvsroot/sbbs, example:                                     *
                     23:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs login                       *
                     24:  *     (just hit return, no password is necessary)                                                     *
                     25:  * cvs -d :pserver:[email protected]:/cvsroot/sbbs checkout src                *
                     26:  *                                                                                                                                                     *
                     27:  * For Synchronet coding style and modification guidelines, see                                *
                     28:  * http://www.synchro.net/source.html                                                                          *
                     29:  *                                                                                                                                                     *
                     30:  * You are encouraged to submit any modifications (preferably in Unix diff     *
                     31:  * format) via e-mail to [email protected]                                                                      *
                     32:  *                                                                                                                                                     *
                     33:  * Note: If this box doesn't appear square, then you need to fix your tabs.    *
                     34:  ****************************************************************************/
                     35: 
                     36: #include "scfg.h"
                     37: 
                     38: void sub_cfg(uint grpnum)
                     39: {
                     40:        static int dflt,tog_dflt,opt_dflt,net_dflt,adv_dflt,bar;
                     41:        char str[81],str2[81],done=0,code[9],*p;
                     42:        int j,m,n,ptridx,q,s;
                     43:        uint i,subnum[MAX_OPTS+1];
                     44:        static sub_t savsub;
                     45: 
                     46: while(1) {
                     47:        for(i=0,j=0;i<cfg.total_subs && j<MAX_OPTS;i++)
                     48:         if(cfg.sub[i]->grp==grpnum) {
                     49:                        subnum[j]=i;
                     50:                        if(cfg.sub[subnum[0]]->qwkconf)
                     51:                                sprintf(opt[j],"%-5u %s"
                     52:                                        ,cfg.sub[i]->qwkconf,cfg.sub[i]->lname);
                     53:                        else
                     54:                                sprintf(opt[j],"%s"
                     55:                                        ,cfg.sub[i]->lname);
                     56:                        j++; }
                     57:        subnum[j]=cfg.total_subs;
                     58:        opt[j][0]=0;
                     59:        sprintf(str,"%s Sub-boards",cfg.grp[grpnum]->sname);
                     60:        uifc.savnum=0;
                     61:        i=WIN_SAV|WIN_ACT;
                     62:        if(j)
                     63:                i|=WIN_DEL|WIN_GET|WIN_DELACT;
                     64:        if(j<MAX_OPTS)
                     65:                i|=WIN_INS|WIN_XTR|WIN_INSACT;
                     66:        if(savsub.sname[0])
                     67:                i|=WIN_PUT;
                     68:        SETHELP(WHERE);
                     69: /*
                     70: &Message Sub-boards:&
                     71: 
                     72: This is a list of message sub-boards that have been configured for the
                     73: selected message group.
                     74: 
                     75: To add a sub-board, select the desired position with the arrow keys and
                     76: hit  INS .
                     77: 
                     78: To delete a sub-board, select it with the arrow keys and hit  DEL .
                     79: 
                     80: To configure a sub-board, select it with the arrow keys and hit  ENTER .
                     81: */
                     82:        i=uifc.list(i,24,1,LEN_SLNAME+5,&dflt,&bar,str,opt);
                     83:        uifc.savnum=1;
                     84:        if((signed)i==-1)
                     85:                return;
                     86:        if((i&MSK_ON)==MSK_INS) {
                     87:                i&=MSK_OFF;
                     88:                strcpy(str,"General");
                     89:                SETHELP(WHERE);
                     90: /*
                     91: &Sub-board Long Name:&
                     92: 
                     93: This is a description of the message sub-board which is displayed in all
                     94: sub-board listings.
                     95: */
                     96:                if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board Long Name",str,LEN_SLNAME
                     97:                        ,K_EDIT)<1)
                     98:                        continue;
                     99:                sprintf(str2,"%.*s",LEN_SSNAME,str);
                    100:                SETHELP(WHERE);
                    101: /*
                    102: &Sub-board Short Name:&
                    103: 
                    104: This is a short description of the message sub-board which is displayed
                    105: at the main and reading messages prompts.
                    106: */
                    107:                if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board Short Name",str2,LEN_SSNAME
                    108:                        ,K_EDIT)<1)
                    109:                        continue;
                    110: #if 0
                    111:                sprintf(str3,"%.10s",str2);
                    112:                SETHELP(WHERE);
                    113: /*
                    114: &Sub-board QWK Name:&
                    115: 
                    116: This is the name of the sub-board used for QWK off-line readers.
                    117: */
                    118:                if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board QWK Name",str3,10
                    119:             ,K_EDIT)<1)
                    120:             continue;
                    121: #endif
                    122:                sprintf(code,"%.8s",str2);
                    123:                p=strchr(code,' ');
                    124:                if(p) *p=0;
                    125:                strupr(code);
                    126:                SETHELP(WHERE);
                    127: /*
                    128: &Sub-board Internal Code Suffix:&
                    129: 
                    130: Every sub-board must have its own unique code for Synchronet to refer to
                    131: it internally. This code should be descriptive of the sub-board's topic,
                    132: usually an abreviation of the sub-board's name.
                    133: */
                    134:                if(uifc.input(WIN_MID|WIN_SAV,0,0,"Sub-board Internal Code Suffix",code,LEN_CODE
                    135:                        ,K_EDIT|K_UPPER)<1)
                    136:                        continue;
                    137:                if(!code_ok(code)) {
                    138:                        uifc.helpbuf=invalid_code;
                    139:                        uifc.savnum=0;
                    140:                        uifc.msg("Invalid Code");
                    141:                        uifc.helpbuf=0;
                    142:                        continue; 
                    143:                }
                    144: 
                    145:                if((cfg.sub=(sub_t **)REALLOC(cfg.sub,sizeof(sub_t *)*(cfg.total_subs+1)))==NULL) {
                    146:             errormsg(WHERE,ERR_ALLOC,nulstr,cfg.total_subs+1);
                    147:                        cfg.total_subs=0;
                    148:                        bail(1);
                    149:             continue; }
                    150: 
                    151:                for(ptridx=0;ptridx<USHRT_MAX;ptridx++) { /* Search for unused pointer indx */
                    152:             for(n=0;n<cfg.total_subs;n++)
                    153:                                if(cfg.sub[n]->ptridx==ptridx)
                    154:                     break;
                    155:             if(n==cfg.total_subs)
                    156:                 break; }
                    157: 
                    158:                if(j) {
                    159:                        for(n=cfg.total_subs;n>subnum[i];n--)
                    160:                 cfg.sub[n]=cfg.sub[n-1];
                    161:                        for(q=0;q<cfg.total_qhubs;q++)
                    162:                                for(s=0;s<cfg.qhub[q]->subs;s++)
                    163:                                        if(cfg.qhub[q]->sub[s]>=subnum[i])
                    164:                                                cfg.qhub[q]->sub[s]++; }
                    165: 
                    166:                if((cfg.sub[subnum[i]]=(sub_t *)MALLOC(sizeof(sub_t)))==NULL) {
                    167:                        errormsg(WHERE,ERR_ALLOC,nulstr,sizeof(sub_t));
                    168:                        continue; }
                    169:                memset((sub_t *)cfg.sub[subnum[i]],0,sizeof(sub_t));
                    170:                cfg.sub[subnum[i]]->grp=grpnum;
                    171:                if(cfg.total_faddrs)
                    172:                        cfg.sub[subnum[i]]->faddr=cfg.faddr[0];
                    173:                else
                    174:                        memset(&cfg.sub[subnum[i]]->faddr,0,sizeof(faddr_t));
                    175:                cfg.sub[subnum[i]]->maxmsgs=500;
                    176:                strcpy(cfg.sub[subnum[i]]->code_suffix,code);
                    177:                strcpy(cfg.sub[subnum[i]]->lname,str);
                    178:                strcpy(cfg.sub[subnum[i]]->sname,str2);
                    179:                strcpy(cfg.sub[subnum[i]]->qwkname,code);
                    180:                if(strchr(str,'.') && strchr(str,' ')==NULL)
                    181:                        strcpy(cfg.sub[subnum[i]]->newsgroup,str);
                    182:                cfg.sub[subnum[i]]->misc=(SUB_NSDEF|SUB_SSDEF|SUB_QUOTE|SUB_TOUSER
                    183:                        |SUB_HDRMOD|SUB_FAST);
                    184:                cfg.sub[subnum[i]]->ptridx=ptridx;
                    185:                cfg.total_subs++;
                    186:                uifc.changes=1;
                    187:                continue; }
                    188:        if((i&MSK_ON)==MSK_DEL) {
                    189:                i&=MSK_OFF;
                    190:                SETHELP(WHERE);
                    191: /*
                    192: &Delete Data in Sub-board:&
                    193: 
                    194: If you want to delete all the messages for this sub-board, select &Yes&.
                    195: */
                    196:                j=1;
                    197:                strcpy(opt[0],"Yes");
                    198:                strcpy(opt[1],"No");
                    199:                opt[2][0]=0;
                    200:                j=uifc.list(WIN_MID|WIN_SAV,0,0,0,&j,0
                    201:                        ,"Delete Data in Sub-board",opt);
                    202:                if(j==-1)
                    203:                        continue;
                    204:                if(j==0) {
                    205:                                sprintf(str,"%s%s.*"
                    206:                                        ,cfg.grp[cfg.sub[i]->grp]->code_prefix
                    207:                                        ,cfg.sub[i]->code_suffix);
                    208:                                strlwr(str);
                    209:                                if(!cfg.sub[subnum[i]]->data_dir[0])
                    210:                                        sprintf(tmp,"%ssubs/",cfg.data_dir);
                    211:                                else
                    212:                                        strcpy(tmp,cfg.sub[subnum[i]]->data_dir);
                    213:                                delfiles(tmp,str);
                    214:                                clearptrs(subnum[i]); 
                    215:                }
                    216:                FREE(cfg.sub[subnum[i]]);
                    217:                cfg.total_subs--;
                    218:                for(j=subnum[i];j<cfg.total_subs;j++)
                    219:                        cfg.sub[j]=cfg.sub[j+1];
                    220:                for(q=0;q<cfg.total_qhubs;q++)
                    221:                        for(s=0;s<cfg.qhub[q]->subs;s++) {
                    222:                                if(cfg.qhub[q]->sub[s]==subnum[i])
                    223:                                        cfg.qhub[q]->sub[s]=INVALID_SUB;
                    224:                                else if(cfg.qhub[q]->sub[s]>subnum[i])
                    225:                                        cfg.qhub[q]->sub[s]--; }
                    226:                uifc.changes=1;
                    227:                continue; }
                    228:        if((i&MSK_ON)==MSK_GET) {
                    229:                i&=MSK_OFF;
                    230:                savsub=*cfg.sub[subnum[i]];
                    231:                continue; }
                    232:        if((i&MSK_ON)==MSK_PUT) {
                    233:                i&=MSK_OFF;
                    234:                ptridx=cfg.sub[subnum[i]]->ptridx;
                    235:                *cfg.sub[subnum[i]]=savsub;
                    236:                cfg.sub[subnum[i]]->ptridx=ptridx;
                    237:                cfg.sub[subnum[i]]->grp=grpnum;
                    238:                uifc.changes=1;
                    239:         continue; }
                    240:        i=subnum[i];
                    241:        j=0;
                    242:        done=0;
                    243:        while(!done) {
                    244:                n=0;
                    245:                sprintf(opt[n++],"%-27.27s%s","Long Name",cfg.sub[i]->lname);
                    246:                sprintf(opt[n++],"%-27.27s%s","Short Name",cfg.sub[i]->sname);
                    247:                sprintf(opt[n++],"%-27.27s%s","QWK Name",cfg.sub[i]->qwkname);
                    248:                sprintf(opt[n++],"%-27.27s%s%s","Internal Code"
                    249:                        ,cfg.grp[cfg.sub[i]->grp]->code_prefix, cfg.sub[i]->code_suffix);
                    250:                sprintf(opt[n++],"%-27.27s%s","Newsgroup Name",cfg.sub[i]->newsgroup);
                    251:                sprintf(opt[n++],"%-27.27s%.40s","Access Requirements"
                    252:                        ,cfg.sub[i]->arstr);
                    253:                sprintf(opt[n++],"%-27.27s%.40s","Reading Requirements"
                    254:             ,cfg.sub[i]->read_arstr);
                    255:                sprintf(opt[n++],"%-27.27s%.40s","Posting Requirements"
                    256:                        ,cfg.sub[i]->post_arstr);
                    257:                sprintf(opt[n++],"%-27.27s%.40s","Operator Requirements"
                    258:                        ,cfg.sub[i]->op_arstr);
                    259:                sprintf(opt[n++],"%-27.27s%.40s","Moderated Posting User"
                    260:                        ,cfg.sub[i]->mod_arstr);
                    261:                sprintf(opt[n++],"%-27.27s%lu","Maximum Messages"
                    262:             ,cfg.sub[i]->maxmsgs);
                    263:                if(cfg.sub[i]->maxage)
                    264:             sprintf(str,"Enabled (%u days old)",cfg.sub[i]->maxage);
                    265:         else
                    266:             strcpy(str,"Disabled");
                    267:                sprintf(opt[n++],"%-27.27s%s","Purge by Age",str);
                    268:                if(cfg.sub[i]->maxcrcs)
                    269:                        sprintf(str,"Enabled (%lu message CRCs)",cfg.sub[i]->maxcrcs);
                    270:                else
                    271:                        strcpy(str,"Disabled");
                    272:                sprintf(opt[n++],"%-27.27s%s","Duplicate Checking",str);
                    273: 
                    274:                strcpy(opt[n++],"Toggle Options...");
                    275:                strcpy(opt[n++],"Network Options...");
                    276:                strcpy(opt[n++],"Advanced Options...");
                    277:                opt[n][0]=0;
                    278:                sprintf(str,"%s Sub-board",cfg.sub[i]->sname);
                    279:                uifc.savnum=1;
                    280:                SETHELP(WHERE);
                    281: /*
                    282: &Sub-board Configuration:&
                    283: 
                    284: This menu allows you to configure the individual selected sub-board.
                    285: Options with a trailing &...& provide a sub-menu of more options.
                    286: */
                    287:                switch(uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT
                    288:                        ,0,0,60,&opt_dflt,0,str,opt)) {
                    289:                        case -1:
                    290:                                done=1;
                    291:                                break;
                    292:                        case 0:
                    293:                                SETHELP(WHERE);
                    294: /*
                    295: &Sub-board Long Name:&
                    296: 
                    297: This is a description of the message sub-board which is displayed in all
                    298: sub-board listings.
                    299: */
                    300:                                strcpy(str,cfg.sub[i]->lname);  /* save */
                    301:                                if(!uifc.input(WIN_MID|WIN_SAV,0,17,"Name to use for Listings"
                    302:                                        ,cfg.sub[i]->lname,LEN_SLNAME,K_EDIT))
                    303:                                        strcpy(cfg.sub[i]->lname,str);  /* restore */
                    304:                                break;
                    305:                        case 1:
                    306:                                SETHELP(WHERE);
                    307: /*
                    308: &Sub-board Short Name:&
                    309: 
                    310: This is a short description of the message sub-board which is displayed
                    311: at the main and reading messages prompts.
                    312: */
                    313:                                uifc.input(WIN_MID|WIN_SAV,0,17,"Name to use for Prompts"
                    314:                                        ,cfg.sub[i]->sname,LEN_SSNAME,K_EDIT);
                    315:                                break;
                    316:                        case 2:
                    317:                                SETHELP(WHERE);
                    318: /*
                    319: &Sub-board QWK Name:&
                    320: 
                    321: This is the name of the sub-board used for QWK off-line readers.
                    322: */
                    323:                                uifc.input(WIN_MID|WIN_SAV,0,17,"Name to use for QWK Packets"
                    324:                                        ,cfg.sub[i]->qwkname,10,K_EDIT);
                    325:                 break;
                    326:                        case 3:
                    327:                 SETHELP(WHERE);
                    328: /*
                    329: &Sub-board Internal Code Suffix:&
                    330: 
                    331: Every sub-board must have its own unique code for Synchronet to refer
                    332: to it internally. This code should be descriptive of the sub-board's
                    333: topic, usually an abreviation of the sub-board's name.
                    334: */
                    335:                 strcpy(str,cfg.sub[i]->code_suffix);
                    336:                 uifc.input(WIN_MID|WIN_SAV,0,17,"Internal Code Suffix (unique)"
                    337:                     ,str,LEN_CODE,K_EDIT|K_UPPER);
                    338:                 if(code_ok(str))
                    339:                     strcpy(cfg.sub[i]->code_suffix,str);
                    340:                 else {
                    341:                     uifc.helpbuf=invalid_code;
                    342:                     uifc.msg("Invalid Code");
                    343:                     uifc.helpbuf=0; 
                    344:                                }
                    345:                 break;
                    346:                        case 4:
                    347:                                SETHELP(WHERE);
                    348: /*
                    349: Newsgroup Name:
                    350: 
                    351: This is the name of the sub-board used for newsgroup readers. If no name
                    352: is configured here, a name will be automatically generated from the
                    353: sub-board's name and group name.
                    354: */
                    355:                                uifc.input(WIN_MID|WIN_SAV,0,17,""
                    356:                                        ,cfg.sub[i]->newsgroup,sizeof(cfg.sub[i]->newsgroup)-1,K_EDIT);
                    357:                 break;
                    358:                        case 5:
                    359:                                uifc.savnum=2;
                    360:                                sprintf(str,"%s Access",cfg.sub[i]->sname);
                    361:                                getar(str,cfg.sub[i]->arstr);
                    362:                                break;
                    363:                        case 6:
                    364:                                uifc.savnum=2;
                    365:                                sprintf(str,"%s Reading",cfg.sub[i]->sname);
                    366:                                getar(str,cfg.sub[i]->read_arstr);
                    367:                 break;
                    368:                        case 7:
                    369:                                uifc.savnum=2;
                    370:                                sprintf(str,"%s Posting",cfg.sub[i]->sname);
                    371:                                getar(str,cfg.sub[i]->post_arstr);
                    372:                 break;
                    373:                        case 8:
                    374:                                uifc.savnum=2;
                    375:                                sprintf(str,"%s Operator",cfg.sub[i]->sname);
                    376:                                getar(str,cfg.sub[i]->op_arstr);
                    377:                 break;
                    378:                        case 9:
                    379:                                uifc.savnum=2;
                    380:                                sprintf(str,"%s Moderated Posting User",cfg.sub[i]->sname);
                    381:                                getar(str,cfg.sub[i]->mod_arstr);
                    382:                 break;
                    383:                        case 10:
                    384:                                sprintf(str,"%lu",cfg.sub[i]->maxmsgs);
                    385:                 SETHELP(WHERE);
                    386: /*
                    387: &Maximum Number of Messages:&
                    388: 
                    389: This value is the maximum number of messages that will be kept in the
                    390: sub-board. Once this maximum number of messages is reached, the oldest
                    391: messages will be automatically purged. Usually, 100 messages is a
                    392: sufficient maximum.
                    393: */
                    394:                 uifc.input(WIN_MID|WIN_SAV,0,17,"Maximum Number of Messages"
                    395:                     ,str,9,K_EDIT|K_NUMBER);
                    396:                 cfg.sub[i]->maxmsgs=atoi(str);
                    397:                 cfg.sub[i]->misc|=SUB_HDRMOD;
                    398:                                break;
                    399:                        case 11:
                    400:                                sprintf(str,"%u",cfg.sub[i]->maxage);
                    401:                 SETHELP(WHERE);
                    402: /*
                    403: &Maximum Age of Messages:&
                    404: 
                    405: This value is the maximum number of days that messages will be kept in
                    406: the sub-board.
                    407: */
                    408:                 uifc.input(WIN_MID|WIN_SAV,0,17,"Maximum Age of Messages (in days)"
                    409:                     ,str,5,K_EDIT|K_NUMBER);
                    410:                 cfg.sub[i]->maxage=atoi(str);
                    411:                 cfg.sub[i]->misc|=SUB_HDRMOD;
                    412:                                break;
                    413:                        case 12:
                    414:                                sprintf(str,"%lu",cfg.sub[i]->maxcrcs);
                    415:                                SETHELP(WHERE);
                    416: /*
                    417: &Maximum Number of CRCs:&
                    418: 
                    419: This value is the maximum number of CRCs that will be kept in the
                    420: sub-board for duplicate message checking. Once this maximum number of
                    421: CRCs is reached, the oldest CRCs will be automatically purged.
                    422: */
                    423:                                uifc.input(WIN_MID|WIN_SAV,0,17,"Maximum Number of CRCs"
                    424:                                        ,str,9,K_EDIT|K_NUMBER);
                    425:                                cfg.sub[i]->maxcrcs=atol(str);
                    426:                                cfg.sub[i]->misc|=SUB_HDRMOD;
                    427:                 break;
                    428:                        case 13:
                    429:                                while(1) {
                    430:                                        n=0;
                    431:                                        sprintf(opt[n++],"%-27.27s%s","Allow Private Posts"
                    432:                                                ,cfg.sub[i]->misc&SUB_PRIV ? cfg.sub[i]->misc&SUB_PONLY
                    433:                                                ? "Only":"Yes":"No");
                    434:                                        sprintf(opt[n++],"%-27.27s%s","Allow Anonymous Posts"
                    435:                                                ,cfg.sub[i]->misc&SUB_ANON ? cfg.sub[i]->misc&SUB_AONLY
                    436:                                                ? "Only":"Yes":"No");
                    437:                                        sprintf(opt[n++],"%-27.27s%s","Post Using Real Names"
                    438:                                                ,cfg.sub[i]->misc&SUB_NAME ? "Yes":"No");
                    439:                                        sprintf(opt[n++],"%-27.27s%s","Users Can Edit Posts"
                    440:                                                ,cfg.sub[i]->misc&SUB_EDIT ? cfg.sub[i]->misc&SUB_EDITLAST 
                    441:                                                ? "Last" : "Yes" : "No");
                    442:                                        sprintf(opt[n++],"%-27.27s%s","Users Can Delete Posts"
                    443:                                                ,cfg.sub[i]->misc&SUB_DEL ? cfg.sub[i]->misc&SUB_DELLAST
                    444:                                                ? "Last" : "Yes" : "No");
                    445:                                        sprintf(opt[n++],"%-27.27s%s","Default On for New Scan"
                    446:                                                ,cfg.sub[i]->misc&SUB_NSDEF ? "Yes":"No");
                    447:                                        sprintf(opt[n++],"%-27.27s%s","Forced On for New Scan"
                    448:                                                ,cfg.sub[i]->misc&SUB_FORCED ? "Yes":"No");
                    449:                                        sprintf(opt[n++],"%-27.27s%s","Default On for Your Scan"
                    450:                                                ,cfg.sub[i]->misc&SUB_SSDEF ? "Yes":"No");
                    451:                                        sprintf(opt[n++],"%-27.27s%s","Public 'To' User"
                    452:                                                ,cfg.sub[i]->misc&SUB_TOUSER ? "Yes":"No");
                    453:                                        sprintf(opt[n++],"%-27.27s%s","Allow Message Quoting"
                    454:                                                ,cfg.sub[i]->misc&SUB_QUOTE ? "Yes":"No");
                    455:                                        sprintf(opt[n++],"%-27.27s%s","Suppress User Signatures"
                    456:                                                ,cfg.sub[i]->misc&SUB_NOUSERSIG ? "Yes":"No");
                    457:                                        sprintf(opt[n++],"%-27.27s%s","Permanent Operator Msgs"
                    458:                                                ,cfg.sub[i]->misc&SUB_SYSPERM ? "Yes":"No");
                    459:                                        sprintf(opt[n++],"%-27.27s%s","Kill Read Messages"
                    460:                                                ,cfg.sub[i]->misc&SUB_KILL ? "Yes"
                    461:                                                : (cfg.sub[i]->misc&SUB_KILLP ? "Pvt" : "No"));
                    462:                                        sprintf(opt[n++],"%-27.27s%s","Compress Messages (LZH)"
                    463:                                                ,cfg.sub[i]->misc&SUB_LZH ? "Yes" : "No");
                    464: 
                    465:                                        opt[n][0]=0;
                    466:                                        uifc.savnum=2;
                    467:                                        SETHELP(WHERE);
                    468: /*
                    469: &Sub-board Toggle Options:&
                    470: 
                    471: This menu allows you to toggle certain options for the selected
                    472: sub-board between two or more settings, such as &Yes& and &No&.
                    473: */
                    474:                                        n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,36,&tog_dflt,0
                    475:                                                ,"Toggle Options",opt);
                    476:                                        if(n==-1)
                    477:                                                break;
                    478:                                        uifc.savnum=3;
                    479:                                        switch(n) {
                    480:                                                case 0:
                    481:                                                        if(cfg.sub[i]->misc&SUB_PONLY)
                    482:                                                                n=2;
                    483:                                                        else 
                    484:                                                                n=(cfg.sub[i]->misc&SUB_PRIV) ? 0:1;
                    485:                                                        strcpy(opt[0],"Yes");
                    486:                                                        strcpy(opt[1],"No");
                    487:                                                        strcpy(opt[2],"Only");
                    488:                                                        opt[3][0]=0;
                    489:                                                        SETHELP(WHERE);
                    490: /*
                    491: &Allow Private Posts on Sub-board:&
                    492: 
                    493: If you want users to be able to post private messages to other users
                    494: on this sub-board, set this value to &Yes&. Usually, E-mail is the
                    495: preferred method of private communication. If you want users to be able
                    496: to post private messages only on this sub-board, select &Only&.
                    497: */
                    498:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    499:                                                                ,"Allow Private Posts",opt);
                    500:                                                        if(n==-1)
                    501:                                                                break;
                    502:                                                        if(!n && (cfg.sub[i]->misc&(SUB_PRIV|SUB_PONLY))
                    503:                                                                !=SUB_PRIV) {
                    504:                                                                uifc.changes=1;
                    505:                                                                cfg.sub[i]->misc&=~SUB_PONLY;
                    506:                                                                cfg.sub[i]->misc|=SUB_PRIV;
                    507:                                                                break; }
                    508:                                                        if(n==1 && cfg.sub[i]->misc&SUB_PRIV) {
                    509:                                                                uifc.changes=1;
                    510:                                                                cfg.sub[i]->misc&=~SUB_PRIV;
                    511:                                                                break; }
                    512:                                                        if(n==2 && (cfg.sub[i]->misc&(SUB_PRIV|SUB_PONLY))
                    513:                                                                !=(SUB_PRIV|SUB_PONLY)) {
                    514:                                                                uifc.changes=1;
                    515:                                                                cfg.sub[i]->misc|=(SUB_PRIV|SUB_PONLY); }
                    516:                                                        break;
                    517:                                                case 1:
                    518:                                                        if(cfg.sub[i]->misc&SUB_AONLY)
                    519:                                                                n=2;
                    520:                                                        else 
                    521:                                                                n=(cfg.sub[i]->misc&SUB_ANON) ? 0:1;
                    522:                                                        strcpy(opt[0],"Yes");
                    523:                                                        strcpy(opt[1],"No");
                    524:                                                        strcpy(opt[2],"Only");
                    525:                                                        opt[3][0]=0;
                    526:                                                        SETHELP(WHERE);
                    527: /*
                    528: &Allow Anonymous Posts on Sub-board:&
                    529: 
                    530: If you want users with the &A& exemption to be able to post anonymously on
                    531: this sub-board, select &Yes&. If you want all posts on this sub-board to be
                    532: forced anonymous, select &Only&. If you do not want anonymous posts allowed
                    533: on this sub-board at all, select &No&.
                    534: */
                    535:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    536:                                                                ,"Allow Anonymous Posts",opt);
                    537:                                                        if(n==-1)
                    538:                                                                break;
                    539:                                                        if(!n && (cfg.sub[i]->misc&(SUB_ANON|SUB_AONLY))
                    540:                                                                !=SUB_ANON) {
                    541:                                                                uifc.changes=1;
                    542:                                                                cfg.sub[i]->misc&=~SUB_AONLY;
                    543:                                                                cfg.sub[i]->misc|=SUB_ANON;
                    544:                                                                break; }
                    545:                                                        if(n==1 && cfg.sub[i]->misc&(SUB_ANON|SUB_AONLY)) {
                    546:                                                                uifc.changes=1;
                    547:                                                                cfg.sub[i]->misc&=~(SUB_ANON|SUB_AONLY);
                    548:                                                                break; }
                    549:                                                        if(n==2 && (cfg.sub[i]->misc&(SUB_ANON|SUB_AONLY))
                    550:                                                                !=(SUB_ANON|SUB_AONLY)) {
                    551:                                                                uifc.changes=1;
                    552:                                                                cfg.sub[i]->misc|=(SUB_ANON|SUB_AONLY); }
                    553:                             break;
                    554:                                                case 2:
                    555:                                                        n=(cfg.sub[i]->misc&SUB_NAME) ? 0:1;
                    556:                                                        strcpy(opt[0],"Yes");
                    557:                                                        strcpy(opt[1],"No");
                    558:                                                        opt[2][0]=0;
                    559:                                                        SETHELP(WHERE);
                    560: /*
                    561: &User Real Names in Posts on Sub-board:&
                    562: 
                    563: If you allow aliases on your system, you can have messages on this
                    564: sub-board automatically use the real name of the posting user by setting
                    565: this option to &Yes&.
                    566: */
                    567:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    568:                                                                ,"Use Real Names in Posts",opt);
                    569:                                                        if(n==-1)
                    570:                                 break;
                    571:                                                        if(!n && !(cfg.sub[i]->misc&SUB_NAME)) {
                    572:                                                                uifc.changes=1;
                    573:                                                                cfg.sub[i]->misc|=SUB_NAME;
                    574:                                                                break; }
                    575:                                                        if(n==1 && cfg.sub[i]->misc&SUB_NAME) {
                    576:                                                                uifc.changes=1;
                    577:                                                                cfg.sub[i]->misc&=~SUB_NAME; }
                    578:                                                        break;
                    579:                                                case 3:
                    580:                                                        if(cfg.sub[i]->misc&SUB_EDITLAST)
                    581:                                                                n=2;
                    582:                                                        else
                    583:                                                                n=(cfg.sub[i]->misc&SUB_EDIT) ? 0:1;
                    584:                                                        strcpy(opt[0],"Yes");
                    585:                                                        strcpy(opt[1],"No");
                    586:                                                        strcpy(opt[2],"Last Post Only");
                    587:                                                        opt[3][0]=0;
                    588:                                                        SETHELP(WHERE);
                    589: /*
                    590: &Users Can Edit Posts on Sub-board:&
                    591: 
                    592: If you wish to allow users to edit their messages after they have been
                    593: posted, this option to &Yes&. If you wish to allow users to edit only the
                    594: last message on a message base, set this option to &Last Post Only&.
                    595: */
                    596:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    597:                                                                ,"Users Can Edit Messages",opt);
                    598:                                                        if(n==-1)
                    599:                                 break;
                    600:                                                        if(n==0 /* yes */
                    601:                                                                && (cfg.sub[i]->misc&(SUB_EDIT|SUB_EDITLAST))
                    602:                                                                !=SUB_EDIT
                    603:                                                                ) {
                    604:                                                                uifc.changes=1;
                    605:                                                                cfg.sub[i]->misc|=SUB_EDIT;
                    606:                                                                cfg.sub[i]->misc&=~SUB_EDITLAST;
                    607:                                                                break; 
                    608:                                                        }
                    609:                                                        if(n==1 /* no */
                    610:                                                                && cfg.sub[i]->misc&(SUB_EDIT|SUB_EDITLAST)
                    611:                                                                ) {
                    612:                                                                uifc.changes=1;
                    613:                                                                cfg.sub[i]->misc&=~(SUB_EDIT|SUB_EDITLAST);
                    614:                                                                break;
                    615:                                                        }
                    616:                                                        if(n==2 /* last only */
                    617:                                                                && (cfg.sub[i]->misc&(SUB_EDIT|SUB_EDITLAST))
                    618:                                                                !=(SUB_EDIT|SUB_EDITLAST)
                    619:                                                                ) {
                    620:                                                                uifc.changes=1;
                    621:                                                                cfg.sub[i]->misc|=(SUB_EDIT|SUB_EDITLAST);
                    622:                                                                break;
                    623:                                                        }
                    624:                             break;
                    625:                                                case 4:
                    626:                                                        if(cfg.sub[i]->misc&SUB_DELLAST)
                    627:                                                                n=2;
                    628:                                                        else 
                    629:                                                                n=(cfg.sub[i]->misc&SUB_DEL) ? 0:1;
                    630: 
                    631:                                                        strcpy(opt[0],"Yes");
                    632:                                                        strcpy(opt[1],"No");
                    633:                                                        strcpy(opt[2],"Last Post Only");
                    634:                                                        opt[3][0]=0;
                    635:                                                        SETHELP(WHERE);
                    636: /*
                    637: &Users Can Delete Posts on Sub-board:&
                    638: 
                    639: If you want users to be able to delete any of their own posts on this
                    640: sub-board, set this option to &Yes&. If you want to allow users the
                    641: ability to delete their message only if it is the last message on the
                    642: sub-board, select &Last Post Only&. If you want to disallow users from
                    643: deleting any of their posts, set this option to &No&.
                    644: */
                    645:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    646:                                                                ,"Users Can Delete Posts",opt);
                    647:                                                        if(n==-1)
                    648:                                                                break;
                    649:                                                        if(!n && (cfg.sub[i]->misc&(SUB_DEL|SUB_DELLAST))
                    650:                                                                !=SUB_DEL) {
                    651:                                                                uifc.changes=1;
                    652:                                                                cfg.sub[i]->misc&=~SUB_DELLAST;
                    653:                                                                cfg.sub[i]->misc|=SUB_DEL;
                    654:                                                                break; 
                    655:                                                        }
                    656:                                                        if(n==1 && cfg.sub[i]->misc&SUB_DEL) {
                    657:                                                                uifc.changes=1;
                    658:                                                                cfg.sub[i]->misc&=~SUB_DEL;
                    659:                                                                break; 
                    660:                                                        }
                    661:                                                        if(n==2 && (cfg.sub[i]->misc&(SUB_DEL|SUB_DELLAST))
                    662:                                                                !=(SUB_DEL|SUB_DELLAST)) {
                    663:                                                                uifc.changes=1;
                    664:                                                                cfg.sub[i]->misc|=(SUB_DEL|SUB_DELLAST); 
                    665:                                                        }
                    666:                             break;
                    667:                                                case 5:
                    668:                                                        n=(cfg.sub[i]->misc&SUB_NSDEF) ? 0:1;
                    669:                                                        strcpy(opt[0],"Yes");
                    670:                                                        strcpy(opt[1],"No");
                    671:                                                        opt[2][0]=0;
                    672:                                                        SETHELP(WHERE);
                    673: /*
                    674: &Default On for New Scan:&
                    675: 
                    676: If you want this sub-board to be included in all user new message scans
                    677: by default, set this option to &Yes&.
                    678: */
                    679:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    680:                                                                ,"Default On for New Scan",opt);
                    681:                                                        if(n==-1)
                    682:                                 break;
                    683:                                                        if(!n && !(cfg.sub[i]->misc&SUB_NSDEF)) {
                    684:                                                                uifc.changes=1;
                    685:                                                                cfg.sub[i]->misc|=SUB_NSDEF;
                    686:                                                                break; }
                    687:                                                        if(n==1 && cfg.sub[i]->misc&SUB_NSDEF) {
                    688:                                                                uifc.changes=1;
                    689:                                                                cfg.sub[i]->misc&=~SUB_NSDEF; }
                    690:                             break;
                    691:                                                case 6:
                    692:                                                        n=(cfg.sub[i]->misc&SUB_FORCED) ? 0:1;
                    693:                                                        strcpy(opt[0],"Yes");
                    694:                                                        strcpy(opt[1],"No");
                    695:                                                        opt[2][0]=0;
                    696:                                                        SETHELP(WHERE);
                    697: /*
                    698: &Forced On for New Scan:&
                    699: 
                    700: If you want this sub-board to be included in all user new message scans
                    701: even if the user has removed it from their new scan configuration, set
                    702: this option to &Yes&.
                    703: */
                    704:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    705:                                                                ,"Forced New Scan",opt);
                    706:                                                        if(n==-1)
                    707:                                 break;
                    708:                                                        if(!n && !(cfg.sub[i]->misc&SUB_FORCED)) {
                    709:                                                                uifc.changes=1;
                    710:                                                                cfg.sub[i]->misc|=SUB_FORCED;
                    711:                                                                break; }
                    712:                                                        if(n==1 && cfg.sub[i]->misc&SUB_FORCED) {
                    713:                                                                uifc.changes=1;
                    714:                                                                cfg.sub[i]->misc&=~SUB_FORCED; }
                    715:                             break;
                    716:                                                case 7:
                    717:                                                        n=(cfg.sub[i]->misc&SUB_SSDEF) ? 0:1;
                    718:                                                        strcpy(opt[0],"Yes");
                    719:                                                        strcpy(opt[1],"No");
                    720:                                                        opt[2][0]=0;
                    721:                                                        SETHELP(WHERE);
                    722: /*
                    723: &Default On for Your Scan:&
                    724: 
                    725: If you want this sub-board to be included in all user personal message
                    726: scans by default, set this option to &Yes&.
                    727: */
                    728:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    729:                                                                ,"Default On for Your Scan",opt);
                    730:                                                        if(n==-1)
                    731:                                 break;
                    732:                                                        if(!n && !(cfg.sub[i]->misc&SUB_SSDEF)) {
                    733:                                                                uifc.changes=1;
                    734:                                                                cfg.sub[i]->misc|=SUB_SSDEF;
                    735:                                                                break; }
                    736:                                                        if(n==1 && cfg.sub[i]->misc&SUB_SSDEF) {
                    737:                                                                uifc.changes=1;
                    738:                                                                cfg.sub[i]->misc&=~SUB_SSDEF; }
                    739:                             break;
                    740:                                                case 8:
                    741:                                                        n=(cfg.sub[i]->misc&SUB_TOUSER) ? 0:1;
                    742:                                                        strcpy(opt[0],"Yes");
                    743:                                                        strcpy(opt[1],"No");
                    744:                                                        opt[2][0]=0;
                    745:                                                        SETHELP(WHERE);
                    746: /*
                    747: &Prompt for 'To' User on Public Posts:&
                    748: 
                    749: If you want all posts on this sub-board to be prompted for a 'To' user,
                    750: set this option to &Yes&. This is a useful option for sub-boards that
                    751: are on a network that does not allow private posts.
                    752: */
                    753:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    754:                                                                ,"Prompt for 'To' User on Public Posts",opt);
                    755:                                                        if(n==-1)
                    756:                                 break;
                    757:                                                        if(!n && !(cfg.sub[i]->misc&SUB_TOUSER)) {
                    758:                                                                uifc.changes=1;
                    759:                                                                cfg.sub[i]->misc|=SUB_TOUSER;
                    760:                                                                break; }
                    761:                                                        if(n==1 && cfg.sub[i]->misc&SUB_TOUSER) {
                    762:                                                                uifc.changes=1;
                    763:                                                                cfg.sub[i]->misc&=~SUB_TOUSER; }
                    764:                                                        break;
                    765:                                                case 9:
                    766:                                                        n=(cfg.sub[i]->misc&SUB_QUOTE) ? 0:1;
                    767:                                                        strcpy(opt[0],"Yes");
                    768:                                                        strcpy(opt[1],"No");
                    769:                                                        opt[2][0]=0;
                    770:                                                        SETHELP(WHERE);
                    771: /*
                    772: &Allow Message Quoting:&
                    773: 
                    774: If you want users to be allowed to quote messages on this sub-board, set
                    775: this option to &Yes&.
                    776: */
                    777:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    778:                                                                ,"Allow Message Quoting",opt);
                    779:                                                        if(n==-1)
                    780:                                 break;
                    781:                                                        if(!n && !(cfg.sub[i]->misc&SUB_QUOTE)) {
                    782:                                                                uifc.changes=1;
                    783:                                                                cfg.sub[i]->misc|=SUB_QUOTE;
                    784:                                                                break; }
                    785:                                                        if(n==1 && cfg.sub[i]->misc&SUB_QUOTE) {
                    786:                                                                uifc.changes=1;
                    787:                                                                cfg.sub[i]->misc&=~SUB_QUOTE; }
                    788:                             break;
                    789:                                                case 10:
                    790:                                                        n=(cfg.sub[i]->misc&SUB_NOUSERSIG) ? 0:1;
                    791:                                                        strcpy(opt[0],"Yes");
                    792:                                                        strcpy(opt[1],"No");
                    793:                                                        opt[2][0]=0;
                    794:                                                        SETHELP(WHERE);
                    795: /*
                    796: Suppress User Signatures:
                    797: 
                    798: If you do not wish to have user signatures automatically appended to
                    799: messages posted in this sub-board, set this option to Yes.
                    800: */
                    801:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    802:                                                                ,"Suppress User Signatures",opt);
                    803:                                                        if(n==-1)
                    804:                                 break;
                    805:                                                        if(!n && !(cfg.sub[i]->misc&SUB_NOUSERSIG)) {
                    806:                                                                uifc.changes=1;
                    807:                                                                cfg.sub[i]->misc|=SUB_NOUSERSIG;
                    808:                                                                break; }
                    809:                                                        if(n==1 && cfg.sub[i]->misc&SUB_NOUSERSIG) {
                    810:                                                                uifc.changes=1;
                    811:                                                                cfg.sub[i]->misc&=~SUB_NOUSERSIG; }
                    812:                             break;
                    813:                                                case 11:
                    814:                                                        n=(cfg.sub[i]->misc&SUB_SYSPERM) ? 0:1;
                    815:                                                        strcpy(opt[0],"Yes");
                    816:                                                        strcpy(opt[1],"No");
                    817:                                                        opt[2][0]=0;
                    818:                                                        SETHELP(WHERE);
                    819: /*
                    820: &Operator Messages Automatically Permanent:&
                    821: 
                    822: If you want messages posted by &System& and &Sub-board Operators& to be
                    823: automatically permanent (non-purgable) for this sub-board, set this
                    824: option to &Yes&.
                    825: */
                    826:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    827:                                                                ,"Permanent Operator Messages",opt);
                    828:                                                        if(n==-1)
                    829:                                 break;
                    830:                                                        if(!n && !(cfg.sub[i]->misc&SUB_SYSPERM)) {
                    831:                                                                uifc.changes=1;
                    832:                                                                cfg.sub[i]->misc|=SUB_SYSPERM;
                    833:                                                                break; }
                    834:                                                        if(n==1 && cfg.sub[i]->misc&SUB_SYSPERM) {
                    835:                                                                uifc.changes=1;
                    836:                                                                cfg.sub[i]->misc&=~SUB_SYSPERM; }
                    837:                             break;
                    838:                                                case 12:
                    839:                                                        if(cfg.sub[i]->misc&SUB_KILLP)
                    840:                                                                n=2;
                    841:                                                        else
                    842:                                                                n=(cfg.sub[i]->misc&SUB_KILL) ? 0:1;
                    843:                                                        strcpy(opt[0],"Yes");
                    844:                                                        strcpy(opt[1],"No");
                    845:                                                        strcpy(opt[2],"Private");
                    846:                                                        opt[3][0]=0;
                    847:                                                        SETHELP(WHERE);
                    848: /*
                    849: &Kill Read Messages Automatically:&
                    850: 
                    851: If you want messages that have been read by the intended recipient to
                    852: be automatically deleted by &SMBUTIL&, set this option to &Yes& or
                    853: &Private& if you want only private messages to be automatically deleted.
                    854: */
                    855:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    856:                                                                ,"Kill Read Messages",opt);
                    857:                                                        if(n==-1)
                    858:                                 break;
                    859:                                                        if(!n && !(cfg.sub[i]->misc&SUB_KILL)) {
                    860:                                                                uifc.changes=1;
                    861:                                                                cfg.sub[i]->misc|=SUB_KILL;
                    862:                                                                cfg.sub[i]->misc&=~SUB_KILLP;
                    863:                                                                break; }
                    864:                                                        if(n==1 && cfg.sub[i]->misc&(SUB_KILL|SUB_KILLP)) {
                    865:                                                                uifc.changes=1;
                    866:                                                                cfg.sub[i]->misc&=~(SUB_KILL|SUB_KILLP); }
                    867:                                                        if(n==2 && !(cfg.sub[i]->misc&SUB_KILLP)) {
                    868:                                                                uifc.changes=1;
                    869:                                                                cfg.sub[i]->misc|=SUB_KILLP;
                    870:                                                                cfg.sub[i]->misc&=~SUB_KILL;
                    871:                                 break; }
                    872:                             break;
                    873:                                                case 13:
                    874:                                                        n=(cfg.sub[i]->misc&SUB_LZH) ? 0:1;
                    875:                                                        strcpy(opt[0],"Yes");
                    876:                                                        strcpy(opt[1],"No");
                    877:                                                        opt[2][0]=0;
                    878:                                                        SETHELP(WHERE);
                    879: /*
                    880: &Compress Messages with LZH Encoding:&
                    881: 
                    882: If you want all messages in this sub-board to be automatically
                    883: compressed via &LZH& (Lempel/Ziv/Huffman algorithm used in LHarc, LHA,
                    884: and other popular compression and archive programs), this option to &Yes&.
                    885: 
                    886: Compression will slow down the reading and writing of messages slightly,
                    887: but the storage space saved can be as much as &50 percent&.
                    888: 
                    889: Before setting this option to &Yes&, make sure that all of the SMB
                    890: compatible mail programs you use support the &LZH& translation.
                    891: */
                    892:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    893:                                                                ,"Compress Messages (LZH)",opt);
                    894:                                                        if(n==-1)
                    895:                                 break;
                    896:                                                        if(!n && !(cfg.sub[i]->misc&SUB_LZH)) {
                    897:                                                                uifc.changes=1;
                    898:                                                                cfg.sub[i]->misc|=SUB_LZH;
                    899:                                                                break; }
                    900:                                                        if(n==1 && cfg.sub[i]->misc&SUB_LZH) {
                    901:                                                                uifc.changes=1;
                    902:                                                                cfg.sub[i]->misc&=~SUB_LZH; }
                    903:                             break;
                    904: 
                    905:                                                        } }
                    906:                                break;
                    907:                        case 14:
                    908:                                while(1) {
                    909:                                        n=0;
                    910:                                        sprintf(opt[n++],"%-27.27s%s","Append Tag/Origin Line"
                    911:                                                ,cfg.sub[i]->misc&SUB_NOTAG ? "No":"Yes");
                    912:                                        sprintf(opt[n++],"%-27.27s%s","Export ASCII Only"
                    913:                                                ,cfg.sub[i]->misc&SUB_ASCII ? "Yes":"No");
                    914:                                        sprintf(opt[n++],"%-27.27s%s","Gate Between Net Types"
                    915:                                                ,cfg.sub[i]->misc&SUB_GATE ? "Yes":"No");
                    916:                                        sprintf(opt[n++],"%-27.27s%s","QWK Networked"
                    917:                                                ,cfg.sub[i]->misc&SUB_QNET ? "Yes":"No");
                    918:                                        sprintf(opt[n++],"QWK Tagline");
                    919:                                        sprintf(opt[n++],"%-27.27s%s","Internet (UUCP/NNTP)"
                    920:                                                ,cfg.sub[i]->misc&SUB_INET ? "Yes":"No");
                    921:                                        sprintf(opt[n++],"%-27.27s%s","PostLink or PCRelay"
                    922:                         ,cfg.sub[i]->misc&SUB_PNET ? "Yes":"No");
                    923:                                        sprintf(opt[n++],"%-27.27s%s","FidoNet EchoMail"
                    924:                                                ,cfg.sub[i]->misc&SUB_FIDO ? "Yes":"No");
                    925:                                        sprintf(opt[n++],"%-27.27s%s","FidoNet Address"
                    926:                         ,smb_faddrtoa(&cfg.sub[i]->faddr,tmp));
                    927:                                        sprintf(opt[n++],"EchoMail Origin Line");
                    928:                                        opt[n][0]=0;
                    929:                                        uifc.savnum=2;
                    930:                                        SETHELP(WHERE);
                    931: /*
                    932: &Sub-board Network Options:&
                    933: 
                    934: This menu contains options for the selected sub-board that pertain
                    935: specifically to message networking.
                    936: */
                    937:                                        n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,60,&net_dflt,0
                    938:                                                ,"Network Options",opt);
                    939:                                        if(n==-1)
                    940:                                                break;
                    941:                                        uifc.savnum=3;
                    942:                     switch(n) {
                    943:                                                case 0:
                    944:                                                        n=0;
                    945:                                                        strcpy(opt[0],"Yes");
                    946:                                                        strcpy(opt[1],"No");
                    947:                                                        opt[2][0]=0;
                    948:                                                        SETHELP(WHERE);
                    949: /*
                    950: &Append Tag/Origin Line to Posts:&
                    951: 
                    952: If you want to disable the automatic addition of a network tagline or
                    953: origin line to the bottom of outgoing networked posts from this
                    954: sub-board, set this option to &No&.
                    955: */
                    956:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    957:                                                                ,"Append Tag/Origin Line to Posts",opt);
                    958:                                                        if(n==-1)
                    959:                                 break;
                    960:                                                        if(!n && cfg.sub[i]->misc&SUB_NOTAG) {
                    961:                                                                uifc.changes=1;
                    962:                                                                cfg.sub[i]->misc&=~SUB_NOTAG;
                    963:                                                                break; }
                    964:                                                        if(n==1 && !(cfg.sub[i]->misc&SUB_NOTAG)) {
                    965:                                                                uifc.changes=1;
                    966:                                                                cfg.sub[i]->misc|=SUB_NOTAG; }
                    967:                             break;
                    968:                                                case 1:
                    969:                                                        n=0;
                    970:                                                        strcpy(opt[0],"Yes");
                    971:                                                        strcpy(opt[1],"No");
                    972:                                                        opt[2][0]=0;
                    973:                                                        SETHELP(WHERE);
                    974: /*
                    975: &Export ASCII Characters Only:&
                    976: 
                    977: If the network that this sub-board is echoed on does not allow extended
                    978: ASCII (>127) or control codes (<20, not including CR), set this option
                    979: to &Yes&.
                    980: */
                    981:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                    982:                                                                ,"Export ASCII Characters Only",opt);
                    983:                                                        if(n==-1)
                    984:                                 break;
                    985:                                                        if(n && cfg.sub[i]->misc&SUB_ASCII) {
                    986:                                                                uifc.changes=1;
                    987:                                                                cfg.sub[i]->misc&=~SUB_ASCII;
                    988:                                                                break; }
                    989:                                                        if(!n && !(cfg.sub[i]->misc&SUB_ASCII)) {
                    990:                                                                uifc.changes=1;
                    991:                                                                cfg.sub[i]->misc|=SUB_ASCII; }
                    992:                             break;
                    993:                                                case 2:
                    994:                                                        n=1;
                    995:                                                        strcpy(opt[0],"Yes");
                    996:                                                        strcpy(opt[1],"No");
                    997:                                                        opt[2][0]=0;
                    998:                                                        SETHELP(WHERE);
                    999: /*
                   1000: &Gate Between Net Types:&
                   1001: 
                   1002: If this sub-board is networked using more than one network technology,
                   1003: and you want messages to be &gated& between the networks, set this
                   1004: option to &Yes&.
                   1005: 
                   1006: If this option is set to &No&, messages imported from one network type
                   1007: will ¬& be exported to another network type. This is the default and
                   1008: should be used unless you have &specific& permission from both networks
                   1009: to gate this sub-board. Incorrectly gated sub-boards can cause duplicate
                   1010: messages loops and cross-posted messages.
                   1011: 
                   1012: This option does not affect the exporting of messages created on your
                   1013: BBS.
                   1014: */
                   1015:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1016:                                                                ,"Gate Between Net Types",opt);
                   1017:                                                        if(n==-1)
                   1018:                                 break;
                   1019:                                                        if(!n && !(cfg.sub[i]->misc&SUB_GATE)) {
                   1020:                                                                uifc.changes=1;
                   1021:                                                                cfg.sub[i]->misc|=SUB_GATE;
                   1022:                                                                break; }
                   1023:                                                        if(n==1 && cfg.sub[i]->misc&SUB_GATE) {
                   1024:                                                                uifc.changes=1;
                   1025:                                                                cfg.sub[i]->misc&=~SUB_GATE; }
                   1026:                             break;
                   1027:                                                case 3:
                   1028:                                                        n=1;
                   1029:                                                        strcpy(opt[0],"Yes");
                   1030:                                                        strcpy(opt[1],"No");
                   1031:                                                        opt[2][0]=0;
                   1032:                                                        SETHELP(WHERE);
                   1033: /*
                   1034: &Sub-board Networked via QWK Packets:&
                   1035: 
                   1036: If this sub-board is networked with other BBSs via QWK packets, this
                   1037: option should be set to &Yes&. With this option set to &Yes&, titles of
                   1038: posts on this sub-board will be limited to the QWK packet limitation of
                   1039: 25 characters. It also allows the &N&etwork restriction to function
                   1040: properly.
                   1041: */
                   1042:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1043:                                                                ,"Networked via QWK Packets",opt);
                   1044:                                                        if(n==-1)
                   1045:                                 break;
                   1046:                                                        if(!n && !(cfg.sub[i]->misc&SUB_QNET)) {
                   1047:                                                                uifc.changes=1;
                   1048:                                                                cfg.sub[i]->misc|=SUB_QNET;
                   1049:                                                                break; }
                   1050:                                                        if(n==1 && cfg.sub[i]->misc&SUB_QNET) {
                   1051:                                                                uifc.changes=1;
                   1052:                                                                cfg.sub[i]->misc&=~SUB_QNET; }
                   1053:                             break;
                   1054:                                                case 4:
                   1055:                                                        SETHELP(WHERE);
                   1056: /*
                   1057: &Sub-board QWK Network Tagline:&
                   1058: 
                   1059: If you want to use a different QWK tagline than the configured default
                   1060: tagline in the &Networks& configuration, you should enter that tagline
                   1061: here. If this option is left blank, the default tagline is used.
                   1062: */
                   1063:                                                        uifc.input(WIN_MID|WIN_SAV,0,0,nulstr,cfg.sub[i]->tagline
                   1064:                                                                ,sizeof(cfg.sub[i]->tagline)-1,K_MSG|K_EDIT);
                   1065:                                                        break;
                   1066:                                                case 5:
                   1067:                                                        n=1;
                   1068:                                                        strcpy(opt[0],"Yes");
                   1069:                                                        strcpy(opt[1],"No");
                   1070:                                                        opt[2][0]=0;
                   1071:                                                        SETHELP(WHERE);
                   1072: /*
                   1073: &Sub-board Networked via Internet:&
                   1074: 
                   1075: If this sub-board is networked to the Internet via UUCP or NNTP, this
                   1076: option should be set to &Yes&.
                   1077: 
                   1078: It will allow the &N&etwork user restriction to function properly.
                   1079: */
                   1080:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1081:                                                                ,"Networked via Internet",opt);
                   1082:                                                        if(n==-1)
                   1083:                                 break;
                   1084:                                                        if(!n && !(cfg.sub[i]->misc&SUB_INET)) {
                   1085:                                                                uifc.changes=1;
                   1086:                                                                cfg.sub[i]->misc|=SUB_INET;
                   1087:                                                                break; }
                   1088:                                                        if(n==1 && cfg.sub[i]->misc&SUB_INET) {
                   1089:                                                                uifc.changes=1;
                   1090:                                                                cfg.sub[i]->misc&=~SUB_INET; }
                   1091:                             break;
                   1092:                                                case 6:
                   1093:                             n=1;
                   1094:                             strcpy(opt[0],"Yes");
                   1095:                             strcpy(opt[1],"No");
                   1096:                             opt[2][0]=0;
                   1097:                             SETHELP(WHERE);
                   1098: /*
                   1099: &Sub-board Networked via PostLink or PCRelay:&
                   1100: 
                   1101: If this sub-board is networked with other BBSs via PostLink or PCRelay,
                   1102: this option should be set to &Yes&. With this option set to &Yes&,
                   1103: titles of posts on this sub-board will be limited to the UTI
                   1104: specification limitation of 25 characters. It also allows the &N&etwork
                   1105: restriction to function properly.
                   1106: */
                   1107:                             n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1108:                                 ,"Networked via PostLink or PCRelay",opt);
                   1109:                             if(n==-1)
                   1110:                                 break;
                   1111:                             if(!n && !(cfg.sub[i]->misc&SUB_PNET)) {
                   1112:                                 uifc.changes=1;
                   1113:                                 cfg.sub[i]->misc|=SUB_PNET;
                   1114:                                 break; }
                   1115:                             if(n==1 && cfg.sub[i]->misc&SUB_PNET) {
                   1116:                                 uifc.changes=1;
                   1117:                                 cfg.sub[i]->misc&=~SUB_PNET; }
                   1118:                             break;
                   1119:                                                case 7:
                   1120:                                                        n=1;
                   1121:                                                        strcpy(opt[0],"Yes");
                   1122:                                                        strcpy(opt[1],"No");
                   1123:                                                        opt[2][0]=0;
                   1124:                                                        SETHELP(WHERE);
                   1125: /*
                   1126: &Sub-board Networked via FidoNet EchoMail:&
                   1127: 
                   1128: If this sub-board is part of a FidoNet EchoMail conference, set this
                   1129: option to &Yes&.
                   1130: */
                   1131:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1132:                                                                ,"Networked via FidoNet EchoMail",opt);
                   1133:                                                        if(n==-1)
                   1134:                                 break;
                   1135:                                                        if(!n && !(cfg.sub[i]->misc&SUB_FIDO)) {
                   1136:                                                                uifc.changes=1;
                   1137:                                                                cfg.sub[i]->misc|=SUB_FIDO;
                   1138:                                                                break; }
                   1139:                                                        if(n==1 && cfg.sub[i]->misc&SUB_FIDO) {
                   1140:                                                                uifc.changes=1;
                   1141:                                                                cfg.sub[i]->misc&=~SUB_FIDO; }
                   1142:                             break;
                   1143:                                                case 8:
                   1144:                                                        smb_faddrtoa(&cfg.sub[i]->faddr,str);
                   1145:                                                        SETHELP(WHERE);
                   1146: /*
                   1147: &Sub-board FidoNet Address:&
                   1148: 
                   1149: If this sub-board is part of a FidoNet EchoMail conference, this is
                   1150: the address used for this sub-board. Format: &Zone:Net/Node[.Point]&
                   1151: */
                   1152:                                                        uifc.input(WIN_MID|WIN_SAV,0,0,"FidoNet Address"
                   1153:                                                                ,str,25,K_EDIT);
                   1154:                                                        cfg.sub[i]->faddr=atofaddr(str);
                   1155:                                                        break;
                   1156:                                                case 9:
                   1157:                                                        SETHELP(WHERE);
                   1158: /*
                   1159: &Sub-board FidoNet Origin Line:&
                   1160: 
                   1161: If this sub-board is part of a FidoNet EchoMail conference and you
                   1162: want to use an origin line other than the default origin line in the
                   1163: &Networks& configuration, set this value to the desired origin line.
                   1164: 
                   1165: If this option is blank, the default origin line is used.
                   1166: */
                   1167:                                                        uifc.input(WIN_MID|WIN_SAV,0,0,nulstr,cfg.sub[i]->origline
                   1168:                                                                ,sizeof(cfg.sub[i]->origline)-1,K_EDIT);
                   1169:                             break;
                   1170:                                        } 
                   1171:                                }
                   1172:                                break;
                   1173:                        case 15:
                   1174:                                while(1) {
                   1175:                                        n=0;
                   1176:                                        if(cfg.sub[i]->qwkconf)
                   1177:                                                sprintf(str,"Static (%u)",cfg.sub[i]->qwkconf);
                   1178:                                        else
                   1179:                                                strcpy(str,"Dynamic");
                   1180:                                        sprintf(opt[n++],"%-27.27s%s","QWK Conference Number"
                   1181:                                                ,str);
                   1182:                                        sprintf(opt[n++],"%-27.27s%s","Storage Method"
                   1183:                                                ,cfg.sub[i]->misc&SUB_HYPER ? "Hyper Allocation"
                   1184:                                                : cfg.sub[i]->misc&SUB_FAST ? "Fast Allocation"
                   1185:                                                : "Self-packing");
                   1186:                                        if(!cfg.sub[i]->data_dir[0])
                   1187:                                                sprintf(str,"%ssubs/",cfg.data_dir);
                   1188:                                        else
                   1189:                                                strcpy(str,cfg.sub[i]->data_dir);
                   1190:                                        sprintf(opt[n++],"%-27.27s%.40s","Storage Directory",str);
                   1191:                                        sprintf(opt[n++],"%-27.27s%.40s","Semaphore File",cfg.sub[i]->post_sem);
                   1192:                                        sprintf(opt[n++],"%-27.27s%u","Pointer File Index",cfg.sub[i]->ptridx);
                   1193:                                        opt[n][0]=0;
                   1194:                                        uifc.savnum=2;
                   1195:                                        SETHELP(WHERE);
                   1196: /*
                   1197: &Sub-board Advanced Options:&
                   1198: 
                   1199: This menu contains options for the selected sub-board that are advanced
                   1200: in nature.
                   1201: */
                   1202:                                        n=uifc.list(WIN_ACT|WIN_SAV|WIN_RHT|WIN_BOT,3,2,60,&adv_dflt,0
                   1203:                                                ,"Advanced Options",opt);
                   1204:                                        if(n==-1)
                   1205:                                                break;
                   1206:                                        uifc.savnum=3;
                   1207:                     switch(n) {
                   1208:                         case 0:
                   1209:                                                        SETHELP(WHERE);
                   1210: /*
                   1211: &Sub-board QWK Conference Number:&
                   1212: 
                   1213: If you wish to have the QWK conference number for this sub-board
                   1214: automatically generated by Synchronet (based on the group number
                   1215: and sub-board number for the user), set this option to &Dynamic&.
                   1216: 
                   1217: If you wish to have the same QWK conference number for this sub-board
                   1218: regardless of which user access it, set this option to &Static&
                   1219: by entering the conference number you want to use.
                   1220: */
                   1221:                                                        if(cfg.sub[i]->qwkconf)
                   1222:                                                                sprintf(str,"%u",cfg.sub[i]->qwkconf);
                   1223:                                                        else
                   1224:                                                                str[0]=0;
                   1225:                                                        if(uifc.input(WIN_MID|WIN_SAV,0,17
                   1226:                                                                ,"QWK Conference Number (0=Dynamic)"
                   1227:                                                                ,str,5,K_EDIT|K_NUMBER)>=0)
                   1228:                                                                cfg.sub[i]->qwkconf=atoi(str);
                   1229:                                                        break;
                   1230:                                                case 1:
                   1231:                                                        n=0;
                   1232:                                                        strcpy(opt[0],"Hyper Allocation");
                   1233:                                                        strcpy(opt[1],"Fast Allocation");
                   1234:                                                        strcpy(opt[2],"Self-packing");
                   1235:                                                        opt[3][0]=0;
                   1236:                                                        SETHELP(WHERE);
                   1237: /*
                   1238: &Self-Packing& is the slowest storage method because it conserves disk
                   1239:   space as it imports messages by using deleted message header and data
                   1240:   blocks for new messages automatically. If you use this storage method,
                   1241:   you will not need to run &SMBUTIL P& on this message base unless you
                   1242:   accumilate a large number of deleted message blocks and wish to free
                   1243:   that disk space. You can switch from self-packing to fast allocation
                   1244:   storage method and back again as you wish.
                   1245: &Fast Allocation& is faster than self-packing because it does not search
                   1246:   for deleted message blocks for new messages. It automatically places
                   1247:   all new message blocks at the end of the header and data files. If you
                   1248:   use this storage method, you will need to run &SMBUTIL P& on this
                   1249:   message base periodically or it will continually use up disk space.
                   1250: &Hyper Allocation& is the fastest storage method because it does not
                   1251:   maintain allocation files at all. Once a message base is setup to use
                   1252:   this storage method, it should not be changed without first deleting
                   1253:   the message base data files in your &DATA\DIRS\SUBS& directory for this
                   1254:   sub-board. You must use &SMBUTIL P& as with the fast allocation method.
                   1255: */
                   1256:                                                        n=uifc.list(WIN_SAV|WIN_MID,0,0,0,&n,0
                   1257:                                                                ,"Storage Method",opt);
                   1258:                                                        if(n==-1)
                   1259:                                                                break;
                   1260:                                                        if(!n && !(cfg.sub[i]->misc&SUB_HYPER)) {
                   1261:                                                                uifc.changes=1;
                   1262:                                                                cfg.sub[i]->misc|=SUB_HYPER;
                   1263:                                                                cfg.sub[i]->misc&=~SUB_FAST;
                   1264:                                                                cfg.sub[i]->misc|=SUB_HDRMOD;
                   1265:                                                                break; }
                   1266:                                                        if(!n)
                   1267:                                                                break;
                   1268:                                                        if(cfg.sub[i]->misc&SUB_HYPER) {        /* Switching from hyper */
                   1269:                                                                strcpy(opt[0],"Yes");
                   1270:                                                                strcpy(opt[1],"No, I want to use Hyper Allocation");
                   1271:                                                                opt[2][0]=0;
                   1272:                                                                m=0;
                   1273:                                                                if(uifc.list(WIN_SAV|WIN_MID,0,0,0,&m,0
                   1274:                                                                        ,"Delete all messages in this sub-board?",opt)!=0)
                   1275:                                                                        break;
                   1276:                                                                if(cfg.sub[i]->data_dir[0])
                   1277:                                                                        sprintf(str,"%s",cfg.sub[i]->data_dir);
                   1278:                                                                else
                   1279:                                                                        sprintf(str,"%ssubs/",cfg.data_dir);
                   1280:                                                                sprintf(str2,"%s%s.*"
                   1281:                                                                        ,cfg.grp[cfg.sub[i]->grp]->code_prefix
                   1282:                                                                        ,cfg.sub[i]->code_suffix);
                   1283:                                                                strlwr(str2);
                   1284:                                                                delfiles(str,str2); 
                   1285:                                                        }
                   1286: 
                   1287:                                                        if(cfg.sub[i]->misc&SUB_HYPER)
                   1288:                                                                cfg.sub[i]->misc|=SUB_HDRMOD;
                   1289:                                                        if(n==1 && !(cfg.sub[i]->misc&SUB_FAST)) {
                   1290:                                                                uifc.changes=1;
                   1291:                                                                cfg.sub[i]->misc|=SUB_FAST;
                   1292:                                                                cfg.sub[i]->misc&=~SUB_HYPER;
                   1293:                                                                break; 
                   1294:                                                        }
                   1295:                                                        if(n==2 && cfg.sub[i]->misc&(SUB_FAST|SUB_HYPER)) {
                   1296:                                                                uifc.changes=1;
                   1297:                                                                cfg.sub[i]->misc&=~(SUB_FAST|SUB_HYPER);
                   1298:                                                                break; 
                   1299:                                                        }
                   1300:                                                        break;
                   1301:                                                case 2:
                   1302:                                                        SETHELP(WHERE);
                   1303: /*
                   1304: &Sub-board Storage Directory:&
                   1305: 
                   1306: Use this if you wish to place the data directory for this sub-board on
                   1307: another drive or in another directory besides the default setting.
                   1308: */
                   1309:                                                        uifc.input(WIN_MID|WIN_SAV,0,17,"Directory"
                   1310:                                                                ,cfg.sub[i]->data_dir,sizeof(cfg.sub[i]->data_dir)-1,K_EDIT);
                   1311:                                                        break; 
                   1312:                                                case 3:
                   1313:                                                        SETHELP(WHERE);
                   1314: /*
                   1315: `Sub-board Semaphore File:`
                   1316: 
                   1317: This is a filename that will be created as a semaphore (signal) to an
                   1318: external program or event whenever a message is posted in this sub-board.
                   1319: */
                   1320:                                                        uifc.input(WIN_MID|WIN_SAV,0,17,"Semaphore File"
                   1321:                                                                ,cfg.sub[i]->post_sem,sizeof(cfg.sub[i]->post_sem)-1,K_EDIT);
                   1322:                                                        break; 
                   1323:                                                case 4:
                   1324:                                                        SETHELP(WHERE);
                   1325: /*
                   1326: `Sub-board Pointer Index:`
                   1327: 
                   1328: You should normally have no reason to modify this value. If you get
                   1329: crossed-up or duplicate ptridx values, then you may want to adjust
                   1330: this value, but do so with great care and trepidation.
                   1331: */
                   1332:                                                        sprintf(str,"%u",cfg.sub[i]->ptridx);
                   1333:                                                        if(uifc.input(WIN_MID|WIN_SAV,0,17
                   1334:                                                                ,"Pointer File Index (Danger!)"
                   1335:                                                                ,str,5,K_EDIT|K_NUMBER)>=0)
                   1336:                                                                cfg.sub[i]->ptridx=atoi(str);
                   1337:                                                        break;
                   1338: 
                   1339:                                        } 
                   1340:                                }
                   1341:                                break;
                   1342:                        } 
                   1343:                } 
                   1344:        }
                   1345: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.