MCPcopy Create free account
hub / github.com/boostorg/build / regtail

Function regtail

v2/engine/regexp.c:723–750  ·  view source on GitHub ↗

- regtail - set the next-pointer at the end of a node chain */

Source from the content-addressed store, hash-verified

721 - regtail - set the next-pointer at the end of a node chain
722 */
723static void
724regtail(
725 char *p,
726 char *val )
727{
728 register char *scan;
729 register char *temp;
730 register int offset;
731
732 if (p == &regdummy)
733 return;
734
735 /* Find last node. */
736 scan = p;
737 for (;;) {
738 temp = regnext(scan);
739 if (temp == NULL)
740 break;
741 scan = temp;
742 }
743
744 if (OP(scan) == BACK)
745 offset = scan - val;
746 else
747 offset = val - scan;
748 *(scan+1) = (offset>>8)&0377;
749 *(scan+2) = offset&0377;
750}
751
752/*
753 - regoptail - regtail on operand of first argument; nop if operandless

Callers 4

regFunction · 0.85
regbranchFunction · 0.85
regpieceFunction · 0.85
regoptailFunction · 0.85

Calls 1

regnextFunction · 0.85

Tested by

no test coverage detected