Fix MS Visual C 6.0 library bug

This commit is contained in:
Stas Degteff 2005-10-02 11:37:36 +00:00
parent 863efacae6
commit ff570df247
2 changed files with 45 additions and 0 deletions

View File

@ -10,6 +10,10 @@ ______________________________________________________________________
Notes for GoldED+ 1.1.5, /snapshot/ Notes for GoldED+ 1.1.5, /snapshot/
______________________________________________________________________ ______________________________________________________________________
- Fix MS Visual C 6.0 library bug in vector::sort(). GoldNode+/MSVC sort
nodelist correctly with nodes quantity > 32767 now.
(Patch from Ianos Gnatiuc 2:5030/830.17)
+ Add CHS tables and XLATCHARSET lines for the double recoded russian text. + Add CHS tables and XLATCHARSET lines for the double recoded russian text.
(Tables by Eugene Palenock 2:5020/2065.468@FidoNet.) (Tables by Eugene Palenock 2:5020/2065.468@FidoNet.)

View File

@ -74,7 +74,48 @@ const size_t maxnodes = 262000;
typedef std::vector<Addr>::iterator addr_iter; typedef std::vector<Addr>::iterator addr_iter;
typedef std::vector<Stamp>::iterator stamp_iter; typedef std::vector<Stamp>::iterator stamp_iter;
#if (_MSC_VER == 1200)
class _geidxlist : public std::list<_GEIdx>
{
public:
void sort()
{
if (2 <= size())
{
const size_t _MAXN = 15;
_Myt _X(allocator), _A[_MAXN + 1];
size_t _N = 0;
while (!empty())
{
_X.splice(_X.begin(), *this, begin());
size_t _I;
for (_I = 0; _I < _N && !_A[_I].empty(); ++_I)
{
_A[_I].merge(_X);
_A[_I].swap(_X);
}
if (_I == _MAXN) _A[_I].merge(_X);
else
{
_A[_I].swap(_X);
if (_I == _N) ++_N;
}
}
for (int _NN = _N; _NN >= 0; _NN--)
merge(_A[_NN]);
}
}
};
typedef _geidxlist geidxlist;
#else
typedef std::list<_GEIdx> geidxlist; typedef std::list<_GEIdx> geidxlist;
#endif
// Nodelists // Nodelists
std::vector<Stamp> nodelist; // nodelist files,stamps,update marker std::vector<Stamp> nodelist; // nodelist files,stamps,update marker