]> arthur.barton.de Git - netatalk.git/blob - etc/afpd/codepage.h
Removed any special masking of chmod calls. Also fixed a strerror() call.
[netatalk.git] / etc / afpd / codepage.h
1 /*
2  * $Id: codepage.h,v 1.3 2001-12-03 05:03:38 jmarcus Exp $
3  */
4
5 #ifndef AFPD_CODEPAGE_H
6 #define AFPD_CODEPAGE_H 1
7
8 /*
9  * header of a codepage --
10  * file magic:                   2 bytes
11  * file version:                 1 byte
12  * size of name:                 1 byte
13  * quantum:                      1 byte
14  * rules:                        1 byte
15  * offset to data:               2 bytes (network byte order)
16  * size of data:                 2 bytes (network byte order)
17  * name:                         strlen(name) bytes (padded)
18  * 
19  * data for a version 2 codepage --
20  * mapping rule: 1 byte
21  * mac/bad code:     <quantum> bytes
22  * xlate/rule code:  <quantum> bytes
23  * ...
24  */
25
26 #define CODEPAGE_FILE_ID 0xCFAF
27 #define CODEPAGE_FILE_VERSION 0x02
28 #define CODEPAGE_FILE_HEADER_SIZE 10
29
30 /* m->u and u->m mappings */
31 #define CODEPAGE_RULE_MTOU       (1 << 0)
32 #define CODEPAGE_RULE_UTOM       (1 << 1)
33 #define CODEPAGE_RULE_BADU       (1 << 2)
34
35 /* rules for bad character assignment.
36  *
37  * bit assignments:
38  * bit 0 set:  it's an illegal character
39  *     unset:  it's okay
40  *
41  * bit 1 set:  bad anywhere
42  *     unset:  only check at the beginning of each quantum. 
43  *
44  * bit 2 set:  all quanta are the same length
45  *     unset:  quanta beginning with ascii characters are 1-byte long  
46  *
47  */
48 #define CODEPAGE_BADCHAR_SET      (1 << 0) 
49 #define CODEPAGE_BADCHAR_ANYWHERE (1 << 1)  
50 #define CODEPAGE_BADCHAR_QUANTUM  (1 << 2) 
51
52 #endif