1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
Author: Michael Karcher <debian@mkarcher.dialup.fu-berlin.de>,
David Seifert <soap@gentoo.org>,
Fabian Greffrath <fabian@debian.org>
Description: Fixes prototypes in unincore.h to match uninorm.c.
--- a/source/base/all/uninorm/unincore.h
+++ b/source/base/all/uninorm/unincore.h
@@ -3,28 +3,30 @@
*
*/
+typedef unsigned int uint;
+
/* integer string functions */
-int istrlen (int * str );
-int istrcmp (int * s1, int * s2 );
+uint istrlen (uint * str );
+uint istrcmp (uint * s1, uint * s2 );
/* unicode data accessors */
-int is_excluded (int c );
-int get_combining_class (int c );
-int get_recombined_codepoint (int c1, int c2 );
-int * get_decomposition (int * buf, int c );
+uint is_excluded (uint c );
+uint get_combining_class (uint c );
+int get_recombined_codepoint (uint c1, uint c2 );
+uint * get_decomposition (uint * buf, uint c );
/* utf en/decoding functions */
void encode_utf8(char *buf, unsigned *str);
void decode_utf8(unsigned *buf, char *str);
/* (de)composition functions */
-void decompose_recursive (int * buf, int c );
-void canonical_order (int * str );
-void canonical_composition (int * str );
-void canonical_decomposition (int * buf, int * str );
+void decompose_recursive (uint * buf, uint c );
+void canonical_order (uint * str );
+void canonical_composition (uint * str );
+void canonical_decomposition (uint * buf, uint * str );
/* normalization functions */
-void normalize_nfd (int * buf, int * str );
-void normalize_nfc (int * buf, int * str );
+void normalize_nfd (uint * buf, uint * str );
+void normalize_nfc (uint * buf, uint * str );
void normalize_nfd_utf8 (char * buf, char * str );
void normalize_nfc_utf8 (char * buf, char * str );
--- a/source/base/all/uninorm/uninorm.c
+++ b/source/base/all/uninorm/uninorm.c
@@ -8,10 +8,10 @@
/*-----------------BASE_UNINORM_CP850ToUTF8NFD------------------------------*/
/* UTF-8 NFD is the filename representation format in Apple's Mac OS X (Darwin) HFS+ file system */
-INT BASE_UNINORM_CP850ToUTF8NFD(UCHAR *cp850String, INT len)
+INT BASE_UNINORM_CP850ToUTF8NFD(CHAR *cp850String, INT len)
{
UINT Unicode[BASE_LFN_MAXLEN+1], Normalized[BASE_LFN_MAXLEN+1], *destptr = Unicode;
- UCHAR *srcptr = cp850String, *resultstr = cp850String;
+ CHAR *srcptr = cp850String, *resultstr = cp850String;
srcptr[len] = 0;
/* First, convert that DOS CP850 encoded String to Unicode */
@@ -31,10 +31,10 @@ INT BASE_UNINORM_CP850ToUTF8NFD(UCHAR *c
/*-----------------BASE_UNINORM_CP850ToUTF8NFC------------------------------*/
/* UTF-8 NFC is the filename representation format in most other UNIX systems including Linux */
-INT BASE_UNINORM_CP850ToUTF8NFC(UCHAR *cp850String, INT len)
+INT BASE_UNINORM_CP850ToUTF8NFC(CHAR *cp850String, INT len)
{
UINT Unicode[BASE_LFN_MAXLEN+1], Normalized[BASE_LFN_MAXLEN+1], *destptr = Unicode;
- UCHAR *srcptr = cp850String, *resultstr = cp850String;
+ CHAR *srcptr = cp850String, *resultstr = cp850String;
srcptr[len] = 0;
/* First, convert that DOS CP850 encoded String to Unicode */
@@ -101,4 +101,4 @@ INT BASE_UNINORM_CP850ToUTF8NFD(UCHAR *u
}
}
-*/
\ No newline at end of file
+*/
--- a/source/base/all/uninorm/unincore.c
+++ b/source/base/all/uninorm/unincore.c
@@ -18,6 +18,7 @@
#include <stdlib.h>
#include <string.h>
#include "unidata.h"
+#include "unincore.h"
/* Hangul constants */
#define SBase 0xAC00
--- a/source/base/all/uninorm/uninorm.h
+++ b/source/base/all/uninorm/uninorm.h
@@ -1,3 +1,3 @@
-INT BASE_UNINORM_CP850ToUTF8NFD(UCHAR *cp1252String, INT len);
-INT BASE_UNINORM_CP850ToUTF8NFC(UCHAR *cp1252String, INT len);
+INT BASE_UNINORM_CP850ToUTF8NFD(CHAR *cp1252String, INT len);
+INT BASE_UNINORM_CP850ToUTF8NFC(CHAR *cp1252String, INT len);
|