cleanup
[linux-2.4.git] / fs / ntfs / util.h
1 /*
2  * util.h - Header file for util.c
3  *
4  * Copyright (C) 1997 RĂ©gis Duchesne
5  * Copyright (C) 2001 Anton Altaparmakov (AIA)
6  */
7
8 /* The first 16 inodes correspond to NTFS special files. */
9 typedef enum {
10         FILE_Mft        = 0,
11         FILE_MftMirr    = 1,
12         FILE_LogFile    = 2,
13         FILE_Volume     = 3,
14         FILE_AttrDef    = 4,
15         FILE_root       = 5,
16         FILE_BitMap     = 6,
17         FILE_Boot       = 7,
18         FILE_BadClus    = 8,
19         FILE_Secure     = 9,
20         FILE_UpCase     = 10,
21         FILE_Extend     = 11,
22         FILE_Reserved12 = 12,
23         FILE_Reserved13 = 13,
24         FILE_Reserved14 = 14,
25         FILE_Reserved15 = 15,
26 } NTFS_SYSTEM_FILES;
27  
28 /* Memory management */
29 void *ntfs_calloc(int size);
30
31 /* String operations */
32 /*  Copy Unicode <-> ASCII */
33 void ntfs_ascii2uni(short int *to, char *from, int len);
34
35 /*  Comparison */
36 int ntfs_uni_strncmp(short int* a, short int *b, int n);
37 int ntfs_ua_strncmp(short int* a, char* b, int n);
38
39 /* Same address space copies */
40 void ntfs_put(ntfs_io *dest, void *src, ntfs_size_t n);
41 void ntfs_get(void* dest, ntfs_io *src, ntfs_size_t n);
42
43 /* Charset conversion */
44 int ntfs_encodeuni(ntfs_volume *vol, ntfs_u16 *in, int in_len, char **out,
45                    int *out_len);
46 int ntfs_decodeuni(ntfs_volume *vol, char *in, int in_len, ntfs_u16 **out,
47                    int *out_len);
48
49 /* Time conversion */
50 /*  NT <-> Unix */
51 ntfs_time_t ntfs_ntutc2unixutc(ntfs_time64_t ntutc);
52 ntfs_time64_t ntfs_unixutc2ntutc(ntfs_time_t t);
53
54 /* Attribute names */
55 void ntfs_indexname(char *buf, int type);
56