home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / msgs.c < prev    next >
C/C++ Source or Header  |  1990-06-04  |  668b  |  37 lines

  1. /* :ts=4
  2.  * print common messages
  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. void
  17. fulldisk(art, file)            /* complain once & set status bits */
  18. register struct article *art;
  19. char *file;
  20. {
  21.     if (!(art->a_status&ST_DISKFULL))
  22.         art->a_status |= prfulldisk(file);
  23. }
  24.  
  25. statust
  26. prfulldisk(file)            /* complain & return bad status */
  27. char *file;
  28. {
  29. extern int errno;
  30. static char err[8];
  31.  
  32.     sprintf(err, "%d", errno);
  33.     warning("error writing `%s', probably the disk filled", file);
  34.     warning("error #%s", err);
  35.     return ST_DISKFULL|ST_NEEDATTN|ST_DROPPED;
  36. }
  37.