2 /* ----------------------------------------------------------------------- *
4 * Copyright 2001 H. Peter Anvin - All Rights Reserved
6 * This program is free software available under the same license
7 * as the "OpenBSD" operating system, distributed at
8 * http://www.openbsd.org/.
10 * ----------------------------------------------------------------------- */
15 * Prototypes for regular-expression based filename remapping.
26 /* This is called when we encounter a substitution like \i. The
27 macro character is passed as the first argument; the output buffer,
28 if any, is passed as the second argument. The function should return
29 the number of characters output, or -1 on failure. */
30 typedef int (*match_pattern_callback
)(char, char *);
32 /* Read a rule file */
33 struct rule
*parserulefile(FILE *);
35 /* Destroy a rule file data structure */
36 void freerules(struct rule
*);
38 /* Execute a rule set on a string; returns a malloc'd new string. */
39 char *rewrite_string(const char *, const struct rule
*, int,
40 match_pattern_callback
, const char **);
42 #endif /* WITH_REGEX */
43 #endif /* TFTPD_REMAP_H */