1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
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
This commit is contained in:
Ulrich Drepper
2002-07-27 08:28:46 +00:00
parent ac3d553b8b
commit d683fe11f9
6 changed files with 202 additions and 10 deletions

View File

@ -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)