Added CMake scripts for other platforms\nFixed some bugs that gcc complained about\nFixed CR/LF vs LF bug

This commit is contained in:
jbeder
2008-08-07 03:30:56 +00:00
parent 2601f5fd49
commit 2d93b6ce58
30 changed files with 233 additions and 82 deletions

View File

@@ -122,23 +122,23 @@ namespace YAML
// write anchor/alias
if(m_anchor != "") {
if(m_alias)
out << "*";
out << std::string("*");
else
out << "&";
out << m_anchor << " ";
out << std::string("&");
out << m_anchor << std::string(" ");
startedLine = true;
onlyOneCharOnLine = false;
}
// write tag
if(m_tag != "") {
out << "!<" << m_tag << "> ";
out << std::string("!<") << m_tag << std::string("> ");
startedLine = true;
onlyOneCharOnLine = false;
}
if(!m_pContent) {
out << std::endl;
out << std::string("\n");
} else {
m_pContent->Write(out, indent, startedLine, onlyOneCharOnLine);
}
@@ -148,8 +148,15 @@ namespace YAML
{
if(!m_pContent)
return CT_NONE;
return m_pContent->GetType();
if(m_pContent->IsScalar())
return CT_SCALAR;
else if(m_pContent->IsSequence())
return CT_SEQUENCE;
else if(m_pContent->IsMap())
return CT_MAP;
return CT_NONE;
}
// begin