xref: /netbsd-src/external/ibm-public/postfix/dist/src/global/been_here.h (revision 67b9b338a7386232ac596b5fd0cd5a9cc8a03c71)
1 /*	$NetBSD: been_here.h,v 1.3 2022/10/08 16:12:45 christos Exp $	*/
2 
3 #ifndef _BEEN_HERE_H_INCLUDED_
4 #define _BEEN_HERE_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	been_here 3h
9 /* SUMMARY
10 /*	detect repeated occurrence of string
11 /* SYNOPSIS
12 /*	#include <been_here.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * System library.
18   */
19 #include <stdarg.h>
20 
21  /*
22   * External interface.
23   */
24 typedef struct {
25     int     limit;			/* ceiling, zero for none */
26     int     flags;			/* see below */
27     struct HTABLE *table;
28 } BH_TABLE;
29 
30 #define BH_BOUND_NONE	0		/* no upper bound */
31 #define BH_FLAG_NONE	0		/* no special processing */
32 #define BH_FLAG_FOLD	(1<<0)		/* fold case */
33 
34 extern BH_TABLE *been_here_init(int, int);
35 extern void been_here_free(BH_TABLE *);
36 extern int been_here_fixed(BH_TABLE *, const char *);
37 extern int PRINTFLIKE(2, 3) been_here(BH_TABLE *, const char *,...);
38 extern int been_here_check_fixed(BH_TABLE *, const char *);
39 extern int PRINTFLIKE(2, 3) been_here_check(BH_TABLE *, const char *,...);
40 extern int been_here_drop_fixed(BH_TABLE *, const char *);
41 extern int PRINTFLIKE(2, 3) been_here_drop(BH_TABLE *, const char *,...);
42 
43 /* LICENSE
44 /* .ad
45 /* .fi
46 /*	The Secure Mailer license must be distributed with this software.
47 /* AUTHOR(S)
48 /*	Wietse Venema
49 /*	IBM T.J. Watson Research
50 /*	P.O. Box 704
51 /*	Yorktown Heights, NY 10598, USA
52 /*
53 /*	Wietse Venema
54 /*	Google, Inc.
55 /*	111 8th Avenue
56 /*	New York, NY 10011, USA
57 /*--*/
58 
59 #endif
60