X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=blobdiff_plain;f=util%2Fsrwtst.c;h=9208cd68c8fb8b9f44796cd7ea9e40916aee6de6;hp=7de077c08847ce4afaf92babb9c5256b1b117f44;hb=7ef1b50f481cda83d012cc3d69d83f9313836f1f;hpb=1ffd6698cc631866391bf0d646f58907c32ab086 diff --git a/util/srwtst.c b/util/srwtst.c index 7de077c..9208cd6 100644 --- a/util/srwtst.c +++ b/util/srwtst.c @@ -74,8 +74,11 @@ int main(int argc, char **argv) { fprintf (stderr, "%d\n", i); if (res->records[i].recordData_buf) - fwrite(res->records[i].recordData_buf, 1, - res->records[i].recordData_len, stderr); + { + fprintf(stderr, "%.*s", + res->records[i].recordData_len, + res->records[i].recordData_buf); + } } } } @@ -85,7 +88,9 @@ int main(int argc, char **argv) ret = z_soap_codec(encode, &soap_package, &content_buf, &content_len, h); if (content_buf && content_len) - fwrite (content_buf, content_len, 1, stdout); + { + printf("%.*s", content_len, content_buf); + } else { fprintf(stderr, "No output!\n");