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

Function regtail

src/engine/regexp.cpp:724–751  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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