tester3.c

changeset 12
5fd153b29d40
parent 9
55e7f2ff6021
child 17
a034888a2227
--- a/tester3.c	Sat May 20 17:43:36 2000 +0200
+++ b/tester3.c	Sun May 21 17:33:48 2000 +0200
@@ -13,31 +13,19 @@
 
 
 static const char usage[]=
-	"$u [options]\n"
+	"Usage: $p [options]\n"
 	"\n"
 	"Where options are:\n"
-	"\n"
-	"  -o, -f, -v, -z, -x\n"
-	"$c                   \n"
-	"\n";
+	"$o\n";
 	
 
-static ProgInfo proginfo={
-	"Tester III",
-	"0.1",
-	"foo",
-	"bar",
-	usage
-};
-
-
 static OptParserOpt opts[]={
-	{'o',	"opt",		OPT_ARG},
-	{'f',	"file",		OPT_ARG},
-	{'v',	"view",		0},
-	{'z',	"zip",		0},
-	{'x',	"extract",	0},
-	{0, NULL, 0}
+	{'o',	"opt", OPT_ARG, "OPTION", "foo bar baz quk asdf jklö äölk dfgh quik aaaa bbbb cccc dddd eeee ffff"},
+	{'f',	"file", OPT_ARG, "FILE", "asdfsadlfölökjasdflökjasdflkjöasdflkjöas dlöfjkasdfölkjasdfölkjasdfasdflöjasdfkasödjlfkasdlföjasdölfjkölkasjdfasdfölkjasd asdöljfasöldf  asdölfköasdlf asfdlök asdföljkadsfölasdfölasdölkfjasdölfasödlflöskflasdföaölsdf"},
+	{'v',	"view",	0, NULL, NULL},
+	{'z',	"zip", 0, NULL, NULL},
+	{'x',	"extract", 0, NULL, NULL},
+	{0, NULL, 0, NULL, NULL}
 };
 	
 
@@ -45,9 +33,9 @@
 {
 	int opt;
 	
-	libtu_init(&argc, argv, &proginfo);
+	libtu_init(argv[0]);
 	
-	optparser_init(argc, argv, OPTP_NO_DASH, opts);
+	optparser_init(argc, argv, OPTP_NO_DASH, opts, NULL);
 	
 	while((opt=optparser_get_opt())){
 		switch(opt){

mercurial