diff options
Diffstat (limited to 'Build/source/extra/xz/src/lzmainfo')
-rw-r--r-- | Build/source/extra/xz/src/lzmainfo/Makefile.am | 13 | ||||
-rw-r--r-- | Build/source/extra/xz/src/lzmainfo/Makefile.in | 44 | ||||
-rw-r--r-- | Build/source/extra/xz/src/lzmainfo/lzmainfo.1 | 27 | ||||
-rw-r--r-- | Build/source/extra/xz/src/lzmainfo/lzmainfo.c | 13 | ||||
-rw-r--r-- | Build/source/extra/xz/src/lzmainfo/lzmainfo_w32res.rc | 12 |
5 files changed, 72 insertions, 37 deletions
diff --git a/Build/source/extra/xz/src/lzmainfo/Makefile.am b/Build/source/extra/xz/src/lzmainfo/Makefile.am index cbc7e5c7edf..b90b3b3d642 100644 --- a/Build/source/extra/xz/src/lzmainfo/Makefile.am +++ b/Build/source/extra/xz/src/lzmainfo/Makefile.am @@ -12,14 +12,16 @@ lzmainfo_SOURCES = \ $(top_srcdir)/src/common/tuklib_progname.c \ $(top_srcdir)/src/common/tuklib_exit.c +if COND_W32 +lzmainfo_SOURCES += lzmainfo_w32res.rc +endif + lzmainfo_CPPFLAGS = \ -DLOCALEDIR=\"$(localedir)\" \ -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/liblzma/api \ - -I$(top_builddir)/lib \ - $(DYNAMIC_CPPFLAGS) + -I$(top_builddir)/lib -lzmainfo_LDFLAGS = $(DYNAMIC_LDFLAGS) lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la if COND_GNULIB @@ -30,3 +32,8 @@ lzmainfo_LDADD += $(LTLIBINTL) dist_man_MANS = lzmainfo.1 + +# Windows resource compiler support +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ diff --git a/Build/source/extra/xz/src/lzmainfo/Makefile.in b/Build/source/extra/xz/src/lzmainfo/Makefile.in index b5c08c1035b..a87db6d893b 100644 --- a/Build/source/extra/xz/src/lzmainfo/Makefile.in +++ b/Build/source/extra/xz/src/lzmainfo/Makefile.in @@ -35,7 +35,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = lzmainfo$(EXEEXT) -@COND_GNULIB_TRUE@am__append_1 = $(top_builddir)/lib/libgnu.a +@COND_W32_TRUE@am__append_1 = lzmainfo_w32res.rc +@COND_GNULIB_TRUE@am__append_2 = $(top_builddir)/lib/libgnu.a subdir = src/lzmainfo DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -51,6 +52,7 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/tuklib_common.m4 \ $(top_srcdir)/m4/tuklib_cpucores.m4 \ $(top_srcdir)/m4/tuklib_integer.m4 \ + $(top_srcdir)/m4/tuklib_mbstr.m4 \ $(top_srcdir)/m4/tuklib_physmem.m4 \ $(top_srcdir)/m4/tuklib_progname.m4 \ $(top_srcdir)/m4/visibility.m4 $(top_srcdir)/configure.ac @@ -62,16 +64,17 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) +am__lzmainfo_SOURCES_DIST = lzmainfo.c \ + $(top_srcdir)/src/common/tuklib_progname.c \ + $(top_srcdir)/src/common/tuklib_exit.c lzmainfo_w32res.rc +@COND_W32_TRUE@am__objects_1 = lzmainfo_w32res.$(OBJEXT) am_lzmainfo_OBJECTS = lzmainfo-lzmainfo.$(OBJEXT) \ lzmainfo-tuklib_progname.$(OBJEXT) \ - lzmainfo-tuklib_exit.$(OBJEXT) + lzmainfo-tuklib_exit.$(OBJEXT) $(am__objects_1) lzmainfo_OBJECTS = $(am_lzmainfo_OBJECTS) am__DEPENDENCIES_1 = lzmainfo_DEPENDENCIES = $(top_builddir)/src/liblzma/liblzma.la \ - $(am__append_1) $(am__DEPENDENCIES_1) -lzmainfo_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(lzmainfo_LDFLAGS) \ - $(LDFLAGS) -o $@ + $(am__append_2) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -86,7 +89,7 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(lzmainfo_SOURCES) -DIST_SOURCES = $(lzmainfo_SOURCES) +DIST_SOURCES = $(am__lzmainfo_SOURCES_DIST) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -138,8 +141,6 @@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ -DYNAMIC_CPPFLAGS = @DYNAMIC_CPPFLAGS@ -DYNAMIC_LDFLAGS = @DYNAMIC_LDFLAGS@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ @@ -172,6 +173,7 @@ LTLIBICONV = @LTLIBICONV@ LTLIBINTL = @LTLIBINTL@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ MSGFMT = @MSGFMT@ MSGFMT_015 = @MSGFMT_015@ @@ -201,8 +203,6 @@ RC = @RC@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ -STATIC_CPPFLAGS = @STATIC_CPPFLAGS@ -STATIC_LDFLAGS = @STATIC_LDFLAGS@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ @@ -212,6 +212,7 @@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ @@ -261,26 +262,22 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ xz = @xz@ -lzmainfo_SOURCES = \ - lzmainfo.c \ +lzmainfo_SOURCES = lzmainfo.c \ $(top_srcdir)/src/common/tuklib_progname.c \ - $(top_srcdir)/src/common/tuklib_exit.c - + $(top_srcdir)/src/common/tuklib_exit.c $(am__append_1) lzmainfo_CPPFLAGS = \ -DLOCALEDIR=\"$(localedir)\" \ -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/liblzma/api \ - -I$(top_builddir)/lib \ - $(DYNAMIC_CPPFLAGS) + -I$(top_builddir)/lib -lzmainfo_LDFLAGS = $(DYNAMIC_LDFLAGS) lzmainfo_LDADD = $(top_builddir)/src/liblzma/liblzma.la \ - $(am__append_1) $(LTLIBINTL) + $(am__append_2) $(LTLIBINTL) dist_man_MANS = lzmainfo.1 all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -356,7 +353,7 @@ clean-binPROGRAMS: rm -f $$list lzmainfo$(EXEEXT): $(lzmainfo_OBJECTS) $(lzmainfo_DEPENDENCIES) @rm -f lzmainfo$(EXEEXT) - $(lzmainfo_LINK) $(lzmainfo_OBJECTS) $(lzmainfo_LDADD) $(LIBS) + $(LINK) $(lzmainfo_OBJECTS) $(lzmainfo_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -692,6 +689,11 @@ uninstall-man: uninstall-man1 uninstall-man1 +# Windows resource compiler support +.rc.o: + $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(lzmainfo_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@ + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/Build/source/extra/xz/src/lzmainfo/lzmainfo.1 b/Build/source/extra/xz/src/lzmainfo/lzmainfo.1 index ef736a6c662..f2b93b4c643 100644 --- a/Build/source/extra/xz/src/lzmainfo/lzmainfo.1 +++ b/Build/source/extra/xz/src/lzmainfo/lzmainfo.1 @@ -4,9 +4,9 @@ .\" This file has been put into the public domain. .\" You can do whatever you want with this file. .\" -.TH LZMAINFO 1 "2009-08-13" "Tukaani" "XZ Utils" +.TH LZMAINFO 1 "2010-09-27" "Tukaani" "XZ Utils" .SH NAME -lzmainfo \- show infomation stored in the .lzma file header +lzmainfo \- show information stored in the .lzma file header .SH SYNOPSIS .B lzmainfo .RB [ \-\-help ] @@ -16,10 +16,12 @@ lzmainfo \- show infomation stored in the .lzma file header .B lzmainfo shows information stored in the .B .lzma -file header. It reads the first 13 bytes from the specified +file header. +It reads the first 13 bytes from the specified .IR file , decodes the header, and prints it to standard output in human -readable format. If no +readable format. +If no .I files are given or .I file @@ -27,16 +29,19 @@ is .BR \- , standard input is read. .PP -Usually the most interesting information is the uncompressed size and -the dictionary size. Uncompressed size can be shown only if the file is -in the non-streamed +Usually the most interesting information is +the uncompressed size and the dictionary size. +Uncompressed size can be shown only if +the file is in the non-streamed .B .lzma -format variant. The amount of memory required to decompress the file is +format variant. +The amount of memory required to decompress the file is a few dozen kilobytes plus the dictionary size. .PP .B lzmainfo -is included in XZ Utils primarily for backward compatibility with LZMA Utils. -.SH EXIT STATUS +is included in XZ Utils primarily for +backward compatibility with LZMA Utils. +.SH "EXIT STATUS" .TP .B 0 All is good. @@ -51,5 +56,5 @@ while the correct suffix would be .B MiB (2^20 bytes). This is to keep the output compatible with LZMA Utils. -.SH SEE ALSO +.SH "SEE ALSO" .BR xz (1) diff --git a/Build/source/extra/xz/src/lzmainfo/lzmainfo.c b/Build/source/extra/xz/src/lzmainfo/lzmainfo.c index af8e66cc8f9..3100dc631af 100644 --- a/Build/source/extra/xz/src/lzmainfo/lzmainfo.c +++ b/Build/source/extra/xz/src/lzmainfo/lzmainfo.c @@ -20,6 +20,11 @@ #include "tuklib_progname.h" #include "tuklib_exit.h" +#ifdef TUKLIB_DOSLIKE +# include <fcntl.h> +# include <io.h> +#endif + static void lzma_attribute((noreturn)) help(void) @@ -43,7 +48,7 @@ _("Usage: %s [--help] [--version] [FILE]...\n" 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 @@ lzmainfo(const char *name, FILE *f) 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 @@ main(int argc, char **argv) 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 diff --git a/Build/source/extra/xz/src/lzmainfo/lzmainfo_w32res.rc b/Build/source/extra/xz/src/lzmainfo/lzmainfo_w32res.rc new file mode 100644 index 00000000000..378fbe6958f --- /dev/null +++ b/Build/source/extra/xz/src/lzmainfo/lzmainfo_w32res.rc @@ -0,0 +1,12 @@ +/* + * Author: Lasse Collin + * + * This file has been put into the public domain. + * You can do whatever you want with this file. + */ + +#define MY_TYPE VFT_APP +#define MY_NAME "lzmainfo" +#define MY_SUFFIX ".exe" +#define MY_DESC "lzmainfo shows information about .lzma files" +#include "common_w32res.rc" |