Debian Codegraph @

pscan.h

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 #ifndef PSCAN_H
2 #define PSCAN_H
3 /**********************************************************************
4 * pscan: http://deployingradius.com/pscan/
5 *
6 * Copyright (C) 2000,2007 Alan DeKok <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
21 *
22 **********************************************************************/
23
24 #ifndef FALSE
25 #define FALSE (0)
26 #define TRUE (!FALSE)
27 #endif
28
29 #define PROBLEMATIC TRUE
30 #define NOT_PROBLEMATIC FALSE
31
•32 #define YY_NO_UNPUT
33
34 /*
35 * The maximum number of user-defined problem functions which may be
36 * read from a .pscan problem definition file.
37 */
38 #define MAX_USER_PROBLEMS 2048
39
40 typedef struct problem_t {
41 const char *function;
42 int fmt_arg;
43 } problem_t;
44
45 typedef struct parser_state_t {
46 const problem_t *problem;
47 int line; /* source file line at which we found
48 the problem function */
49 int args; /* number of arguments used by the function */
50 int constant_string; /* is the last argument a constant string? */
51 int last_token; /* was the last token problematic, or not? */
52 int braces; /* the number of braces... */
53 } parser_state_t;
54 extern parser_state_t *state;
55
56 extern parser_state_t *pop_stack(void);
57 extern parser_state_t *push_stack(parser_state_t *current);
58 extern void check_function(parser_state_t *state);
59 extern parser_state_t *setup_checks(const char *yytext, parser_state_t *state);
60 #endif /* PSCAN_H */