MCPcopy Index your code
hub / github.com/assaultcube/AC / docinvalid

Function docinvalid

source/src/docs.cpp:199–218  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197COMMAND(docundone, "i");
198
199void docinvalid()
200{
201 vector<const char *> inames, irefs;
202 enumerate(docidents, docident, d, if(!strchr(d.name, ' ') && !identexists(d.name)) inames.add(d.name););
203 inames.sort(stringsort);
204 if(inames.length()) conoutf("no such ident:");
205 loopv(inames) conoutf(" %s", inames[i]);
206 enumerate(docidents, docident, d,
207 {
208 loopv(d.references) if(!identexists(d.references[i]))
209 {
210 bool add = true;
211 loopvj(inames) if(!strcasecmp(inames[j], d.references[i])) add = false; // don't list references to nonexisting but documented entries
212 if(add) irefs.add(d.references[i]);
213 }
214 });
215 irefs.sort(stringsort);
216 if(irefs.length()) conoutf("no such reference:");
217 loopv(irefs) conoutf(" %s", irefs[i]);
218}
219COMMAND(docinvalid, "");
220
221void docfind(char *search, int *silent)

Callers

nothing calls this directly

Calls 7

identexistsFunction · 0.85
sortMethod · 0.80
conoutfFunction · 0.70
loopvFunction · 0.70
loopvjFunction · 0.70
addMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected