home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / cnews.tar / contrib / include / netdata.h < prev    next >
C/C++ Source or Header  |  1992-06-07  |  906b  |  26 lines

  1. #ifndef ARTBATCHSIZE
  2. # define ARTBATCHSIZE 8192
  3. #endif
  4.  
  5. struct netdata {
  6.     FILE *nd_fp;        /* temporary file */
  7.     sizeint nd_bytes;    /* total bytes */
  8.     sizeint nd_spilled;    /* number of bytes spilled to nd_fp */
  9.     sizeint nd_bufcnt;    /* number of bytes in nd_buf */
  10.     char nd_buf[ARTBATCHSIZE];
  11. };
  12.  
  13. extern char *net_readline(/* FILE *fp, sizeint *lenp */);
  14. extern char *net_cmdread(/* FILE *fp, sizeint *lenp */);
  15. extern int net_endwrite(/* FILE *fp */);
  16. extern int net_writeline(/* char *cp, sizeint len, FILE *fp */);
  17. extern int net_ackwrite(/* char *cp, sizeint len,char *str, FILE *fp */);
  18. extern struct netdata *net_new(/* void */);
  19. extern int net_getdata(/* FILE *fp, struct netdata *ndp */);
  20. extern int net_timeout(/* int timeout */);
  21. extern char *net_getreply(/* FILE *fp, sizeint *lenp,
  22.               void (* pfunc)(char *line, sizeint *lenp, char *arg),
  23.               char *arg */);
  24.               
  25. #define NULLFUNC    ((void (*)()) 0)
  26.