check_ready.c 219 B

12345678910111213141516171819
  1. #include "local_proto.h"
  2. #include <grass/glocale.h>
  3. int check_ready(void)
  4. {
  5. FILE *fp;
  6. int retval;
  7. retval = 0;
  8. if (!(fp = fopen(file, "r")))
  9. retval = 1;
  10. else
  11. fclose(fp);
  12. return (retval);
  13. }