]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - clock/shhopt.h
1 /* $Id: shhopt.h,v 2.2 1997/07/06 23:11:58 aebr Exp $ */
5 /* constants for recognized option types. */
7 OPT_END
, /* nothing. used as ending element. */
8 OPT_FLAG
, /* no argument following. sets variable to 1. */
9 OPT_STRING
, /* string argument. */
10 OPT_INT
, /* signed integer argument. */
11 OPT_UINT
, /* unsigned integer argument. */
12 OPT_LONG
, /* signed long integer argument. */
13 OPT_ULONG
, /* unsigned long integer argument. */
16 /* flags modifying the default way options are handeled. */
17 #define OPT_CALLFUNC 1 /* pass argument to a function. */
20 char shortName
; /* Short option name. */
21 char *longName
; /* Long option name, no including '--'. */
22 optArgType type
; /* Option type. */
23 void *arg
; /* Pointer to variable to fill with argument,
24 * or pointer to function if Type == OPT_FUNC. */
25 int flags
; /* Modifier flags. */
29 void optSetFatalFunc(void (*f
)(const char *, ...));
30 void optParseOptions(int *argc
, char *argv
[],
31 const optStruct opt
[], int allowNegNum
);