Training tools: Print help message when (argv == 1)

This commit is contained in:
amitdo 2016-05-22 11:16:42 +03:00 committed by Zdenko Podobný
parent c5b86d0fdd
commit a38c2d8e6d

View File

@ -144,6 +144,12 @@ void PrintCommandLineFlags() {
void ParseCommandLineFlags(const char* usage,
int* argc, char*** argv,
const bool remove_flags) {
if (*argc == 1) {
tprintf("USAGE: %s\n", usage);
PrintCommandLineFlags();
exit(0);
}
unsigned int i = 1;
for (i = 1; i < *argc; ++i) {
const char* current_arg = (*argv)[i];