From: David Schleef Date: Mon, 30 Jul 2001 20:40:26 +0000 (+0000) Subject: Added long getopts and added help(), 'cuz I always forget how to use it X-Git-Tag: r0_7_17~45 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=8b5cd228fa67a718e961e1eb5b73fb2b6549694c;p=comedilib.git Added long getopts and added help(), 'cuz I always forget how to use it --- diff --git a/testing/main.c b/testing/main.c index 1494acf..ab22e5e 100644 --- a/testing/main.c +++ b/testing/main.c @@ -74,6 +74,37 @@ int realtime; static void get_capabilities(unsigned int subd); static void print_device_info(void); +void help(int ret) +{ + int i; + + fprintf(stderr, +"comedi_test [options]\n" +" --device, -f Use device \n" +" --realtime, -r Use real-time interrupts, if available\n" +" --subdevice, -s Only test subdevice \n" +" --test, -t Only run test \n" +" --verbose, -v Be verbose\n" +" --help, -h Print this message\n" +"Available tests: "); + for(i=0;i