Revision: 5703
http://winmerge.svn.sourceforge.net/winmerge/?rev=5703&view=rev
Author: kimmov
Date: 2008-07-30 12:09:30 +0000 (Wed, 30 Jul 2008)
Log Message:
-----------
Remove unused (only usage was in unused code) sbuffer class.
Modified Paths:
--------------
trunk/Src/Common/UniFile.cpp
trunk/Src/Common/UniFile.h
trunk/Src/Merge.vcproj
Removed Paths:
-------------
trunk/Src/Common/sbuffer.h
Modified: trunk/Src/Common/UniFile.cpp
===================================================================
--- trunk/Src/Common/UniFile.cpp 2008-07-30 11:13:18 UTC (rev 5702)
+++ trunk/Src/Common/UniFile.cpp 2008-07-30 12:09:30 UTC (rev 5703)
@@ -923,16 +923,6 @@
ASSERT(0); // unimplemented -- currently cannot read from a UniStdioFile!
return FALSE;
}
-BOOL UniStdioFile::ReadString(sbuffer & sline, bool * lossy)
-{
- ASSERT(0); // unimplemented -- currently cannot read from a UniStdioFile!
- return FALSE;
-}
-BOOL UniStdioFile::ReadString(sbuffer & sline, String & eol, bool * lossy)
-{
- ASSERT(0); // unimplemented -- currently cannot read from a UniStdioFile!
- return FALSE;
-}
/** @brief Write BOM (byte order mark) if Unicode file */
int UniStdioFile::WriteBom()
Modified: trunk/Src/Common/UniFile.h
===================================================================
--- trunk/Src/Common/UniFile.h 2008-07-30 11:13:18 UTC (rev 5702)
+++ trunk/Src/Common/UniFile.h 2008-07-30 12:09:30 UTC (rev 5703)
@@ -12,7 +12,6 @@
#ifndef UniFile_h_included
#define UniFile_h_included
-#include "sbuffer.h"
#include "unicoder.h"
/**
@@ -191,10 +190,8 @@
protected:
virtual BOOL ReadString(String & line, bool * lossy);
virtual BOOL ReadString(String & line, String & eol, bool * lossy);
-public:
- virtual BOOL ReadString(sbuffer & line, bool * lossy);
- virtual BOOL ReadString(sbuffer & line, String & eol, bool * lossy);
+public:
virtual __int64 GetPosition() const;
virtual int WriteBom();
Deleted: trunk/Src/Common/sbuffer.h
===================================================================
--- trunk/Src/Common/sbuffer.h 2008-07-30 11:13:18 UTC (rev 5702)
+++ trunk/Src/Common/sbuffer.h 2008-07-30 12:09:30 UTC (rev 5703)
@@ -1,88 +0,0 @@
-/**
- * @file sbuffer.h
- *
- * @brief Declaration file for sbuffer class
- *
- * @date Created: 2003-10-09 (Perry Rapp)
- */
-// RCS ID line follows -- this is updated by CVS
-// $Id$
-
-#ifndef sbuffer_h_included
-#define sbuffer_h_included
-
-
-/**
- * @brief Primitive string that grows with exponential allocation
- */
-class sbuffer
-{
-public:
- sbuffer(UINT init)
- {
- m_size = init;
- m_buff = new TCHAR[m_size];
- m_len = 0;
- }
- ~sbuffer()
- {
- delete m_buff;
- m_buff = 0;
- }
- void Append(LPCTSTR sz)
- {
- CString str = sz;
- Append(str);
- }
- void Append(const CString & s)
- {
- if (s.GetLength() + m_len > m_size-1)
- {
- do
- {
- m_size = m_size * 2;
- }
- while (s.GetLength() + m_len > m_size-1);
- TCHAR * newbuff = new TCHAR[m_size];
- _tcscpy(newbuff, m_buff);
- delete[] m_buff;
- m_buff = newbuff;
- }
- _tcscpy(&m_buff[m_len], s);
- m_len += s.GetLength();
- }
- void Clear() { m_buff[0] = 0; m_len = 0; }
- void Set(LPCTSTR sztext)
- {
- Clear();
- Append(sztext);
- }
- BOOL StartsWithInsensitive(const CString & prefix)
- {
- return (0 == _tcsnicmp(GetData(), prefix, prefix.GetLength()));
- }
- CString Left(int len)
- {
- CString s;
- LPTSTR sz = s.GetBuffer(len+1);
- _tcsncpy(sz, GetData(), len);
- sz[len] = 0;
- s.ReleaseBuffer();
- return s;
- }
- // get data length
- int GetLength() const { return m_len; }
-
- // TRUE if zero length
- BOOL IsEmpty() const { return m_len==0; }
-
- LPCTSTR GetData() const { return m_buff; }
-
-// Implementation data
-private:
- TCHAR * m_buff;
- UINT m_len;
- UINT m_size;
-};
-
-#endif // sbuffer_h_included
Modified: trunk/Src/Merge.vcproj
===================================================================
--- trunk/Src/Merge.vcproj 2008-07-30 11:13:18 UTC (rev 5702)
+++ trunk/Src/Merge.vcproj 2008-07-30 12:09:30 UTC (rev 5703)
@@ -6392,9 +6392,6 @@
RelativePath="SaveClosingDlg.h">
</File>
<File
- RelativePath="Common\sbuffer.h">
- </File>
- <File
RelativePath="Common\scbarcf.h">
</File>
<File
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|