MCPcopy Create free account
hub / github.com/SimHacker/micropolis / reginsert

Function reginsert

micropolis-activity/src/tcl/regexp.c:610–634  ·  view source on GitHub ↗

- reginsert - insert an operator in front of already-emitted operand * * Means relocating the operand. */

(op, opnd)

Source from the content-addressed store, hash-verified

608 * Means relocating the operand.
609 */
610static void
611reginsert(op, opnd)
612char op;
613char *opnd;
614{
615 register char *src;
616 register char *dst;
617 register char *place;
618
619 if (regcode == &regdummy) {
620 regsize += 3;
621 return;
622 }
623
624 src = regcode;
625 regcode += 3;
626 dst = regcode;
627 while (src > opnd)
628 *--dst = *--src;
629
630 place = opnd; /* Op node, where operand used to be. */
631 *place++ = op;
632 *place++ = '\0';
633 *place++ = '\0';
634}
635
636/*
637 - regtail - set the next-pointer at the end of a node chain

Callers 1

regexp.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected