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