2 * Copyright (C) the libgit2 contributors. All rights reserved.
4 * This file is part of libgit2, distributed under the GNU GPL v2 with
5 * a Linking Exception. For full terms see the included COPYING file.
7 #ifndef INCLUDE_config_parse_h__
8 #define INCLUDE_config_parse_h__
17 extern const char *git_config_escapes
;
18 extern const char *git_config_escaped
;
25 #define GIT_CONFIG_PARSER_INIT { NULL, GIT_PARSE_CTX_INIT }
27 typedef int (*git_config_parser_section_cb
)(
28 git_config_parser
*parser
,
29 const char *current_section
,
34 typedef int (*git_config_parser_variable_cb
)(
35 git_config_parser
*parser
,
36 const char *current_section
,
38 const char *var_value
,
43 typedef int (*git_config_parser_comment_cb
)(
44 git_config_parser
*parser
,
49 typedef int (*git_config_parser_eof_cb
)(
50 git_config_parser
*parser
,
51 const char *current_section
,
54 int git_config_parser_init(git_config_parser
*out
, const char *path
, const char *data
, size_t datalen
);
55 void git_config_parser_dispose(git_config_parser
*parser
);
58 git_config_parser
*parser
,
59 git_config_parser_section_cb on_section
,
60 git_config_parser_variable_cb on_variable
,
61 git_config_parser_comment_cb on_comment
,
62 git_config_parser_eof_cb on_eof
,