2 * $Id: filttype.h 767 2007-10-24 00:03:59Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
16 #ifndef PITH_FILTTYPE_INCLUDED
17 #define PITH_FILTTYPE_INCLUDED
21 * Size of generic filter's input/output queue
27 * typedefs of generalized filters used by gf_pipe
29 typedef struct filter_s
{ /* type to hold data for filter function */
30 void (*f
)(struct filter_s
*, int);
31 struct filter_s
*next
; /* next filter to call */
32 long n
; /* number of chars seen */
34 int f2
; /* second place for flags */
35 unsigned char t
; /* temporary char */
36 char *line
; /* place for temporary storage */
37 char *linep
; /* pointer into storage space */
38 void *opt
; /* optional per instance data */
39 void *data
; /* misc internal data pointer */
40 unsigned char queue
[1 + GF_MAXBUF
];
41 short queuein
, queueout
;
45 typedef struct filter_insert_s
{
49 struct filter_insert_s
*next
;
53 typedef int (*gf_io_t
)(); /* type of get and put char function */
54 typedef void (*filter_t
)(FILTER_S
*, int);
55 typedef int (*linetest_t
)(long, char *, LT_INS_S
**, void *);
56 typedef void (*htmlrisk_t
)(void);
57 typedef int (*prepedtest_t
)(void);
59 typedef struct filtlist_s
{
65 typedef struct cbuf_s
{
66 unsigned char cbuf
[6]; /* used for converting to or from */
67 unsigned char *cbufp
; /* locale-specific charset */
68 unsigned char *cbufend
;
72 /* exported protoypes */
75 #endif /* PITH_FILTTYPE_INCLUDED */