From efdc5bce3b9794847093baeb040937ab55eba86e Mon Sep 17 00:00:00 2001 From: Richard E Barber Date: Sun, 19 May 2024 04:27:10 -0700 Subject: [PATCH] Fix linking with jpeg-turbo patch via Termux PR https://github.com/termux-user-repository/tur/pull/1027 --- rtengine/jdatasrc.cc | 28 ++-------------------------- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/rtengine/jdatasrc.cc b/rtengine/jdatasrc.cc index fa13b9dd13..a0d12657f2 100644 --- a/rtengine/jdatasrc.cc +++ b/rtengine/jdatasrc.cc @@ -247,20 +247,6 @@ my_error_exit (j_common_ptr cinfo) #endif } - -#ifdef _WIN32 -#define JVERSION "6b 27-Mar-1998" -#define JCOPYRIGHT_SHORT "(C) 1998, Thomas G. Lane" -#define JMESSAGE(code,string) string , - -const char * const jpeg_std_message_table[] = { -#include "jerror.h" - NULL -}; -#else -extern const char * const jpeg_std_message_table[]; -#endif - /* * Actual output of an error or trace message. * Applications may override this method to send JPEG messages somewhere @@ -409,24 +395,14 @@ reset_error_mgr (j_common_ptr cinfo) GLOBAL(struct jpeg_error_mgr *) my_jpeg_std_error (struct jpeg_error_mgr * err) { + err = jpeg_std_error(err); + /* override these functions */ err->error_exit = my_error_exit; err->emit_message = emit_message; err->output_message = output_message; err->format_message = format_message; err->reset_error_mgr = reset_error_mgr; - err->trace_level = 0; /* default = no tracing */ - err->num_warnings = 0; /* no warnings emitted yet */ - err->msg_code = 0; /* may be useful as a flag for "no error" */ - - /* Initialize message table pointers */ - err->jpeg_message_table = jpeg_std_message_table; - err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; - - err->addon_message_table = nullptr; - err->first_addon_message = 0; /* for safety */ - err->last_addon_message = 0; - return err; }