]> git.draconx.ca Git - cdecl99.git/blobdiff - src/cdecl-internal.h
libcdecl: Remove "too many parentheses" error check.
[cdecl99.git] / src / cdecl-internal.h
index 214000673cda5a265b2f166af85acfb65397ea33..74c2654b76501016c2761d4138c7654fbdaa4994 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Internal declarations for libcdecl.
- * Copyright © 2021 Nick Bowler
+ * Copyright © 2021, 2023 Nick Bowler
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 struct cdecl_error;
 struct cdecl_declspec;
 
+#if ENABLE_NLS
 void cdecl__init_i18n(void);
+#else
+static inline void cdecl__init_i18n(void)
+{
+}
+#endif
 
-const char *cdecl__strerror(unsigned code);
-void cdecl__set_error(const struct cdecl_error *err);
+void cdecl__err(unsigned code, const char *fmt, const char *arg);
+void cdecl__errmsg(unsigned msg);
 
-unsigned long cdecl__build_typemap(struct cdecl_declspec *s);
 struct cdecl_declspec *cdecl__normalize_specs(struct cdecl_declspec *specs);
 
-size_t cdecl__advance_(char **buf, size_t *n, size_t amount);
-size_t cdecl__advance(char **buf, size_t *n, size_t amount);
-size_t cdecl__explain_specs(char *buf, size_t n, struct cdecl_declspec *s,
-                                                 unsigned mask);
-size_t cdecl__explain_pre_specs(char *buf, size_t n, struct cdecl_declspec *s);
-size_t cdecl__explain_post_specs(char *buf, size_t n, struct cdecl_declspec *s);
+struct output_state {
+       char *dst;
+       size_t dstlen;
+       size_t accum;
+};
+
+size_t cdecl__advance(struct output_state *dst, size_t amount);
+size_t cdecl__emit(struct output_state *dst, const char *src);
+
+const char *cdecl__emit_specs(struct output_state *dst,
+                              struct cdecl_declspec *s,
+                              unsigned mask);
 
 #endif