Lines 1-20
Link Here
|
|
|
1 |
This is a combinediff of |
2 |
https://github.com/Beep6581/RawTherapee/pull/7080/commits/efdc5bce3b9794847093baeb040937ab55eba86e |
3 |
https://github.com/Beep6581/RawTherapee/pull/7080/commits/7789a8574b454ebd874522a70930ae4b40726da4 |
4 |
|
1 |
--- rtengine/jdatasrc.cc.orig 2024-02-16 05:12:09 UTC |
5 |
--- rtengine/jdatasrc.cc.orig 2024-02-16 05:12:09 UTC |
2 |
+++ rtengine/jdatasrc.cc |
6 |
+++ rtengine/jdatasrc.cc |
3 |
@@ -409,6 +409,8 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) |
7 |
@@ -247,20 +247,6 @@ my_error_exit (j_common_ptr cinfo) |
|
|
8 |
#endif |
9 |
} |
10 |
|
11 |
- |
12 |
-#ifdef _WIN32 |
13 |
-#define JVERSION "6b 27-Mar-1998" |
14 |
-#define JCOPYRIGHT_SHORT "(C) 1998, Thomas G. Lane" |
15 |
-#define JMESSAGE(code,string) string , |
16 |
- |
17 |
-const char * const jpeg_std_message_table[] = { |
18 |
-#include "jerror.h" |
19 |
- NULL |
20 |
-}; |
21 |
-#else |
22 |
-extern const char * const jpeg_std_message_table[]; |
23 |
-#endif |
24 |
- |
25 |
/* |
26 |
* Actual output of an error or trace message. |
27 |
* Applications may override this method to send JPEG messages somewhere |
28 |
@@ -409,24 +395,10 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) |
4 |
GLOBAL(struct jpeg_error_mgr *) |
29 |
GLOBAL(struct jpeg_error_mgr *) |
5 |
my_jpeg_std_error (struct jpeg_error_mgr * err) |
30 |
my_jpeg_std_error (struct jpeg_error_mgr * err) |
6 |
{ |
31 |
{ |
7 |
+ struct jpeg_error_mgr std_jpeg_err; |
32 |
+ err = jpeg_std_error(err); |
8 |
+ (void)jpeg_std_error(&std_jpeg_err); |
|
|
9 |
|
33 |
|
|
|
34 |
+ /* override these functions */ |
10 |
err->error_exit = my_error_exit; |
35 |
err->error_exit = my_error_exit; |
11 |
err->emit_message = emit_message; |
36 |
- err->emit_message = emit_message; |
12 |
@@ -421,7 +423,7 @@ my_jpeg_std_error (struct jpeg_error_mgr * err) |
37 |
- err->output_message = output_message; |
13 |
err->msg_code = 0; /* may be useful as a flag for "no error" */ |
38 |
- err->format_message = format_message; |
14 |
|
39 |
- err->reset_error_mgr = reset_error_mgr; |
15 |
/* Initialize message table pointers */ |
40 |
- |
|
|
41 |
- err->trace_level = 0; /* default = no tracing */ |
42 |
- err->num_warnings = 0; /* no warnings emitted yet */ |
43 |
- err->msg_code = 0; /* may be useful as a flag for "no error" */ |
44 |
- |
45 |
- /* Initialize message table pointers */ |
16 |
- err->jpeg_message_table = jpeg_std_message_table; |
46 |
- err->jpeg_message_table = jpeg_std_message_table; |
17 |
+ err->jpeg_message_table = std_jpeg_err.jpeg_message_table; |
47 |
- err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; |
18 |
err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; |
48 |
- |
|
|
49 |
- err->addon_message_table = nullptr; |
50 |
- err->first_addon_message = 0; /* for safety */ |
51 |
- err->last_addon_message = 0; |
19 |
|
52 |
|
20 |
err->addon_message_table = nullptr; |
53 |
return err; |
|
|
54 |
} |
21 |
- |
|
|