Revision: 76541
          http://sourceforge.net/p/brlcad/code/76541
Author:   brlcad
Date:     2020-07-28 04:03:18 +0000 (Tue, 28 Jul 2020)
Log Message:
-----------
obj parser is set up to already handle either mode, so make them consistently 
use binary

Modified Paths:
--------------
    brlcad/trunk/src/libgcv/plugins/obj/obj_read.c
    brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_parser.cpp

Modified: brlcad/trunk/src/libgcv/plugins/obj/obj_read.c
===================================================================
--- brlcad/trunk/src/libgcv/plugins/obj/obj_read.c      2020-07-28 02:15:47 UTC 
(rev 76540)
+++ brlcad/trunk/src/libgcv/plugins/obj/obj_read.c      2020-07-28 04:03:18 UTC 
(rev 76541)
@@ -3527,7 +3527,7 @@
        FILE *my_stream;
        int parse_err;
 
-       if (!(my_stream = fopen(source_path, "r"))) {
+       if (!(my_stream = fopen(source_path, "rb"))) {
            perror("libgcv");
            bu_log("Cannot open input file (%s)\n", source_path);
            obj_parser_destroy(ga.parser);
@@ -3589,7 +3589,7 @@
        obj_parser_destroy(parser);
        return 0;
     }
-    if (!(fp = fopen(source_path, "r"))) {
+    if (!(fp = fopen(source_path, "rb"))) {
        obj_parser_destroy(parser);
        return 0;
     }

Modified: brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_parser.cpp
===================================================================
--- brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_parser.cpp    2020-07-28 
02:15:47 UTC (rev 76540)
+++ brlcad/trunk/src/libgcv/plugins/obj/wfobj/obj_parser.cpp    2020-07-28 
04:03:18 UTC (rev 76541)
@@ -87,7 +87,7 @@
 
     node.lineno = 1;
 
-    FILE *file = fopen(filename.c_str(), "r");
+    FILE *file = fopen(filename.c_str(), "rb");
 
     if (!file) {
        return errno;

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