4343#include "utf8proc_data.c"
4444
4545
46- const int8_t utf8proc_utf8class [256 ] = {
46+ DLLEXPORT const int8_t utf8proc_utf8class [256 ] = {
4747 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
4848 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
4949 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ,
@@ -95,11 +95,11 @@ const int8_t utf8proc_utf8class[256] = {
9595#define UTF8PROC_BOUNDCLASS_LVT 10
9696
9797
98- const char * utf8proc_version (void ) {
98+ DLLEXPORT const char * utf8proc_version (void ) {
9999 return "1.1.6" ;
100100}
101101
102- const char * utf8proc_errmsg (ssize_t errcode ) {
102+ DLLEXPORT const char * utf8proc_errmsg (ssize_t errcode ) {
103103 switch (errcode ) {
104104 case UTF8PROC_ERROR_NOMEM :
105105 return "Memory for processing UTF-8 data could not be allocated." ;
@@ -116,7 +116,7 @@ const char *utf8proc_errmsg(ssize_t errcode) {
116116 }
117117}
118118
119- ssize_t utf8proc_iterate (
119+ DLLEXPORT ssize_t utf8proc_iterate (
120120 const uint8_t * str , ssize_t strlen , int32_t * dst
121121) {
122122 int length ;
@@ -156,14 +156,14 @@ ssize_t utf8proc_iterate(
156156 return length ;
157157}
158158
159- bool utf8proc_codepoint_valid (int32_t uc ) {
159+ DLLEXPORT bool utf8proc_codepoint_valid (int32_t uc ) {
160160 if (uc < 0 || uc >= 0x110000 ||
161161 ((uc & 0xFFFF ) >= 0xFFFE ) || (uc >= 0xD800 && uc < 0xE000 ) ||
162162 (uc >= 0xFDD0 && uc < 0xFDF0 )) return false;
163163 else return true;
164164}
165165
166- ssize_t utf8proc_encode_char (int32_t uc , uint8_t * dst ) {
166+ DLLEXPORT ssize_t utf8proc_encode_char (int32_t uc , uint8_t * dst ) {
167167 if (uc < 0x00 ) {
168168 return 0 ;
169169 } else if (uc < 0x80 ) {
@@ -193,7 +193,7 @@ ssize_t utf8proc_encode_char(int32_t uc, uint8_t *dst) {
193193 } else return 0 ;
194194}
195195
196- const utf8proc_property_t * utf8proc_get_property (int32_t uc ) {
196+ DLLEXPORT const utf8proc_property_t * utf8proc_get_property (int32_t uc ) {
197197 /* ASSERT: uc >= 0 && uc < 0x110000 */
198198 return utf8proc_properties + (
199199 utf8proc_stage2table [
@@ -206,7 +206,7 @@ const utf8proc_property_t *utf8proc_get_property(int32_t uc) {
206206 return utf8proc_decompose_char((replacement_uc), dst, bufsize, \
207207 options & ~UTF8PROC_LUMP, last_boundclass)
208208
209- ssize_t utf8proc_decompose_char (int32_t uc , int32_t * dst , ssize_t bufsize ,
209+ DLLEXPORT ssize_t utf8proc_decompose_char (int32_t uc , int32_t * dst , ssize_t bufsize ,
210210 int options , int * last_boundclass ) {
211211 /* ASSERT: uc >= 0 && uc < 0x110000 */
212212 const utf8proc_property_t * property ;
@@ -351,7 +351,7 @@ ssize_t utf8proc_decompose_char(int32_t uc, int32_t *dst, ssize_t bufsize,
351351 return 1 ;
352352}
353353
354- ssize_t utf8proc_decompose (
354+ DLLEXPORT ssize_t utf8proc_decompose (
355355 const uint8_t * str , ssize_t strlen ,
356356 int32_t * buffer , ssize_t bufsize , int options
357357) {
@@ -413,7 +413,7 @@ ssize_t utf8proc_decompose(
413413 return wpos ;
414414}
415415
416- ssize_t utf8proc_reencode (int32_t * buffer , ssize_t length , int options ) {
416+ DLLEXPORT ssize_t utf8proc_reencode (int32_t * buffer , ssize_t length , int options ) {
417417 /* UTF8PROC_NULLTERM option will be ignored, 'length' is never ignored
418418 ASSERT: 'buffer' has one spare byte of free space at the end! */
419419 if (options & (UTF8PROC_NLF2LS | UTF8PROC_NLF2PS | UTF8PROC_STRIPCC )) {
@@ -528,7 +528,7 @@ ssize_t utf8proc_reencode(int32_t *buffer, ssize_t length, int options) {
528528 }
529529}
530530
531- ssize_t utf8proc_map (
531+ DLLEXPORT ssize_t utf8proc_map (
532532 const uint8_t * str , ssize_t strlen , uint8_t * * dstptr , int options
533533) {
534534 int32_t * buffer ;
@@ -557,28 +557,28 @@ ssize_t utf8proc_map(
557557 return result ;
558558}
559559
560- uint8_t * utf8proc_NFD (const uint8_t * str ) {
560+ DLLEXPORT uint8_t * utf8proc_NFD (const uint8_t * str ) {
561561 uint8_t * retval ;
562562 utf8proc_map (str , 0 , & retval , UTF8PROC_NULLTERM | UTF8PROC_STABLE |
563563 UTF8PROC_DECOMPOSE );
564564 return retval ;
565565}
566566
567- uint8_t * utf8proc_NFC (const uint8_t * str ) {
567+ DLLEXPORT uint8_t * utf8proc_NFC (const uint8_t * str ) {
568568 uint8_t * retval ;
569569 utf8proc_map (str , 0 , & retval , UTF8PROC_NULLTERM | UTF8PROC_STABLE |
570570 UTF8PROC_COMPOSE );
571571 return retval ;
572572}
573573
574- uint8_t * utf8proc_NFKD (const uint8_t * str ) {
574+ DLLEXPORT uint8_t * utf8proc_NFKD (const uint8_t * str ) {
575575 uint8_t * retval ;
576576 utf8proc_map (str , 0 , & retval , UTF8PROC_NULLTERM | UTF8PROC_STABLE |
577577 UTF8PROC_DECOMPOSE | UTF8PROC_COMPAT );
578578 return retval ;
579579}
580580
581- uint8_t * utf8proc_NFKC (const uint8_t * str ) {
581+ DLLEXPORT uint8_t * utf8proc_NFKC (const uint8_t * str ) {
582582 uint8_t * retval ;
583583 utf8proc_map (str , 0 , & retval , UTF8PROC_NULLTERM | UTF8PROC_STABLE |
584584 UTF8PROC_COMPOSE | UTF8PROC_COMPAT );
0 commit comments