Skip to content
Open
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions pvtoolsSrc/pvget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ int MAIN (int argc, char *argv[])

// ================ Parse Arguments

if(argc <= optind){
/* No arguments specified */
fprintf(stderr, "No arguments specified. Please use " EXECNAME" -h for help");
return 1;
}

while ((opt = getopt(argc, argv, ":hvVRM:r:w:tmp:qdcF:f:ni")) != -1) {
switch (opt) {
case 'h': /* Print usage */
Expand Down Expand Up @@ -361,8 +367,11 @@ int MAIN (int argc, char *argv[])
optopt);
return 1;
default :
usage();
return 1;
fprintf(stderr,
"Option '-%c' is not supported - it is a valid option but is not implemented. \n",
optopt);
usage();
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the indentation, these should line up with the fprintf() above.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops, sorry, i forgot about this completely - now done.

}
}

Expand Down