Commit | Line | Data |
---|---|---|
a33962ba | 1 | /* |
711a0748 | 2 | * Copyright (C) 1998-1999,2003 Ian Jackson |
a33962ba | 3 | * |
4 | * This is free software; you can redistribute it and/or modify it | |
5 | * under the terms of the GNU General Public License as published by | |
6 | * the Free Software Foundation; either version 2 of the License, or | |
7 | * (at your option) any later version. | |
8 | * | |
9 | * This program is distributed in the hope that it will be useful, but | |
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
12 | * General Public License for more details. | |
13 | * | |
14 | * You should have received a copy of the GNU General Public License | |
15 | * along with userv-utils; if not, write to the Free Software | |
16 | * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
17 | * | |
18 | * $Id$ | |
19 | */ | |
6a580c17 | 20 | |
21 | #ifndef UCGI_H | |
22 | #define UCGI_H | |
23 | ||
24 | #include <stdlib.h> | |
25 | ||
6a3086f1 MW |
26 | #ifdef DEBUG |
27 | # define D(x) x | |
28 | #else | |
29 | # define D(x) | |
30 | #endif | |
31 | ||
6a580c17 | 32 | #define MAX_ARGS 1024 |
33 | #define MAX_USERNAME_LEN 1024 | |
34 | #define MAX_SCRIPTPATH_LEN 1024 | |
f601a2c6 | 35 | #define MAX_ENVVAR_NAME 128 |
6a580c17 | 36 | #define MAX_ENVVAR_VALUE (1024*1024) |
f601a2c6 | 37 | #define MAX_ENVVARS 256 |
6a580c17 | 38 | |
39 | void syserror(const char *m); | |
0cd9d59d | 40 | void error(const char *m, int st); |
6a580c17 | 41 | void *xmalloc(size_t sz); |
42 | void xsetenv(const char *en, const char *ev, int overwrite); | |
44a77f48 | 43 | void *xrealloc(void *ptr, size_t sz); |
6a580c17 | 44 | |
f7b4be5a MW |
45 | const char **load_filters(unsigned flags, const char *first, ...); |
46 | #define LOADF_MUST 1u | |
47 | #define LF_END ((const char *)0) | |
48 | ||
f601a2c6 MW |
49 | void filter_environment(unsigned flags, const char *prefix_in, |
50 | const char *const *patv, | |
aa0bce91 | 51 | const char *const *defaults, |
f601a2c6 MW |
52 | void (*foundone)(const char *fulln, const char *en, |
53 | const char *ev, void *p), | |
54 | void *p); | |
55 | #define FILTF_WILDCARD 1u | |
56 | ||
6a580c17 | 57 | extern int debugmode; |
58 | ||
59 | #endif |