diff options
author | tlatorre <tlatorre@uchicago.edu> | 2018-12-03 10:18:20 -0600 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2018-12-03 10:18:20 -0600 |
commit | 05b1b58938c9ca1518895efb7a4d962256b35a67 (patch) | |
tree | 0a72d4dd223ed20b3610d71c9b5cdb76dc694b56 | |
parent | 7e7614fbc9ad0f6cb3e65912134069082109fd6e (diff) | |
download | sddm-05b1b58938c9ca1518895efb7a4d962256b35a67.tar.gz sddm-05b1b58938c9ca1518895efb7a4d962256b35a67.tar.bz2 sddm-05b1b58938c9ca1518895efb7a4d962256b35a67.zip |
fix test-zebra
-rw-r--r-- | src/Makefile | 2 | ||||
-rw-r--r-- | src/Muons.zdab | bin | 0 -> 353280 bytes | |||
-rw-r--r-- | src/test-zebra.c | 5 | ||||
-rw-r--r-- | src/zebra.c | 2 |
4 files changed, 7 insertions, 2 deletions
diff --git a/src/Makefile b/src/Makefile index c44c172..9bae25e 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ release_hdr := $(shell sh -c './mkreleasehdr.sh') CFLAGS=-O2 -Wall -g -DSWAP_BYTES LDLIBS=-lm -lgsl -lgslcblas -lnlopt_cxx -lstdc++ -all: test test-vector test-likelihood fit test-charge test-path calculate-csda-range test-time-pdf +all: test test-vector test-likelihood fit test-charge test-path calculate-csda-range test-time-pdf test-zebra Makefile.dep: -$(CC) -MM *.c > Makefile.dep diff --git a/src/Muons.zdab b/src/Muons.zdab Binary files differnew file mode 100644 index 0000000..c9e7295 --- /dev/null +++ b/src/Muons.zdab diff --git a/src/test-zebra.c b/src/test-zebra.c index 10eb147..ffd0c50 100644 --- a/src/test-zebra.c +++ b/src/test-zebra.c @@ -13,6 +13,11 @@ int test_zdab(char *err) zebraFile *z = zebra_open("Muons.zdab"); + if (!z) { + sprintf(err, "%s", zebra_err); + return 1; + } + while (1) { rv = next_bank(z, &b); diff --git a/src/zebra.c b/src/zebra.c index aacf1ef..4ce51a2 100644 --- a/src/zebra.c +++ b/src/zebra.c @@ -13,7 +13,7 @@ zebraFile *zebra_open(const char *filename) FILE *f = fopen(filename, "r"); if (!f) { - sprintf(zebra_err, "failed to open '%s': %s\n", filename, strerror(errno)); + sprintf(zebra_err, "failed to open '%s': %s", filename, strerror(errno)); return NULL; } |