aboutsummaryrefslogtreecommitdiffstats
path: root/merge.c
diff options
context:
space:
mode:
Diffstat (limited to 'merge.c')
-rw-r--r--merge.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/merge.c b/merge.c
index c1dfe0e4a4..2c7c7b566f 100644
--- a/merge.c
+++ b/merge.c
@@ -380,52 +380,3 @@ merge_open_in_files(int in_file_count, char *const *in_file_names,
return count;
}
-
-
-/*
- * Convenience function: merge two or more files into one.
- */
-merge_status_e
-merge_n_files(int out_fd, int in_file_count, char *const *in_filenames,
- int file_type, gboolean do_append, int *err, gchar **err_info,
- int *err_fileno)
-{
- merge_in_file_t *in_files = NULL;
- merge_out_file_t out_file;
- gboolean ret;
- int close_err;
-
- /* open the input files */
- in_file_count = merge_open_in_files(in_file_count, in_filenames, &in_files,
- err, err_info, err_fileno);
- if (in_file_count < 2) {
- if (merge_verbose == VERBOSE_ALL)
- fprintf(stderr, "mergecap: Not all input files valid\n");
- free(in_files);
- return MERGE_OPEN_INPUT_FAILED;
- }
-
- if (!merge_open_outfile(&out_file, out_fd, file_type,
- merge_select_frame_type(in_file_count, in_files),
- merge_max_snapshot_length(in_file_count, in_files), err)) {
- merge_close_in_files(in_file_count, in_files);
- free(in_files);
- return MERGE_OPEN_OUTPUT_FAILED;
- }
-
- /* do the merge (or append) */
- if (do_append)
- ret = merge_append_files(in_file_count, in_files, &out_file, err);
- else
- ret = merge_files(in_file_count, in_files, &out_file, err);
-
- merge_close_in_files(in_file_count, in_files);
- if (ret)
- ret = merge_close_outfile(&out_file, err);
- else
- merge_close_outfile(&out_file, &close_err);
-
- free(in_files);
-
- return ret ? MERGE_SUCCESS : MERGE_WRITE_FAILED;
-}