[evolution-ews/gnome-3-8] Add standalone LZX decompress test (cherry picked from commit 0aadc72c4499b05563d9e8908902572ca5de73



commit 12917b6841e825019e84c9e83dadedd492a774be
Author: David Woodhouse <David Woodhouse intel com>
Date:   Wed May 1 21:53:29 2013 +0100

    Add standalone LZX decompress test
    (cherry picked from commit 0aadc72c4499b05563d9e8908902572ca5de738d)

 src/addressbook/lzx/Makefile.am               |   13 +++++++++++++
 src/addressbook/lzx/ews-oal-decompress.c      |   20 --------------------
 src/addressbook/lzx/gal-lzx-decompress-test.c |   19 +++++++++++++++++++
 3 files changed, 32 insertions(+), 20 deletions(-)
---
diff --git a/src/addressbook/lzx/Makefile.am b/src/addressbook/lzx/Makefile.am
index 8b0871a..8e21251 100644
--- a/src/addressbook/lzx/Makefile.am
+++ b/src/addressbook/lzx/Makefile.am
@@ -23,4 +23,17 @@ liblzx_la_LIBADD = \
        $(LIBM) \
        $(NULL)
 
+noinst_PROGRAMS = gal-lzx-decompress-test
+
+gal_lzx_decompress_test_CPPFLAGS = \
+       $(AM_CPPFLAGS) \
+       $(GNOME_PLATFORM_CFLAGS) \
+       $(NULL)
+
+gal_lzx_decompress_test_SOURCES = \
+       gal-lzx-decompress-test.c
+
+gal_lzx_decompress_test_LDADD = \
+       liblzx.la
+
 -include $(top_srcdir)/git.mk
diff --git a/src/addressbook/lzx/ews-oal-decompress.c b/src/addressbook/lzx/ews-oal-decompress.c
index ec4f683..219c2c1 100644
--- a/src/addressbook/lzx/ews-oal-decompress.c
+++ b/src/addressbook/lzx/ews-oal-decompress.c
@@ -262,23 +262,3 @@ exit:
 
        return ret;
 }
-
-/*
-gint
-main (gint argc,
-      gchar *argv[])
-{
-       if (argc != 3) {
-               g_print ("Pass an lzx file and an output filename as argument \n");
-               return;
-       }
-
-       g_type_init ();
-
-       if (oal_decompress_v4_full_detail_file (argv[1], argv[2], NULL))
-               g_print ("Successfully decompressed \n");
-       else
-               g_print ("decompression failed \n");
-
-       return 0;
-} */
diff --git a/src/addressbook/lzx/gal-lzx-decompress-test.c b/src/addressbook/lzx/gal-lzx-decompress-test.c
new file mode 100644
index 0000000..213aad3
--- /dev/null
+++ b/src/addressbook/lzx/gal-lzx-decompress-test.c
@@ -0,0 +1,19 @@
+
+#include "ews-oal-decompress.h"
+
+gint
+main (gint argc,
+      gchar *argv[])
+{
+       if (argc != 3) {
+               g_print ("Pass an lzx file and an output filename as argument \n");
+               return -1;
+       }
+
+       if (oal_decompress_v4_full_detail_file (argv[1], argv[2], NULL))
+               g_print ("Successfully decompressed \n");
+       else
+               g_print ("decompression failed \n");
+
+       return 0;
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]