Tue, 04 Nov 2025 22:26:27 +0100
update uwproj (fixes configure on solaris)
| 1 | 1 | /* Copyright 2025 Mike Becker. All rights reserved. |
| 2 | * | |
| 3 | * Redistribution and use in source and binary forms, with or without | |
| 4 | * modification, are permitted provided that the following conditions are met: | |
| 5 | * | |
| 6 | * 1. Redistributions of source code must retain the above copyright | |
| 7 | * notice, this list of conditions and the following disclaimer. | |
| 8 | * | |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright | |
| 10 | * notice, this list of conditions and the following disclaimer in the | |
| 11 | * documentation and/or other materials provided with the distribution. | |
| 12 | * | |
| 13 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
| 16 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | |
| 17 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
| 18 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
| 19 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
| 20 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | |
| 21 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
| 22 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 23 | */ | |
| 24 | ||
| 25 | ||
| 26 | #ifndef SETTINGS_H | |
| 27 | #define SETTINGS_H | |
| 28 | ||
| 29 | #include <string> | |
| 30 | #include <vector> | |
| 16 | 31 | #include <unordered_map> |
| 1 | 32 | |
| 33 | namespace fm { | |
| 34 | ||
| 5 | 35 | constexpr static short settings_current_year = 0; |
| 1 | 36 | |
| 37 | struct settings { | |
| 38 | std::string hg{"/usr/bin/hg"}; | |
| 39 | std::string git{"/usr/bin/git"}; | |
| 40 | std::vector<std::string> paths; | |
| 14 | 41 | std::vector<std::string> authors; |
| 16 | 42 | std::unordered_map<std::string, std::string> authormap; |
| 43 | ||
| 1 | 44 | unsigned char depth = 1; |
|
27
d2eee642a31b
do not pull repos by default - fixes #587
Mike Becker <universe@uap-core.de>
parents:
20
diff
changeset
|
45 | bool update_repos = false; |
| 1 | 46 | bool separate = false; |
|
20
8639ccd855ba
implement --fragment option
Mike Becker <universe@uap-core.de>
parents:
16
diff
changeset
|
47 | bool fragment = false; |
|
52
e9edc3bd0301
add custom fragment indentation
Mike Becker <universe@uap-core.de>
parents:
27
diff
changeset
|
48 | unsigned char fragment_indent = 0; |
| 5 | 49 | unsigned short year = settings_current_year; |
| 14 | 50 | |
| 16 | 51 | int parse_authormap(const std::string& path); |
| 14 | 52 | [[nodiscard]] bool exclude_author(const std::string &author) const; |
| 16 | 53 | |
| 54 | std::string map_author(std::string_view author) const; | |
| 1 | 55 | }; |
| 56 | ||
| 57 | } | |
| 58 | ||
| 59 | #endif //SETTINGS_H |