X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fatalk%2Funicode.h;h=75a970b631efa16167194b0108cb33cb5ca05f63;hb=939eb9da6116bd502cdae97f84541993848071b4;hp=27441549e2d803cd3e0f85b147673fb6aa3e51b0;hpb=b0bcb8f6b0571592a50ce039882c9319e012a270;p=netatalk.git diff --git a/include/atalk/unicode.h b/include/atalk/unicode.h index 27441549..75a970b6 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)) @@ -55,7 +56,6 @@ typedef struct { #define CONV_DECOMPOSE (1<<7) /* precompose */ #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 */ /* conversion return flags */ #define CONV_REQMANGLE (1<<14) /* mangling of returned name is required */ @@ -78,7 +78,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; }; @@ -92,9 +92,9 @@ extern int atalk_register_charset (struct charset_functions *); /* from utf16_case.c */ extern ucs2_t toupper_w (ucs2_t); -extern u_int32_t toupper_sp (u_int32_t); +extern uint32_t toupper_sp (uint32_t); extern ucs2_t tolower_w (ucs2_t); -extern u_int32_t tolower_sp (u_int32_t); +extern uint32_t tolower_sp (uint32_t); /* from util_unistr.c */ extern int strupper_w (ucs2_t *); @@ -122,6 +122,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 **); @@ -138,7 +140,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);