1#ifndef _RHEOLEF_SCATCH_ICC
2#define _RHEOLEF_SCATCH_ICC
37 if (stat(filename.c_str(), &s) != 0) {
44scatch (istream& in,
const string& ch,
bool full_match)
47 unsigned int l = ch.length();
48 if (l == 0)
return true;
52 unsigned int state = 0;
53 const char *
p = ch.c_str();
69 }
else if (state != 0 && ch[0] == c) {
73 }
else if (state != 0) {
79 while (state < l && in.get(c) && in.good());
81 if (!full_match)
return (state == l);
82 if (state != l)
return false;
86 if (!c || !in.good())
return true;
87 if (isspace(c))
return true;
This file is part of Rheolef.
bool scatch(std::istream &in, const std::string &ch, bool full_match=true)
scatch: see the rheostream page for the full documentation
bool file_exists(const std::string &filename)
file_exists: see the rheostream page for the full documentation