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