+#ifdef ICONV_OPTION
+ if (need_unsorted_flist) {
+ /* Create an extra array of index pointers that we can sort for
+ * the generator's use (for wading through the files in sorted
+ * order and for calling flist_find()). We keep the "files"
+ * list unsorted for our exchange of index numbers with the
+ * other side (since their names may not sort the same). */
+ if (!(flist->sorted = new_array(struct file_struct *, flist->count)))
+ out_of_memory("recv_file_list");
+ memcpy(flist->sorted, flist->files,
+ flist->count * sizeof (struct file_struct*));
+ if (inc_recurse && dir_flist->count > dstart) {
+ dir_flist->sorted = realloc_array(dir_flist->sorted,
+ struct file_struct *,
+ dir_flist->count);
+ memcpy(dir_flist->sorted + dstart, dir_flist->files + dstart,
+ (dir_flist->count - dstart) * sizeof (struct file_struct*));
+ fsort(dir_flist->sorted + dstart, dir_flist->count - dstart);
+ }
+ } else
+#endif
+ {
+ flist->sorted = flist->files;
+ if (inc_recurse && dir_flist->count > dstart) {
+ dir_flist->sorted = dir_flist->files;
+ fsort(dir_flist->sorted + dstart, dir_flist->count - dstart);
+ }
+ }