Remove the use of C99's stdbool.h and the bool type; not all compilers
support this (gcc 2.8.1 on IRIX 6.5 bit this time).
This commit is contained in:
parent
12445b1efd
commit
f122dd821c
@ -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;
|
||||
}
|
||||
|
@ -10,8 +10,6 @@
|
||||
#include "expat.h" /* need XML_Char */
|
||||
#endif
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
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 */
|
||||
|
Loading…
Reference in New Issue
Block a user