+extern int read_batch;
+extern int write_batch;
+
+extern struct exclude_struct **exclude_list;
+extern struct exclude_struct **server_exclude_list;
+extern struct exclude_struct **local_exclude_list;
+
+int io_error;
+
+static struct file_struct null_file;
+
+static void clean_flist(struct file_list *flist, int strip_root, int no_dups);
+
+
+static int show_filelist_p(void)
+{
+ return verbose && (recurse || files_from) && !am_server;
+}
+
+static void start_filelist_progress(char *kind)
+{
+ rprintf(FINFO, "%s ... ", kind);
+ if ((verbose > 1) || do_progress)
+ rprintf(FINFO, "\n");
+ rflush(FINFO);
+}
+
+
+static void emit_filelist_progress(const struct file_list *flist)
+{
+ rprintf(FINFO, " %d files...\r", flist->count);
+}
+
+
+static void maybe_emit_filelist_progress(const struct file_list *flist)
+{
+ if (do_progress && show_filelist_p() && ((flist->count % 100) == 0))
+ emit_filelist_progress(flist);
+}
+
+
+static void finish_filelist_progress(const struct file_list *flist)
+{
+ if (do_progress) {
+ /* This overwrites the progress line */
+ rprintf(FINFO, "%d file%sto consider\n",
+ flist->count, flist->count == 1 ? " " : "s ");
+ } else
+ rprintf(FINFO, "done\n");
+}
+
+void show_flist_stats(void)
+{
+ /* Nothing yet */
+}
+
+
+static struct string_area *string_area_new(int size)
+{
+ struct string_area *a;
+
+ if (size <= 0)
+ size = ARENA_SIZE;
+ a = new(struct string_area);
+ if (!a)
+ out_of_memory("string_area_new");
+ a->current = a->base = new_array(char, size);
+ if (!a->current)
+ out_of_memory("string_area_new buffer");
+ a->end = a->base + size;
+ a->next = NULL;
+
+ return a;
+}