- Timestamp:
- Jan 7, 2007, 10:14:26 PM (14 years ago)
- Location:
- zzuf/trunk/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
zzuf/trunk/src/fd.c
r1613 r1621 31 31 #include "fd.h" 32 32 33 regex_t * re_include = NULL; 34 regex_t * re_exclude = NULL; 33 /* Regex stuff */ 34 static regex_t * re_include = NULL; 35 static regex_t * re_exclude = NULL; 35 36 36 37 /* File descriptor stuff */ … … 46 47 static int *fds; 47 48 static int maxfd, nfiles; 49 50 void _zz_include(char const *regex) 51 { 52 re_include = malloc(sizeof(*re_include)); 53 54 if(regcomp(re_include, regex, REG_EXTENDED) != 0) 55 { 56 free(re_include); 57 re_include = NULL; 58 } 59 } 60 61 void _zz_exclude(char const *regex) 62 { 63 re_exclude = malloc(sizeof(*re_exclude)); 64 65 if(regcomp(re_exclude, regex, REG_EXTENDED) != 0) 66 { 67 free(re_exclude); 68 re_exclude = NULL; 69 } 70 } 48 71 49 72 void _zz_fd_init(void) -
zzuf/trunk/src/fd.h
r1613 r1621 17 17 */ 18 18 19 extern void _zz_include(char const *); 20 extern void _zz_exclude(char const *); 19 21 extern void _zz_fd_init(void); 20 22 extern void _zz_fd_fini(void); 21 22 extern regex_t * re_include;23 extern regex_t * re_exclude;24 23 25 24 extern int _zz_mustwatch(char const *); -
zzuf/trunk/src/fuzz.c
r1614 r1621 26 26 #include <stdio.h> 27 27 #include <string.h> 28 #include <regex.h>29 28 30 29 #include "libzzuf.h" -
zzuf/trunk/src/libzzuf.c
r1614 r1621 30 30 #include <string.h> 31 31 #include <fcntl.h> 32 #include <regex.h>33 32 34 33 #include <stdarg.h> … … 75 74 tmp = getenv("ZZUF_INCLUDE"); 76 75 if(tmp && *tmp) 77 { 78 re_include = malloc(sizeof(*re_include)); 79 regcomp(re_include, tmp, REG_EXTENDED); 80 } 76 _zz_include(tmp); 81 77 82 78 tmp = getenv("ZZUF_EXCLUDE"); 83 79 if(tmp && *tmp) 84 { 85 re_exclude = malloc(sizeof(*re_exclude)); 86 regcomp(re_exclude, tmp, REG_EXTENDED); 87 } 80 _zz_exclude(tmp); 88 81 89 82 tmp = getenv("ZZUF_SIGNAL"); -
zzuf/trunk/src/load-fd.c
r1613 r1621 32 32 #include <string.h> 33 33 #include <dlfcn.h> 34 #include <regex.h>35 34 36 35 #include <sys/types.h> -
zzuf/trunk/src/load-signal.c
r1613 r1621 29 29 #include <stdlib.h> 30 30 #include <dlfcn.h> 31 #include <regex.h>32 31 33 32 #include <string.h> -
zzuf/trunk/src/load-stream.c
r1620 r1621 28 28 #include <stdlib.h> 29 29 #include <dlfcn.h> 30 #include <regex.h>31 30 32 31 #include <stdio.h>
Note: See TracChangeset
for help on using the changeset viewer.