home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / io.c < prev    next >
C/C++ Source or Header  |  1990-05-28  |  514b  |  32 lines

  1. /* :ts=4
  2.  * common i/o operations
  3.  *
  4.  *    $Log$
  5.  */
  6.  
  7. #include <stdio.h>
  8. #ifdef unix
  9. # include <sys/types.h>
  10. #endif /* unix */
  11. #include "news.h"
  12. #include "headers.h"
  13. #include "article.h"
  14. #include "msgs.h"
  15.  
  16. /*
  17.  * If *fpp is non-null, fclose it and check for errors.
  18.  * On error, call fulldisk(art, name).
  19.  */
  20. void
  21. nnfclose(art, fpp, name)
  22. struct article *art;
  23. register FILE **fpp;
  24. char *name;
  25. {
  26.     if (*fpp != NULL) {
  27.         if (nfclose(*fpp) == EOF)
  28.             fulldisk(art, name);
  29.         *fpp = NULL;        /* mark the stream closed */
  30.     }
  31. }
  32.