Pārlūkot izejas kodu

DEV: help output added

master
Christos Houtouridis pirms 4 gadiem
vecāks
revīzija
cfb52ee609
2 mainītis faili ar 14 papildinājumiem un 3 dzēšanām
  1. +1
    -1
      .gitignore
  2. +13
    -2
      src/main.c

+ 1
- 1
.gitignore Parādīt failu

@@ -4,4 +4,4 @@ Doc/*

*Debug
*Release
*bin

+ 13
- 2
src/main.c Parādīt failu

@@ -74,7 +74,16 @@ int parse_args (settings_t *s, int argc, char const *argv[]) {
case 's': s->sendTimeout.tv_sec = atoi (optarg); break;
case 'w': s->me = atoi (optarg); break;
case 't': s->trackTime = true; break;
case 'h': printf ("This will be the help text\n"); break;
case 'h':
printf ("Syntax:\nrtes_final [-t] [-v num] [-i num] [-p num] [-s num] [-w num]\n\n");
printf ("-v, --outlevel num: Change the verbosity of the program, num can be 0, 1 or 2\n");
printf ("-i, --interval sec: Set the interval of the seeker in [sec]\n");
printf ("-p, --pingtimeout sec: Set the ping timeout in [sec]\n");
printf ("-s, --sendtimeout sec: Set the connect/send timeout in [sec]\n");
printf ("-w, --who AEM: Select the AEM of the device\n");
printf ("-t, --tracktime: Enables time tracking in statistics\n");
printf ("-h, --help: Print this and exit\n");
exit(1);
case ':':
default:
case '?':
@@ -86,7 +95,9 @@ int parse_args (settings_t *s, int argc, char const *argv[]) {
return 0;
}
/*!
* Main function
*/
int main (int argc, char const *argv[]) {
// get command line arguments


Notiek ielāde…
Atcelt
Saglabāt