Compile a probe of common Dinkumware instantiations and find byte-identical copies in .text (relocations masked; every callee must itself be library/CRT code). 255 functions reclassified from fn to lib. Known gap: some stringbuf members (e.g. seekoff 0x40224b) differ slightly from the probe and remain fn. Co-Authored-By: Claude Opus 5.5 <[email protected]>
52 lines
1.7 KiB
C++
52 lines
1.7 KiB
C++
// Library probe: instantiates the Dinkumware templates the client is likely to use, so
|
|
// `eq.py libscan` can find their copies in eqgame.exe and classify them as library code.
|
|
#include <new>
|
|
#include <string>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
#include <iostream>
|
|
#include <vector>
|
|
#include <list>
|
|
#include <map>
|
|
#include <set>
|
|
#include <deque>
|
|
#include <algorithm>
|
|
|
|
template class std::basic_string<char>;
|
|
template class std::basic_string<unsigned short>;
|
|
template class std::basic_stringbuf<char>;
|
|
template class std::basic_istringstream<char>;
|
|
template class std::basic_ostringstream<char>;
|
|
template class std::basic_stringstream<char>;
|
|
template class std::basic_filebuf<char>;
|
|
template class std::basic_ifstream<char>;
|
|
template class std::basic_ofstream<char>;
|
|
template class std::basic_fstream<char>;
|
|
template class std::basic_istream<char>;
|
|
template class std::basic_ostream<char>;
|
|
template class std::basic_iostream<char>;
|
|
template class std::basic_streambuf<char>;
|
|
template class std::basic_ios<char>;
|
|
template class std::vector<int>;
|
|
template class std::vector<unsigned int>;
|
|
template class std::vector<char*>;
|
|
template class std::vector<void*>;
|
|
template class std::vector<std::string>;
|
|
template class std::list<int>;
|
|
template class std::list<void*>;
|
|
template class std::map<int, int>;
|
|
template class std::map<std::string, int>;
|
|
template class std::map<std::string, std::string>;
|
|
template class std::set<int>;
|
|
template class std::deque<int>;
|
|
|
|
std::ostream& probe_ostream(std::ostream& o, int i, const char* s, float f, double d)
|
|
{
|
|
return o << i << s << f << d << std::endl;
|
|
}
|
|
|
|
std::istream& probe_istream(std::istream& in, int& i, std::string& s, float& f)
|
|
{
|
|
return in >> i >> s >> f;
|
|
}
|