Debian Codegraph @

texk/ttf2pk2/emtexdir.h

raw
1 /* emtexdir.h -- written by Eberhard Mattes, donated to the public domain */
2
3 #if !defined (_EMTEXDIR_H)
4 #define _EMTEXDIR_H
5
6 #if defined (__cplusplus)
7 extern "C" {
8 #endif
9
10
11 /* Flags for emtex_dir_setup */
12
13 #define EDS_ONESUBDIR 0x0001
14 #define EDS_ALLSUBDIR 0x0002
15 #define EDS_BANG 0x0004
16
17 /* Flags for emtex_dir_find */
18
19 #define EDF_CWD 0x0001
20 #define EDF_FSLASH 0x0002
21 #define EDF_TRACE 0x8000
22
23 /* Methods for emtex_dir_trunc */
24
25 #define EDT_5_PLUS_3 0 /* 5+3.3 */
26 #define EDT_8 1 /* 8.3 */
27
28 /* Return values for emtex_dir_trunc */
29
30 #define EDT_UNCHANGED 0 /* Path name not changed */
31 #define EDT_CHANGED 1 /* Path name truncated */
32 #define EDT_TOOLONG 2 /* Path name too long */
33 #define EDT_INVALID 3 /* Path name invalid */
34
35 struct emtex_dir
36 {
37 char **list;
38 int used;
39 int alloc;
40 };
41
42 extern void (*emtex_dir_find_callback)(const char *name, int ok);
43
44 extern int setup_list(struct emtex_dir *dst, char *path,
45 const char *list, unsigned flags);
46
47 int emtex_dir_setup (struct emtex_dir *ed, const char *env, const char *dir,
48 unsigned flags);
49
50 int emtex_dir_find (char *path, size_t path_size, const struct emtex_dir *ed,
51 const char *fname, unsigned flags);
52
53 int emtex_dir_trunc (char *dst, size_t dst_size, const char *src,
54 unsigned flags, int method);
55
56 #if defined (__cplusplus)
57 }
58 #endif
59
60 #endif /* !defined (_EMTEXDIR_H) */