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

Function loopvj

source/src/docs.cpp:227–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225 enumerate(docidents, docident, i, inames.add(i.name));
226 inames.sort(stringsort);
227 loopvj(inames)
228 {
229 docident &i = *docidents.access(inames[j]);
230 vector<char *> srch;
231 srch.add(i.name); // 0
232 srch.add(i.desc); // 1
233 loopvk(i.remarks) srch.add(i.remarks[k]);
234
235 char *r;
236 int rline;
237 if((r = cvecstr(srch, search, &rline)))
238 {
239 cvecprintf(res, "%s %d\n", escapestring(i.name, false), rline);
240 if(!rline) r = srch[(rline = 1)];
241 if(!*silent)
242 {
243 const int showchars = 100;
244 string match;
245 int pos = r - srch[rline];
246 copystring(match, srch[rline] + (pos < showchars - 10 ? 0 : pos - 10), showchars);
247 conoutf("%-20s%s", i.name, match);
248 }
249 }
250 }
251 resultcharvector(res, -1);
252}
253COMMAND(docfind, "si");

Callers 12

sortmapmodelslotsFunction · 0.70
loopvFunction · 0.70
rendermodel.cppFile · 0.70
loopiFunction · 0.70
loopvFunction · 0.70
loopvFunction · 0.70
sortmapsoundslotsFunction · 0.70
loopvFunction · 0.70
listundoneidentsFunction · 0.70
docinvalidFunction · 0.70
renderdocFunction · 0.70
loopvFunction · 0.70

Calls 8

loopvkFunction · 0.85
cvecstrFunction · 0.85
cvecprintfFunction · 0.85
escapestringFunction · 0.85
copystringFunction · 0.85
accessMethod · 0.80
conoutfFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected