Blame


1 fb863fa4 2020-06-22 tracey /*
2 fb863fa4 2020-06-22 tracey * Copyright (c) 2020 Tracey Emery <tracey@openbsd.org>
3 fb863fa4 2020-06-22 tracey *
4 fb863fa4 2020-06-22 tracey * Permission to use, copy, modify, and distribute this software for any
5 fb863fa4 2020-06-22 tracey * purpose with or without fee is hereby granted, provided that the above
6 fb863fa4 2020-06-22 tracey * copyright notice and this permission notice appear in all copies.
7 fb863fa4 2020-06-22 tracey *
8 fb863fa4 2020-06-22 tracey * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 fb863fa4 2020-06-22 tracey * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 fb863fa4 2020-06-22 tracey * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 fb863fa4 2020-06-22 tracey * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 fb863fa4 2020-06-22 tracey * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 fb863fa4 2020-06-22 tracey * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 fb863fa4 2020-06-22 tracey * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 fb863fa4 2020-06-22 tracey */
16 fb863fa4 2020-06-22 tracey
17 9e6e8e60 2020-08-02 stsp struct gotconfig_remote_repo {
18 9e6e8e60 2020-08-02 stsp TAILQ_ENTRY(gotconfig_remote_repo) entry;
19 9e6e8e60 2020-08-02 stsp char *name;
20 9e6e8e60 2020-08-02 stsp char *repository;
21 9e6e8e60 2020-08-02 stsp char *server;
22 9e6e8e60 2020-08-02 stsp char *protocol;
23 9e6e8e60 2020-08-02 stsp char *user;
24 fb863fa4 2020-06-22 tracey };
25 9e6e8e60 2020-08-02 stsp TAILQ_HEAD(gotconfig_remote_repo_list, gotconfig_remote_repo);
26 fb863fa4 2020-06-22 tracey
27 9e6e8e60 2020-08-02 stsp struct gotconfig {
28 9e6e8e60 2020-08-02 stsp struct gotconfig_remote_repo_list remotes;
29 9e6e8e60 2020-08-02 stsp int nremotes;
30 9e6e8e60 2020-08-02 stsp };
31 9e6e8e60 2020-08-02 stsp
32 fb863fa4 2020-06-22 tracey /*
33 fb863fa4 2020-06-22 tracey * Parse individual gotconfig repository files
34 fb863fa4 2020-06-22 tracey */
35 9e6e8e60 2020-08-02 stsp const struct got_error* gotconfig_parse(struct gotconfig **,
36 9e6e8e60 2020-08-02 stsp const char *filename);
37 9e6e8e60 2020-08-02 stsp
38 9e6e8e60 2020-08-02 stsp void gotconfig_free(struct gotconfig *);