@@ -218,12 +218,12 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx)
218
218
We return 0 if we find a match and REG_NOMATCH if not. */
219
219
220
220
int
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 )
227
227
{
228
228
reg_errcode_t err ;
229
229
int start , length ;
@@ -303,11 +303,11 @@ compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
303
303
match was found and -2 indicates an internal error. */
304
304
305
305
int
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 )
311
311
{
312
312
return re_search_stub (bufp , string , length , start , 0 , length , regs , 1 );
313
313
}
@@ -316,11 +316,10 @@ weak_alias (__re_match, re_match)
316
316
#endif
317
317
318
318
int
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 )
324
323
{
325
324
return re_search_stub (bufp , string , length , start , range , length , regs , 0 );
326
325
}
@@ -329,11 +328,10 @@ weak_alias (__re_search, re_search)
329
328
#endif
330
329
331
330
int
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 )
337
335
{
338
336
return re_search_2_stub (bufp , string1 , length1 , string2 , length2 ,
339
337
start , 0 , regs , stop , 1 );
@@ -343,11 +341,10 @@ weak_alias (__re_match_2, re_match_2)
343
341
#endif
344
342
345
343
int
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 )
351
348
{
352
349
return re_search_2_stub (bufp , string1 , length1 , string2 , length2 ,
353
350
start , range , regs , stop , 0 );
@@ -357,12 +354,11 @@ weak_alias (__re_search_2, re_search_2)
357
354
#endif
358
355
359
356
static 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 )
366
362
{
367
363
const char * str ;
368
364
int rval ;
@@ -402,11 +398,10 @@ re_search_2_stub (bufp, string1, length1, string2, length2, start, range, regs,
402
398
otherwise the position of the match is returned. */
403
399
404
400
static 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 )
410
405
{
411
406
reg_errcode_t result ;
412
407
regmatch_t * pmatch ;
@@ -490,10 +485,9 @@ re_search_stub (bufp, string, length, start, range, stop, regs, ret_len)
490
485
}
491
486
492
487
static 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 )
497
491
{
498
492
int rval = REGS_REALLOCATE ;
499
493
int i ;
@@ -570,11 +564,11 @@ re_copy_regs (regs, pmatch, nregs, regs_allocated)
570
564
freeing the old data. */
571
565
572
566
void
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 )
578
572
{
579
573
if (num_regs )
580
574
{
@@ -621,13 +615,11 @@ re_exec (s)
621
615
(START + RANGE >= 0 && START + RANGE <= LENGTH) */
622
616
623
617
static 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 )
631
623
{
632
624
reg_errcode_t err ;
633
625
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,
947
939
}
948
940
949
941
static reg_errcode_t
950
- prune_impossible_nodes (mctx )
951
- re_match_context_t * mctx ;
942
+ prune_impossible_nodes (re_match_context_t * mctx )
952
943
{
953
944
const re_dfa_t * const dfa = mctx -> dfa ;
954
945
int halt_node , match_last ;
0 commit comments