History

jbig2dec: Use unsigned suffix when defining UINT32_MAX.

Also move UINT32_MAX/INT32_MAX to internal header so they are defined (the same) in every jbig2 source code file.

Sebastian Rasmussen committed 6 years ago

Commit 05f5d7e1 parent 08c3f837 files · +10 −33Browse files

Unified · Split

7 files
  1. jbig2_arith_int.c +0 −7
  2. jbig2_generic.c +0 −4
  3. jbig2_image.c +0 −7
  4. jbig2_mmr.c +0 −4
  5. jbig2_page.c +0 −7
  6. jbig2_priv.h +10 −0
  7. jbig2_segment.c +0 −4
jbig2_arith_int.c+0−7
@@ -32,13 +32,6 @@ · 31 unmodified lines
3232 #include "jbig2_arith.h"
3333 #include "jbig2_arith_int.h"
3434
35−#if !defined (INT32_MIN)
36−#define INT32_MIN (-0x7fffffff - 1)
37−#endif
38−#if !defined (INT32_MAX)
39−#define INT32_MAX 0x7fffffff
40−#endif
41−
4235 struct _Jbig2ArithIntCtx {
4336 Jbig2ArithCx IAx[512];
4437 };
jbig2_generic.c+0−4
@@ -42,10 +42,6 @@ · 41 unmodified lines
4242 #include "jbig2_page.h"
4343 #include "jbig2_segment.h"
4444
45−#if !defined (UINT32_MAX)
46−#define UINT32_MAX 0xffffffff
47−#endif
48−
4945 /*
5046 This is an explanation of the unoptimized and optimized generic
5147 region decoder implementations below, wherein we try to explain
jbig2_image.c+0−7
@@ -30,13 +30,6 @@ · 29 unmodified lines
3030 #include "jbig2_priv.h"
3131 #include "jbig2_image.h"
3232
33−#if !defined (INT32_MAX)
34−#define INT32_MAX 0x7fffffff
35−#endif
36−#if !defined (UINT32_MAX)
37−#define UINT32_MAX 0xffffffffu
38−#endif
39−
4033 /* allocate a Jbig2Image structure and its associated bitmap */
4134 Jbig2Image *
4235 jbig2_image_new(Jbig2Ctx *ctx, uint32_t width, uint32_t height)
jbig2_mmr.c+0−4
@@ -40,10 +40,6 @@ · 39 unmodified lines
4040 #include "jbig2_mmr.h"
4141 #include "jbig2_segment.h"
4242
43−#if !defined (UINT32_MAX)
44−#define UINT32_MAX 0xffffffff
45−#endif
46−
4743 typedef struct {
4844 uint32_t width;
4945 uint32_t height;
jbig2_page.c+0−7
@@ -34,13 +34,6 @@ · 33 unmodified lines
3434 #include "jbig2_page.h"
3535 #include "jbig2_segment.h"
3636
37−#if !defined (INT32_MAX)
38−#define INT32_MAX 0x7fffffff
39−#endif
40−#if !defined (UINT32_MAX)
41−#define UINT32_MAX 0xffffffff
42−#endif
43−
4437 /* dump the page struct info */
4538 static void
4639 dump_page_info(Jbig2Ctx *ctx, Jbig2Segment *segment, Jbig2Page *page)
jbig2_priv.h+10−0
@@ -55,6 +55,16 @@ typedef uint8_t byte; · 54 unmodified lines
5555 #define NULL ((void*)0)
5656 #endif
5757
58+#if !defined (INT32_MIN)
59+#define INT32_MIN (-0x7fffffff - 1)
60+#endif
61+#if !defined (INT32_MAX)
62+#define INT32_MAX 0x7fffffff
63+#endif
64+#if !defined (UINT32_MAX)
65+#define UINT32_MAX 0xffffffffu
66+#endif
67+
5868 typedef struct _Jbig2Page Jbig2Page;
5969 typedef struct _Jbig2Segment Jbig2Segment;
6070
jbig2_segment.c+0−4
@@ -39,10 +39,6 @@ · 38 unmodified lines
3939 #include "jbig2_symbol_dict.h"
4040 #include "jbig2_text.h"
4141
42−#if !defined (UINT32_MAX)
43−#define UINT32_MAX 0xffffffff
44−#endif
45−
4642 Jbig2Segment *
4743 jbig2_parse_segment_header(Jbig2Ctx *ctx, uint8_t *buf, size_t buf_size, size_t *p_header_size)
4844 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t