summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@elego.de>2011-03-28 17:02:45 +0200
committerCarlos Martín Nieto <cmn@elego.de>2011-03-28 17:03:08 +0200
commit5d4cd0030569f0551cb0b7e432d0f496c50a118c (patch)
treeeaa0391821cc8e157ac1d689d5b5afc5f0d613db /src/config.h
parenta3002d5694bf27b9c49ff585faa3ceade3af5dd6 (diff)
downloadlibgit2-5d4cd0030569f0551cb0b7e432d0f496c50a118c.tar.gz
Move the struct declaration outside config.c
Signed-off-by: Carlos Martín Nieto <cmn@elego.de>
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
new file mode 100644
index 000000000..07d123ef5
--- /dev/null
+++ b/src/config.h
@@ -0,0 +1,33 @@
+#ifndef INCLUDE_tag_h__
+#define INCLUDE_tag_h__
+
+struct git_config {
+ char *file_path;
+
+ struct {
+ gitfo_buf buffer;
+ char *read_ptr;
+ int line_number;
+ int eof;
+ } reader;
+
+ git_hashtable *vars;
+};
+
+typedef enum {
+ GIT_VAR_INT,
+ GIT_VAR_BOOL,
+ GIT_VAR_STR
+} git_config_type;
+
+struct git_config_var {
+ git_config_type type;
+ char *name;
+ union {
+ unsigned char boolean;
+ long integer;
+ char *string;
+ } value;
+};
+
+#endif