003 File Manager
Current Path:
/usr/src/contrib/xz/src/common
usr
/
src
/
contrib
/
xz
/
src
/
common
/
📁
..
📄
mythread.h
(11.77 KB)
📄
sysdefs.h
(4.8 KB)
📄
tuklib_common.h
(1.86 KB)
📄
tuklib_config.h
(121 B)
📄
tuklib_cpucores.c
(2.3 KB)
📄
tuklib_cpucores.h
(606 B)
📄
tuklib_exit.c
(1.51 KB)
📄
tuklib_exit.h
(706 B)
📄
tuklib_gettext.h
(1.04 KB)
📄
tuklib_integer.h
(16.67 KB)
📄
tuklib_mbstr.h
(2.81 KB)
📄
tuklib_mbstr_fw.c
(745 B)
📄
tuklib_mbstr_width.c
(1.48 KB)
📄
tuklib_open_stdxxx.c
(1.43 KB)
📄
tuklib_open_stdxxx.h
(647 B)
📄
tuklib_physmem.c
(5.65 KB)
📄
tuklib_physmem.h
(763 B)
📄
tuklib_progname.c
(1.11 KB)
📄
tuklib_progname.h
(817 B)
Editing: tuklib_exit.c
/////////////////////////////////////////////////////////////////////////////// // /// \file tuklib_exit.c /// \brief Close stdout and stderr, and exit // // Author: Lasse Collin // // This file has been put into the public domain. // You can do whatever you want with this file. // /////////////////////////////////////////////////////////////////////////////// #include "tuklib_common.h" #include <stdlib.h> #include <stdio.h> #include <string.h> #include "tuklib_gettext.h" #include "tuklib_progname.h" #include "tuklib_exit.h" extern void tuklib_exit(int status, int err_status, int show_error) { if (status != err_status) { // Close stdout. If something goes wrong, // print an error message to stderr. const int ferror_err = ferror(stdout); const int fclose_err = fclose(stdout); if (ferror_err || fclose_err) { status = err_status; // If it was fclose() that failed, we have the reason // in errno. If only ferror() indicated an error, // we have no idea what the reason was. if (show_error) fprintf(stderr, "%s: %s: %s\n", progname, _("Writing to standard " "output failed"), fclose_err ? strerror(errno) : _("Unknown error")); } } if (status != err_status) { // Close stderr. If something goes wrong, there's // nothing where we could print an error message. // Just set the exit status. const int ferror_err = ferror(stderr); const int fclose_err = fclose(stderr); if (fclose_err || ferror_err) status = err_status; } exit(status); }
Upload File
Create Folder