summaryrefslogtreecommitdiff
path: root/graphics/asymptote/fileio.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/fileio.h')
-rw-r--r--graphics/asymptote/fileio.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/graphics/asymptote/fileio.h b/graphics/asymptote/fileio.h
index b68ba0431b..0e04088a9f 100644
--- a/graphics/asymptote/fileio.h
+++ b/graphics/asymptote/fileio.h
@@ -62,7 +62,7 @@ inline void openpipeout()
}
inline string locatefile(string name) {
- string s=settings::locateFile(name);
+ string s=settings::locateFile(name,false,"");
return s.empty() ? name : s;
}
@@ -84,7 +84,7 @@ protected:
bool standard; // Standard input/output
bool binary; // Read in binary mode.
- bool nullfield; // Used to detect a final null field in csv+line mode.
+ bool nullfield; // Used to detect null fields in line mode and cvs mode.
string whitespace;
size_t index; // Terminator index.
@@ -224,7 +224,7 @@ public:
if(errorstream::interrupt) throw interrupted();
else {
ignoreComment(val);
- val=T();
+ val=vm::Undefined;
if(!nullfield)
Read(val);
csv();
@@ -537,7 +537,11 @@ public:
}
}
void Read(char& val) {iread(val);}
- void Read(string& val) {char c; iread(c); val=c;}
+ void Read(string& val) {
+ ostringstream buf;
+ buf << fstream->rdbuf();
+ val=buf.str();
+ }
void Read(double& val) {
if(singlereal) {float fval; iread(fval); val=fval;}