| 256 | } |
| 257 | |
| 258 | inline bool getCmdLineArgumentString(const int argc, const char **argv, |
| 259 | const char *string_ref, char **string_retval) |
| 260 | { |
| 261 | bool bFound = false; |
| 262 | |
| 263 | if (argc >= 1) |
| 264 | { |
| 265 | for (int i=1; i < argc; i++) |
| 266 | { |
| 267 | int string_start = stringRemoveDelimiter('-', argv[i]); |
| 268 | char *string_argv = (char *)&argv[i][string_start]; |
| 269 | int length = (int)strlen(string_ref); |
| 270 | |
| 271 | if (!STRNCASECMP(string_argv, string_ref, length)) |
| 272 | { |
| 273 | *string_retval = &string_argv[length+1]; |
| 274 | bFound = true; |
| 275 | continue; |
| 276 | } |
| 277 | } |
| 278 | } |
| 279 | |
| 280 | if (!bFound) |
| 281 | { |
| 282 | *string_retval = NULL; |
| 283 | } |
| 284 | |
| 285 | return bFound; |
| 286 | } |
| 287 | |
| 288 | ////////////////////////////////////////////////////////////////////////////// |
| 289 | //! Find the path for a file assuming that |
nothing calls this directly
no test coverage detected