1 /* This file is part of the Linux Trace Toolkit viewer
2 * Copyright (C) 2003-2004 Michel Dagenais
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License Version 2 as
6 * published by the Free Software Foundation;
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
22 /* Define a new option with a long name (--long_name), a short
23 one character name (-c), a descriptive text, the argument type, and a
24 pointer to where the argument value will be stored. For an option of
25 type LTTV_OPT_NONE, the argument is a boolean value set to true when the
26 option is present. The option hook is called if non NULL. */
28 typedef enum _LttvOptionType
29 {LTTV_OPT_NONE
, LTTV_OPT_STRING
, LTTV_OPT_INT
, LTTV_OPT_LONG
}
32 typedef void (*LttvOptionHook
)(void *hook_data
);
34 void lttv_option_add(const char *long_name
, const char char_name
,
35 const char *description
, const char *arg_description
,
36 const LttvOptionType t
, void *p
,
37 const LttvOptionHook h
, void *hook_data
);
40 /* Remove an option */
42 void lttv_option_remove(const char *long_name
);
45 /* Parse command line options. It is possible to add options (through the
46 hooks being called) while the parsing is done. The new options will be
47 used for subsequent command line arguments. */
49 void lttv_option_parse(int argc
, char **argv
);
51 void lttv_option_show_help(void);
This page took 0.029709 seconds and 4 git commands to generate.