Remove workaround for autoconf 2.52
[tftp-hpa.git] / tftpd / remap.h
blob3830b5c65194509c3c9bc23dcfcb1610d2d55a60
1 /* ----------------------------------------------------------------------- *
3 * Copyright 2001-2007 H. Peter Anvin - All Rights Reserved
5 * This program is free software available under the same license
6 * as the "OpenBSD" operating system, distributed at
7 * http://www.openbsd.org/.
9 * ----------------------------------------------------------------------- */
12 * remap.h
14 * Prototypes for regular-expression based filename remapping.
17 #ifndef TFTPD_REMAP_H
18 #define TFTPD_REMAP_H
20 /* Opaque type */
21 struct rule;
23 #ifdef WITH_REGEX
25 /* This is called when we encounter a substitution like \i. The
26 macro character is passed as the first argument; the output buffer,
27 if any, is passed as the second argument. The function should return
28 the number of characters output, or -1 on failure. */
29 typedef int (*match_pattern_callback) (char, char *);
31 /* Read a rule file */
32 struct rule *parserulefile(FILE *);
34 /* Destroy a rule file data structure */
35 void freerules(struct rule *);
37 /* Execute a rule set on a string; returns a malloc'd new string. */
38 char *rewrite_string(const char *, const struct rule *, int,
39 match_pattern_callback, const char **);
41 #endif /* WITH_REGEX */
42 #endif /* TFTPD_REMAP_H */