Subversion Repositories gelsvn

Rev

Rev 30 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 30 Rev 37
Line 9... Line 9...
9
namespace
9
namespace
10
{
10
{
11
 
11
 
12
	bool Comp(istreambuf_iterator<char>& Itt,const string str)
12
	bool Comp(istreambuf_iterator<char>& Itt,const string str)
13
	{
13
	{
-
 
14
		
14
		int cChar=0;
15
		int cChar=0;
15
		bool Ret=true;
16
		bool Ret=true;
16
		while(cChar<str.size() && Ret)
17
		while(cChar<str.size() && Ret)
17
		{
18
		{
18
			Ret=(*Itt==str[cChar]);
19
			Ret=(*Itt==str[cChar]);
Line 49... Line 50...
49
			  const std::string& VarName,
50
			  const std::string& VarName,
50
			  const std::string& FileName,
51
			  const std::string& FileName,
51
			  const bool append,
52
			  const bool append,
52
			  const std::string& Comment)
53
			  const std::string& Comment)
53
{
54
{
54
	std::_Ios_Openmode nMode;
55
	long nMode;
55
	if(append)
56
	if(append)
56
		nMode=std::ios::app;
57
		nMode=std::ios::app;
57
	else
58
	else
58
		nMode=std::ios::trunc;
59
		nMode=std::ios::trunc;
59
	std::ofstream Mfile(FileName.c_str(),nMode);
60
	std::ofstream Mfile(FileName.c_str(), nMode);
60
 
61
	
61
	
62
	
62
	if(!Comment.empty())
63
	if(!Comment.empty())
63
		Mfile << "% " << Comment.c_str() << "\n";
64
		Mfile << "% " << Comment.c_str() << "\n";
64
	Mfile << VarName.c_str() << "=[";
65
	Mfile << VarName.c_str() << "=[";
65
	
66