Thank you itsme for your time and patience. I jsut realized that the first snippet:

Code:
FileStat.st_mtime = 0l;
   stat("infile",&FileStat);
   time(&chktime);
   if(FileStat.st_mtime+7776000l<chktime ){
      up(error6);
      time_delay(500);
      dn(error6);
      exit(FALSE);
      }
is actually 7776000L (alpha L, not a 1). Do you know what that means?