#include <string.h>
#include <stdlib.h>

#include "extern.h"

exeauto()
    { int i , plflg = 0;
      for ( i = 0 ; i <= JUNLE_MAX ; i++ )
			{ if ( ! strcmp(stbl[i],"PLAZA   ") ) plflg = 1; }

      resv = 1;
      if ( ! strcmp(cmdopt,"ALL") ) resv = 2;
      strcpy(cmdtbl,"MAIL,F,R A,MAIN,F,R A,PLAZA,F,R A,D");
      if ( plflg ) strcpy(cmdtbl,"MAIL,F,R A,MAIN,F,R A,D");
      if ( atoi(cmdnum) != 0 )
         { sprintf(cmdtbl,"MAIL,F,R A,MAIN,F %s,R A,PLAZA,F %s,R A,D",cmdnum,cmdnum); 
			if ( plflg ) sprintf(cmdtbl,"MAIL,F,R A,MAIN,F %s,R A,D",cmdnum);
         }
      
      if ( ! strcmp(hiscall,sysop) && atoi(cmdnum) == 0 )
         {   strcpy(cmdtbl,"L,MAIL,F,R A,MAIN,F,R A,PLAZA,F,R A,D");  }
      if ( ! exp_flg )
         { sprintf(ssent,"\n*** 自動一括送信処理を開始します ***\n\n=== ダウン・ロードを始めて下さい ===\n"); 
           rsout();          /* ｶﾞｲﾀﾞﾝｽ ﾋｮｳｼﾞ */
         }
	  rsans(10);
      return(0);
    }
    
