From 3467a54965e532c07d43784609ddc05b54e958e5 Mon Sep 17 00:00:00 2001 From: krasimir Date: Thu, 26 Jan 2017 12:48:22 +0000 Subject: bring the Haskell binding a bit closer to the pure Haskell API --- src/runtime/c/utils/pgf-print.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 src/runtime/c/utils/pgf-print.c (limited to 'src/runtime/c/utils/pgf-print.c') diff --git a/src/runtime/c/utils/pgf-print.c b/src/runtime/c/utils/pgf-print.c deleted file mode 100644 index 07b343a4d..000000000 --- a/src/runtime/c/utils/pgf-print.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include - -#include -#include - -#include -#include - -int main(int argc, char* argv[]) { - // Set the character locale, so we can produce proper output. - setlocale(LC_CTYPE, ""); - - if (argc != 2) { - fprintf(stderr, "usage: %s pgf\n", argv[0]); - return EXIT_FAILURE; - } - char* filename = argv[1]; - - GuPool* pool = gu_new_pool(); - GuExn* err = gu_exn(pool); - PgfPGF* pgf = pgf_read(filename, pool, err); - int status = 0; - if (!gu_ok(err)) { - fprintf(stderr, "Reading PGF failed\n"); - status = 1; - goto fail_read; - } - GuOut* out = gu_file_out(stdout, pool); - pgf_print(pgf, out, err); - gu_out_flush(out, err); -fail_read: - gu_pool_free(pool); - return status; -} - -- cgit v1.2.3