aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcharconv.h1337
1 files changed, 78 insertions, 1259 deletions
diff --git a/libcharconv.h b/libcharconv.h
index 1be4782..4a7d4db 100644
--- a/libcharconv.h
+++ b/libcharconv.h
@@ -14,73 +14,51 @@ enum libcharconv_result {
};
+#define LIBCHARCONV_FUNC_(NAME)\
+ /**
+ * @param s Text to convert
+ * @param slen The number of bytes available in `s`
+ * @param n Output parameter for the number of consumed bytes
+ * @param cp Output buffer for the codepoints
+ * @param ncp Input parameter for the number of codepoints that
+ * fit in `cp`, and output parameter for the number
+ * of output codepoints (if it exceeds the original
+ * value of `ncp`, a larger buffer is needed)
+ * @return LIBCHARCONV_NO_CONVERT:
+ * `*n` is the number of bytes from the beginning
+ * of `s` that cannot be converted
+ * LIBCHARCONV_CONVERTED:
+ * `*n` is the number of bytes from the beginning
+ * of `s` that was converted to a codepoint which
+ * is stored in `*cp`
+ * LIBCHARCONV_INDETERMINATE:
+ * If all text has been input, no more can be
+ * converted, otherwise more of the text most
+ * be made available before the function can
+ * determine whether the beginning of `s` can be
+ * converted or what it should be converted to
+ * LIBCHARCONV_CONVERT_IF_END:
+ * As LIBCHARCONV_CONVERTED the entire text has
+ * been input, as LIBCHARCONV_INDETERMINATE
+ * otherwise
+ */\
+ enum libcharconv_result NAME(const char *s, size_t slen, size_t *n,\
+ uint_least32_t *cp, size_t *ncp)
+
+
/**
* Convert
* 'w' to WHITE SHOGI PIECE,
* 'b' to BLACK SHOGI PIECE,
* 'W' to TURNED WHITE SHOGI PIECE, and
* 'B' to TURNED BLACK SHOGI PIECE
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_shogi(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_shogi);
/**
* Convert '1' through '6' to DIE FACE-1 through DIE FACE-6
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_dice(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_dice);
/**
* Convert
@@ -88,35 +66,8 @@ enum libcharconv_result libcharconv_dice(const char *s, size_t slen, size_t *n,
* 'b' and 'B' to BLACK CIRCLE,
* '1' to WHITE CIRCLE WITH DOT RIGHT, and
* '2' to WHITE CIRCLE WITH TWO DOTS
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_go_white(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_go_white);
/**
* Convert
@@ -124,35 +75,8 @@ enum libcharconv_result libcharconv_go_white(const char *s, size_t slen, size_t
* 'w', and 'W' to WHITE CIRCLE,
* '1' to BLACK CIRCLE WITH WHITE DOT RIGHT, and
* '2' to BLACK CIRCLE WITH TWO WHITE DOTS
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_go_black(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_go_black);
/**
* Convert
@@ -160,940 +84,157 @@ enum libcharconv_result libcharconv_go_black(const char *s, size_t slen, size_t
* 'k' and '2' to WHITE DRAUGHTS KING,
* 'M' to BLACK DRAUGHTS MAN, and
* 'K' to BLACK DRAUGHTS KING
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_draughts(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_draughts);
/**
* Convert 'a' through 'z' and 'A' through 'Z'
* to REGION INDICATOR SYMBOL LETTER A through
* REGION INDICATOR SYMBOL LETTER Z
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_region_indicators(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_region_indicators);
/**
* Convert ' ' through '~' to
* TAG SPACE through TAG TILDE
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_tags(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_tags);
/**
* Convert
* 'f', 'F', 'w', and 'W' to FEMALE SIGN,
* 'm' and 'M' to MALE SIGN, and
* 'i' and 'I' to MERCURY (intersex sign)
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_gender_symbols(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_gender_symbols);
/**
* Preforms convertion in opposite direction
* of the other functions
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_latin);
/**
* Convert from Latin to Cypriot
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_cypriot(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_cypriot);
/**
* Convert from Latin to MATHEMATICAL BOLD
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_bold(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_bold);
/**
* Convert from Latin to MATHEMATICAL ITALIC
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_italic(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_italic);
/**
* Convert from Latin to MATHEMATICAL BOLD ITALIC
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_bold_italic(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_bold_italic);
/**
* Convert from Latin to MATHEMATICAL MONOSPACE
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_monospace(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_monospace);
/**
* Convert from DIGITs to SEGMENTED DIGITs
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_segmented(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_segmented);
/**
* Convert from Latin to MATHEMATICAL SANS-SERIF
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_sans_serif(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_sans_serif);
/**
* Convert from Latin to MATHEMATICAL SANS-SERIF BOLD
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_sans_serif_bold(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_sans_serif_bold);
/**
* Convert from Latin to MATHEMATICAL SANS-SERIF ITALIC
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_sans_serif_italic(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_sans_serif_italic);
/**
* Convert from Latin to MATHEMATICAL SANS-SERIF BOLD ITALIC
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_sans_serif_bold_italic(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_sans_serif_bold_italic);
/**
* Convert from Latin to MATHEMATICAL DOUBLE-STRUCK
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_double_struck(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_double_struck);
/**
* Convert from Latin to DOUBLE-STRUCK ITALIC
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_double_struck_italic(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_double_struck_italic);
/**
* Convert from Latin to MATHEMATICAL FRAKTUR
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_fraktur(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_fraktur);
/**
* Convert from Latin to MATHEMATICAL BOLD FRAKTUR
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_bold_fraktur(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_bold_fraktur);
/**
* Convert from Latin to MATHEMATICAL SCRIPT
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_script(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_script);
/**
* Convert from Latin to MATHEMATICAL BOLD SCRIPT
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_bold_script(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_bold_script);
/**
* Convert from Latin to Buhid
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_buhid(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_buhid);
/**
* Convert
* "obj" to OBJECT REPLACEMENT CHARACTER, and
* "?" to REPLACEMENT CHARACTER
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_replacement(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_replacement);
/**
* Convert alphanumerics to bracketed form
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_bracketed(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_bracketed);
/**
* Convert numbers to VARIATION SELECTORs
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_variation_selectors(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_variation_selectors);
/**
* Convert to superscript
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_superscript(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_superscript);
/**
* Convert to subscript
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_subscript(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_subscript);
/**
* Convert from Latin to Lydian
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_lydian(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_lydian);
/**
* Convert from Latin to Lycian
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_lycian(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_lycian);
/**
* Convert a pair of [0, 6]-digits to domino tiles,
@@ -1101,35 +242,8 @@ enum libcharconv_result libcharconv_lycian(const char *s, size_t slen, size_t *n
* will be horizontal by default, but '|' or '-' can
* be added between the two symbols to select
* horizontal ('|') or vertical ('-') orientation
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_domino_tiles_horizontal(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_domino_tiles_horizontal);
/**
* Convert a pair of [0, 6]-digits to domino tiles,
@@ -1137,70 +251,16 @@ enum libcharconv_result libcharconv_domino_tiles_horizontal(const char *s, size_
* will be vertical by default, but '|' or '-' can
* be added between the two symbols to select
* horizontal ('|') or vertical ('-') orientation
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_domino_tiles_vertical(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_domino_tiles_vertical);
/**
* Convert "0:00", "1:00", ..., '24:00',
* "00:00", "01:00", ..., '24:00',
* "0:30", "1:30", ..., '23:30', and
* "00:30", "01:30", ..., '23:30' to CLOCK FACEs
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_clock_faces(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_clock_faces);
/**
* Convert
@@ -1216,293 +276,52 @@ enum libcharconv_result libcharconv_clock_faces(const char *s, size_t slen, size
* 'P' and 'p' to OCR DASH,
* '_' to OCR CUSTOMER ACCOUNT NUMBER, and
* 'E' to HELLSCHREIBER PAUSE SYMBOL
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_ocr(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_ocr);
/**
* Convert "-|", "|-", "_|", and "|_" to CROP marks
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_crop_marks(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_crop_marks);
/**
* Convert sequences of unique [1, 8]-digits to BRAILLE PATTERNs,
* a sequence can be empty (for the blank pattern), each
* sequence can be (and the empty sequence must be) termianted
* by a DIGIT ZERO
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_braille(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_braille);
/**
* Convert from Latin to Lisu
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_lisu(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_lisu);
/**
* Convert from [1, 3]-digits to Yijing monograms
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_yijing_monograms(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_yijing_monograms);
/**
* Convert from [1, 3]-digit sequences to Yijing digrams
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_yijing_digrams(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_yijing_digrams);
/**
* Convert from [1, 2]-digit sequences to Yijing trigrams
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_yijing_trigrams(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_yijing_trigrams);
/**
* Convert from [1, 3]-digit sequences to Yijing tetragrams
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_yijing_tetragrams(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
-
+LIBCHARCONV_FUNC_(libcharconv_yijing_tetragrams);
/**
* Convert from [1, 2]-digit sequences to Yijing hexagrams
- *
- * @param s Text to convert
- * @param slen The number of bytes available in `s`
- * @param n Output parameter for the number of consumed bytes
- * @param cp Output buffer for the codepoints
- * @param ncp Input parameter for the number of codepoints that
- * fit in `cp`, and output parameter for the number
- * of output codepoints (if it exceeds the original
- * value of `ncp`, a larger buffer is needed)
- * @return LIBCHARCONV_NO_CONVERT:
- * `*n` is the number of bytes from the beginning
- * of `s` that cannot be converted
- * LIBCHARCONV_CONVERTED:
- * `*n` is the number of bytes from the beginning
- * of `s` that was converted to a codepoint which
- * is stored in `*cp`
- * LIBCHARCONV_INDETERMINATE:
- * If all text has been input, no more can be
- * converted, otherwise more of the text most
- * be made available before the function can
- * determine whether the beginning of `s` can be
- * converted or what it should be converted to
- * LIBCHARCONV_CONVERT_IF_END:
- * As LIBCHARCONV_CONVERTED the entire text has
- * been input, as LIBCHARCONV_INDETERMINATE
- * otherwise
*/
-enum libcharconv_result libcharconv_yijing_hexagrams(const char *s, size_t slen, size_t *n, uint_least32_t *cp, size_t *ncp);
+LIBCHARCONV_FUNC_(libcharconv_yijing_hexagrams);
+#undef LIBCHARCONV_FUNC_
#endif