Revision: 76737
          http://sourceforge.net/p/brlcad/code/76737
Author:   starseeker
Date:     2020-08-13 16:46:04 +0000 (Thu, 13 Aug 2020)
Log Message:
-----------
Only set mode if we're dealing with stdin/stdout

Modified Paths:
--------------
    brlcad/branches/RELEASE/src/util/cv.c

Modified: brlcad/branches/RELEASE/src/util/cv.c
===================================================================
--- brlcad/branches/RELEASE/src/util/cv.c       2020-08-13 15:26:43 UTC (rev 
76736)
+++ brlcad/branches/RELEASE/src/util/cv.c       2020-08-13 16:46:04 UTC (rev 
76737)
@@ -97,8 +97,8 @@
        }
     } else {
        outfp = stdout;
+       setmode(outfp, O_BINARY);
     }
-    setmode(outfp, O_BINARY);
 
     if (argc >= 4) {
        if ((infp = fopen(argv[3], "rb")) == NULL) {
@@ -107,8 +107,8 @@
        }
     } else {
        infp = stdin;
+       setmode(infp, O_BINARY);
     }
-    setmode(infp, O_BINARY);
 
     if (isatty(fileno(outfp))) {
        fprintf(stderr, "cv: trying to send binary output to terminal\n");

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to