#if HAVE_CONFIG_H #include #endif #include #include #include #include #include "misc.h" void chk_dce_err(ecode, where, why, fatal) error_status_t ecode; const char * where; const char * why; unsigned int fatal; { dce_error_string_t errstr; int error_status; if (ecode != error_status_ok) { dce_error_inq_text(ecode, errstr, &error_status); if (error_status == error_status_ok) printf("ERROR. where = <%s> why = <%s> error code = 0x%x" "reason = <%s>\n", where, why, (unsigned32)ecode, errstr); else printf("ERROR. where = <%s> why = <%s> error code = 0x%x\n", where, why, (unsigned32)ecode); if (fatal) exit(1); } }