XZ Utils  5.2.7
Functions | Variables
main.c File Reference

main() More...

#include "private.h"
#include <ctype.h>

Functions

void set_exit_status (enum exit_status_type new_status)
 
void set_exit_no_warn (void)
 
static const char * read_name (const args_info *args)
 
int main (int argc, char **argv)
 

Variables

static enum exit_status_type exit_status = E_SUCCESS
 Exit status to use. This can be changed with set_exit_status(). More...
 
static bool no_warn = false
 

Detailed Description

main()

Function Documentation

◆ set_exit_status()

void set_exit_status ( enum exit_status_type  new_status)

Sets the exit status after a warning or error has occurred. If new_status is E_WARNING and the old exit status was already E_ERROR, the exit status is not changed.

Referenced by signals_exit().

◆ set_exit_no_warn()

void set_exit_no_warn ( void  )

Use E_SUCCESS instead of E_WARNING if something worth a warning occurs but nothing worth an error has occurred. This is called when –no-warn is specified.

References no_warn.

Variable Documentation

◆ exit_status

enum exit_status_type exit_status = E_SUCCESS
static

Exit status to use. This can be changed with set_exit_status().

◆ no_warn

bool no_warn = false
static

True if –no-warn is specified. When this is true, we don't set the exit status to E_WARNING when something worth a warning happens.

Referenced by set_exit_no_warn().