19 #if defined(_WIN32) && !defined(__CYGWIN__)
22 static CRITICAL_SECTION exit_status_cs;
35 #if defined(_WIN32) && !defined(__CYGWIN__)
36 EnterCriticalSection(&exit_status_cs);
42 #if defined(_WIN32) && !defined(__CYGWIN__)
43 LeaveCriticalSection(&exit_status_cs);
66 static size_t size = 256;
81 const int c = fgetc(
args->files_file);
83 if (ferror(
args->files_file)) {
90 args->files_name, strerror(errno));
94 if (feof(
args->files_file)) {
97 "when reading filenames"),
103 if (
c ==
args->files_delim) {
121 "reading filenames; maybe you meant "
122 "to use `--files0' instead "
123 "of `--files'?"),
args->files_name);
145 #if defined(_WIN32) && !defined(__CYGWIN__)
146 InitializeCriticalSection(&exit_status_cs);
175 "are not supported yet."));
188 && strcmp(
args.arg_names[0],
"-") == 0)) {
208 #ifdef ENABLE_SANDBOX
237 if (strcmp(
"-",
args.arg_names[
i]) == 0) {
253 "standard input when "
255 "from standard input"));
288 (void)fclose(
args.files_file);
314 #if defined(_WIN32) && !defined(__CYGWIN__)
315 EnterCriticalSection(&exit_status_cs);
320 #if defined(_WIN32) && !defined(__CYGWIN__)
321 LeaveCriticalSection(&exit_status_cs);
void args_parse(args_info *args, int argc, char **argv)
const char stdin_filename[]
void coder_free(void)
Free the memory allocated for the coder and kill the worker threads.
void coder_run(const char *filename)
Compress or decompress the given file.
enum operation_mode opt_mode
void io_init(void)
Initialize the I/O module.
void * xrealloc(void *, size_t)
int main(int argc, const char **argv)
static static fork const void static count static fd const char const char static newpath char char argv
exit_status_type
Possible exit status values. These are the same as used by gzip and bzip2.
assert(limit<=UINT32_MAX/2)
void message_set_files(unsigned int files)
Set the total number of files to be processed.
void message_init(void)
Initializes the message functions.
void message_error(const char *fmt,...)
void message_try_help(void)
Print a message that user should try –help.
void message_fatal(const char *fmt,...)
enum message_verbosity message_verbosity_get(void)
Get the current verbosity level.
static int run(int i, const char *arg)
volatile sig_atomic_t user_abort
void list_file(const char *filename)
List information about the given .xz file.
void list_totals(void)
Show the totals after all files have been listed.
void set_exit_no_warn(void)
static const char * read_name(const args_info *args)
void set_exit_status(enum exit_status_type new_status)
static enum exit_status_type exit_status
Exit status to use. This can be changed with set_exit_status().
Common includes, definitions, and prototypes.
bool is_tty_stdin(void)
Test if stdin is a terminal.
bool is_tty_stdout(void)
Test if stdout is a terminal.
#define tuklib_gettext_init(package, localedir)
#define tuklib_progname_init