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

Function format2

source/src/command.cpp:1113–1123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1111COMMAND(format, "v");
1112
1113void format2(char **args, int numargs)
1114{
1115 if(numargs > 0)
1116 {
1117 vector<char *> pars;
1118 pars.add(newstring(args[0]));
1119 for(int i = 1; i < numargs ; i++) explodelist(args[i], pars);
1120 format(pars.getbuf(), pars.length());
1121 loopv(pars) delstring(pars[i]);
1122 }
1123}
1124COMMAND(format2, "v");
1125
1126#define whitespaceskip do { s += strspn(s, "\n\r\t "); } while(s[0] == '/' && s[1] == '/' && (s += strcspn(s, "\n\r\0")))

Callers

nothing calls this directly

Calls 8

newstringFunction · 0.85
explodelistFunction · 0.85
formatFunction · 0.85
delstringFunction · 0.85
loopvFunction · 0.70
addMethod · 0.45
getbufMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected