X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ferror.h;h=9be862792a46d3f3e2e7e009fa4aeffddbbfd46a;hb=4255c7e5a693e09a97dc7a3cca0634bb2adaba2d;hp=095f7af841680562048e325335c3711655c469d0;hpb=205ac3afa4c2b19c85819d8695abf3975bb11807;p=pspp diff --git a/src/error.h b/src/error.h index 095f7af841..9be862792a 100644 --- a/src/error.h +++ b/src/error.h @@ -33,7 +33,7 @@ enum ERR_CLASS_COUNT, /* Number of message classes. */ ERR_CLASS_MASK = 0xf, /* Bitmask for class. */ ERR_VERBOSITY_SHIFT = 4, /* Shift count for verbosity. */ - ERR_VERBOSITY_MASK = 0xf, /* Bitmask for verbosity. */ + ERR_VERBOSITY_MASK = 0xf /* Bitmask for verbosity. */ }; /* If passed to msg() as CLASS, the return value will cause the message @@ -53,7 +53,6 @@ struct error int class; /* One of the classes above. */ struct file_locator where; /* File location, or (NULL, -1). */ const char *title; /* Special text inserted if not null. */ - const char *text; /* Error text. */ }; /* Number of errors, warnings reported. */ @@ -85,7 +84,7 @@ void err_location (struct file_locator *); void err_break (void); void err_check_count (void); void err_hcf (int exit_code) NO_RETURN; -void err_vmsg (const struct error *); +void err_vmsg (const struct error *, const char *, va_list); /* Used in panic situations only */ void request_bug_report_and_abort(const char *msg ); @@ -97,7 +96,7 @@ void err_assert_fail(const char *expr, const char *file, int line); #undef assert -#define assert(expr) ( (void) ( expr ? 0 : \ +#define assert(expr) ( (void) ( expr ? (void) 0 : \ err_assert_fail(__STRING(expr), __FILE__, __LINE__)) )