summaryrefslogtreecommitdiffstats
path: root/gl/regexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'gl/regexec.c')
-rw-r--r--gl/regexec.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/gl/regexec.c b/gl/regexec.c
index 7c186aa..ac6c258 100644
--- a/gl/regexec.c
+++ b/gl/regexec.c
@@ -1,11 +1,12 @@
1/* Extended regular expression matching and search library. 1/* Extended regular expression matching and search library.
2 Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation,
3 Inc.
3 This file is part of the GNU C Library. 4 This file is part of the GNU C Library.
4 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>. 5 Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
5 6
6 This program is free software; you can redistribute it and/or modify 7 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 8 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option) 9 the Free Software Foundation; either version 3, or (at your option)
9 any later version. 10 any later version.
10 11
11 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
@@ -221,10 +222,10 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
221 222
222int 223int
223regexec (preg, string, nmatch, pmatch, eflags) 224regexec (preg, string, nmatch, pmatch, eflags)
224 const regex_t *__restrict preg; 225 const regex_t *_Restrict_ preg;
225 const char *__restrict string; 226 const char *_Restrict_ string;
226 size_t nmatch; 227 size_t nmatch;
227 regmatch_t pmatch[]; 228 regmatch_t pmatch[_Restrict_arr_];
228 int eflags; 229 int eflags;
229{ 230{
230 reg_errcode_t err; 231 reg_errcode_t err;
@@ -267,8 +268,8 @@ __typeof__ (__regexec) __compat_regexec;
267 268
268int 269int
269attribute_compat_text_section 270attribute_compat_text_section
270__compat_regexec (const regex_t *__restrict preg, 271__compat_regexec (const regex_t *_Restrict_ preg,
271 const char *__restrict string, size_t nmatch, 272 const char *_Restrict_ string, size_t nmatch,
272 regmatch_t pmatch[], int eflags) 273 regmatch_t pmatch[], int eflags)
273{ 274{
274 return regexec (preg, string, nmatch, pmatch, 275 return regexec (preg, string, nmatch, pmatch,
@@ -2338,7 +2339,7 @@ transit_state (reg_errcode_t *err, re_match_context_t *mctx,
2338} 2339}
2339 2340
2340/* Update the state_log if we need */ 2341/* Update the state_log if we need */
2341re_dfastate_t * 2342static re_dfastate_t *
2342internal_function 2343internal_function
2343merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, 2344merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
2344 re_dfastate_t *next_state) 2345 re_dfastate_t *next_state)