On Thu, Mar 29, 2007 at 11:04:22AM +0200, Tim Dijkstra wrote:
> On Thu, 29 Mar 2007 10:32:59 +0200
> Stefan Seyfried <[EMAIL PROTECTED]> wrote:
>
> > This is ugly and long, but shows the long options (we could leave out
> > the short options, or go for something like:
> > Usage: suspend [-h|--help]
> > [-f|--config <config>]
> > [-s|--image_size <image_size>]
> > [-o|--resume_offset <resume_offset>]
> > [<resume_device>]
>
> I would go for this.
ok, this is
Index: config.c
===================================================================
RCS file: /cvsroot/suspend/suspend/config.c,v
retrieving revision 1.7
diff -u -p -r1.7 config.c
--- config.c 10 Nov 2006 00:08:33 -0000 1.7
+++ config.c 29 Mar 2007 12:29:04 -0000
@@ -108,12 +108,12 @@ void usage(char *my_name, struct option
{
struct option *opt;
- printf("Usage: %s ", my_name);
+ printf("Usage: %s\t", my_name);
for (opt = options; opt->name; opt++)
if (opt->has_arg)
- printf("[-%c <%s>]", opt->val, opt->name);
+ printf("[-%c|--%s <%s>]\n\t\t", opt->val, opt->name,
opt->name);
else
- printf("[-%c]", opt->val);
+ printf("[-%c|--%s]\n\t\t", opt->val, opt->name);
- printf(" [<resume_device>]\n");
+ printf("[<resume_device>]\n");
}
Objections, anyone?
--
Stefan Seyfried
"Any ideas, John?"
"Well, surrounding them's out."
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Suspend-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/suspend-devel