}
// Replace the "-" with a special pointer, which is
- // recognized by process_file() and other things.
+ // recognized by coder_run() and other things.
// This way error messages get a proper filename
// string and the code still knows that it is
// handling the special case of stdin.
}
// Do the actual compression or uncompression.
- process_file(args.arg_names[i]);
+ coder_run(args.arg_names[i]);
}
// If --files or --files0 was used, process the filenames from the
// read_name() doesn't return empty names.
assert(name[0] != '\0');
- process_file(name);
+ coder_run(name);
}
if (args.files_name != stdin_filename)
static bool
-coder_run(file_pair *pair)
+coder_main(file_pair *pair)
{
// Buffers to hold input and output data.
uint8_t in_buf[IO_BUFFER_SIZE];
extern void
-process_file(const char *filename)
+coder_run(const char *filename)
{
// First try initializing the coder. If it fails, it's useless to try
// opening the file. Check also for user_abort just in case if we had
return;
// Do the actual coding.
- const bool success = coder_run(pair);
+ const bool success = coder_main(pair);
// Close the file pair. It needs to know if coding was successful to
// know if the source or target file should be unlinked.
///
extern void coder_set_compression_settings(void);
-extern void process_init(void);
-
-extern void process_file(const char *filename);
+/// Compress or decompress the given file
+extern void coder_run(const char *filename);