From a1c429a45b17c05abb6c67d959350fae054ea952 Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Mon, 30 Mar 2015 11:05:51 -0400 Subject: rename DLLEXPORT to UTF8PROC_DLLEXPORT to prevent conflicts with other header files that define DLLEXPORT --- utf8proc.h | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'utf8proc.h') diff --git a/utf8proc.h b/utf8proc.h index 85cdff3..e089f28 100644 --- a/utf8proc.h +++ b/utf8proc.h @@ -99,14 +99,14 @@ enum {false, true}; #ifdef _WIN32 # ifdef UTF8PROC_EXPORTS -# define DLLEXPORT __declspec(dllexport) +# define UTF8PROC_DLLEXPORT __declspec(dllexport) # else -# define DLLEXPORT __declspec(dllimport) +# define UTF8PROC_DLLEXPORT __declspec(dllimport) # endif #elif __GNUC__ >= 4 -# define DLLEXPORT __attribute__ ((visibility("default"))) +# define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) #else -# define DLLEXPORT +# define UTF8PROC_DLLEXPORT #endif #ifdef __cplusplus @@ -351,20 +351,20 @@ typedef enum { * Array containing the byte lengths of a UTF-8 encoded codepoint based * on the first byte. */ -DLLEXPORT extern const int8_t utf8proc_utf8class[256]; +UTF8PROC_DLLEXPORT extern const int8_t utf8proc_utf8class[256]; /** * Returns the utf8proc API version as a string MAJOR.MINOR.PATCH * (http://semver.org format), possibly with a "-dev" suffix for * development versions. */ -DLLEXPORT const char *utf8proc_version(void); +UTF8PROC_DLLEXPORT const char *utf8proc_version(void); /** * Returns an informative error string for the given utf8proc error code * (e.g. the error codes returned by @ref utf8proc_map). */ -DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode); +UTF8PROC_DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode); /** * Reads a single codepoint from the UTF-8 sequence being pointed to by `str`. @@ -376,7 +376,7 @@ DLLEXPORT const char *utf8proc_errmsg(ssize_t errcode); * In case of success, the number of bytes read is returned; otherwise, a * negative error code is returned. */ -DLLEXPORT ssize_t utf8proc_iterate(const uint8_t *str, ssize_t strlen, int32_t *codepoint_ref); +UTF8PROC_DLLEXPORT ssize_t utf8proc_iterate(const uint8_t *str, ssize_t strlen, int32_t *codepoint_ref); /** * Check if a codepoint is valid (regardless of whether it has been @@ -384,7 +384,7 @@ DLLEXPORT ssize_t utf8proc_iterate(const uint8_t *str, ssize_t strlen, int32_t * * * @return 1 if the given `codepoint` is valid and otherwise return 0. */ -DLLEXPORT bool utf8proc_codepoint_valid(int32_t codepoint); +UTF8PROC_DLLEXPORT bool utf8proc_codepoint_valid(int32_t codepoint); /** * Encodes the codepoint as an UTF-8 string in the byte array pointed @@ -395,7 +395,7 @@ DLLEXPORT bool utf8proc_codepoint_valid(int32_t codepoint); * * This function does not check whether `codepoint` is valid Unicode. */ -DLLEXPORT ssize_t utf8proc_encode_char(int32_t codepoint, uint8_t *dst); +UTF8PROC_DLLEXPORT ssize_t utf8proc_encode_char(int32_t codepoint, uint8_t *dst); /** * Look up the properties for a given codepoint. @@ -409,7 +409,7 @@ DLLEXPORT ssize_t utf8proc_encode_char(int32_t codepoint, uint8_t *dst); * If the codepoint is unassigned or invalid, a pointer to a special struct is * returned in which `category` is 0 (@ref UTF8PROC_CATEGORY_CN). */ -DLLEXPORT const utf8proc_property_t *utf8proc_get_property(int32_t codepoint); +UTF8PROC_DLLEXPORT const utf8proc_property_t *utf8proc_get_property(int32_t codepoint); /** Decompose a codepoint into an array of codepoints. * @@ -438,7 +438,7 @@ DLLEXPORT const utf8proc_property_t *utf8proc_get_property(int32_t codepoint); * required buffer size is returned, while the buffer will be overwritten with * undefined data. */ -DLLEXPORT ssize_t utf8proc_decompose_char( +UTF8PROC_DLLEXPORT ssize_t utf8proc_decompose_char( int32_t codepoint, int32_t *dst, ssize_t bufsize, utf8proc_option_t options, int *last_boundclass ); @@ -459,7 +459,7 @@ DLLEXPORT ssize_t utf8proc_decompose_char( * required buffer size is returned, while the buffer will be overwritten with * undefined data. */ -DLLEXPORT ssize_t utf8proc_decompose( +UTF8PROC_DLLEXPORT ssize_t utf8proc_decompose( const uint8_t *str, ssize_t strlen, int32_t *buffer, ssize_t bufsize, utf8proc_option_t options ); @@ -489,13 +489,13 @@ DLLEXPORT ssize_t utf8proc_decompose( * entries of the array pointed to by `str` have to be in the * range `0x0000` to `0x10FFFF`. Otherwise, the program might crash! */ -DLLEXPORT ssize_t utf8proc_reencode(int32_t *buffer, ssize_t length, utf8proc_option_t options); +UTF8PROC_DLLEXPORT ssize_t utf8proc_reencode(int32_t *buffer, ssize_t length, utf8proc_option_t options); /** * Given a pair of consecutive codepoints, return whether a grapheme break is * permitted between them (as defined by the extended grapheme clusters in UAX#29). */ -DLLEXPORT bool utf8proc_grapheme_break(int32_t codepoint1, int32_t codepoint2); +UTF8PROC_DLLEXPORT bool utf8proc_grapheme_break(int32_t codepoint1, int32_t codepoint2); /** * Given a codepoint, return a character width analogous to `wcwidth(codepoint)`, @@ -505,19 +505,19 @@ DLLEXPORT bool utf8proc_grapheme_break(int32_t codepoint1, int32_t codepoint2); * @note * If you want to check for particular types of non-printable characters, * (analogous to `isprint` or `iscntrl`), use @ref utf8proc_category. */ -DLLEXPORT int utf8proc_charwidth(int32_t codepoint); +UTF8PROC_DLLEXPORT int utf8proc_charwidth(int32_t codepoint); /** * Return the Unicode category for the codepoint (one of the * @ref utf8proc_category_t constants.) */ -DLLEXPORT utf8proc_category_t utf8proc_category(int32_t codepoint); +UTF8PROC_DLLEXPORT utf8proc_category_t utf8proc_category(int32_t codepoint); /** * Return the two-letter (nul-terminated) Unicode category string for * the codepoint (e.g. `"Lu"` or `"Co"`). */ -DLLEXPORT const char *utf8proc_category_string(int32_t codepoint); +UTF8PROC_DLLEXPORT const char *utf8proc_category_string(int32_t codepoint); /** * Maps the given UTF-8 string pointed to by `str` to a new UTF-8 @@ -537,7 +537,7 @@ DLLEXPORT const char *utf8proc_category_string(int32_t codepoint); * @note The memory of the new UTF-8 string will have been allocated * with `malloc`, and should therefore be deallocated with `free`. */ -DLLEXPORT ssize_t utf8proc_map( +UTF8PROC_DLLEXPORT ssize_t utf8proc_map( const uint8_t *str, ssize_t strlen, uint8_t **dstptr, utf8proc_option_t options ); @@ -550,13 +550,13 @@ DLLEXPORT ssize_t utf8proc_map( */ /** @{ */ /** NFD normalization (@ref UTF8PROC_DECOMPOSE). */ -DLLEXPORT uint8_t *utf8proc_NFD(const uint8_t *str); +UTF8PROC_DLLEXPORT uint8_t *utf8proc_NFD(const uint8_t *str); /** NFC normalization (@ref UTF8PROC_COMPOSE). */ -DLLEXPORT uint8_t *utf8proc_NFC(const uint8_t *str); +UTF8PROC_DLLEXPORT uint8_t *utf8proc_NFC(const uint8_t *str); /** NFD normalization (@ref UTF8PROC_DECOMPOSE and @ref UTF8PROC_COMPAT). */ -DLLEXPORT uint8_t *utf8proc_NFKD(const uint8_t *str); +UTF8PROC_DLLEXPORT uint8_t *utf8proc_NFKD(const uint8_t *str); /** NFD normalization (@ref UTF8PROC_COMPOSE and @ref UTF8PROC_COMPAT). */ -DLLEXPORT uint8_t *utf8proc_NFKC(const uint8_t *str); +UTF8PROC_DLLEXPORT uint8_t *utf8proc_NFKC(const uint8_t *str); /** @} */ #ifdef __cplusplus -- cgit v1.2.3