#include <string.h>
#include <ctype.h>
#include "extern.h"

/* Node Chain ｼｮﾘ */
exenode()
       { 
         int  numd,i;
         
         numd = atoi(cmdnum);
         if ( numd != 0 )
            { *(pfna) = NULL;
              if ( numd < 1000 &&  *(rtbl + numd) != NULL 
                   && *(rtbl + numd) != -1   ) 
              {    
	           makfname("MSG",*(rtbl + numd),pfna);
              }
            }
         
         if ( ! strlen(pfna))
            { sprintf(ssent,": ファイルＮｏ．を正しく指定して下さい\n");
              rsout();
              return(0);
            }
         
         fpw = fopen(pfna,"r");
         if ( fpw == NULL ) return(0);
         if ( fgets(fbuff,255,fpw) == NULL ) return(0);
         fclose(fpw);
         
         substr(fbuff,11,30,nodtitle);
         *(cmdopt) = NULL;
         for ( i = 0; i <= 1000 ; i++) *(rtbl + i) = 0;
         strcpy(cmdnum,"-9997");
         sprintf(ssent,"\nタイトル [[ %s ]] についての書きこみ\n",nodtitle);
         rsout();
         exefind();
         return(0);
       }

