add isl_cat test application
authorSven Verdoolaege <skimo@kotnet.org>
Sun, 24 Jan 2010 21:08:27 +0000 (22:08 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 25 Jan 2010 17:29:21 +0000 (18:29 +0100)
Makefile.am
cat.c [new file with mode: 0644]

index c4769c1..4c0cf46 100644 (file)
@@ -6,7 +6,7 @@ ACLOCAL_AMFLAGS = -I m4
 lib_LTLIBRARIES = libisl.la
 noinst_PROGRAMS = isl_test isl_polyhedron_sample isl_pip \
        isl_polyhedron_minimize isl_polytope_scan \
-       isl_polyhedron_detect_equalities
+       isl_polyhedron_detect_equalities isl_cat
 TESTS = isl_test
 
 if HAVE_PIPLIB
@@ -120,6 +120,12 @@ isl_polyhedron_detect_equalities_LDADD = libisl.la
 isl_polyhedron_detect_equalities_SOURCES = \
        polyhedron_detect_equalities.c
 
+isl_cat_CPPFLAGS = -I$(srcdir)/include -Iinclude/ \
+       @GMP_CPPFLAGS@
+isl_cat_LDADD = libisl.la
+isl_cat_SOURCES = \
+       cat.c
+
 nodist_pkginclude_HEADERS = \
        include/isl_config.h \
        include/isl_stdint.h
diff --git a/cat.c b/cat.c
new file mode 100644 (file)
index 0000000..09a4a10
--- /dev/null
+++ b/cat.c
@@ -0,0 +1,17 @@
+#include <isl_map.h>
+
+int main(int argc, char **argv)
+{
+       struct isl_ctx *ctx;
+       struct isl_map *map;
+
+       ctx = isl_ctx_alloc();
+
+       map = isl_map_read_from_file(ctx, stdin, -1);
+       isl_map_print(map, stdout, 0, ISL_FORMAT_ISL);
+       isl_map_free(map);
+
+       isl_ctx_free(ctx);
+
+       return 0;
+}