MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / FindArgChar

Function FindArgChar

Descent3/args.cpp:126–136  ·  view source on GitHub ↗

Returns index of argument sought, or 0 if not found

Source from the content-addressed store, hash-verified

124
125// Returns index of argument sought, or 0 if not found
126int FindArgChar(const char *which, char singleCharArg) {
127 for (int i = 1; i <= TotalArgs; i++) {
128 char *str = GameArgs[i];
129 if (str[0] == '-' && str[1] == singleCharArg && str[2] == '\0') {
130 mprintf(0, "FindArg: Found [-%c] at argument index (%d).", singleCharArg, i);
131 return i;
132 }
133 }
134
135 return FindArg(which);
136}

Callers 6

InitMethod · 0.85
opengl_SetupFunction · 0.85
joyGetNumDevsFunction · 0.85
LoadServerConfigFileFunction · 0.85
StartDedicatedServerFunction · 0.85
mainFunction · 0.85

Calls 1

FindArgFunction · 0.70

Tested by

no test coverage detected