MCPcopy Create free account
hub / github.com/coreboot/coreboot / print_partial_compiled_pattern

Function print_partial_compiled_pattern

util/kconfig/regex.c:519–724  ·  view source on GitHub ↗
(start, end)

Source from the content-addressed store, hash-verified

517 the START pointer into it and ending just before the pointer END. */
518
519void
520print_partial_compiled_pattern (start, end)
521 unsigned char *start;
522 unsigned char *end;
523{
524 int mcnt, mcnt2;
525 unsigned char *p = start;
526 unsigned char *pend = end;
527
528 if (start == NULL)
529 {
530 printf ("(null)\n");
531 return;
532 }
533
534 /* Loop over pattern commands. */
535 while (p < pend)
536 {
537 switch ((re_opcode_t) *p++)
538 {
539 case no_op:
540 printf ("/no_op");
541 break;
542
543 case exactn:
544 mcnt = *p++;
545 printf ("/exactn/%d", mcnt);
546 do
547 {
548 putchar ('/');
549 printchar (*p++);
550 }
551 while (--mcnt);
552 break;
553
554 case start_memory:
555 mcnt = *p++;
556 printf ("/start_memory/%d/%d", mcnt, *p++);
557 break;
558
559 case stop_memory:
560 mcnt = *p++;
561 printf ("/stop_memory/%d/%d", mcnt, *p++);
562 break;
563
564 case duplicate:
565 printf ("/duplicate/%d", *p++);
566 break;
567
568 case anychar:
569 printf ("/anychar");
570 break;
571
572 case charset:
573 case charset_not:
574 {
575 register int c;
576

Callers 1

print_compiled_patternFunction · 0.85

Calls 3

printfFunction · 0.85
putcharFunction · 0.85
extract_number_and_incrFunction · 0.85

Tested by

no test coverage detected