1/* file.h  -  Additional file attributes */
2
3/* Written 1993 by Werner Almesberger */
4
5
6#ifndef _FILE_H
7#define _FILE_H
8
9#include <linux/msdos_fs.h>
10
11
12typedef enum { fdt_none,fdt_drop,fdt_undelete } FD_TYPE;
13
14typedef struct _fptr {
15    char name[MSDOS_NAME];
16    FD_TYPE type;
17    struct _fptr *first; /* first entry */
18    struct _fptr *next; /* next file in directory */
19} FDSC;
20
21
22extern FDSC *fp_root;
23
24
25char *file_name(unsigned char *fixed);
26
27/* Returns a pointer to a pretty-printed representation of a fixed MS-DOS file
28   name. */
29
30int file_cvt(unsigned char *name,unsigned char *fixed);
31
32/* Converts a pretty-printed file name to the fixed MS-DOS format. Returns a
33   non-zero integer on success, zero on failure. */
34
35void file_add(char *path,FD_TYPE type);
36
37/* Define special attributes for a path. TYPE can be either FDT_DROP or
38   FDT_UNDELETE. */
39
40FDSC **file_cd(FDSC **curr,char *fixed);
41
42/* Returns a pointer to the directory descriptor of the subdirectory FIXED of
43   CURR, or NULL if no such subdirectory exists. */
44
45FD_TYPE file_type(FDSC **curr,char *fixed);
46
47/* Returns the attribute of the file FIXED in directory CURR or FDT_NONE if no
48   such file exists or if CURR is NULL. */
49
50void file_modify(FDSC **curr,char *fixed);
51
52/* Performs the necessary operation on the entry of CURR that is named FIXED. */
53
54void file_unused(void);
55
56/* Displays warnings for all unused file attributes. */
57
58#endif
59