defined new type "opj_bool", and new constants OPJ_FALSE and OPJ_TRUE, to avoid having to deal with "stdbool.h" (patch from Winfried)

This commit is contained in:
Antonin Descampe
2011-05-18 11:02:27 +00:00
parent 0c9f6a3ac9
commit 88f43b15fa
26 changed files with 284 additions and 312 deletions

View File

@@ -72,7 +72,7 @@ opj_event_mgr_t* OPJ_CALLCONV opj_set_event_mgr(opj_common_ptr cinfo, opj_event_
return NULL;
}
bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
opj_bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
#define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
opj_msg_callback msg_handler = NULL;
@@ -92,10 +92,10 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
break;
}
if(msg_handler == NULL) {
return false;
return OPJ_FALSE;
}
} else {
return false;
return OPJ_FALSE;
}
if ((fmt != NULL) && (event_mgr != NULL)) {
@@ -116,6 +116,6 @@ bool opj_event_msg(opj_common_ptr cinfo, int event_type, const char *fmt, ...) {
msg_handler(message, cinfo->client_data);
}
return true;
return OPJ_TRUE;
}