diff options
author | Petri Lehtinen <petri@digip.org> | 2009-07-13 10:31:42 +0300 |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2009-07-13 21:45:16 +0300 |
commit | 4c414bdd6d1038195bb6a125fc86eb68d67857e3 (patch) | |
tree | 394d1e5b7d903e77a6cd0d2e569572bf9b1218b2 /test | |
parent | 1b67edb54df7d82e5aa75e92732a1ed809422dbf (diff) | |
download | jansson-4c414bdd6d1038195bb6a125fc86eb68d67857e3.zip jansson-4c414bdd6d1038195bb6a125fc86eb68d67857e3.tar.gz jansson-4c414bdd6d1038195bb6a125fc86eb68d67857e3.tar.bz2 |
Get rid of json_dumpfd and json_loadfd
fdopen() makes supporting separate API for file descriptors useless.
Supporting fd's also makes Jansson less portable.
Diffstat (limited to 'test')
-rw-r--r-- | test/.gitignore | 1 | ||||
-rw-r--r-- | test/Makefile.am | 2 | ||||
-rw-r--r-- | test/loadfd_dumpfd.c | 25 | ||||
-rw-r--r-- | test/run-test | 1 |
4 files changed, 1 insertions, 28 deletions
diff --git a/test/.gitignore b/test/.gitignore index 5147f3a..ede052b 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,4 +1,3 @@ load_dump loadf_dumpf -loadfd_dumpfd loads_dumps diff --git a/test/Makefile.am b/test/Makefile.am index 132c133..188fb97 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,4 +1,4 @@ -check_PROGRAMS = load_dump loadf_dumpf loadfd_dumpfd loads_dumps +check_PROGRAMS = load_dump loadf_dumpf loads_dumps AM_CPPFLAGS = -I$(top_srcdir)/src AM_CFLAGS = -Wall -Werror diff --git a/test/loadfd_dumpfd.c b/test/loadfd_dumpfd.c deleted file mode 100644 index 0faf0c6..0000000 --- a/test/loadfd_dumpfd.c +++ /dev/null @@ -1,25 +0,0 @@ -#include <stdio.h> -#include <unistd.h> -#include <jansson.h> - -int main(int argc, char *argv[]) -{ - json_t *json; - json_error_t error; - - if(argc != 1) { - fprintf(stderr, "usage: %s\n", argv[0]); - return 2; - } - - json = json_loadfd(STDIN_FILENO, &error); - if(!json) { - fprintf(stderr, "%d\n%s\n", error.line, error.text); - return 1; - } - - json_dumpfd(json, STDOUT_FILENO, 0); - json_decref(json); - - return 0; -} diff --git a/test/run-test b/test/run-test index 79d955a..c0db36a 100644 --- a/test/run-test +++ b/test/run-test @@ -26,6 +26,5 @@ ${srcdir}/split-testfile.py $TESTFILE $TMPDIR | \ while read input output; do run_test load_dump $input $output run_test loadf_dumpf $input $output - run_test loadfd_dumpfd $input $output run_test loads_dumps $input $output done |