Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Unified Diff: src/lzmainfo/lzmainfo.c

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lzmainfo/lzmainfo.1 ('k') | src/lzmainfo/lzmainfo_w32res.rc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lzmainfo/lzmainfo.c
===================================================================
--- src/lzmainfo/lzmainfo.c (revision 50504)
+++ src/lzmainfo/lzmainfo.c (working copy)
@@ -20,8 +20,13 @@
#include "tuklib_progname.h"
#include "tuklib_exit.h"
+#ifdef TUKLIB_DOSLIKE
+# include <fcntl.h>
+# include <io.h>
+#endif
-static void lzma_attribute((noreturn))
+
+static void lzma_attribute((__noreturn__))
help(void)
{
printf(
@@ -40,10 +45,10 @@
}
-static void lzma_attribute((noreturn))
+static void lzma_attribute((__noreturn__))
version(void)
{
- puts("lzmainfo (" PACKAGE_NAME ") " PACKAGE_VERSION);
+ puts("lzmainfo (" PACKAGE_NAME ") " LZMA_VERSION_STRING);
tuklib_exit(EXIT_SUCCESS, EXIT_FAILURE, true);
}
@@ -150,7 +155,7 @@
lzma_options_lzma *opt = filter.options;
printf("\nDictionary size: "
- "%u MB (2^%u bytes)\n"
+ "%" PRIu32 " MB (2^%" PRIu32 " bytes)\n"
"Literal context bits (lc): %" PRIu32 "\n"
"Literal pos bits (lp): %" PRIu32 "\n"
"Number of pos bits (pb): %" PRIu32 "\n",
@@ -171,6 +176,10 @@
parse_args(argc, argv);
+#ifdef TUKLIB_DOSLIKE
+ setmode(fileno(stdin), O_BINARY);
+#endif
+
int ret = EXIT_SUCCESS;
// We print empty lines around the output only when reading from
« no previous file with comments | « src/lzmainfo/lzmainfo.1 ('k') | src/lzmainfo/lzmainfo_w32res.rc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698