Subversion Repositories spk

Rev

Rev 200 | Rev 211 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 200 Rev 201
Line 1129... Line 1129...
1129
	if ( filename.contains(L"::")) {
1129
	if ( filename.contains(L"::")) {
1130
		Utils::WString catfile = filename.token(L"::", 1);
1130
		Utils::WString catfile = filename.token(L"::", 1);
1131
		Utils::WString file = filename.token(L"::", 2);
1131
		Utils::WString file = filename.token(L"::", 2);
1132
 
1132
 
1133
		CCatFile newcat;
1133
		CCatFile newcat;
1134
		return newcat.addData(catfile.toString(), data, len, file.toString(), true, true);
1134
		return newcat.addData(catfile, data, len, file, true, true);
1135
	}
1135
	}
1136
	else {
1136
	else {
1137
		Utils::WString filen = filename.findReplace(L"/", L"\\");
1137
		Utils::WString filen = filename.findReplace(L"/", L"\\");
1138
		filen = filen.findReplace(L"\\\\", L"\\");
1138
		filen = filen.findReplace(L"\\\\", L"\\");
1139
 
1139
 
Line 1177... Line 1177...
1177
}
1177
}
1178
 
1178
 
1179
Utils::WString C_File::creationTimeString() const
1179
Utils::WString C_File::creationTimeString() const
1180
{
1180
{
1181
	if ( !m_tTime )
1181
	if ( !m_tTime )
1182
		return Utils::String::Null();
1182
		return Utils::WString::Null();
1183
 
1183
 
1184
	struct tm   *currDate;
1184
	struct tm   *currDate;
1185
	char    dateString[100];
1185
	char    dateString[100];
1186
 
1186
 
1187
	time_t n = m_tTime;
1187
	time_t n = m_tTime;
Line 1659... Line 1659...
1659
		if ( data[pos2] != '<' ) break;
1659
		if ( data[pos2] != '<' ) break;
1660
 
1660
 
1661
		memcpy(tag, data + pos2, pos - pos2);
1661
		memcpy(tag, data + pos2, pos - pos2);
1662
		tag[pos - pos2] = '\0';
1662
		tag[pos - pos2] = '\0';
1663
 
1663
 
1664
		Utils::String sTag(tag);
1664
		Utils::WString sTag(tag);
1665
		if ( sTag.Compare("</signature") || sTag.Compare("<signature") ) return true;
1665
		if ( sTag.Compare(L"</signature") || sTag.Compare(L"<signature") ) return true;
1666
		if ( sTag.Compare("</codearray") || sTag.Compare("<codearray") ) return false;
1666
		if ( sTag.Compare(L"</codearray") || sTag.Compare(L"<codearray") ) return false;
1667
		pos = pos2 - 1;
1667
		pos = pos2 - 1;
1668
	}
1668
	}
1669
 
1669
 
1670
	return false;
1670
	return false;
1671
}
1671
}
Line 1707... Line 1707...
1707
		if ( (pos - iStartPos) > 20 ) continue;
1707
		if ( (pos - iStartPos) > 20 ) continue;
1708
 
1708
 
1709
		// check if the tag is what we're looking for
1709
		// check if the tag is what we're looking for
1710
		memcpy(tag, data + iStartPos, pos - iStartPos);
1710
		memcpy(tag, data + iStartPos, pos - iStartPos);
1711
		tag[pos - iStartPos] = '\0';
1711
		tag[pos - iStartPos] = '\0';
1712
		Utils::String sTag(tag);
1712
		Utils::WString sTag(tag);
1713
		if ( !sTag.Compare("<version") ) continue;
1713
		if ( !sTag.Compare(L"<version") ) continue;
1714
		
1714
		
1715
		//extract the tag data
1715
		//extract the tag data
1716
		iStartPos = pos + 1;
1716
		iStartPos = pos + 1;
1717
		while ( (pos < iMax) && (data[pos] != '<') ) ++pos;
1717
		while ( (pos < iMax) && (data[pos] != '<') ) ++pos;
1718
		if ( (pos - iStartPos) > 20 ) continue;
1718
		if ( (pos - iStartPos) > 20 ) continue;
Line 1843... Line 1843...
1843
{
1843
{
1844
	(*size) = 0;
1844
	(*size) = 0;
1845
 
1845
 
1846
	Utils::WString fromFile = this->filePointer();
1846
	Utils::WString fromFile = this->filePointer();
1847
	if ( !CFileIO::Exists(fromFile) ) {
1847
	if ( !CFileIO::Exists(fromFile) ) {
1848
		if ( this->writeToFile(CPackages::tempDirectory().toString() + "bob.tmp")) {
1848
		if ( this->writeToFile(CPackages::tempDirectory() + L"bob.tmp")) {
1849
			fromFile = CPackages::tempDirectory() + L"bob.tmp";
1849
			fromFile = CPackages::tempDirectory() + L"bob.tmp";
1850
		}
1850
		}
1851
	}
1851
	}
1852
 
1852
 
1853
	fromFile = fromFile.findReplace(L"/", L"\\");
1853
	fromFile = fromFile.findReplace(L"/", L"\\");
Line 1903... Line 1903...
1903
bool C_File::BobDecompile()
1903
bool C_File::BobDecompile()
1904
{
1904
{
1905
	bool bRes=false;
1905
	bool bRes=false;
1906
 
1906
 
1907
 
1907
 
1908
	Utils::CStringList outData;
1908
	Utils::WStringList outData;
1909
	outData.pushBack("// Converted by SPK Libraries\n");
1909
	outData.pushBack(L"// Converted by SPK Libraries\n");
1910
	/*
1910
	/*
1911
	bob_with_errors *e=0;
1911
	bob_with_errors *e=0;
1912
	char *pszTime;
1912
	char *pszTime;
1913
	char *name="";
1913
	char *name="";
1914
 
1914