1 /* $NetBSD: header_token.h,v 1.1.1.1 2009/06/23 10:08:46 tron Exp $ */ 2 3 #ifndef _HEADER_TOKEN_H_INCLUDED_ 4 #define _HEADER_TOKEN_H_INCLUDED_ 5 6 /*++ 7 /* NAME 8 /* header_token 3h 9 /* SUMMARY 10 /* mail header parser 11 /* SYNOPSIS 12 /* #include "header_token.h" 13 DESCRIPTION 14 .nf 15 16 /* 17 * Utility library. 18 */ 19 #include <vstring.h> 20 21 /* 22 * HEADER header parser tokens. Specials and controls are represented by 23 * themselves. Character pointers point to substrings in a token buffer. 24 */ 25 typedef struct HEADER_TOKEN { 26 int type; /* see below */ 27 union { 28 const char *value; /* just a pointer, not a copy */ 29 ssize_t offset; /* index into token buffer */ 30 } u; /* indent beats any alternative */ 31 } HEADER_TOKEN; 32 33 #define HEADER_TOK_TOKEN 256 34 #define HEADER_TOK_QSTRING 257 35 36 extern ssize_t header_token(HEADER_TOKEN *, ssize_t, VSTRING *, const char **, const char *, int); 37 38 /* LICENSE 39 /* .ad 40 /* .fi 41 /* The Secure Mailer license must be distributed with this software. 42 /* AUTHOR(S) 43 /* Wietse Venema 44 /* IBM T.J. Watson Research 45 /* P.O. Box 704 46 /* Yorktown Heights, NY 10598, USA 47 /*--*/ 48 49 #endif 50