Imported Upstream version 0.66.1
[hcoop/debian/courier-authlib.git] / libs / rfc822 / rfc822hdr.h
CommitLineData
d9898ee8 1/*
d9898ee8 2*/
3#ifndef rfc822hdr_h
4#define rfc822hdr_h
5
6/*
7** Copyright 2001 Double Precision, Inc.
8** See COPYING for distribution information.
9*/
10
d9898ee8 11
12#if HAVE_CONFIG_H
b0322a85 13#include "rfc822/config.h"
d9898ee8 14#endif
15#include <sys/types.h>
16#include <stdio.h>
17#include <string.h>
18#include <stdlib.h>
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24struct rfc822hdr {
25 char *header;
26 char *value;
27
28 size_t hdrsize;
29 size_t maxsize;
30} ;
31
32#define rfc822hdr_init(h,s) \
33 do { memset((h), 0, sizeof(*h)); (h)->maxsize=(s); } while(0)
34
35#define rfc822hdr_free(h) \
36 do { if ((h)->header) free ((h)->header); } while (0)
37
38int rfc822hdr_read(struct rfc822hdr *, FILE *, off_t *, off_t);
39void rfc822hdr_fixname(struct rfc822hdr *);
40void rfc822hdr_collapse(struct rfc822hdr *);
41
b0322a85 42int rfc822hdr_namecmp(const char *a, const char *b);
8d138742
CE
43int rfc822hdr_is_addr(const char *hdr);
44
d9898ee8 45#ifdef __cplusplus
46}
47#endif
48
49#endif