From 8b5cd228fa67a718e961e1eb5b73fb2b6549694c Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 30 Jul 2001 20:40:26 +0000 Subject: [PATCH] Added long getopts and added help(), 'cuz I always forget how to use it --- testing/main.c | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) 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