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 fb863fa4 2020-06-22 tracey struct got_config_list_entry {
18 fb863fa4 2020-06-22 tracey TAILQ_ENTRY(got_config_list_entry) entry;
19 fb863fa4 2020-06-22 tracey const char *remote;
20 fb863fa4 2020-06-22 tracey const char *repository;
21 fb863fa4 2020-06-22 tracey const char *server;
22 fb863fa4 2020-06-22 tracey const char *protocol;
23 fb863fa4 2020-06-22 tracey const char *user;
24 fb863fa4 2020-06-22 tracey };
25 fb863fa4 2020-06-22 tracey TAILQ_HEAD(got_config_list, got_config_list_entry);
26 fb863fa4 2020-06-22 tracey
27 fb863fa4 2020-06-22 tracey /*
28 fb863fa4 2020-06-22 tracey * Parse individual gotconfig repository files
29 fb863fa4 2020-06-22 tracey * Load got_config_list_entry struct and insert to got_config_list TAILQ
30 fb863fa4 2020-06-22 tracey */
31 fb863fa4 2020-06-22 tracey const struct got_error* parse_got_config(struct got_config_list **,
32 fb863fa4 2020-06-22 tracey char *filename);