summaryrefslogtreecommitdiff
path: root/src/modules/evas/model_savers
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-12-03 09:32:39 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-12-05 21:04:36 +0100
commit3b44645363dcdd561edd9610a64f3d2c382753a9 (patch)
tree64f6c4a580e563e79ca3f1867ae510025052fd64 /src/modules/evas/model_savers
parentd2a7882b732b4cc3a8e7b11ec1c4336bdc2029bb (diff)
efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/modules/evas/model_savers')
-rw-r--r--src/modules/evas/model_savers/obj/evas_model_save_obj.c4
-rw-r--r--src/modules/evas/model_savers/ply/evas_model_save_ply.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/evas/model_savers/obj/evas_model_save_obj.c b/src/modules/evas/model_savers/obj/evas_model_save_obj.c
index 09e5c723c6..8789ce44eb 100644
--- a/src/modules/evas/model_savers/obj/evas_model_save_obj.c
+++ b/src/modules/evas/model_savers/obj/evas_model_save_obj.c
@@ -163,7 +163,7 @@ _save_mesh(Evas_Canvas3D_Mesh_Data *pd,
163 163
164 evas_model_save_data_from_mesh(pd, f, header, &data); 164 evas_model_save_data_from_mesh(pd, f, header, &data);
165 165
166 FILE * _obj_file = fopen(_obj_file_name, "w+"); 166 FILE * _obj_file = fopen(_obj_file_name, "wb+");
167 if (!_obj_file) 167 if (!_obj_file)
168 { 168 {
169 ERR("File open '%s' for save failed", _obj_file_name); 169 ERR("File open '%s' for save failed", _obj_file_name);
@@ -191,7 +191,7 @@ _save_material(Evas_Canvas3D_Mesh_Data *pd EINA_UNUSED,
191 const char *_mtl_file_name, 191 const char *_mtl_file_name,
192 Evas_Canvas3D_Material_Data *mat) 192 Evas_Canvas3D_Material_Data *mat)
193{ 193{
194 FILE * _mtl_file = fopen(_mtl_file_name, "w+"); 194 FILE * _mtl_file = fopen(_mtl_file_name, "wb+");
195 if (!_mtl_file) 195 if (!_mtl_file)
196 { 196 {
197 ERR("File open '%s' for save failed", _mtl_file_name); 197 ERR("File open '%s' for save failed", _mtl_file_name);
diff --git a/src/modules/evas/model_savers/ply/evas_model_save_ply.c b/src/modules/evas/model_savers/ply/evas_model_save_ply.c
index 8da8f741ea..805f267bc0 100644
--- a/src/modules/evas/model_savers/ply/evas_model_save_ply.c
+++ b/src/modules/evas/model_savers/ply/evas_model_save_ply.c
@@ -75,7 +75,7 @@ evas_model_save_file_ply(const Evas_Canvas3D_Mesh *mesh,
75 if (!evas_model_save_header_from_mesh(pd, f, &header)) return; 75 if (!evas_model_save_header_from_mesh(pd, f, &header)) return;
76 evas_model_save_data_from_mesh(pd, f, header, &data); 76 evas_model_save_data_from_mesh(pd, f, header, &data);
77 77
78 FILE *_ply_file = fopen(file, "w+"); 78 FILE *_ply_file = fopen(file, "wb+");
79 if (!_ply_file) 79 if (!_ply_file)
80 { 80 {
81 ERR("File open '%s' for save failed", file); 81 ERR("File open '%s' for save failed", file);