X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=zoom%2Fzoomsh.c;h=363b1e0423c4948dc8e44d67242f7c7c747fc17f;hb=2cc3fc3eb644f09db82f30906e8d9a09601f544e;hp=6a376c7c28a0250169a83b2bb8d44c2c9e629da3;hpb=7ef1b50f481cda83d012cc3d69d83f9313836f1f;p=yaz-moved-to-github.git diff --git a/zoom/zoomsh.c b/zoom/zoomsh.c index 6a376c7..363b1e0 100644 --- a/zoom/zoomsh.c +++ b/zoom/zoomsh.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2008 Index Data + * Copyright (C) 1995-2009 Index Data * See the file LICENSE for details. */ @@ -207,7 +207,7 @@ static void display_records(ZOOM_connection c, schema ? schema : "unknown"); if (render) { - if (write(render, 1, len, stdout) != len) + if (fwrite(render, 1, len, stdout) != (size_t) len) { printf("write to stdout failed\n"); } @@ -215,7 +215,8 @@ static void display_records(ZOOM_connection c, printf("\n"); if (opac_render) { - if (fwrite(opac_render, 1, opac_len, stdout) != opac_len) + if (fwrite(opac_render, 1, opac_len, stdout) != (size_t) + opac_len) printf("write to stdout failed\n"); } } @@ -681,6 +682,7 @@ int main(int argc, char **argv) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab