netatalk: mangle.h File Reference

netatalk 4.5.1
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
mangle.h File Reference
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <atalk/adouble.h>`
`#include <atalk/cnid.h>`
`#include <atalk/globals.h>`
`#include <atalk/logger.h>`
`#include "directory.h"`
`#include "volume.h"`

Go to the source code of this file.

## Macros
#define | MANGLE_CHAR '#'
#define | MAX_MANGLE_SUFFIX_LENGTH 999
#define | MAX_EXT_LENGTH 5
#define | MANGLE_LENGTH 9
#define | MAX_LENGTH MACFILELEN

## Functions
char * | mangle (const struct vol *, char *, size_t, char *, cnid_t, int)
char * | demangle (const struct vol *, char *, cnid_t did)
char * | demangle_osx (const struct vol *, char *, cnid_t did, cnid_t *fileid)

## Macro Definition Documentation

## ◆ MANGLE_CHAR

#define MANGLE_CHAR '#'

## ◆ MANGLE_LENGTH

#define MANGLE_LENGTH 9

#ffffffff This really can't be changed.

## ◆ MAX_EXT_LENGTH

#define MAX_EXT_LENGTH 5

XXX This cannot be greater than 27

## ◆ MAX_LENGTH

#define MAX_LENGTH MACFILELEN

## ◆ MAX_MANGLE_SUFFIX_LENGTH

#define MAX_MANGLE_SUFFIX_LENGTH 999

## Function Documentation

## ◆ demangle()

char * demangle | ( | const struct vol * | vol,
|  | char * | mfilename,
|  | cnid_t | did )
| extern

## ◆ demangle_osx()

char * demangle_osx | ( | const struct vol * | vol,
|  | char * | mfilename,
|  | cnid_t | did,
|  | cnid_t * | fileid )
| extern

## ◆ mangle()

char * mangle | ( | const struct vol * | vol,
|  | char * | filename,
|  | size_t | filenamelen,
|  | char * | uname,
|  | cnid_t | id,
|  | int | flags )
| extern

Bug

  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

Note
  with utf8 filename not always round trip
  filename mac filename too long or first chars if unmatchable chars.
  uname unix filename
  id file/folder ID or 0
  first
  static int first
  Definition nad_ls.c:56
  ID
  static uint16_t ID
  Definition uams_dhx2_pam.c:45