Import 2.4.0-test2pre7
[davej-history.git] / fs / ntfs / util.h
blob663b0b5da76614f02e5eb9cd2eb61e4665774650
1 /*
2 * util.h
3 * Header file for util.c
5 * Copyright (C) 1997 RĂ©gis Duchesne
6 */
8 /* Which character set is used for file names */
9 /* Translate everything to UTF-8 */
10 #define nct_utf8 1
11 /* Translate to 8859-1 */
12 #define nct_iso8859_1 2
13 /* Quote unprintables with : */
14 #define nct_uni_xlate 4
15 /* Do that in the vfat way instead of the documented way */
16 #define nct_uni_xlate_vfat 8
17 /* Use a mapping table to determine printables */
18 #define nct_map 16
20 /* The first 11 inodes correspond to special files */
21 #define FILE_MFT 0
22 #define FILE_MFTMIRR 1
23 #define FILE_LOGFILE 2
24 #define FILE_VOLUME 3
25 #define FILE_ATTRDEF 4
26 #define FILE_ROOT 5
27 #define FILE_BITMAP 6
28 #define FILE_BOOT 7
29 #define FILE_BADCLUS 8
30 #define FILE_QUOTA 9
31 #define FILE_UPCASE 10
33 /* Memory management */
34 void *ntfs_calloc(int size);
36 /* String operations */
37 /* Copy Unicode <-> ASCII */
38 #if 0
39 void ntfs_uni2ascii(char *to,char *from,int len);
40 #endif
41 void ntfs_ascii2uni(short int *to,char *from,int len);
42 /* Comparison */
43 int ntfs_uni_strncmp(short int* a,short int *b,int n);
44 int ntfs_ua_strncmp(short int* a,char* b,int n);
46 /* Same address space copies */
47 void ntfs_put(ntfs_io *dest, void *src, ntfs_size_t n);
48 void ntfs_get(void* dest, ntfs_io *src, ntfs_size_t n);
50 /* Charset conversion */
51 int ntfs_encodeuni(ntfs_volume *vol,ntfs_u16 *in, int in_len,char **out, int *out_len);
52 int ntfs_decodeuni(ntfs_volume *vol,char *in, int in_len, ntfs_u16 **out, int *out_len);
54 /* Time conversion */
55 /* NT <-> Unix */
56 ntfs_time_t ntfs_ntutc2unixutc(ntfs_time64_t ntutc);
57 ntfs_time64_t ntfs_unixutc2ntutc(ntfs_time_t t);
59 /* Attribute names */
60 void ntfs_indexname(char *buf, int type);
63 * Local variables:
64 * c-file-style: "linux"
65 * End: