]> arthur.barton.de Git - netatalk.git/blob - etc/papd/file.h
CVS id tags, define fixes, code beautification
[netatalk.git] / etc / papd / file.h
1 /*
2  * $Id: file.h,v 1.6 2001-06-25 20:13:45 rufustfirefly Exp $
3  *
4  * Copyright (c) 1990,1991 Regents of The University of Michigan.
5  * All Rights Reserved.  See COPYRIGHT.
6  */
7
8 #ifndef PAPD_FILE_H
9 #define PAPD_FILE_H 1
10
11 #include <sys/cdefs.h>
12
13 struct papfile {
14     int                 pf_state;
15     struct state        *pf_xstate;
16     int                 pf_bufsize;
17     int                 pf_datalen;
18     char                *pf_buf;
19     char                *pf_data;
20 };
21
22 #define PF_BOT          (1<<0)
23 #define PF_EOF          (1<<1)
24 #define PF_QUERY        (1<<2)
25
26 #define CONSUME( pf, len )  {   (pf)->pf_data += (len); \
27                                 (pf)->pf_datalen -= (len); \
28                                 if ((pf)->pf_datalen <= 0) { \
29                                     (pf)->pf_data = (pf)->pf_buf; \
30                                     (pf)->pf_datalen = 0; \
31                                 } \
32                             }
33
34 #define PF_MORESPACE    1024
35
36 int markline __P(( struct papfile *, char **, int *, int * ));
37 void morespace __P(( struct papfile *, const char *, int ));
38 void append __P(( struct papfile *, const char *, int ));
39 void spoolerror __P(( struct papfile *, char * ));
40
41 #endif /* PAPD_FILE_H */