diff options
author | Thomas G. Lane <tgl@netcom.com> | 1992-12-10 00:00:00 +0000 |
---|---|---|
committer | DRC <information@libjpeg-turbo.org> | 2015-07-29 15:23:45 -0500 |
commit | 88aeed428fd820659e3ae00292cb84ecfc05dd23 (patch) | |
tree | c4db96b8043b8c97f0b39c55f67443d73856f2f9 /jerror.c | |
parent | 4a6b7303643714d495b9d26742d8a156fd120936 (diff) |
The Independent JPEG Group's JPEG software v4
Diffstat (limited to 'jerror.c')
-rw-r--r-- | jerror.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -48,7 +48,7 @@ trace_message (const char *msgtext) METHODDEF void error_exit (const char *msgtext) { - trace_message(msgtext); + (*methods->trace_message) (msgtext); (*methods->free_all) (); /* clean up memory allocation */ exit(EXIT_FAILURE); } @@ -69,4 +69,13 @@ jselerror (external_methods_ptr emethods) emethods->trace_message = trace_message; emethods->trace_level = 0; /* default = no tracing */ + + emethods->num_warnings = 0; /* no warnings emitted yet */ + /* By default, the first corrupt-data warning will be displayed, + * but additional ones will appear only if trace level is at least 3. + * A corrupt data file could generate many warnings, so it's a good idea + * to suppress additional messages except at high tracing levels. + */ + emethods->first_warning_level = 0; + emethods->more_warning_level = 3; } |