MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / addpatt

Function addpatt

other_src/lua/src/lpeg.cpp:1002–1015  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1000
1001
1002static int addpatt (lua_State *L, Instruction *p, int p1idx) {
1003 Instruction *p1 = (Instruction *)lua_touserdata(L, p1idx);
1004 int sz = pattsize(L, p1idx);
1005 int corr = jointable(L, p1idx);
1006 copypatt(p, p1, sz + 1);
1007 if (corr != 0) {
1008 Instruction *px;
1009 for (px = p; px < p + sz; px += sizei(px)) {
1010 if (isfenvoff(px) && px->i.offset != 0)
1011 px->i.offset += corr;
1012 }
1013 }
1014 return sz;
1015}
1016
1017
1018static void setinstaux (Instruction *i, Opcode op, int offset, int aux) {

Callers 13

fix_lFunction · 0.85
concat_lFunction · 0.85
diff_lFunction · 0.85
pattand_lFunction · 0.85
pattbehindFunction · 0.85
basicUnionFunction · 0.85
repeatcharsetFunction · 0.85
repeatheadfailFunction · 0.85
repeatsFunction · 0.85
optionalheadfailFunction · 0.85
optionalsFunction · 0.85
capture_auxFunction · 0.85

Calls 3

jointableFunction · 0.85
sizeiFunction · 0.85
lua_touserdataFunction · 0.70

Tested by

no test coverage detected