diff --git a/expat/tests/chardata.c b/expat/tests/chardata.c index 2ff7125c..4a228a7a 100644 --- a/expat/tests/chardata.c +++ b/expat/tests/chardata.c @@ -70,7 +70,7 @@ CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len) } } -bool +int CharData_CheckString(CharData *storage, const char *expected) { char buffer[1280]; @@ -90,16 +90,16 @@ CharData_CheckString(CharData *storage, const char *expected) "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); - return false; + return 0; } if (memcmp(expected, storage->data, len) != 0) { fail("got bad data bytes"); - return false; + return 0; } - return true; + return 1; } -bool +int CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) { char buffer[1024]; @@ -112,11 +112,11 @@ CharData_CheckXMLChars(CharData *storage, const XML_Char *expected) sprintf(buffer, "wrong number of data characters: got %d, expected %d", count, len); fail(buffer); - return false; + return 0; } if (memcmp(expected, storage->data, len * sizeof(storage->data[0])) != 0) { fail("got bad data bytes"); - return false; + return 0; } - return true; + return 1; } diff --git a/expat/tests/chardata.h b/expat/tests/chardata.h index 399aed3c..35ce0599 100644 --- a/expat/tests/chardata.h +++ b/expat/tests/chardata.h @@ -10,8 +10,6 @@ #include "expat.h" /* need XML_Char */ #endif -#include - typedef struct { int count; /* # of chars, < 0 if not set */ @@ -25,9 +23,9 @@ void CharData_AppendString(CharData *storage, const char *s); void CharData_AppendXMLChars(CharData *storage, const XML_Char *s, int len); -bool CharData_CheckString(CharData *storage, const char *s); +int CharData_CheckString(CharData *storage, const char *s); -bool CharData_CheckXMLChars(CharData *storage, const XML_Char *s); +int CharData_CheckXMLChars(CharData *storage, const XML_Char *s); #endif /* XML_CHARDATA_H */