#include <string.h>

#include "extern.h"

hischk()
    {  fp1 = fopen(BBSMAS,"r");
       while(1)
         {   if ( fgets(fbuff,255,fp1) == NULL ) break;
             if ( strncmp(hiscall,fbuff,8) != NULL ) continue;
             substr(fbuff,10,8,lastdate);
             substr(fbuff,19,5,lasttime);
             fclose(fp1);
             nwdate();
             strcpy(statdate,nowdate);
             strcpy(stattime,nowtime);
   
             slave = 1;
             fp1 = fopen(CALL_MAST,"r");
             if ( fp1 == NULL ) { return(0); }
             while(1)
               { if ( fgets(fbuff,255,fp1) == NULL ) break;
                 if ( strncmp(fbuff,hiscall,8) == NULL ) { slave = 0; break; }
               }
             fclose(fp1);             
             return(0);
         }
       fclose(fp1);
       return(1);
    }

