MCPcopy Create free account
hub / github.com/Singular/Singular / lInsert3

Function lInsert3

Singular/lists.cc:135–146  ·  view source on GitHub ↗

2 * insert v into list u at pos w */

Source from the content-addressed store, hash-verified

133* insert v into list u at pos w
134*/
135BOOLEAN lInsert3(leftv res, leftv u, leftv v, leftv w)
136{
137 lists ul=(lists)u->CopyD();
138 res->data=(char *)lInsert0(ul,v,(int)(long)w->Data());
139 if (res->data==NULL)
140 {
141 Werror("cannot insert type `%s` at pos. %d",
142 Tok2Cmdname(v->Typ()),(int)(long)w->Data());
143 return TRUE;
144 }
145 return FALSE;
146}
147
148/*2
149* append v to list u

Callers

nothing calls this directly

Calls 6

lInsert0Function · 0.85
WerrorFunction · 0.85
Tok2CmdnameFunction · 0.70
CopyDMethod · 0.45
DataMethod · 0.45
TypMethod · 0.45

Tested by

no test coverage detected