X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=blobdiff_plain;f=include%2Fatalk%2Funicode.h;h=f842ce096fec1da82112b5ff7d99268e83a80c99;hp=1bb2ee3efdaad8c7f0a0528c40d392b5ebd49d24;hb=59ba70c884ca7356e28873fccab7d3611369e6cc;hpb=be96d276348da0a7e66eeec844b306e8a5fa8fac diff --git a/include/atalk/unicode.h b/include/atalk/unicode.h index 1bb2ee3e..f842ce09 100644 --- a/include/atalk/unicode.h +++ b/include/atalk/unicode.h @@ -2,9 +2,10 @@ #define _ATALK_UNICODE_H 1 #include +#include #include -#define ucs2_t u_int16_t +#define ucs2_t uint16_t #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) @@ -56,6 +57,7 @@ typedef struct { #define CONV_FORCE (1<<8) /* force convertion */ #define CONV__EILSEQ (1<<9) /* ignore EILSEQ, replace with IGNORE_CHAR (try USC2) */ #define CONV_ALLOW_COLON (1<<10) /* Allow ':' in name. Needed for Extended Attributes */ +#define CONV_ALLOW_SLASH (1<<11) /* Allow '/' in name. Needed for volume name */ /* conversion return flags */ #define CONV_REQMANGLE (1<<14) /* mangling of returned name is required */ @@ -78,7 +80,7 @@ struct charset_functions { char **outbuf, size_t *outbytesleft); size_t (*push)(void *, char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft); - u_int32_t flags; + uint32_t flags; const char *iname; struct charset_functions *prev, *next; }; @@ -90,9 +92,13 @@ extern int atalk_iconv_close (atalk_iconv_t); extern struct charset_functions *find_charset_functions (const char *); extern int atalk_register_charset (struct charset_functions *); +/* from utf16_case.c */ +extern ucs2_t toupper_w (ucs2_t); +extern uint32_t toupper_sp (uint32_t); +extern ucs2_t tolower_w (ucs2_t); +extern uint32_t tolower_sp (uint32_t); + /* from util_unistr.c */ -extern ucs2_t toupper_w (ucs2_t); -extern ucs2_t tolower_w (ucs2_t); extern int strupper_w (ucs2_t *); extern int strlower_w (ucs2_t *); extern int islower_w (ucs2_t); @@ -118,6 +124,8 @@ extern size_t utf8_charlen ( char* ); extern size_t utf8_strlen_validate ( char *); /* from charcnv.c */ +extern int set_charset_name(charset_t, const char *); +extern void free_charset_names(void); extern void init_iconv (void); extern size_t convert_string (charset_t, charset_t, void const *, size_t, void *, size_t); extern size_t convert_string_allocate (charset_t, charset_t, void const *, size_t, char **); @@ -134,7 +142,7 @@ extern size_t ucs2_to_charset_allocate (charset_t, char **dest, const ucs2_t * extern size_t utf8_to_charset_allocate (charset_t, char **dest, const char *src); extern size_t ucs2_to_charset (charset_t, const ucs2_t *src, char *dest, size_t); -extern size_t convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, u_int16_t *); +extern size_t convert_charset (charset_t, charset_t, charset_t, const char *, size_t, char *, size_t, uint16_t *); extern size_t charset_precompose ( charset_t, char *, size_t, char *, size_t); extern size_t charset_decompose ( charset_t, char *, size_t, char *, size_t);