Calling tdtool without any parameter shows help, closes #21

This commit is contained in:
Micke Prag 2008-07-10 09:25:05 +00:00
parent 57e74dd496
commit 3b46ada09c

View file

@ -3,8 +3,8 @@
#include <stdlib.h>
#include <unistd.h>
#include "TellUsbD101.h"
#ifdef __MINGW32__
#define sleep(x) _sleep((x)*1000)
#ifdef __MINGW32__
#define sleep(x) _sleep((x)*1000)
#endif
void print_usage( char *name ) {
@ -72,6 +72,11 @@ int main(int argc, char **argv)
{ 0, 0, 0, 0}
};
if (argc < 2) {
print_usage( argv[0] );
return -1;
}
while ( (optch = getopt_long(argc,argv,optstring,long_opts,&longindex)) != -1 )
switch (optch) {
case 'f' :