Fix dtinfo search engine

This commit is contained in:
Ulrich Wilkens
2014-04-01 04:45:33 +02:00
committed by Jon Trulson
parent 0254ebc0b4
commit 38dfc9e235
68 changed files with 252 additions and 135 deletions

View File

@@ -145,22 +145,25 @@ int gethostname(char* name, int namelen)
int compare_stream(ostringstream& x, ostringstream& y)
{
if ( x.str().size() != y.str().size() ) {
cerr << x.str().size() << "---" << y.str().size() << endl;
//debug(cerr, x.str().c_str());
//debug(cerr, y.str().c_str());
string xstr = x.str();
string ystr = y.str();
if ( xstr.size() != ystr.size() ) {
cerr << xstr.size() << "---" << ystr.size() << endl;
//debug(cerr, xstr.c_str());
//debug(cerr, ystr.c_str());
return 1;
} else {
char* u = (char *)x.str().c_str();
char* v = (char *)y.str().c_str();
char* u = (char *)xstr.c_str();
char* v = (char *)ystr.c_str();
//debug(cerr, u);
//debug(cerr, v);
//fprintf(stderr, "u=%s, pcount() = %d\n", u, x.pcount());
//fprintf(stderr, "v=%s, pcount() = %d\n", v, y.pcount());
if ( memcmp(u, v, x.str().size()) != 0 ) {
if ( memcmp(u, v, xstr.size()) != 0 ) {
STDERR_MESSAGE("two streams do not match.");
debug(cerr, u);
debug(cerr, v);