netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
papd/file.h
Go to the documentation of this file.
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/types.h>
10
11struct papfile {
16 char *pf_buf;
17 char *pf_data;
18 int origin;
19};
20
21#define PF_BOT (1<<0)
22#define PF_EOF (1<<1)
23#define PF_QUERY (1<<2)
24#define PF_STW (1<<3)
25#define PF_TRANSLATE (1<<4)
26#define PF_FONT_QUERY (1<<5)
27
28#define CONSUME( pf, len ) { (pf)->pf_data += (len); \
29 (pf)->pf_datalen -= (len); \
30 if ((pf)->pf_datalen <= 0) { \
31 (pf)->pf_data = (pf)->pf_buf; \
32 (pf)->pf_datalen = 0; \
33 } \
34 }
35
36#define PF_MORESPACE 1024
37
38int markline(struct papfile *, char **, int *, int *);
39void morespace(struct papfile *, const char *, int);
40void append(struct papfile *, const char *, int);
41void spoolerror(struct papfile *, char *);
42void spoolreply(struct papfile *, char *);
43
44#endif /* PAPD_FILE_H */
static int state
Definition magics.c:22
int markline(struct papfile *, char **, int *, int *)
Definition papd/file.c:18
void spoolerror(struct papfile *, char *)
Definition papd/file.c:126
void append(struct papfile *, const char *, int)
Definition papd/file.c:100
void spoolreply(struct papfile *, char *)
Definition papd/file.c:112
void morespace(struct papfile *, const char *, int)
Definition papd/file.c:66
Definition papd/file.h:11
int pf_bufsize
Definition papd/file.h:14
int pf_state
Definition papd/file.h:12
int pf_datalen
Definition papd/file.h:15
struct state * pf_xstate
Definition papd/file.h:13
char * pf_data
Definition papd/file.h:17
int origin
Definition papd/file.h:18
char * pf_buf
Definition papd/file.h:16