git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@578 67ed7778-7388-44ab-90cf-0a291f65f57c
15 lines
304 B
C
15 lines
304 B
C
/* Make it easy to add command-line options */
|
|
|
|
#define OPTION_CALLBACK(_a) int _a (char *arg)
|
|
#define SHORT_OPTION "-"
|
|
#define LONG_OPTION "--"
|
|
|
|
typedef struct {
|
|
char short_id[3];
|
|
char long_id[20];
|
|
char argument[16];
|
|
char description[35];
|
|
OPTION_CALLBACK((*execute));
|
|
int required;
|
|
} Option;
|