From: Marc Cromme Date: Tue, 1 May 2007 08:17:05 +0000 (+0000) Subject: moved ICU helper function declarations from icu_I18N.h header file to icu_I18N.c... X-Git-Tag: PAZPAR2.1.0.0~185 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=273b54f5a836e08765596af85ad74654828a21b8;p=pazpar2-moved-to-github.git moved ICU helper function declarations from icu_I18N.h header file to icu_I18N.c source file --- diff --git a/src/.cvsignore b/src/.cvsignore index 64124c6..97dc9ef 100644 --- a/src/.cvsignore +++ b/src/.cvsignore @@ -8,6 +8,7 @@ cconfig.h.in *.log stamp-h1 test_config +test_icu_I18N test_record test_reclists test_relevance diff --git a/src/icu_I18N.c b/src/icu_I18N.c index 060030b..7044160 100644 --- a/src/icu_I18N.c +++ b/src/icu_I18N.c @@ -1,4 +1,4 @@ -/* $Id: icu_I18N.c,v 1.1 2007-04-30 13:56:52 marc Exp $ +/* $Id: icu_I18N.c,v 1.2 2007-05-01 08:17:05 marc Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -35,18 +35,49 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include #include + #include /* some more string fcns*/ +#include /* char names */ + //#include //#include /* Basic ICU data types */ //#include //#include /* C Converter API */ -//#include /* char names */ //#include //#include /* #include */ +// forward declarations for helper functions + +int icu_check_status (UErrorCode status); + +UChar* icu_utf16_from_utf8(UChar *utf16, + int32_t utf16_cap, + int32_t *utf16_len, + const char *utf8); + +UChar* icu_utf16_from_utf8n(UChar *utf16, + int32_t utf16_cap, + int32_t *utf16_len, + const char *utf8, + size_t utf8_len); + + +char* icu_utf16_to_utf8(char *utf8, + size_t utf8_cap, + size_t *utf8_len, + const UChar *utf16, + int32_t utf16_len); + + +int32_t icu_utf16_casemap(UChar *dest16, int32_t dest16_cap, + const UChar *src16, int32_t src16_len, + const char *locale, char action); + + +// source code int icu_check_status (UErrorCode status) { diff --git a/src/icu_I18N.h b/src/icu_I18N.h index 9020719..971b0ca 100644 --- a/src/icu_I18N.h +++ b/src/icu_I18N.h @@ -1,4 +1,4 @@ -/* $Id: icu_I18N.h,v 1.1 2007-04-30 13:56:52 marc Exp $ +/* $Id: icu_I18N.h,v 1.2 2007-05-01 08:17:05 marc Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -28,7 +28,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA //#include /* Basic ICU data types */ -#include /* char names */ +//#include /* char names */ //#include //#include @@ -39,31 +39,6 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA //#include -int icu_check_status (UErrorCode status); - -UChar* icu_utf16_from_utf8(UChar *utf16, - int32_t utf16_cap, - int32_t *utf16_len, - const char *utf8); - -UChar* icu_utf16_from_utf8n(UChar *utf16, - int32_t utf16_cap, - int32_t *utf16_len, - const char *utf8, - size_t utf8_len); - - -char* icu_utf16_to_utf8(char *utf8, - size_t utf8_cap, - size_t *utf8_len, - const UChar *utf16, - int32_t utf16_len); - - -int32_t icu_utf16_casemap(UChar *dest16, int32_t dest16_cap, - const UChar *src16, int32_t src16_len, - const char *locale, char action); - char * icu_casemap(NMEM nmem, char *buf, size_t buf_cap, size_t *dest8_len, const char *src8, const char *locale, char action);