Skip to content
Snippets Groups Projects
Commit dc923030 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix user-defined functions: text mode messes up fsetpos/getpos: weird

parent 58447802
No related branches found
No related tags found
No related merge requests found
// $Id: OpenFile.cpp,v 1.91 2006-02-25 07:22:11 geuzaine Exp $
// $Id: OpenFile.cpp,v 1.92 2006-02-25 07:32:42 geuzaine Exp $
//
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
//
......@@ -141,7 +141,9 @@ int ParseFile(char *f, int silent, int close, int warn_if_missing)
FILE *yyin_old, *fp;
int yylineno_old, yyerrorstate_old, numviews_old, status;
if(!(fp = fopen(f, "r"))){
// add 'b' for pure Windows programs: opening in text mode messes up
// fsetpos/fgetpos (used e.g. for user-defined functions)
if(!(fp = fopen(f, "rb"))){
if(warn_if_missing)
Msg(WARNING, "Unable to open file '%s'", f);
return 0;
......@@ -242,7 +244,7 @@ int MergeProblem(char *name, int warn_if_missing)
int status;
FILE *fp;
// add 'b' for pure Windows programs, since some of these files
// added 'b' for pure Windows programs, since some of these files
// contain binary data
if(!(fp = fopen(name, "rb"))){
if(warn_if_missing)
......
$Id: TODO,v 1.123 2006-02-25 07:02:20 geuzaine Exp $
$Id: TODO,v 1.124 2006-02-25 07:32:42 geuzaine Exp $
********************************************************************
......@@ -37,11 +37,6 @@ curve/surface/volume or loop over all elements.)
********************************************************************
On Windows WITHOUT Cygwin:
- Functions in parser don't seem to work
********************************************************************
allow mixed 1st/2nd order meshes (2nd order only where the geometry
requires it). Add this as an advanced option since it will create
meshes with hanging nodes.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment