summaryrefslogtreecommitdiffstats
path: root/src/config.h
diff options
context:
space:
mode:
authorjolsa@redhat.com <jolsa@redhat.com>2011-03-12 13:59:21 +0100
committerJiri Olsa <Jiri Olsa jolsa@redhat.com>2011-04-05 17:35:56 +0200
commit252af820ecf406c7dac397bcb54f763883e1eb8f (patch)
tree8302abfb4dffe2aa46d200e5d09590fd2a091dda /src/config.h
parent79381b3ed5b490054cb211d0374f4338ef9d5931 (diff)
downloadlatrace-252af820ecf406c7dac397bcb54f763883e1eb8f.tar.gz
latrace-252af820ecf406c7dac397bcb54f763883e1eb8f.tar.xz
latrace-252af820ecf406c7dac397bcb54f763883e1eb8f.zip
adding support for configuration file
- separating bison/flex functions for args and config - the "include file support" unified among new conf and C header parsing - support for following options: HEADERS INDENT_SYM PIPE TIMESTAMP FRAMESIZE FRAMESIZE_CHECK HIDE_TID FOLLOW_FORK FOLLOW_EXEC DEMANGLE BRACES ENABLE_ARGS DETAIL_ARGS
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index c7f88ee..9bdae88 100644
--- a/src/config.h
+++ b/src/config.h
@@ -70,6 +70,29 @@ struct lt_config_tv {
char *name;
};
+enum {
+ LT_OPT_HEADERS = 1,
+ LT_OPT_PIPE,
+ LT_OPT_INDENT_SYM,
+ LT_OPT_TIMESTAMP,
+ LT_OPT_FRAMESIZE,
+ LT_OPT_FRAMESIZE_CHECK,
+ LT_OPT_HIDE_TID,
+ LT_OPT_FOLLOW_FORK,
+ LT_OPT_FOLLOW_EXEC,
+ LT_OPT_DEMANGLE,
+ LT_OPT_BRACES,
+ LT_OPT_ENABLE_ARGS,
+ LT_OPT_DETAIL_ARGS,
+};
+
+struct lt_config_opt {
+ int idx;
+ char *sval;
+ unsigned long nval;
+ struct lt_list_head list;
+};
+
struct lt_config_shared {
#define LT_CONFIG_VERSION 1
#define LT_CONFIG_MAGIC ((LT_CONFIG_VERSION << 16) + 0xdead)
@@ -323,6 +346,10 @@ struct lt_symbol* lt_symbol_bind(struct lt_config_shared *cfg,
struct lt_symbol* lt_symbol_get(struct lt_config_shared *cfg,
void *ptr, const char *name);
+/* config options */
+struct lt_config_opt *lt_config_opt_new(int idx, char *sval, long nval);
+int lt_config_opt_process(struct lt_config_app *cfg, struct lt_list_head *list);
+
#define PRINT(fmt, args...) \
do { \
char lpbuf[1024]; \