mangle, demangle (filename) More...
#include <ctype.h>#include <stdio.h>#include <atalk/util.h>#include "desktop.h"#include "mangle.h"Macros | |
| #define | hextoint(c) ( isdigit( c ) ? c - '0' : c + 10 - 'A' ) |
| #define | isuxdigit(x) (isdigit(x) || (isupper(x) && isxdigit(x))) |
Functions | |
| static size_t | mangle_extension (const struct vol *vol, const char *uname, char *extension, charset_t charset) |
| static char * | demangle_checks (const struct vol *vol, char *uname, char *mfilename, size_t prefix, char *ext) |
| static char * | private_demangle (const struct vol *vol, char *mfilename, cnid_t did, cnid_t *osx) |
| char * | demangle (const struct vol *vol, char *mfilename, cnid_t did) |
| char * | demangle_osx (const struct vol *vol, char *mfilename, cnid_t did, cnid_t *fileid) |
| char * | mangle (const struct vol *vol, char *filename, size_t filenamelen, char *uname, cnid_t id, int flags) |
mangle, demangle (filename)
mangle or demangle filenames if they are greater than the max allowed characters for a given version of AFP.
| #define isuxdigit | ( | x | ) | (isdigit(x) || (isupper(x) && isxdigit(x))) |
|
static |
| char * mangle | ( | const struct vol * | vol, |
| char * | filename, | ||
| size_t | filenamelen, | ||
| char * | uname, | ||
| cnid_t | id, | ||
| int | flags | ||
| ) |
Early Mac OS X (10.0-10.4.?) had the limitation up to 255 Byte. Current implementation is: volcharset -> UTF16-MAC -> truncated 255 UTF8-MAC
Recent Mac OS X (10.4.?-) don't have this limitation. Desirable implementation is: volcharset -> truncated 510 UTF16-MAC -> UTF8-MAC
|
static |