mirror of https://github.com/MidnightCommander/mc
Use EXIT_FAILURE symbolic name as return code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
1c367a41fd
commit
993d678ed9
|
@ -1576,7 +1576,7 @@ get_key_code (int no_delay)
|
||||||
if (this == NULL) {
|
if (this == NULL) {
|
||||||
/* Shouldn't happen */
|
/* Shouldn't happen */
|
||||||
fputs ("Internal error\n", stderr);
|
fputs ("Internal error\n", stderr);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
goto nodelay_try_again;
|
goto nodelay_try_again;
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ tty_init (gboolean slow, gboolean ugly_lines)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
_("Screen size %dx%d is not supported.\n"
|
_("Screen size %dx%d is not supported.\n"
|
||||||
"Check the TERM environment variable.\n"), COLS, LINES);
|
"Check the TERM environment variable.\n"), COLS, LINES);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
tcgetattr (fileno (stdin), &boot_mode);
|
tcgetattr (fileno (stdin), &boot_mode);
|
||||||
|
@ -394,7 +394,7 @@ tty_lowlevel_getch (void)
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"SLang_getkey returned SLANG_GETKEY_ERROR\n"
|
"SLang_getkey returned SLANG_GETKEY_ERROR\n"
|
||||||
"Assuming EOF on stdin and exiting\n");
|
"Assuming EOF on stdin and exiting\n");
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return c;
|
return c;
|
||||||
|
|
|
@ -1309,7 +1309,7 @@ register_port (int port, int abort_if_fail)
|
||||||
else {
|
else {
|
||||||
fprintf (stderr, "Cannot register service with portmapper\n");
|
fprintf (stderr, "Cannot register service with portmapper\n");
|
||||||
if (abort_if_fail)
|
if (abort_if_fail)
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
(void) port;
|
(void) port;
|
||||||
|
@ -1403,5 +1403,5 @@ void
|
||||||
vfs_die (const char *m)
|
vfs_die (const char *m)
|
||||||
{
|
{
|
||||||
fputs (m, stderr);
|
fputs (m, stderr);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -819,7 +819,7 @@ void
|
||||||
vfs_die (const char *m)
|
vfs_die (const char *m)
|
||||||
{
|
{
|
||||||
message (D_ERROR, _("Internal error:"), "%s", m);
|
message (D_ERROR, _("Internal error:"), "%s", m);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|
|
@ -1452,7 +1452,7 @@ init_xterm_support (void)
|
||||||
if (!termvalue || !(*termvalue))
|
if (!termvalue || !(*termvalue))
|
||||||
{
|
{
|
||||||
fputs (_("The TERM environment variable is unset!\n"), stderr);
|
fputs (_("The TERM environment variable is unset!\n"), stderr);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check mouse capabilities */
|
/* Check mouse capabilities */
|
||||||
|
@ -2225,7 +2225,7 @@ mc_main__setup_by_args (int argc, char *argv[])
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fputs ("No arguments given to the viewer\n", stderr);
|
fputs ("No arguments given to the viewer\n", stderr);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
mc_run_mode = MC_RUN_VIEWER;
|
mc_run_mode = MC_RUN_VIEWER;
|
||||||
#ifdef USE_DIFF_VIEW
|
#ifdef USE_DIFF_VIEW
|
||||||
|
@ -2235,7 +2235,7 @@ mc_main__setup_by_args (int argc, char *argv[])
|
||||||
if (argc < 3)
|
if (argc < 3)
|
||||||
{
|
{
|
||||||
fputs ("There 2 files are required to diffviewer\n", stderr);
|
fputs ("There 2 files are required to diffviewer\n", stderr);
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
else if (tmp != NULL)
|
else if (tmp != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -494,7 +494,7 @@ init_subshell (void)
|
||||||
fprintf (stderr, "Cannot spawn the subshell process: %s\r\n", unix_error_string (errno));
|
fprintf (stderr, "Cannot spawn the subshell process: %s\r\n", unix_error_string (errno));
|
||||||
/* We exit here because, if the process table is full, the */
|
/* We exit here because, if the process table is full, the */
|
||||||
/* other method of running user commands won't work either */
|
/* other method of running user commands won't work either */
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subshell_pid == 0)
|
if (subshell_pid == 0)
|
||||||
|
@ -651,7 +651,7 @@ read_subshell_prompt (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fprintf (stderr, "select (FD_SETSIZE, &tmp...): %s\r\n", unix_error_string (errno));
|
fprintf (stderr, "select (FD_SETSIZE, &tmp...): %s\r\n", unix_error_string (errno));
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1033,7 +1033,7 @@ feed_subshell (int how, int fail_on_error)
|
||||||
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
||||||
fprintf (stderr, "select (FD_SETSIZE, &read_set...): %s\r\n",
|
fprintf (stderr, "select (FD_SETSIZE, &read_set...): %s\r\n",
|
||||||
unix_error_string (errno));
|
unix_error_string (errno));
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FD_ISSET (subshell_pty, &read_set))
|
if (FD_ISSET (subshell_pty, &read_set))
|
||||||
|
@ -1054,7 +1054,7 @@ feed_subshell (int how, int fail_on_error)
|
||||||
{
|
{
|
||||||
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
||||||
fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (errno));
|
fprintf (stderr, "read (subshell_pty...): %s\r\n", unix_error_string (errno));
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (how == VISIBLY)
|
if (how == VISIBLY)
|
||||||
|
@ -1071,7 +1071,7 @@ feed_subshell (int how, int fail_on_error)
|
||||||
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
||||||
fprintf (stderr, "read (subshell_pipe[READ]...): %s\r\n",
|
fprintf (stderr, "read (subshell_pipe[READ]...): %s\r\n",
|
||||||
unix_error_string (errno));
|
unix_error_string (errno));
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
subshell_cwd[bytes - 1] = 0; /* Squash the final '\n' */
|
subshell_cwd[bytes - 1] = 0; /* Squash the final '\n' */
|
||||||
|
@ -1095,7 +1095,7 @@ feed_subshell (int how, int fail_on_error)
|
||||||
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
tcsetattr (STDOUT_FILENO, TCSANOW, &shell_mode);
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
"read (STDIN_FILENO, pty_buffer...): %s\r\n", unix_error_string (errno));
|
"read (STDIN_FILENO, pty_buffer...): %s\r\n", unix_error_string (errno));
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < bytes; ++i)
|
for (i = 0; i < bytes; ++i)
|
||||||
|
|
|
@ -1422,7 +1422,7 @@ input_destroy (WInput * in)
|
||||||
if (in == NULL)
|
if (in == NULL)
|
||||||
{
|
{
|
||||||
fprintf (stderr, "Internal error: null Input *\n");
|
fprintf (stderr, "Internal error: null Input *\n");
|
||||||
exit (1);
|
exit (EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
new_input (in);
|
new_input (in);
|
||||||
|
|
Loading…
Reference in New Issue