- unsigned char flags;
- static time_t last_time;
- static mode_t last_mode;
- static dev_t last_rdev;
- static uid_t last_uid;
- static gid_t last_gid;
+ struct file_struct **new_ptr;
+
+ if (flist->count < flist->malloced)
+ return;
+
+ if (flist->malloced < FLIST_START)
+ flist->malloced = FLIST_START;
+ else if (flist->malloced >= FLIST_LINEAR)
+ flist->malloced += FLIST_LINEAR;
+ else
+ flist->malloced *= 2;
+
+ /*
+ * In case count jumped or we are starting the list
+ * with a known size just set it.
+ */
+ if (flist->malloced < flist->count)
+ flist->malloced = flist->count;
+
+ new_ptr = realloc_array(flist->files, struct file_struct *,
+ flist->malloced);
+
+ if (verbose >= 2) {
+ rprintf(FINFO, "[%s] expand file_list to %.0f bytes, did%s move\n",
+ who_am_i(),
+ (double)sizeof flist->files[0] * flist->malloced,
+ (new_ptr == flist->files) ? " not" : "");
+ }
+
+ flist->files = new_ptr;
+
+ if (!flist->files)
+ out_of_memory("flist_expand");
+}
+
+void send_file_entry(struct file_struct *file, int f, unsigned short base_flags)
+{
+ unsigned short flags;
+ static time_t modtime;
+ static mode_t mode;
+ static uint64 dev;
+ static dev_t rdev;
+ static uint32 rdev_major;
+ static uid_t uid;
+ static gid_t gid;