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
32#include "jbig2_arith.h"32#include "jbig2_arith.h"
33#include "jbig2_arith_int.h"33#include "jbig2_arith_int.h"
34 34
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
42struct _Jbig2ArithIntCtx {35struct _Jbig2ArithIntCtx {
43 Jbig2ArithCx IAx[512];36 Jbig2ArithCx IAx[512];
44};37};
jbig2_generic.c+0−4
@@ -42,10 +42,6 @@ · 41 unmodified lines
42#include "jbig2_page.h"42#include "jbig2_page.h"
43#include "jbig2_segment.h"43#include "jbig2_segment.h"
44 44
45#if !defined (UINT32_MAX)
46#define UINT32_MAX 0xffffffff
47#endif
48
49/*45/*
50This is an explanation of the unoptimized and optimized generic46This is an explanation of the unoptimized and optimized generic
51region decoder implementations below, wherein we try to explain47region decoder implementations below, wherein we try to explain
jbig2_image.c+0−7
@@ -30,13 +30,6 @@ · 29 unmodified lines
30#include "jbig2_priv.h"30#include "jbig2_priv.h"
31#include "jbig2_image.h"31#include "jbig2_image.h"
32 32
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
40/* allocate a Jbig2Image structure and its associated bitmap */33/* allocate a Jbig2Image structure and its associated bitmap */
41Jbig2Image *34Jbig2Image *
42jbig2_image_new(Jbig2Ctx *ctx, uint32_t width, uint32_t height)35jbig2_image_new(Jbig2Ctx *ctx, uint32_t width, uint32_t height)
jbig2_mmr.c+0−4
@@ -40,10 +40,6 @@ · 39 unmodified lines
40#include "jbig2_mmr.h"40#include "jbig2_mmr.h"
41#include "jbig2_segment.h"41#include "jbig2_segment.h"
42 42
43#if !defined (UINT32_MAX)
44#define UINT32_MAX 0xffffffff
45#endif
46
47typedef struct {43typedef struct {
48 uint32_t width;44 uint32_t width;
49 uint32_t height;45 uint32_t height;
jbig2_page.c+0−7
@@ -34,13 +34,6 @@ · 33 unmodified lines
34#include "jbig2_page.h"34#include "jbig2_page.h"
35#include "jbig2_segment.h"35#include "jbig2_segment.h"
36 36
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
44/* dump the page struct info */37/* dump the page struct info */
45static void38static void
46dump_page_info(Jbig2Ctx *ctx, Jbig2Segment *segment, Jbig2Page *page)39dump_page_info(Jbig2Ctx *ctx, Jbig2Segment *segment, Jbig2Page *page)
jbig2_priv.h+10−0
@@ -55,6 +55,16 @@ typedef uint8_t byte; · 54 unmodified lines
55#define NULL ((void*)0)55#define NULL ((void*)0)
56#endif56#endif
57 57
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
58typedef struct _Jbig2Page Jbig2Page;68typedef struct _Jbig2Page Jbig2Page;
59typedef struct _Jbig2Segment Jbig2Segment;69typedef struct _Jbig2Segment Jbig2Segment;
60 70
jbig2_segment.c+0−4
@@ -39,10 +39,6 @@ · 38 unmodified lines
39#include "jbig2_symbol_dict.h"39#include "jbig2_symbol_dict.h"
40#include "jbig2_text.h"40#include "jbig2_text.h"
41 41
42#if !defined (UINT32_MAX)
43#define UINT32_MAX 0xffffffff
44#endif
45
46Jbig2Segment *42Jbig2Segment *
47jbig2_parse_segment_header(Jbig2Ctx *ctx, uint8_t *buf, size_t buf_size, size_t *p_header_size)43jbig2_parse_segment_header(Jbig2Ctx *ctx, uint8_t *buf, size_t buf_size, size_t *p_header_size)
48{44{

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