bump version number
[got-portable.git] / lib / got_lib_gitconfig.h
blob6d7b767591d04099821c70f467c178f1f05e080a
1 /* $OpenBSD: conf.h,v 1.34 2006/08/30 16:56:56 hshoexer Exp $ */
2 /* $EOM: conf.h,v 1.13 2000/09/18 00:01:47 ho Exp $ */
4 /*
5 * Copyright (c) 1998, 1999, 2001 Niklas Hallqvist. All rights reserved.
6 * Copyright (c) 2000, 2003 HÃ¥kan Olsson. All rights reserved.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 struct got_gitconfig_list_node {
30 TAILQ_ENTRY(got_gitconfig_list_node) link;
31 char *field;
34 struct got_gitconfig_list {
35 size_t cnt;
36 TAILQ_HEAD(got_gitconfig_list_fields_head, got_gitconfig_list_node) fields;
39 struct got_gitconfig;
41 void got_gitconfig_free_list(struct got_gitconfig_list *);
42 const struct got_error *got_gitconfig_get_section_list(
43 struct got_gitconfig_list **, struct got_gitconfig *);
44 struct got_gitconfig_list *got_gitconfig_get_list(struct got_gitconfig *,
45 char *, char *);
46 struct got_gitconfig_list *got_gitconfig_get_tag_list(struct got_gitconfig *,
47 const char *);
48 int got_gitconfig_get_num(struct got_gitconfig *, const char *, const char *,
49 int);
50 char *got_gitconfig_get_str(struct got_gitconfig *, const char *,
51 const char *);
52 const struct got_error *got_gitconfig_open(struct got_gitconfig **, int);
53 void got_gitconfig_close(struct got_gitconfig *);
54 int got_gitconfig_match_num(struct got_gitconfig *, char *, char *, int);
55 const struct got_error *got_gitconfig_reinit(struct got_gitconfig *, int);
56 int got_gitconfig_remove(struct got_gitconfig *, int, char *, char *);
57 int got_gitconfig_remove_section(struct got_gitconfig *, int, char *);
58 int got_gitconfig_set(struct got_gitconfig *, int, char *, char *, char *,
59 int, int);