diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-07-27 08:28:46 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-07-27 08:28:46 +0000 |
commit | d683fe11f91717f0f9c2cf238c8bff0f1618c1ae (patch) | |
tree | 18cd385117a55cab137854ac22a328207963a720 /posix/bug-regex6.c | |
parent | ac3d553b8b5bcfbc7a13bd746966036422cf5275 (diff) | |
download | glibc-d683fe11f91717f0f9c2cf238c8bff0f1618c1ae.tar.gz glibc-d683fe11f91717f0f9c2cf238c8bff0f1618c1ae.tar.xz glibc-d683fe11f91717f0f9c2cf238c8bff0f1618c1ae.zip |
Update.
2002-07-16 Stepan Kasal <kasal@math.cas.cz> * posix/bug-regex7.c: New file. * posix/bug-regex8.c: New file. * posix/Makefile (tests): Add bug-regex7 and bug-regex8. 2002-07-16 Stepan Kasal <kasal@math.cas.cz> * posix/bug-regex4.c (main): Fix typos. * posix/bug-regex6.c (main): Likewise. * posix/bug-regex6.c (main): Fix warnings. * stdio-common/printf_fp.c (__printf_fp): If _FPIO_CONST_SHIFT is
Diffstat (limited to 'posix/bug-regex6.c')
-rw-r--r-- | posix/bug-regex6.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/posix/bug-regex6.c b/posix/bug-regex6.c index 9a06898a26..9c3f3750d2 100644 --- a/posix/bug-regex6.c +++ b/posix/bug-regex6.c @@ -18,10 +18,12 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#include <sys/types.h> -#include <regex.h> #include <locale.h> #include <stdio.h> +#include <string.h> +#include <sys/types.h> +#include <regex.h> + int main (int argc, char *argv[]) @@ -29,8 +31,8 @@ main (int argc, char *argv[]) regex_t re; regmatch_t mat[10]; int i, j, ret = 0; - char *locales[] = { "C", "de_DE.UTF-8" }; - char *string = "http://www.regex.com/pattern/matching.html#intro"; + const char *locales[] = { "C", "de_DE.UTF-8" }; + const char *string = "http://www.regex.com/pattern/matching.html#intro"; regmatch_t expect[10] = { { 0, 48 }, { 0, 5 }, { 0, 4 }, { 5, 20 }, { 7, 20 }, { 20, 42 }, { -1, -1 }, { -1, -1 }, { 42, 48 }, { 43, 48 } }; @@ -46,7 +48,7 @@ main (int argc, char *argv[]) "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?", REG_EXTENDED) != REG_NOERROR) { - puts ("cannot compile expression \"[a-f]*\""); + puts ("cannot compile the regular expression"); ret = 1; } else if (regexec (&re, string, 10, mat, 0) == REG_NOMATCH) |