]> git.draconx.ca Git - cdecl99.git/blob - src/cdecl-internal.h
Consolidate header files.
[cdecl99.git] / src / cdecl-internal.h
1 /*
2  * Internal declarations for libcdecl.
3  * Copyright © 2021 Nick Bowler
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17  */
18 #ifndef CDECL_INTERNAL_H_
19 #define CDECL_INTERNAL_H_
20
21 #include <stddef.h>
22 #include <gettext.h>
23
24 #define _(s) dgettext(PACKAGE, s)
25 #define N_(s) s
26
27 struct cdecl_error;
28 struct cdecl_declspec;
29
30 void cdecl__init_i18n(void);
31
32 const char *cdecl__strerror(unsigned code);
33 void cdecl__set_error(const struct cdecl_error *err);
34
35 unsigned long cdecl__build_typemap(struct cdecl_declspec *s);
36 struct cdecl_declspec *cdecl__normalize_specs(struct cdecl_declspec *specs);
37
38 size_t cdecl__advance_(char **buf, size_t *n, size_t amount);
39 size_t cdecl__advance(char **buf, size_t *n, size_t amount);
40 size_t cdecl__explain_specs(char *buf, size_t n, struct cdecl_declspec *s,
41                                                  unsigned mask);
42 size_t cdecl__explain_pre_specs(char *buf, size_t n, struct cdecl_declspec *s);
43 size_t cdecl__explain_post_specs(char *buf, size_t n, struct cdecl_declspec *s);
44
45 #endif