Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-04-02 Thread Stefan Seyfried
On Sat, Mar 31, 2007 at 03:07:02PM +0200, Luca Tettamanti wrote: > On 3/30/07, Stefan Seyfried <[EMAIL PROTECTED]> wrote: > > I'll follow up with a small improvement in the style of > > > > #ifdef CONFIG_BOTH > > #define MYNAME "s2both" > > #else > > #define MYNAME "s2disk" > > #endif > > > > and l

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-31 Thread Luca Tettamanti
On 3/30/07, Stefan Seyfried <[EMAIL PROTECTED]> wrote: > I'll follow up with a small improvement in the style of > > #ifdef CONFIG_BOTH > #define MYNAME "s2both" > #else > #define MYNAME "s2disk" > #endif > > and later > > ... > usage(MYNAME, ...); > ... Pass down argv[0] instead of a hard

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-30 Thread Stefan Seyfried
On Thu, Mar 29, 2007 at 11:25:07PM +0200, Tim Dijkstra wrote: > Op Thu, 29 Mar 2007 21:58:10 +0200 > schreef Stefan Seyfried <[EMAIL PROTECTED]>: > > > > 2) Also pass the short option string to usage and check for each > > > `val' if it is included in the short option string. At first I > > > thou

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Tim Dijkstra
Op Thu, 29 Mar 2007 21:58:10 +0200 schreef Stefan Seyfried <[EMAIL PROTECTED]>: > > 2) Also pass the short option string to usage and check for each > > `val' if it is included in the short option string. At first I > > thought this was a bit overkill, but thinking about it, it is more > > correct

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Stefan Seyfried
On Thu, Mar 29, 2007 at 09:29:26PM +0200, Tim Dijkstra wrote: > On Thu, 29 Mar 2007 14:30:04 +0200 > Sorry, to change my mind on this;) But if we want to support only > '--force' and no short option for it this doesn't fit. I can leave out > the short option from the short option string, but the op

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Rafael J. Wysocki
On Thursday, 29 March 2007 21:29, Tim Dijkstra wrote: > On Thu, 29 Mar 2007 14:30:04 +0200 > Stefan Seyfried <[EMAIL PROTECTED]> wrote: > > > 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: > >

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Tim Dijkstra
On Thu, 29 Mar 2007 14:30:04 +0200 Stefan Seyfried <[EMAIL PROTECTED]> wrote: > 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

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Stefan Seyfried
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|--hel

Re: [Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Tim Dijkstra
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 ] > [-s|--image_size ] >

[Suspend-devel] [PATCH] encourage the usage of --long_options

2007-03-29 Thread Stefan Seyfried
Hi, trivial patch: Index: config.c === RCS file: /cvsroot/suspend/suspend/config.c,v retrieving revision 1.7 diff -u -p -r1.7 config.c --- config.c10 Nov 2006 00:08:33 - 1.7 +++ config.c29 Mar 2007 08:24:27 - @@