mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
Make sure that getopt flags are only written down once
darcs-hash:20060526145551-ac50b-5411809433e277cd0bdebc34907ee3312a8a0263.gz
This commit is contained in:
parent
28ea5ce732
commit
b5b49e7a4d
3 changed files with 21 additions and 6 deletions
9
fishd.c
9
fishd.c
|
@ -110,6 +110,11 @@ time the original barrier request was sent have been received.
|
||||||
*/
|
*/
|
||||||
#define LOCKTIMEOUT 1
|
#define LOCKTIMEOUT 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
Getopt short switches for fishd
|
||||||
|
*/
|
||||||
|
#define GETOPT_STRING "hv"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
The list of connections to clients
|
The list of connections to clients
|
||||||
*/
|
*/
|
||||||
|
@ -502,14 +507,14 @@ int main( int argc, char ** argv )
|
||||||
|
|
||||||
int opt = getopt_long( argc,
|
int opt = getopt_long( argc,
|
||||||
argv,
|
argv,
|
||||||
"hv",
|
GETOPT_STRING,
|
||||||
long_options,
|
long_options,
|
||||||
&opt_index );
|
&opt_index );
|
||||||
|
|
||||||
#else
|
#else
|
||||||
int opt = getopt( argc,
|
int opt = getopt( argc,
|
||||||
argv,
|
argv,
|
||||||
"hv" );
|
GETOPT_STRING );
|
||||||
#endif
|
#endif
|
||||||
if( opt == -1 )
|
if( opt == -1 )
|
||||||
break;
|
break;
|
||||||
|
|
9
mimedb.c
9
mimedb.c
|
@ -88,6 +88,11 @@ license. Read the source code of the library for more information.
|
||||||
*/
|
*/
|
||||||
#define MIMEDB "mimedb"
|
#define MIMEDB "mimedb"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Getopt short switches for mimedb
|
||||||
|
*/
|
||||||
|
#define GETOPT_STRING "tfimdalhv"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
All types of input and output possible
|
All types of input and output possible
|
||||||
*/
|
*/
|
||||||
|
@ -1216,14 +1221,14 @@ int main (int argc, char *argv[])
|
||||||
|
|
||||||
int opt = getopt_long( argc,
|
int opt = getopt_long( argc,
|
||||||
argv,
|
argv,
|
||||||
"tfimdalhv",
|
GETOPT_STRING,
|
||||||
long_options,
|
long_options,
|
||||||
&opt_index );
|
&opt_index );
|
||||||
|
|
||||||
#else
|
#else
|
||||||
int opt = getopt( argc,
|
int opt = getopt( argc,
|
||||||
argv,
|
argv,
|
||||||
"tfimdalhv" );
|
GETOPT_STRING );
|
||||||
#endif
|
#endif
|
||||||
if( opt == -1 )
|
if( opt == -1 )
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -49,6 +49,11 @@
|
||||||
*/
|
*/
|
||||||
#define SET_COLOR "set_color"
|
#define SET_COLOR "set_color"
|
||||||
|
|
||||||
|
/**
|
||||||
|
Getopt short switches for set_color
|
||||||
|
*/
|
||||||
|
#define GETOPT_STRING "b:hvoc"
|
||||||
|
|
||||||
#if HAVE_GETTEXT
|
#if HAVE_GETTEXT
|
||||||
#define _(string) gettext(string)
|
#define _(string) gettext(string)
|
||||||
#else
|
#else
|
||||||
|
@ -186,13 +191,13 @@ int main( int argc, char **argv )
|
||||||
|
|
||||||
int opt = getopt_long( argc,
|
int opt = getopt_long( argc,
|
||||||
argv,
|
argv,
|
||||||
"b:hvoc",
|
GETOPT_STRING,
|
||||||
long_options,
|
long_options,
|
||||||
&opt_index );
|
&opt_index );
|
||||||
#else
|
#else
|
||||||
int opt = getopt( argc,
|
int opt = getopt( argc,
|
||||||
argv,
|
argv,
|
||||||
"b:hvoc" );
|
GETOPT_STRING );
|
||||||
#endif
|
#endif
|
||||||
if( opt == -1 )
|
if( opt == -1 )
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue