xzdec.c (213700) | xzdec.c (223935) |
---|---|
1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file xzdec.c 4/// \brief Simple single-threaded tool to uncompress .xz or .lzma files 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 26 unchanged lines hidden (view full) --- 35#endif 36 37 38/// Error messages are suppressed if this is zero, which is the case when 39/// --quiet has been given at least twice. 40static unsigned int display_errors = 2; 41 42 | 1/////////////////////////////////////////////////////////////////////////////// 2// 3/// \file xzdec.c 4/// \brief Simple single-threaded tool to uncompress .xz or .lzma files 5// 6// Author: Lasse Collin 7// 8// This file has been put into the public domain. --- 26 unchanged lines hidden (view full) --- 35#endif 36 37 38/// Error messages are suppressed if this is zero, which is the case when 39/// --quiet has been given at least twice. 40static unsigned int display_errors = 2; 41 42 |
43static void lzma_attribute((format(printf, 1, 2))) | 43static void lzma_attribute((__format__(__printf__, 1, 2))) |
44my_errorf(const char *fmt, ...) 45{ 46 va_list ap; 47 va_start(ap, fmt); 48 49 if (display_errors) { 50 fprintf(stderr, "%s: ", progname); 51 vfprintf(stderr, fmt, ap); 52 fprintf(stderr, "\n"); 53 } 54 55 va_end(ap); 56 return; 57} 58 59 | 44my_errorf(const char *fmt, ...) 45{ 46 va_list ap; 47 va_start(ap, fmt); 48 49 if (display_errors) { 50 fprintf(stderr, "%s: ", progname); 51 vfprintf(stderr, fmt, ap); 52 fprintf(stderr, "\n"); 53 } 54 55 va_end(ap); 56 return; 57} 58 59 |
60static void lzma_attribute((noreturn)) | 60static void lzma_attribute((__noreturn__)) |
61help(void) 62{ 63 printf( 64"Usage: %s [OPTION]... [FILE]...\n" 65"Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n" 66"\n" 67" -c, --stdout (ignored)\n" 68" -d, --decompress (ignored)\n" --- 7 unchanged lines hidden (view full) --- 76"\n" 77"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n" 78PACKAGE_NAME " home page: <" PACKAGE_URL ">\n", progname); 79 80 tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); 81} 82 83 | 61help(void) 62{ 63 printf( 64"Usage: %s [OPTION]... [FILE]...\n" 65"Uncompress files in the ." TOOL_FORMAT " format to the standard output.\n" 66"\n" 67" -c, --stdout (ignored)\n" 68" -d, --decompress (ignored)\n" --- 7 unchanged lines hidden (view full) --- 76"\n" 77"Report bugs to <" PACKAGE_BUGREPORT "> (in English or Finnish).\n" 78PACKAGE_NAME " home page: <" PACKAGE_URL ">\n", progname); 79 80 tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); 81} 82 83 |
84static void lzma_attribute((noreturn)) | 84static void lzma_attribute((__noreturn__)) |
85version(void) 86{ 87 printf(TOOL_FORMAT "dec (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n" 88 "liblzma %s\n", lzma_version_string()); 89 90 tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); 91} 92 --- 231 unchanged lines hidden --- | 85version(void) 86{ 87 printf(TOOL_FORMAT "dec (" PACKAGE_NAME ") " LZMA_VERSION_STRING "\n" 88 "liblzma %s\n", lzma_version_string()); 89 90 tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, display_errors); 91} 92 --- 231 unchanged lines hidden --- |