14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
+
+
+
+
+
+
+
+
+
+
+
|
#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
#define HAVE_STRUCT_STAT_ST_BLOCKS 1
#ifdef WIN32
# undef HAVE_STRUCT_STAT_ST_BLKSIZE
# undef HAVE_STRUCT_STAT_ST_BLOCKS
#endif
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef HAVE_DEFINED_XVFS_FILE_TYPE_T
#define HAVE_DEFINED_XVFS_FILE_TYPE_T 1
typedef enum {
XVFS_FILE_TYPE_REG,
XVFS_FILE_TYPE_DIR
} xvfs_file_type_t;
#endif
#ifndef HAVE_DEFINED_XVFS_SIZE_T
#define HAVE_DEFINED_XVFS_SIZE_T 1
typedef Tcl_WideInt xvfs_size_t;
#endif
#ifndef HAVE_DEFINED_XVFS_FILE_DATA
#define HAVE_DEFINED_XVFS_FILE_DATA 1
struct xvfs_file_data {
const char *name;
xvfs_file_type_t type;
xvfs_size_t size;
union {
const unsigned char *fileContents;
const char **dirChildren;
} data;
};
#endif
<?
package require xvfs
set ::xvfs::hashNameThreshold 3
if {[info exists ::env(XVFS_CREATE_HASH_NAME_THRESHOLD)]} {
set ::xvfs::hashNameThreshold $::env(XVFS_CREATE_HASH_NAME_THRESHOLD)
|