|
@@ -79,7 +79,15 @@ struct files {
|
79
|
79
|
|
80
|
80
|
struct files *filelist;
|
81
|
81
|
|
82
|
|
-struct files *files_alloc() {
|
|
82
|
+static struct files *files_alloc(void);
|
|
83
|
+static void files_free(struct files **pfiles);
|
|
84
|
+#ifdef DO_DUMP
|
|
85
|
+static void files_dump(struct files *files);
|
|
86
|
+#endif
|
|
87
|
+static int files_add_file(struct files *files, char *filename);
|
|
88
|
+static int files_load_filelist(struct files *files, char *filename);
|
|
89
|
+
|
|
90
|
+struct files *files_alloc(void) {
|
83
|
91
|
struct files *f = calloc(1, sizeof(struct files));
|
84
|
92
|
f->alloc_files = 64;
|
85
|
93
|
f->data = calloc(f->alloc_files, sizeof(struct fileinfo *));
|
|
@@ -103,6 +111,7 @@ void files_free(struct files **pfiles) {
|
103
|
111
|
}
|
104
|
112
|
}
|
105
|
113
|
|
|
114
|
+#ifdef DO_DUMP
|
106
|
115
|
void files_dump(struct files *files) {
|
107
|
116
|
int i;
|
108
|
117
|
fprintf(stdout,"num_files:%d\n", files->num_files);
|
|
@@ -115,6 +124,7 @@ void files_dump(struct files *files) {
|
115
|
124
|
fprintf(stdout,"file[%d]->size=%llu\n", i, f->size);
|
116
|
125
|
}
|
117
|
126
|
}
|
|
127
|
+#endif
|
118
|
128
|
|
119
|
129
|
int files_add_file(struct files *files, char *filename) {
|
120
|
130
|
int ret = 0;
|