home *** CD-ROM | disk | FTP | other *** search
/ The Devil's Doorknob BBS Capture (1996-2003) / devilsdoorknobbbscapture1996-2003.iso / UTIL / WWIVSOR / MMENU.C < prev    next >
Text File  |  1996-12-04  |  35KB  |  1,376 lines

  1. #include "vars.h"
  2.  
  3. #pragma hdrstop
  4.  
  5. #include "ripint.h"
  6. #include <ctype.h>
  7.  
  8.  
  9.  
  10. void mainmenu(void)
  11. {
  12.   char *s, s1[81], s2[81], ch;
  13.   int i, useconf, ac,pos;
  14.   static int mflag = 0, no_clear = 0;
  15.   long oldstat;
  16.   FILE *namefile;
  17.  
  18.   s2[0]=0;
  19.   if (usub[cursub].subnum==-1) {
  20.     cursub=0;
  21.     if (usub[cursub].subnum==-1) {
  22.       strcpy(s2,get_string(16));
  23.     }
  24.   }
  25.  
  26.   write_inst(INST_LOC_MAIN,usub[cursub].subnum,INST_FLAGS_NONE);
  27.  
  28.   tleft(1);
  29.   if ((sysstatus_expert & thisuser.sysstatus)==0) {
  30.     if (menu_on() && no_clear == 0 && cleared != HYPCLEAR) {
  31.  
  32.       if (cleared == NEEDCLEAR)
  33.         rip_cls();
  34.  
  35.       if (autox)
  36.         rmenu = 300;
  37.  
  38.       if (rmenu > 0) {
  39.         nln(4);
  40.         /* Compensate for menu scrolling; varies on some systems */
  41.         sprintf(s1,"\x1b[%dA\r", 8 + sysinfo.rip_rm_adjust);
  42.         outstr(s1);
  43. #ifdef RIPDRIVE
  44.         if (rd_on()) {     /* For RIPdrive local */
  45.           if (sysinfo.rip_rm_adjust > 1)
  46.             sprintf(s1,"\x1b[%dB\r", sysinfo.rip_rm_adjust-2);
  47.           else if (sysinfo.rip_rm_adjust < 1)
  48.             sprintf(s1,"\x1b[%dA\r", 2-sysinfo.rip_rm_adjust);
  49.           rd_str(s1);
  50.         }
  51. #endif
  52.       }
  53.       printmenu(rmenu);
  54.       topscreen();
  55.       if (cleared == NEEDCLEAR || cleared == WASCLEARED) {
  56.         cleared = 0;
  57.         outstr("\x1b[20H");        /* Line 20 at start */
  58.       } else if (rmenu > 0)
  59.         mflag = -1;
  60.  
  61.       if (rip_on() && autox && (!rip_subset)) {
  62.         sprintf(s1, "%sAUTOEXEC.RIP", sysinfo.ripdir);   /* Check for AUTOEXEC.RIP */
  63.         if (exist(s1))                           /* locally */
  64.           rip_show(s1);
  65.         comstr("|1F000000AUTOEXEC.RIP|#\r ");   /* and on user's machine */
  66.         if (delaykey(1) == '1')
  67.           comstr("|1R00000000AUTOEXEC.RIP\r "); /* and play if exists */
  68.       }
  69.       autox = 0;
  70.       rmenu = 0;
  71.     } else
  72.       printmenu(0);
  73.   }
  74.  
  75.   nln(2);
  76.   tleft(1);
  77.  
  78.   useconf=((uconfsub[1].confnum!=-1) && okconf(&thisuser));
  79.  
  80.   if (E_C) {
  81.     npr("1T 0- 1%s\r\n",ctim(nsl()));
  82.     sprintf(s1,"7[1%s %c7] [1%s7]", get_string(1627),
  83.             subconfs[uconfsub[curconfsub].confnum].designator,
  84.       stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  85.     if (s2[0]==0)
  86.       sprintf(s2,"7[1%s%s7] [1%s7]0 : 2",
  87.         useconf?get_string(1398):"",
  88.         usub[cursub].keys,
  89.         stripcolors(subboards[usub[cursub].subnum].name));
  90.   } else {
  91.     npr("3[5Time Left3] 5- 3[5%s3]\r\n",ctim(nsl()));
  92.     sprintf(s1,"3[5%s %c3] [5%s3]", get_string(1627),
  93.       subconfs[uconfsub[curconfsub].confnum].designator,
  94.       stripcolors(subconfs[uconfsub[curconfsub].confnum].name));
  95.     if (s2[0]==0)
  96.       sprintf(s2,"3[5%s%s3] [5%s3] 5:",
  97.         useconf?get_string(1398):"",
  98.         usub[cursub].keys,
  99.         stripcolors(subboards[usub[cursub].subnum].name));
  100.   }
  101.  
  102.   if (useconf) {
  103.     ansic(2);
  104.     pl(s1);
  105.   }
  106. #ifdef RIPDRIVE
  107.   if (rd_on())
  108.     rd_str("\x1b[0J");       /* Clear to EOS */
  109. #endif
  110.   if (menu_on())
  111.     outstr("\x1b[0J");
  112.   prt(2,s2);
  113.   helpl=1;
  114.   s=mmkey(0);
  115.   helpl=0;
  116.   if (s[0])
  117.     for (i=0; (i<num_subs) && (usub[i].subnum!=-1); i++)
  118.       if (strcmp(usub[i].keys,s)==0)
  119.         cursub=i;
  120.   if (strlen(s)>2) {
  121.     sprintf(s1,"//%s",s);
  122.     sysopchar(s1);
  123.   } else
  124.     sysopchar(s);
  125.  
  126.   no_clear = 0;
  127.   if (menu_on() && cleared != HYPCLEAR) {
  128.     comstr("!|1K\r ");     /* Disable menus */
  129.     if (mflag) {
  130.       rip_pcb();
  131.       mflag = 0;
  132.     }
  133.     if (rip_pause)
  134.       printmenu(334);
  135.     if ( (strcmp(s,"/C") == 0) || (s[1] == 0 && (strchr("PEFJ", s[0])
  136.      != NULL)) ) {
  137.       printmenu(321);
  138.       cleared = WASCLEARED;
  139.     } else if (isalpha(s[0]) || (strchr("$", s[0]) != NULL && s[1] == 0))
  140.       printmenu(320);       /* Draw w/Quit & Help unless menu pulled down */
  141.     else if (s[0] != '/' && s[0] != '.')
  142.       no_clear = -1;
  143.     if ((strchr("EFGMNPQS",s[0]) != NULL) || (strcmp(s,"/A") == 0) ||
  144.       strcmp(s,"/E") == 0) {
  145.       rmenu = 300;
  146.       cleared = NEEDCLEAR;
  147.     }
  148.   }
  149.  
  150. /**************************************************/
  151.  
  152.   if (so()) {
  153.     if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  154.       edit_database();
  155.     if ((strcmp(s,"READINI")==0) || (strcmp(s,"RI")==0)) {
  156.       if (!read_ini_info()) {
  157.         printf(get_string(1504));
  158.         end_bbs(noklevel);
  159.       }
  160.       if (!chains_reg)
  161.         sysinfo.flags &= ~OP_FLAGS_CHAIN_REG;
  162.       topscreen();
  163.     }
  164.     if ((strcmp(s,"INSTEDIT")==0) || (strcmp(s,"IE")==0))
  165.       instance_edit();
  166.     if ((strcmp(s,"CONFEDIT")==0) || (strcmp(s,"JE")==0)) {
  167.       write_inst(INST_LOC_CONFEDIT,0,INST_FLAGS_NONE);
  168.       edit_confs();
  169.     }
  170.     if ((strcmp(s,"BOARDEDIT")==0) || (strcmp(s,"BE")==0)) {
  171.       write_inst(INST_LOC_BOARDEDIT,0,INST_FLAGS_NONE);
  172.       sysoplog(get_stringx(1,2));
  173.       boardedit();
  174.     }
  175.     if ((strcmp(s,"CHAINEDIT")==0) || (strcmp(s,"CE")==0)) {
  176.       write_inst(INST_LOC_CHAINEDIT,0,INST_FLAGS_NONE);
  177.       sysoplog(get_stringx(1,4));
  178.       chainedit();
  179.     }
  180.     if (strcmp(s, "CHAT")==0) {
  181.       nl();
  182.       pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
  183.                        get_string(21) :
  184.                        get_string(22));
  185.       sysoplog(get_stringx(1,9));
  186.       topscreen();
  187.     }
  188.     if ((strcmp(s,"CHUSER")==0) || (strcmp(s,"CU")==0)) {
  189.       write_inst(INST_LOC_CHUSER,0,INST_FLAGS_NONE);
  190.       chuser();
  191.     }
  192.     if (strcmp(s,"CLOUT")==0) {
  193.       npr("\r\nNot Yet.\r\n");
  194.     /*  force_callout(2); */
  195.     }
  196.     if (strncmp(s,"DEBUG",5)==0) {
  197.       if((s[5]) && (s[5]!=' '))
  198.         debuglevel=s[5]-'0';
  199.       else if(s[6])
  200.         debuglevel=s[6]-'0';
  201.     }
  202.     if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  203.       write_inst(INST_LOC_DIREDIT,0,INST_FLAGS_NONE);
  204.       sysoplog(get_stringx(1,3));
  205.       dlboardedit();
  206.     }
  207.     if (strcmp(s,"DOS")==0) {
  208.       if (checkpw()) {
  209.         write_inst(INST_LOC_DOS,0,INST_FLAGS_NONE);
  210.         sysoplog(get_stringx(1,6));
  211.         extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  212.       }
  213.     }
  214.     if ((strcmp(s,"EDIT")==0)) {
  215.       if (checkpw()) {
  216.         write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  217.         nl();
  218.         prt(2,get_string(7));
  219.         input(s1,50);
  220.         if (s1[0]) {
  221.           if ((okansi()) && (thisuser.defed))
  222.             external_edit(s1,"",thisuser.defed-1,500,".",s1,1);
  223.           else
  224.             tedit(s1);
  225.         }
  226.       }
  227.     }
  228.     if ((strcmp(s,"GFILEEDIT")==0) || (strcmp(s,"GE")==0)) {
  229.       write_inst(INST_LOC_GFILEEDIT,0,INST_FLAGS_NONE);
  230.       sysoplog(get_stringx(1,5));
  231.       gfileedit();
  232.     }
  233.     if (strcmp(s,"LOAD")==0) {
  234.       nl();
  235.       prt(2,get_string(7));
  236.       input(s1,50);
  237.       if (s1[0]) {
  238.         nl();
  239.         prt(5,get_string(17));
  240.         if (yn()) {
  241.           nl();
  242.           load_workspace(s1,0);
  243.         } else {
  244.           nl();
  245.           load_workspace(s1,1);
  246.         }
  247.       }
  248.     }
  249.     if (strcmp(s,"MAILR")==0) {
  250.       if (checkpw()) {
  251.         write_inst(INST_LOC_MAILR,0,INST_FLAGS_NONE);
  252.         sysoplog(get_stringx(1,8));
  253.         mailr();
  254.       }
  255.     }
  256.     if ((strcmp(s,"REBOOT")==0) && (checkpw())) {
  257.       write_inst(INST_LOC_REBOOT,0,INST_FLAGS_NONE);
  258.       dtr(0);
  259.       sysoplog(get_stringx(1,7));
  260.       logoff();
  261.       sl1(1,"");
  262.       if (ok_modem_stuff)
  263.         closeport();
  264.       close_strfiles();
  265.       Wait(3.0);
  266. #ifdef __OS2__
  267.       sprintf(s2, "/IBD:%c", syscfg.ramdrive);
  268.       execlp("setboot.exe", "setboot.exe", s2, NULL);
  269. #else
  270.       setvect(0xff,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
  271.       geninterrupt(0xff);
  272. #endif
  273.     }
  274.     if (strcmp(s,"RELOAD")==0) {
  275.       write_inst(INST_LOC_RELOAD,0,INST_FLAGS_NONE);
  276.       read_new_stuff();
  277.     }
  278.     if (strcmp(s,"RESETF")==0) {
  279.       write_inst(INST_LOC_RESETF,0,INST_FLAGS_NONE);
  280.       reset_files();
  281.     }
  282.     if (strcmp(s, "RESETQSCAN")==0) {
  283.       prt(5,get_string(970));
  284.       if (yn()) {
  285.         write_inst(INST_LOC_RESETQSCAN,0,INST_FLAGS_NONE);
  286.         for (i=0; i<=number_userrecs(); i++) {
  287.           read_qscn(i, qsc, 1);
  288.           memset(qsc_p,
  289.                  0,
  290.                  syscfg.qscn_len - 4*(1+((max_dirs+31)/32)+((max_subs+31)/32)));
  291.           write_qscn(i, qsc, 1);
  292.         }
  293.         read_qscn(1, qsc, 0);
  294.         close_qscn();
  295.       }
  296.     }
  297.     if (strcmp(s,"STAT")==0) {
  298.       read_status();
  299.       nl();
  300. #ifndef __OS2__
  301.       outstr(get_string(18));
  302.       pln(_stklen);
  303. #endif
  304.       outstr(get_string(19));
  305.       npr("%dk\r\n", (int) (bbscoreleft()/1024));
  306.       outstr(get_string(20));
  307.       npr("%d%%\r\n", cachestat());
  308.       outstr(get_string(938));
  309.       npr("%lu\r\n",status.qscanptr);
  310.       nl();
  311.     }
  312.     if (strcmp(s,"PACK")==0) {
  313.       nl();
  314.       prt(5, get_string(1505));
  315.       if (yn())
  316.         pack_all_subs();
  317.       else
  318.         pack_sub(usub[cursub].subnum);
  319.     }
  320.   }
  321. /**************************************************/
  322.  
  323.   if (cs()) {
  324.     if (strcmp(s,"IVOTES")==0) {
  325.       write_inst(INST_LOC_VOTE,0,INST_FLAGS_NONE);
  326.       sysoplog(get_stringx(1,11));
  327.       ivotes();
  328.     }
  329.     if (strcmp(s,"LOG")==0) {
  330.       slname(date(), s1);
  331.       print_local_file(s1,"");
  332.     }
  333.     if (strcmp(s,"NLOG")==0) {
  334.       print_local_file("NET.LOG","");
  335.     }
  336.     if (strcmp(s,"PENDING")==0) {
  337.       print_pending_list();
  338.     }
  339.     if (strcmp(s,"STATUS")==0) {
  340.       prstatus();
  341.     }
  342.     if (strcmp(s,"TEDIT")==0) {
  343.       write_inst(INST_LOC_TEDIT,0,INST_FLAGS_NONE);
  344.       sysoplog(get_stringx(1,12));
  345.       text_edit();
  346.     }
  347.     if ((strcmp(s,"UEDIT")==0) || (strcmp(s,"UE")==0)) {
  348.       write_inst(INST_LOC_UEDIT,0,INST_FLAGS_NONE);
  349.       sysoplog(get_stringx(1,10));
  350.       uedit(usernum,0);
  351.     }
  352.     if (strcmp(s,"VOTEPRINT")==0) {
  353.       write_inst(INST_LOC_VOTEPRINT,0,INST_FLAGS_NONE);
  354.       voteprint();
  355.     }
  356.     if (strcmp(s,"YLOG")==0) {
  357.       read_status();
  358.       print_local_file(status.log1,"");
  359.     }
  360.     if (strcmp(s,"ZLOG")==0) {
  361.       zlog();
  362.     }
  363.     if ((strcmp(s,",")==0) && ((net_sysnum>0) || (net_num_max>1))) {
  364.       nl();
  365.       prt(2,get_string(23));
  366.       ch=onek("Q012");
  367.       switch(ch) {
  368.         case '0': print_local_file(get_string(1027),""); break;
  369.         case '1': print_local_file(get_string(1028),""); break;
  370.         case '2': print_local_file(get_string(1029),""); break;
  371.       }
  372.     }
  373.     if (strcmp(s,"/?")==0) {
  374.       printmenu(5);
  375.     }
  376.   }
  377.  
  378. /*************************************************/
  379.  
  380.   if ((strcmp(s,"UPLOAD")==0) && (actsl>10))
  381.     upload_post();
  382.   if (strcmp(s,"QWK")==0)
  383.     qwk_menu();
  384.   if (strcmp(s,"CLS")==0) {
  385.     outstr("\f");
  386.     if (rip_on()) {
  387.       //comstr("\r!|*\r");
  388.       rmenu = 300;
  389.       cleared = NEEDCLEAR;
  390.     }
  391.   }
  392.   if ((strcmp(s,"NET")==0) || (strncmp(s,"NET=",4)==0))
  393.     print_net_listing(0);
  394.   if (strcmp(s,"QSCAN")==0) {
  395.     nl();
  396.     prt(5,get_string(24));
  397.     if (yn()) {
  398.       read_status();
  399.       for (i=0; i<max_subs; i++)
  400.         qsc_p[i]=status.qscanptr-1L;
  401.       nl();
  402.       pl(get_string(25));
  403.       nl();
  404.     }
  405.   }
  406.   if (strcmp(s,"VER")==0) {
  407.     if (menu_on()) {
  408.       printmenu(322);
  409.       getkey();
  410.       cleared = NEEDCLEAR;
  411.       rip_cls();
  412.     }
  413.     nl();
  414.     npr("%s   (%s)\r\n",wwiv_version, wwiv_date);
  415.     nln(3);
  416.     pl("The author may be contacted at:");
  417.     nl();
  418.     pl("   Wayne Bell");
  419.     pl("   WWIV Software Services");
  420.     pl("   PO Box 720455");
  421.     pl("   McAllen, TX  78504-0455");
  422.     nl();
  423.     if (menu_on())
  424.       pausescr();
  425.   }
  426.   if (strcmp(s,"WHO")==0) {
  427.     multi_instance();
  428.   }
  429.   if (strlen(s) == 2 && s[0] == '/' && s[1] >= '0' && s[1] <= MAXMENU)
  430.     rmenu = 301 + s[1] - '0';
  431.  
  432.   if (strcmp(s,"/A")==0) {
  433.     write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  434.     express=0;
  435.     expressabort=0;
  436.     if ((uconfsub[1].confnum!=-1) && (okconf(&thisuser))) {
  437.       ac=1;
  438.       tmp_disable_conf(1);
  439.     }
  440.     nscan(0);
  441.     if (ac)
  442.       tmp_disable_conf(0);
  443.   }
  444.   if (strcmp(s,"/E")==0)
  445.     slash_e();
  446.   if (strcmp(s,"/N")==0)
  447.     nscan(cursub);
  448.   if (strcmp(s,"/O")==0) {
  449.     if (numbatchdl!=0) {
  450.       nl();
  451.       outstr(get_string(1324));
  452.       if (ny())
  453.         batchdl(1);
  454.       else
  455.         hangup=1;
  456.     } else
  457.       hangup=1;
  458.   }
  459.   if (strcmp(s,"/R")==0) {
  460.     if (using_modem) {
  461.       rip = rip_check();
  462.       if (rip_on()) {
  463.         if (rip_ver == 15450) {
  464.           rip_subset = -1;
  465.           pl(get_string(1441));        //ripstring(7));
  466.           pausescr();
  467.         } else {
  468.           cleared = WASCLEARED;
  469.           rmenu = 300;
  470.           choosemenu();
  471.         }
  472.       }
  473.     } else {
  474.       if (localrip_detect()) {          // RIPdrive is available
  475.         if (((sysinfo.flags & OP_FLAGS_RIPDRIVE_ON) != 0)
  476.             && !(thisuser.sysstatus & sysstatus_disable_rip)) {
  477.           if (rip_on()==0)
  478.             localrip_activate(sysinfo.ripdir, sysinfo.ripdir);
  479.           strcpy(sysinfo.ripdir,languagedir);
  480.           pos = strlen(sysinfo.ripdir) - 2;
  481.           while ((sysinfo.ripdir[--pos] != '\\') && pos >= 0);  /* Find first \ */
  482.           sysinfo.ripdir[++pos] = 0;
  483.           strcat(sysinfo.ripdir, "RIPMENUS\\");
  484.           rip = -1;
  485.           ripdrive = -1;
  486.           rip_popup = -1;
  487.           setmenu("RIP");
  488.           oldstat = thisuser.sysstatus;
  489.           thisuser.sysstatus &= ~sysstatus_expert;
  490.           do {
  491.             rip_cls();
  492.             printmenu(350);
  493.             user_menus = getkey();
  494.           } while ((user_menus < '0' || user_menus > '6'));
  495.           thisuser.sysstatus = oldstat;
  496.           rip_cls();
  497.           if (user_menus != '0') {
  498.             sprintf(s1, "%sNAME.MNU", sysinfo.ripdir);
  499.             if ((namefile = fopen(s1, "w")) != NULL) {
  500.               fprintf(namefile, "!|T%s\n", syscfg.systemname);
  501.               fclose(namefile);
  502.             }
  503.             autox = 0;
  504.             rmenu = 300;
  505.             cleared = NEEDCLEAR;
  506.             sprintf(s2,"MN%c", user_menus);
  507.             rip_pause = pausecheck(1, s2);
  508.             setmenu("REM");
  509.             topdata = 0;
  510.             if (thisuser.sysstatus & sysstatus_expert)
  511.               pl (get_string(1506));
  512.           } else {
  513.             rip=0;
  514. #ifdef RIPDRIVE
  515.             ripdrive = 0;
  516.             rd_disable();
  517. #endif
  518.           }
  519.         } else
  520.           pl(get_string(1507));
  521.       } else
  522.         pl(get_string(1508));
  523.     }
  524.   }
  525.   if (strcmp(s, "/V")==0)
  526.     valscan();
  527.   if (strcmp(s,"/C")==0) {
  528.     write_inst(INST_LOC_CHATROOM,0,INST_FLAGS_NONE);
  529.     cleared = NEEDCLEAR;
  530.     if (exist("WWIVCHAT.EXE")) {
  531.       sprintf(s1,"WWIVCHAT.EXE %s", create_chain_file());
  532.       extern_prog(s1, sysinfo.spawn_opts[8]);
  533.     } else
  534.       chat_room();
  535.   }
  536.   if (strcmp(s,"/Z")==0) {
  537.     if (sysinfo.flags & OP_FLAGS_SLASH_SZ) {
  538.       prt(5,get_string(935));
  539.       if (yn()) {
  540.         pl(get_string(26));
  541.         set_x_only(1, "POSTS.TXT", 0);
  542.         nscan(0);
  543.         set_x_only(0, NULL, 0);
  544.         add_arc("OFFLINE", "POSTS.TXT", 0);
  545.         download_temp_arc("OFFLINE", 0);
  546.       }
  547.     }
  548.   }
  549.   if ((s[1]==0) && (s[0]!=0)) {
  550.     switch(s[0]) {
  551.       case '}':
  552.         if (okconf(&thisuser)) {
  553.           if ((curconfsub<subconfnum-1) && (uconfsub[curconfsub+1].confnum>=0))
  554.             ++curconfsub;
  555.           else
  556.             curconfsub=0;
  557.           setuconf(CONF_SUBS, curconfsub, -1);
  558.         }
  559.         break;
  560.       case '>':
  561.       case '+':
  562.       case ']':
  563.         if ((cursub<num_subs-1) && (usub[cursub+1].subnum>=0))
  564.           ++cursub;
  565.         else
  566.           cursub=0;
  567.         break;
  568.       case '{':
  569.         if (okconf(&thisuser)) {
  570.           if (curconfsub>0)
  571.             --curconfsub;
  572.           else {
  573.             while ((uconfsub[curconfsub+1].confnum>=0) && (curconfsub<subconfnum-1))
  574.               ++curconfsub;
  575.           }
  576.           setuconf(CONF_SUBS, curconfsub, -1);
  577.         }
  578.         break;
  579.       case '<':
  580.       case '-':
  581.       case '[':
  582.         if (cursub>0)
  583.           --cursub;
  584.         else {
  585.           while ((usub[cursub+1].subnum>=0) && (cursub<num_subs-1))
  586.             ++cursub;
  587.         }
  588.         break;
  589.       case '!':
  590.         helpl=14;
  591.         if (!cs())
  592.           return;
  593.         nln(2);
  594.         pl(get_string(15));
  595.         outstr(":");
  596.         input(s1,30);
  597.         i=finduser1(s1);
  598.         if (i>0) {
  599.           sysoplog(get_stringx(1,13));
  600.           valuser(i);
  601.         } else
  602.           pl(get_string(8));
  603.         break;
  604.       case '.':
  605.         helpl=26;
  606.         write_inst(INST_LOC_CHAINS,0,INST_FLAGS_NONE);
  607.         play_sdf(get_string(1030),0);
  608.         existprint(get_string(1030));
  609.         do_chains();
  610.         break;
  611.       case '$':
  612.         write_inst(INST_LOC_BANK,0,INST_FLAGS_NONE);
  613.         time_bank();
  614.         break;
  615.       case 'A':
  616.         helpl=19;
  617.         write_inst(INST_LOC_AMSG,0,INST_FLAGS_NONE);
  618.         write_automessage();
  619.         break;
  620.       case 'B':
  621.         bbslist();
  622.         break;
  623.       case 'C':
  624.         helpl=3;
  625.         reqchat();
  626.         break;
  627.       case 'D':
  628.         helpl=4;
  629.         write_inst(INST_LOC_DEFAULTS,0,INST_FLAGS_NONE);
  630.         if (existprint(get_string(1031)))
  631.           pausescr();
  632.         if (menu_on()) {
  633.           comstr(" ");
  634.           rmenu = 300;
  635.         }
  636.         defaults();
  637.         break;
  638.       case 'E':
  639.         send_email();
  640.         break;
  641.       case 'F':
  642.         write_inst(INST_LOC_FEEDBACK,0,INST_FLAGS_NONE);
  643.         feedback(0);
  644.         break;
  645.       case 'G':
  646.         helpl=28;
  647.         write_inst(INST_LOC_GFILES,0,INST_FLAGS_NONE);
  648.         existprint(get_string(1032));
  649.         gfiles();
  650.         rmenu = 300;
  651.         break;
  652.       case 'H':
  653.         hop_sub();
  654.         break;
  655.       case 'I':
  656.         nl();
  657.         if (menu_on()) {
  658.           printmenu(328);
  659.           getkey();
  660.           rip_pcb();
  661.         }
  662.         npr("%s   (%s)\r\n",wwiv_version, wwiv_date);
  663.         nl();
  664.         existprint(get_string(1033));
  665.         existprint(get_string(1034));
  666.         break;
  667.       case 'J':
  668.         if (okconf(&thisuser))
  669.           jump_conf(CONF_SUBS);
  670.         break;
  671.       case 'K':
  672.         helpl=8;
  673.         write_inst(INST_LOC_KILLEMAIL,0,INST_FLAGS_NONE);
  674.         kill_old_email();
  675.         break;
  676.       case 'L':
  677.         if (status.callstoday>0) {
  678.           if (sysinfo.flags & OP_FLAGS_SHOW_CITY_ST) {
  679.             if (syscfg.sysconfig & sysconfig_extended_info)
  680.               pl(get_string(1429));
  681.             else
  682.               pl(get_string(972));
  683.           } else {
  684.             pl(get_string(972));
  685.           }
  686.           i=okansi()?205:'=';
  687.           npr(charstr(79,i));
  688.         }
  689. #ifdef RIPDRIVE
  690.         rd_coff();
  691. #endif
  692.         existprint(get_string(1035));
  693. #ifdef RIPDRIVE
  694.         rd_con();
  695. #endif
  696.         break;
  697.       case 'M':
  698.         readmail();
  699.         break;
  700.       case 'N':
  701.         write_inst(INST_LOC_SUBS,65535,INST_FLAGS_NONE);
  702.         express=0;
  703.         expressabort=0;
  704.         nscan(0);
  705.         break;
  706.       case 'O':
  707.         if (numbatchdl!=0) {
  708.           nl();
  709.           outstr(get_string(1324));
  710.           if (ny())
  711.             batchdl(1);
  712.         }
  713.         nln(2);
  714.         prt(5,get_string(28));
  715.         helpl=12;
  716.         if (yn()) {
  717.           write_inst(INST_LOC_LOGOFF,0,INST_FLAGS_NONE);
  718.           outchr(12);
  719.           if (rip_on())
  720.             random_screen("goodbye");
  721.           outstr(get_string(29));
  722.           pl(ctim(timer()-timeon));
  723. #ifdef RIPDRIVE
  724.           rd_coff();
  725. #endif
  726.           existprint(get_string(1036));
  727.           hangup=1;
  728.         }
  729.         break;
  730.       case 'P':
  731.         irt[0]=0;
  732.         irt_name[0]=0;
  733.         grab_quotes(NULL, NULL);
  734.         if (usub[0].subnum!=-1)
  735.           post();
  736.         break;
  737.       case 'Q':
  738.         if (usub[0].subnum!=-1) {
  739.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  740.           i=0;
  741.           express=0;
  742.           expressabort=0;
  743.           qscan(cursub,&i);
  744.         }
  745.         break;
  746.       case 'R':
  747.         if (usub[0].subnum!=-1) {
  748.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  749.           helpl=15;
  750.           remove_post();
  751.         }
  752.         break;
  753.       case 'S':
  754.         if (usub[0].subnum!=-1) {
  755.           write_inst(INST_LOC_SUBS,usub[cursub].subnum,INST_FLAGS_NONE);
  756.           express=0;
  757.           expressabort=0;
  758.           scan2();
  759.         }
  760.         break;
  761.       case 'T':
  762.         if (syscfg.sysconfig & sysconfig_no_xfer) {
  763.           nl();
  764.           pl(get_string(30));
  765.           nl();
  766.           break;
  767.         }
  768.         if ((udir[0].subnum==-1) && (okconf(&thisuser))) {
  769.           for (curconfdir=0;
  770.                (curconfdir<dirconfnum) &&
  771.                (uconfdir[curconfdir].confnum!=-1);
  772.                curconfdir++) {
  773.             setuconf(CONF_DIRS, curconfdir, -1);
  774.             if (udir[0].subnum!=-1)
  775.               break;
  776.           }
  777.         }
  778.         if (udir[0].subnum!=-1) {
  779.           write_inst(INST_LOC_XFER,udir[curdir].subnum,INST_FLAGS_NONE);
  780.           curdloads=1;
  781.           play_sdf(get_string(1037),0);
  782.           existprint(get_string(1037));
  783.         } else {
  784.           nl();
  785.           pl(get_string(31));
  786.           nl();
  787.         }
  788.         if (menu_on()) {
  789.           rmenu = 300;
  790.           rip_cls();
  791.           //printmenu(310);
  792.           cleared = WASCLEARED;
  793.         }
  794.         break;
  795.       case 'U':
  796.       case '~':
  797. #ifdef RIPDRIVE
  798.         rd_coff();
  799. #endif
  800.         list_users(0);
  801. #ifdef RIPDRIVE
  802.         rd_con();
  803. #endif
  804.         break;
  805.       case 'V':
  806.         write_inst(INST_LOC_VOTE,0,INST_FLAGS_NONE);
  807.         helpl=18;
  808.         vote();
  809.         break;
  810.       case 'W':
  811.         printmenu(15);
  812.         break;
  813.       case 'X':
  814.         thisuser.sysstatus ^= sysstatus_expert;
  815.         if (rip_on()) {
  816.           comstr("!|*\r ");        /* Clear menu bar */
  817.           cleared = WASCLEARED;
  818.           if ((thisuser.sysstatus & sysstatus_expert) == 0)
  819.             rmenu = 300;                  /* Menu bar stuff */
  820.         }
  821.         break;
  822.       case 'Y':
  823.         if (rip_on() && (rip_subset == 0)) {
  824.           pl(get_string(1439));      //ripstring(5));
  825.           if (ny()) {
  826.             set_name();
  827.             pausescr();
  828.           }
  829.         }
  830.         yourinfo();
  831.         break;
  832.       case 'Z':
  833.         express=1;
  834.         expressabort=0;
  835.         tmp_disable_pause(1);
  836.         nscan(0);
  837.         express=0;
  838.         expressabort=0;
  839.         tmp_disable_pause(0);
  840.         break;
  841.       case '?':
  842.         if ((sysstatus_expert & thisuser.sysstatus))
  843.         printmenu(0);
  844.         break;
  845.       case '#':
  846.         nl();
  847.         pl(get_string(939));
  848.         nl();
  849.       case '*':
  850. #ifdef RIPDRIVE
  851.         rd_coff();
  852. #endif
  853.         sublist();
  854. #ifdef RIPDRIVE
  855.         rd_con();
  856. #endif
  857.         break;
  858.     }
  859.   }
  860.   if (rip_pause && menu_on())
  861.     if ((s[1]==0) && (strchr("~!*YBILUW#", s[0]) != NULL))
  862.       pausescr();
  863.     else if ((strcmp(s, "VER") == 0) || (strcmp(s, "/?") == 0))
  864.       pausescr();
  865.   if (cleared == HYPCLEAR) {
  866.     rmenu = 300;
  867.     cleared = NEEDCLEAR;
  868.   }
  869.   helpl=0;
  870. }
  871.  
  872. /****************************************************************************/
  873.  
  874. void dlmainmenu(void)
  875. {
  876.   char *s, s1[81],s2[81],ch;
  877.   int i,i1,i2,abort,useconf,ac;
  878.   int dlredraw = 1;
  879.   static int ripdlg = 3;
  880.  
  881.   s2[0]=0;
  882.   if (udir[curdir].subnum==-1) {
  883.     curdir=0;
  884.     if (udir[curdir].subnum==-1) {
  885.       strcpy(s2,get_string(32));
  886.     }
  887.   }
  888.  
  889.   write_inst(INST_LOC_XFER,udir[curdir].subnum,INST_FLAGS_NONE);
  890.  
  891.   tleft(1);
  892.   if (menu_on()) {
  893.     pl("\x1b[30H");
  894.     nln(5);
  895.  
  896.     if (dlredraw) {
  897.       printmenu(310);
  898.       dlredraw = 0;
  899.     }
  900.   }
  901.   if ((sysstatus_expert & thisuser.sysstatus)==0)
  902.     printmenu(ripdlg);
  903.  
  904.   if (menu_on()) {
  905.     nln(6);
  906.  
  907.     if (cleared == 0) {
  908.       cleared = WASCLEARED;
  909.     }
  910.   }
  911. #ifdef RIPDRIVE
  912.   if (rd_on())
  913.     rd_str("\x1b[0J");
  914. #endif
  915.   if (menu_on())
  916.     comstr("\x1b[0J");
  917.   nln(2);
  918.   tleft(1);
  919.  
  920.   useconf=((uconfdir[1].confnum!=-1) && okconf(&thisuser));
  921.  
  922.   if (E_C) {
  923.     npr("1T 0- 1%s\r\n",ctim(nsl()));
  924.     sprintf(s1,"7(1Conf %c7)0-7(1%s7)",dirconfs[uconfdir[curconfdir].confnum].designator,
  925.       stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  926.     if (s2[0]==0)
  927.       sprintf(s2,"7(1%s%s7)0-7(1%s7)0 : 2",
  928.         useconf?get_string(1399):"",
  929.         udir[curdir].keys,
  930.         stripcolors(directories[udir[curdir].subnum].name));
  931.   } else {
  932.     npr("T - %s\r\n",ctim(nsl()));
  933.     sprintf(s1,"(Conf %c)-(%s)",dirconfs[uconfdir[curconfdir].confnum].designator,
  934.       stripcolors(dirconfs[uconfdir[curconfdir].confnum].name));
  935.     if (s2[0]==0)
  936.       sprintf(s2,"(%s%s)-(%s) :",
  937.         useconf?get_string(1399):"",
  938.         udir[curdir].keys,
  939.         stripcolors(directories[udir[curdir].subnum].name));
  940.   }
  941.   if (useconf) {
  942.     ansic(2);
  943.     pl(s1);
  944.   }
  945.   prt(2,s2);
  946.   helpl=2;
  947.   s=mmkey(1);
  948.   helpl=0;
  949.   if (s[0])
  950.     for (i=0; i<num_dirs; i++)
  951.       if (strcmp(udir[i].keys,s)==0)
  952.         curdir=i;
  953.   if (strlen(s)>2) {
  954.     sprintf(s1,"//%s",s);
  955.     sysopchar(s1);
  956.   } else
  957.     sysopchar(s);
  958.  
  959.   if (menu_on()) {
  960.     //comstr("!|1\x1b""0000$PCB$|w0007271610|1K|#\r ");
  961.     printmenu(313);
  962.     if (s[0] != 'T')
  963.       printmenu(320);
  964.     comstr("\x1b[30H");
  965.     nl();
  966.   }
  967.  
  968.   if (strcmp(s,"/A")==0) {
  969.     nl();
  970.     ac=0;
  971.     if ((uconfsub[1].confnum!=-1) && (okconf(&thisuser))) {
  972.       ac=1;
  973.       tmp_disable_conf(1);
  974.     }
  975.     helpl=13;
  976.     abort=0;
  977.     num_listed=0;
  978.     tagging=1;
  979.     titled=1;
  980.     nscanall();
  981.     tagging=0;
  982.     if (ac)
  983.       tmp_disable_conf(0);
  984.   }
  985.  
  986.   if ((strcmp(s,"/M")==0) && menu_on()) {
  987.     if (ripdlg == 3)
  988.       ripdlg = 311;
  989.     else
  990.       ripdlg = 3;
  991.     dlredraw = -1;
  992.   }
  993.  
  994.   if (strcmp(s,"/O")==0) {
  995.     if (numbatchdl!=0) {
  996.       nl();
  997.       outstr(get_string(1324));
  998.       if (ny())
  999.         batchdl(1);
  1000.       else
  1001.         hangup=1;
  1002.     } else
  1003.       hangup=1;
  1004.   }
  1005.   if (strcmp(s,"/S")==0) {
  1006.     if (sysinfo.flags & OP_FLAGS_SLASH_SZ) {
  1007.       tagging=2;
  1008.       prt(5,get_string(935));
  1009.       if (yn()) {
  1010.         pl(get_string(26));
  1011.         set_x_only(1,"FILES.TXT", 1);
  1012.         searchall();
  1013.         set_x_only(0, NULL, 0);
  1014.         add_arc("TEMP", "FILES.TXT", 0);
  1015.         download_temp_arc("TEMP", 0);
  1016.       }
  1017.     }
  1018.   }
  1019.  
  1020.   /* Anyone commands here */
  1021.   if (strcmp(s,"WHO")==0) {
  1022.     multi_instance();
  1023.   }
  1024.  
  1025.   /* download cosysop checks here */
  1026.   if (dcs()) {
  1027.  
  1028.     if (strcmp(s,"/?")==0)
  1029.       printmenu(8);
  1030.  
  1031.     if (strcmp(s,"READIDZ")==0)
  1032.       read_idz();
  1033.  
  1034.     if (strcmp(s,"UPLOADALL")==0) {
  1035.       i1=0;
  1036.       for (i=0; (i<num_dirs) && (udir[i].subnum>=0) && (!i1); i++) {
  1037.         nln(2);
  1038.         outstr(get_string(33));
  1039.         pl(directories[udir[i].subnum].name);
  1040.         nl();
  1041.         i1=uploadall(i);
  1042.       }
  1043.     }
  1044.  
  1045.     if (strcmp(s,"UPLOAD")==0)
  1046.       uploadall(curdir);
  1047.  
  1048.     if (strcmp(s,"REN")==0) {
  1049.       helpl=39;
  1050.       rename_file();
  1051.     }
  1052.  
  1053.     if (strcmp(s,"MOVE")==0)
  1054.       move_file();
  1055.  
  1056.     if (strcmp(s,"SORT")==0) {
  1057.       nl();
  1058.       prt(2,get_string(37));
  1059.       i=yn();
  1060.       nl();
  1061.       prt(2,get_string(38));
  1062.       if (yn())
  1063.         i1=2;
  1064.       else
  1065.         i1=0;
  1066.       tmp_disable_pause(1);
  1067.       if (i)
  1068.         sort_all(i1);
  1069.       else
  1070.         sortdir(udir[curdir].subnum,i1);
  1071.       tmp_disable_pause(0);
  1072.     }
  1073.  
  1074.     if (strcmp(s,"RSORT")==0) {
  1075.       sort_all(1);
  1076.     }
  1077.  
  1078.     if ((strcmp(s,"ALLOWEDIT")==0) || (strcmp(s,"AE")==0))
  1079.       edit_database();
  1080.  
  1081.   }
  1082.  
  1083.   /* sysop checks now */
  1084.   if (so()) {
  1085.  
  1086.     if (strcmp(s,"UPLOADFILE")==0) {
  1087.       nl();
  1088.       pl(get_string(34));
  1089.       pl(get_string(35));
  1090.       nl();
  1091.       prt(5,get_string(36));
  1092.       ch=onek("Q12");
  1093.       nl();
  1094.       if (ch!='Q') {
  1095.         outstr(get_string(7));
  1096.         inputl(s2,80);
  1097.         switch(ch) {
  1098.           case '1': i2=2; break;
  1099.           case '2': i2=0; break;
  1100.           default : i2=0; break;
  1101.         }
  1102.         upload_files(s2,curdir,i2);
  1103.       }
  1104.     }
  1105.  
  1106.     if ((strcmp(s,"DIREDIT")==0) || (strcmp(s,"DE")==0)) {
  1107.       sysoplog(get_stringx(1,3));
  1108.       dlboardedit();
  1109.     }
  1110.  
  1111.     if (strncmp(s,"DEBUG",5)==0) {
  1112.       if((s[5]) && (s[5]!=' '))
  1113.         debuglevel=s[5]-'0';
  1114.       else if(s[6])
  1115.         debuglevel=s[6]-'0';
  1116.     }
  1117.  
  1118.     if (strcmp(s,"DOS")==0) {
  1119.       if (checkpw()) {
  1120.         sysoplog(get_stringx(1,6));
  1121.         extern_prog(getenv("COMSPEC"), EFLAG_SHRINK|EFLAG_COMIO|EFLAG_ABORT);
  1122.         topscreen();
  1123.       }
  1124.     }
  1125.   }
  1126.  
  1127.   /* single-key commands here */
  1128.   if ((s[1]==0) && (s[0]!=0)) {
  1129.     if (strchr("ABDEGLUX", s[0]) != NULL)
  1130.       dlredraw = -1;
  1131.     switch(s[0]) {
  1132.       case '}':
  1133.         if (okconf(&thisuser)) {
  1134.           if ((curconfdir<dirconfnum-1) && (uconfdir[curconfdir+1].confnum>=0))
  1135.             ++curconfdir;
  1136.           else
  1137.             curconfdir=0;
  1138.           setuconf(CONF_DIRS, curconfdir, -1);
  1139.         }
  1140.         break;
  1141.       case '>':
  1142.       case '+':
  1143.       case ']':
  1144.         if ((curdir<num_dirs-1) && (udir[curdir+1].subnum>=0))
  1145.           ++curdir;
  1146.         else
  1147.           curdir=0;
  1148.         break;
  1149.       case '{':
  1150.         if (okconf(&thisuser)) {
  1151.           if (curconfdir>0)
  1152.             --curconfdir;
  1153.           else {
  1154.             while ((uconfdir[curconfdir+1].confnum>=0) && (curconfdir<dirconfnum-1))
  1155.               ++curconfdir;
  1156.           }
  1157.           setuconf(CONF_DIRS, curconfdir, -1);
  1158.         }
  1159.         break;
  1160.       case '<':
  1161.       case '-':
  1162.       case '[':
  1163.         if (curdir>0)
  1164.           --curdir;
  1165.         else {
  1166.           while ((udir[curdir+1].subnum>=0) && (curdir<num_dirs-1))
  1167.             ++curdir;
  1168.         }
  1169.         break;
  1170.       case '#':
  1171.         nl();
  1172.         pl(get_string(939));
  1173.         nl();
  1174.       case '*':
  1175. #ifdef RIPDRIVE
  1176.         rd_coff();
  1177. #endif
  1178.         dirlist();
  1179. #ifdef RIPDRIVE
  1180.         rd_con();
  1181. #endif
  1182.         break;
  1183.       case '~':
  1184. #ifdef RIPDRIVE
  1185.         rd_coff();
  1186. #endif
  1187.         list_users(1);
  1188. #ifdef RIPDRIVE
  1189.         rd_con();
  1190. #endif
  1191.         break;
  1192.       case 'Q':
  1193.         curdloads=0;
  1194.         if (rip_on()) {
  1195.           rip_cls();
  1196.           cleared = WASCLEARED;
  1197.         }
  1198.         break;
  1199.       case '.':
  1200.         if (dcs()) {
  1201.           if (!exist(dszlog))
  1202.             break;
  1203.           print_local_file(dszlog,"");
  1204.         }
  1205.         break;
  1206.       case '^':
  1207.         if (so())
  1208.           print_devices();
  1209.         break;
  1210.       case '?':
  1211.         if ((sysstatus_expert & thisuser.sysstatus)) {
  1212.           ripdlg = 3;
  1213.           printmenu(3);
  1214.         }
  1215.         break;
  1216.       case 'A':
  1217.         helpl=23;
  1218.         arc_l();
  1219.         break;
  1220.       case 'B':
  1221.         helpl=22;
  1222.         batchdl(0);
  1223.         break;
  1224.       case 'C':
  1225.         helpl=3;
  1226.         reqchat();
  1227.         break;
  1228.       case 'D':
  1229.         helpl=20;
  1230.         play_sdf(get_string(1038),0);
  1231.         existprint(get_string(1038));
  1232.         download();
  1233.         break;
  1234.       case 'E':
  1235.         helpl=29;
  1236.         temp_extract();
  1237.         break;
  1238.       case 'F':
  1239.         helpl=21;
  1240.         tagging=1;
  1241.         finddescription();
  1242.         tagging=0;
  1243.         break;
  1244.       case 'G':
  1245.         helpl=30;
  1246.         temporary_stuff();
  1247.         break;
  1248.       case 'H':
  1249.         hop_dir();
  1250.         break;
  1251.       case 'J':
  1252.         if (okconf(&thisuser))
  1253.           jump_conf(CONF_DIRS);
  1254.         break;
  1255.       case 'L':
  1256.         tagging=1;
  1257.         listfiles();
  1258.         tagging=0;
  1259.         break;
  1260.       case 'M':
  1261.         helpl=31;
  1262.         if (dcs())
  1263.           move_file();
  1264.         break;
  1265.       case 'N':
  1266.         if (sysinfo.flags & OP_FLAGS_SETLDATE) {
  1267.           helpl=13;
  1268.           setldate();
  1269.         }
  1270.         abort=0;
  1271.         num_listed=0;
  1272.         tagging=1;
  1273.         titled=1;
  1274.         nl();
  1275.         prt(5,get_string(39));
  1276.         if (yn())
  1277.           nscanall();
  1278.         else {
  1279.           nl();
  1280.           nscandir(curdir,&abort);
  1281.           if (num_listed) {
  1282.             endlist(2);
  1283.           } else {
  1284.             nl();
  1285.             ansic(2);
  1286.             pl(get_string(1039));
  1287.           }
  1288.         }
  1289.         tagging=0;
  1290.         break;
  1291.       case 'O':
  1292.         if (numbatchdl!=0) {
  1293.           nl();
  1294.           outstr(get_string(1324));
  1295.           if (ny())
  1296.             batchdl(1);
  1297.         }
  1298.         helpl=12;
  1299.         nln(2);
  1300.         prt(5,get_string(28));
  1301.         if (yn()) {
  1302.           outchr(12);
  1303.           if (rip_on())
  1304.             random_screen("goodbye");
  1305.           outstr(get_string(29));
  1306.           pl(ctim(timer()-timeon));
  1307. #ifdef RIPDRIVE
  1308.           rd_coff();
  1309. #endif
  1310.           existprint(get_string(1036));
  1311.           hangup=1;
  1312.         }
  1313.         break;
  1314.       case 'P':
  1315.         helpl=13;
  1316.         setldate();
  1317.         break;
  1318.       case 'R':
  1319.         helpl=38;
  1320.         removefile();
  1321.         break;
  1322.       case 'S':
  1323.         tagging=1;
  1324.         searchall();
  1325.         tagging=0;
  1326.         break;
  1327.       case 'T':
  1328.         helpl=32;
  1329.         xfer_defaults();
  1330.         break;
  1331.       case 'U':
  1332.         helpl=17;
  1333.         play_sdf(get_string(1040),0);
  1334.         existprint(get_string(1040));
  1335.         if ((thisuser.restrict & (restrict_validate | restrict_upload)) ||
  1336.             (syscfg.sysconfig & sysconfig_all_sysop)) {
  1337.           if (syscfg.newuploads<num_dirs)
  1338.             upload((int) syscfg.newuploads);
  1339.           else
  1340.             upload(0);
  1341.         } else
  1342.           upload(udir[curdir].subnum);
  1343.         break;
  1344.       case 'V':
  1345.         helpl=23;
  1346.         arc_l();
  1347.         break;
  1348.       case 'W':
  1349.         printmenu(16);
  1350.         break;
  1351.       case 'X':
  1352.         helpl=22;
  1353.         batchdl(0);
  1354.         break;
  1355.       case 'Y':
  1356.         yourinfodl();
  1357.         break;
  1358.       case 'Z':
  1359.         existprint("ZUPLOAD");
  1360.         nln(2);
  1361.         pl(get_string(40));
  1362.         nl();
  1363.         helpl=17;
  1364.         upload(0);
  1365.         break;
  1366.     }
  1367.   }
  1368.   helpl=0;
  1369.   if (rip_pause && menu_on())
  1370.     if ((s[1]==0) && (strchr("~*YW#", s[0]) != NULL))
  1371.       pausescr();
  1372.     else if (strcmp(s, "VER") == 0)
  1373.       pausescr();
  1374. }
  1375.  
  1376.