netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
comment.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_COMMENT_H
7#define PAPD_COMMENT_H 1
8
9#include <sys/types.h>
10
11struct papfile;
12struct sockaddr_at;
13
15 char *c_begin;
16 char *c_end;
17 int (*c_handler)(struct papfile *, struct papfile *, struct sockaddr_at *);
19};
20
21#define CH_DONE 0
22#define CH_MORE 1
23#define CH_ERROR -1
24
30
31extern struct papd_comment *commatch(char *start, char *end,
32 struct papd_comment *table);
33extern struct comstate *comstate;
34extern struct papd_comment magics[];
35extern struct papd_comment queries[];
36extern struct papd_comment headers[];
37extern char *comcont;
38
39#define compeek() (comstate==NULL?NULL:(comstate->cs_comment))
40#define comgetflags() (comstate->cs_flags)
41#define comsetflags(f) (comstate->cs_flags=(f))
42
43/*
44 * Comment flags. 0-15 reserved for "global" flags, 16-31 for specific
45 * subtypes.
46 */
47#define C_FULL (1<<0) /* or prefix */
48#define C_CONTINUE (1<<1)
49
50/*
51 * Query subtypes.
52 */
53
54/*
55 * Magic "number" subtypes.
56 */
57#define CM_NOPRINT (1<<16) /* or print */
58
59void compop(void);
60void compush(struct papd_comment *);
61int comswitch(struct papd_comment *, int (*)(struct papfile *, struct papfile *,
62 struct sockaddr_at *));
63int comcmp(char *, char *, char *, int);
64struct papd_comment *commatch(char *, char *, struct papd_comment *);
65char *comtoken(char *, char *, char *, char *);
66
67#endif /* PAPD_COMMENT_H */
char * comcont
Definition comment.c:21
struct papd_comment headers[]
Definition headers.c:307
struct papd_comment queries[]
Definition queries.c:804
void compush(struct papd_comment *)
Definition comment.c:31
struct papd_comment magics[]
Definition magics.c:262
int comcmp(char *, char *, char *, int)
Definition comment.c:67
void compop(void)
Definition comment.c:23
struct papd_comment * commatch(char *start, char *end, struct papd_comment *table)
char * comtoken(char *, char *, char *, char *)
int comswitch(struct papd_comment *, int(*)(struct papfile *, struct papfile *, struct sockaddr_at *))
#define table
Definition hash.c:40
Definition comment.h:25
int cs_flags
Definition comment.h:28
struct comstate * cs_prev
Definition comment.h:27
struct papd_comment * cs_comment
Definition comment.h:26
Definition comment.h:14
int c_flags
Definition comment.h:18
char * c_begin
Definition comment.h:15
char * c_end
Definition comment.h:16
int(* c_handler)(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition comment.h:17
Definition papd/file.h:11
Definition at.h:88