@@ -218,12 +218,12 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
218218 We return 0 if we find a match and REG_NOMATCH if not. */
219219
220220int
221- regexec (preg , string , nmatch , pmatch , eflags )
222- const regex_t * __restrict preg ;
223- const char * __restrict string ;
224- size_t nmatch ;
225- regmatch_t pmatch [];
226- int eflags ;
221+ regexec (
222+ const regex_t * __restrict preg ,
223+ const char * __restrict string ,
224+ size_t nmatch ,
225+ regmatch_t pmatch [],
226+ int eflags )
227227{
228228 reg_errcode_t err ;
229229 int start , length ;
@@ -303,11 +303,11 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
303303 match was found and -2 indicates an internal error. */
304304
305305int
306- re_match (bufp , string , length , start , regs )
307- struct re_pattern_buffer * bufp ;
308- const char * string ;
309- int length , start ;
310- struct re_registers * regs ;
306+ re_match (struct re_pattern_buffer * bufp ,
307+ const char * string ,
308+ int length ,
309+ int start ,
310+ struct re_registers * regs )
311311{
312312 return re_search_stub (bufp , string , length , start , 0 , length , regs , 1 );
313313}
@@ -316,11 +316,10 @@ weak_alias (__re_match, re_match)
316316#endif
317317
318318int
319- re_search (bufp , string , length , start , range , regs )
320- struct re_pattern_buffer * bufp ;
321- const char * string ;
322- int length , start , range ;
323- struct re_registers * regs ;
319+ re_search (struct re_pattern_buffer * bufp ,
320+ const char * string ,
321+ int length , int start , int range ,
322+ struct re_registers * regs )
324323{
325324 return re_search_stub (bufp , string , length , start , range , length , regs , 0 );
326325}
@@ -329,11 +328,10 @@ weak_alias (__re_search, re_search)
329328#endif
330329
331330int
332- re_match_2 (bufp , string1 , length1 , string2 , length2 , start , regs , stop )
333- struct re_pattern_buffer * bufp ;
334- const char * string1 , * string2 ;
335- int length1 , length2 , start , stop ;
336- struct re_registers * regs ;
331+ re_match_2 (struct re_pattern_buffer * bufp ,
332+ const char * string1 , int length1 ,
333+ const char * string2 , int length2 , int start ,
334+ struct re_registers * regs , int stop )
337335{
338336 return re_search_2_stub (bufp , string1 , length1 , string2 , length2 ,
339337 start , 0 , regs , stop , 1 );
@@ -343,11 +341,10 @@ weak_alias (__re_match_2, re_match_2)
343341#endif
344342
345343int
346- re_search_2 (bufp , string1 , length1 , string2 , length2 , start , range , regs , stop )
347- struct re_pattern_buffer * bufp ;
348- const char * string1 , * string2 ;
349- int length1 , length2 , start , range , stop ;
350- struct re_registers * regs ;
344+ re_search_2 (struct re_pattern_buffer * bufp ,
345+ const char * string1 , int length1 ,
346+ const char * string2 , int length2 , int start ,
347+ int range , struct re_registers * regs , int stop )
351348{
352349 return re_search_2_stub (bufp , string1 , length1 , string2 , length2 ,
353350 start , range , regs , stop , 0 );
@@ -357,12 +354,11 @@ weak_alias (__re_search_2, re_search_2)
357354#endif
358355
359356static int
360- re_search_2_stub (bufp , string1 , length1 , string2 , length2 , start , range , regs ,
361- stop , ret_len )
362- struct re_pattern_buffer * bufp ;
363- const char * string1 , * string2 ;
364- int length1 , length2 , start , range , stop , ret_len ;
365- struct re_registers * regs ;
357+ re_search_2_stub (struct re_pattern_buffer * bufp ,
358+ const char * string1 , int length1 ,
359+ const char * string2 , int length2 , int start ,
360+ int range , struct re_registers * regs ,
361+ int stop , int ret_len )
366362{
367363 const char * str ;
368364 int rval ;
@@ -402,11 +398,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
402398 otherwise the position of the match is returned. */
403399
404400static int
405- re_search_stub (bufp , string , length , start , range , stop , regs , ret_len )
406- struct re_pattern_buffer * bufp ;
407- const char * string ;
408- int length , start , range , stop , ret_len ;
409- struct re_registers * regs ;
401+ re_search_stub (struct re_pattern_buffer * bufp ,
402+ const char * string , int length , int start ,
403+ int range , int stop ,
404+ struct re_registers * regs , int ret_len )
410405{
411406 reg_errcode_t result ;
412407 regmatch_t * pmatch ;
@@ -490,10 +485,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
490485}
491486
492487static unsigned
493- re_copy_regs (regs , pmatch , nregs , regs_allocated )
494- struct re_registers * regs ;
495- regmatch_t * pmatch ;
496- int nregs , regs_allocated ;
488+ re_copy_regs (struct re_registers * regs ,
489+ regmatch_t * pmatch ,
490+ int nregs , int regs_allocated )
497491{
498492 int rval = REGS_REALLOCATE ;
499493 int i ;
@@ -570,11 +564,11 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
570564 freeing the old data. */
571565
572566void
573- re_set_registers (bufp , regs , num_regs , starts , ends )
574- struct re_pattern_buffer * bufp ;
575- struct re_registers * regs ;
576- unsigned num_regs ;
577- regoff_t * starts , * ends ;
567+ re_set_registers (struct re_pattern_buffer * bufp ,
568+ struct re_registers * regs ,
569+ unsigned num_regs ,
570+ regoff_t * starts ,
571+ regoff_t * ends )
578572{
579573 if (num_regs )
580574 {
@@ -621,13 +615,11 @@ re_exec (s)
621615 (START + RANGE >= 0 && START + RANGE <= LENGTH) */
622616
623617static reg_errcode_t
624- re_search_internal (preg , string , length , start , range , stop , nmatch , pmatch ,
625- eflags )
626- const regex_t * preg ;
627- const char * string ;
628- int length , start , range , stop , eflags ;
629- size_t nmatch ;
630- regmatch_t pmatch [];
618+ re_search_internal (const regex_t * preg ,
619+ const char * string ,
620+ int length , int start , int range , int stop ,
621+ size_t nmatch , regmatch_t pmatch [],
622+ int eflags )
631623{
632624 reg_errcode_t err ;
633625 const re_dfa_t * dfa = (const re_dfa_t * ) preg -> buffer ;
@@ -947,8 +939,7 @@ re_search_internal (preg, string, length, start, range, stop, nmatch, pmatch,
947939}
948940
949941static reg_errcode_t
950- prune_impossible_nodes (mctx )
951- re_match_context_t * mctx ;
942+ prune_impossible_nodes (re_match_context_t * mctx )
952943{
953944 const re_dfa_t * const dfa = mctx -> dfa ;
954945 int halt_node , match_last ;
0 commit comments