#ifndef _ATALK_UNICODE_H
#define _ATALK_UNICODE_H 1
-#include <sys/cdefs.h>
-#include <netatalk/endian.h>
#include <errno.h>
#include <sys/param.h>
/* conversion flags */
#define CONV_IGNORE (1<<0) /* return the first convertable characters. */
-#define CONV_ESCAPEHEX (1<<1) /* escape unconvertable chars with :[UCS2HEX] */
+#define CONV_ESCAPEHEX (1<<1) /* escape unconvertable chars with :[UCS2HEX], */
+ /* also escape '/'. Escape ':' if also CONV_ALLOW_COLON, */
+ /* else ':' raises EILSEQ */
#define CONV_ESCAPEDOTS (1<<2) /* escape leading dots with :2600 */
#define CONV_UNESCAPEHEX (1<<3)
#define CONV_TOUPPER (1<<4) /* convert to UPPERcase */
#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 */
/*
* for each charset we have a function that pulls from that charset to
* a ucs2 buffer, and a function that pushes to a ucs2 buffer
- * */
+ */
struct charset_functions {
const char *name;
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 u_int32_t toupper_sp (u_int32_t);
+extern ucs2_t tolower_w (ucs2_t);
+extern u_int32_t tolower_sp (u_int32_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);
extern size_t utf8_precompose ( char *, size_t, char *, size_t);
extern size_t utf8_decompose ( char *, size_t, char *, size_t);
-extern charset_t add_charset (char* name);
+extern charset_t add_charset (const char* name);
#endif /* _ATALK_UNICODE_H */