Blame


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