/***************************************************************************
 *                                                                         *
 *   WGSCHSUP.C                                                            *
 *                                                                         *
 *   Copyright (c) 1996-1997 Galacticomm, Inc.    All Rights Reserved.     *
 *                                                                         *
 *   DOS side utility to allow SYSOP to choose to configure either ICO     *
 *   or modem channels or both at installation.  Called from WGSSTART.BAT. *
 *                                                                         *
 *                                                 - Bill Hyatt 6/24/96    *
 *                                                                         *
 ***************************************************************************/

#include "gcomm.h"
#include "majorbbs.h"

#define FILREV "$Revision: 2 $"

extern CHAR scntbl[][GVIDSCNSIZ];  /* table of pre-OBJ'd scn files         */

CHAR *supchcs[]={
     "     Internet Channels Only     ",  // exit code 10
     "      Modem Channels Only       ",  // exit code 20
     "Both Internet and Modem Channels"   // exit code 30
};                                        // ESC == exit code 40

CHAR savscn1[GVIDSCNSIZ],
     savscn2[GVIDSCNSIZ];

INT
main(VOID)
{
     CHAR ynbuf[3+1];
     GBOOL done=FALSE;
     INT savcur,chc;

     initvid();
     savcur=curcurs();
     cursiz(GVIDNOCURS);
     scn2mem(savscn1,0,GVIDSCNSIZ);
     explodeto(scntbl[0],0,0,61,17,9,3);
     while (!done) {
          proff(0,0);
          if ((chc=choose(3,supchcs,24,16,55,18,TRUE)) != -ESC) {
               done=TRUE;
          }
          else {
               scn2mem(savscn2,0,GVIDSCNSIZ);
               proff(0,0);
               explodeto(scntbl[0],0,18,64,24,7,8);
               printf("\7");
               strcpy(ynbuf,"No");
               edtval(23,13,3+1,ynbuf,validyn,MCHOICE+ALLCAPS);
               mem2scn(savscn2,0,GVIDSCNSIZ);
               if (ynbuf[0] == 'Y') {
                    chc=3;
                    done=TRUE;
               }
          }
     }
     mem2scn(savscn1,0,GVIDSCNSIZ);
     cursiz(savcur);
     clsvid();
     return((chc+1)*10);
}

