2 * Internal declarations for libcdecl.
3 * Copyright © 2021 Nick Bowler
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.
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.
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/>.
18 #ifndef CDECL_INTERNAL_H_
19 #define CDECL_INTERNAL_H_
24 #define _(s) dgettext(PACKAGE, s)
28 struct cdecl_declspec;
31 void cdecl__init_i18n(void);
33 static inline void cdecl__init_i18n(void)
38 const char *cdecl__strerror(unsigned code);
39 void cdecl__err(unsigned code, ...);
41 unsigned long cdecl__build_typemap(struct cdecl_declspec *s);
42 struct cdecl_declspec *cdecl__normalize_specs(struct cdecl_declspec *specs);
44 size_t cdecl__advance_(char **buf, size_t *n, size_t amount);
45 size_t cdecl__advance(char **buf, size_t *n, size_t amount);
46 size_t cdecl__explain_specs(char *buf, size_t n, struct cdecl_declspec *s,
48 size_t cdecl__explain_pre_specs(char *buf, size_t n, struct cdecl_declspec *s);
49 size_t cdecl__explain_post_specs(char *buf, size_t n, struct cdecl_declspec *s);