"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
| 2 | /* |
Rob Landley | 86b4d64 | 2006-08-03 17:58:17 +0000 | [diff] [blame] | 3 | * Busybox xregcomp utility routine. This isn't in libbb.h because the |
| 4 | * C library we're linking against may not support regex.h. |
"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 5 | * |
| 6 | * Based in part on code from sash, Copyright (c) 1999 by David I. Bell |
| 7 | * Permission has been granted to redistribute this code under the GPL. |
Denis Vlasenko | 9213a9e | 2006-09-17 16:28:10 +0000 | [diff] [blame] | 8 | * |
Rob Landley | 86b4d64 | 2006-08-03 17:58:17 +0000 | [diff] [blame] | 9 | * Licensed under GPLv2 or later, see file License in this tarball for details. |
"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 10 | */ |
| 11 | #ifndef __BB_REGEX__ |
| 12 | #define __BB_REGEX__ |
| 13 | |
"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 14 | #include <regex.h> |
Denis Vlasenko | 98636eb | 2008-05-09 17:59:34 +0000 | [diff] [blame] | 15 | |
| 16 | #if __GNUC_PREREQ(4,1) |
| 17 | # pragma GCC visibility push(hidden) |
| 18 | #endif |
| 19 | |
Denis Vlasenko | e865e81 | 2006-12-21 13:24:58 +0000 | [diff] [blame] | 20 | char* regcomp_or_errmsg(regex_t *preg, const char *regex, int cflags); |
| 21 | void xregcomp(regex_t *preg, const char *regex, int cflags); |
"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 22 | |
Denis Vlasenko | 98636eb | 2008-05-09 17:59:34 +0000 | [diff] [blame] | 23 | #if __GNUC_PREREQ(4,1) |
| 24 | # pragma GCC visibility pop |
| 25 | #endif |
| 26 | |
"Vladimir N. Oleynik" | 23f62fc | 2005-09-14 16:59:11 +0000 | [diff] [blame] | 27 | #endif |