352 |
|
return 1; |
353 |
|
} |
354 |
|
|
355 |
+ |
void version_num(char *progname){ |
356 |
+ |
fprintf(stderr, "%s version %s\n", PACKAGE_VERSION); |
357 |
+ |
fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); |
358 |
+ |
exit(1); |
359 |
+ |
} |
360 |
+ |
|
361 |
+ |
void usage(char *progname){ |
362 |
+ |
fprintf(stderr, "Usage: %s [-d delay] [-v] [-h]\n\n", progname); |
363 |
+ |
fprintf(stderr, " -d Sets the update time in seconds\n"); |
364 |
+ |
fprintf(stderr, " -v Prints version number\n"); |
365 |
+ |
fprintf(stderr, " -h Displays this help information.\n"); |
366 |
+ |
fprintf(stderr, "\nReport bugs to <%s>.\n", PACKAGE_BUGREPORT); |
367 |
+ |
exit(1); |
368 |
+ |
|
369 |
+ |
} |
370 |
+ |
|
371 |
|
int main(int argc, char **argv){ |
372 |
|
|
373 |
|
extern char *optarg; |
395 |
|
} |
396 |
|
delay--; |
397 |
|
break; |
398 |
+ |
case 'v': |
399 |
+ |
version_num(argv[0]); |
400 |
+ |
break; |
401 |
+ |
case 'h': |
402 |
+ |
default: |
403 |
+ |
usage(argv[0]); |
404 |
+ |
return 1; |
405 |
+ |
break; |
406 |
+ |
|
407 |
|
} |
408 |
|
} |
409 |
|
|