diff options
author | Henry Stiles <henry.stiles@artifex.com> | 1998-07-28 06:22:20 +0000 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 1998-07-28 06:22:20 +0000 |
commit | 5fbdbaab7335a147a3a7890b5c6fc123926815db (patch) | |
tree | 154edc89b06c38333fd6d4b9abaf0ee8740ddf6a /gs/src/gsbittab.c | |
parent | 14cf10e3738f95f7864978c5a4778b50fb39524b (diff) | |
download | ghostpdl-5fbdbaab7335a147a3a7890b5c6fc123926815db.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r257,
which included commits to RCS files with non-trunk default branches.
git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@258 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'gs/src/gsbittab.c')
-rw-r--r-- | gs/src/gsbittab.c | 124 |
1 files changed, 68 insertions, 56 deletions
diff --git a/gs/src/gsbittab.c b/gs/src/gsbittab.c index 574f03857..bff1caf88 100644 --- a/gs/src/gsbittab.c +++ b/gs/src/gsbittab.c @@ -1,20 +1,20 @@ /* Copyright (C) 1995, 1996 Aladdin Enterprises. All rights reserved. - - This file is part of Aladdin Ghostscript. - - Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author - or distributor accepts any responsibility for the consequences of using it, - or for whether it serves any particular purpose or works at all, unless he - or she says so in writing. Refer to the Aladdin Ghostscript Free Public - License (the "License") for full details. - - Every copy of Aladdin Ghostscript must include a copy of the License, - normally in a plain ASCII text file named PUBLIC. The License grants you - the right to copy, modify and redistribute Aladdin Ghostscript, but only - under certain conditions described in the License. Among other things, the - License requires that the copyright notice and this notice be preserved on - all copies. -*/ + + This file is part of Aladdin Ghostscript. + + Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author + or distributor accepts any responsibility for the consequences of using it, + or for whether it serves any particular purpose or works at all, unless he + or she says so in writing. Refer to the Aladdin Ghostscript Free Public + License (the "License") for full details. + + Every copy of Aladdin Ghostscript must include a copy of the License, + normally in a plain ASCII text file named PUBLIC. The License grants you + the right to copy, modify and redistribute Aladdin Ghostscript, but only + under certain conditions described in the License. Among other things, the + License requires that the copyright notice and this notice be preserved on + all copies. + */ /* gsbittab.c */ /* Tables for bit operations */ @@ -26,22 +26,25 @@ /* * byte_reverse_bits[B] = the byte B with the order of bits reversed. */ -const byte byte_reverse_bits[256] = { - bit_table_8(0, 1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80) +const byte byte_reverse_bits[256] = +{ + bit_table_8(0, 1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80) }; /* * byte_right_mask[N] = a byte with N trailing 1s, 0 <= N <= 8. */ -const byte byte_right_mask[9] = { - 0, 1, 3, 7, 0xf, 0x1f, 0x3f, 0x7f, 0xff +const byte byte_right_mask[9] = +{ + 0, 1, 3, 7, 0xf, 0x1f, 0x3f, 0x7f, 0xff }; /* * byte_count_bits[B] = the number of 1-bits in a byte with value B. */ -const byte byte_count_bits[256] = { - bit_table_8(0, 1, 1, 1, 1, 1, 1, 1, 1) +const byte byte_count_bits[256] = +{ + bit_table_8(0, 1, 1, 1, 1, 1, 1, 1, 1) }; /* ---------------- Scanning tables ---------------- */ @@ -60,31 +63,37 @@ const byte byte_count_bits[256] = { #define r32(n) r16(n),r16(n) #define r64(n) r32(n),r32(n) #define r128(n) r64(n),r64(n) -const byte byte_bit_run_length_0[256] = { - r128(0), r64(1), r32(2), r16(3), r8(4), t8(5) +const byte byte_bit_run_length_0[256] = +{ + r128(0), r64(1), r32(2), r16(3), r8(4), t8(5) }; -const byte far_data byte_bit_run_length_1[256] = { - r64(0), r32(1), r16(2), r8(3), t8(4), - r64(0), r32(1), r16(2), r8(3), t8(4) +const byte far_data byte_bit_run_length_1[256] = +{ + r64(0), r32(1), r16(2), r8(3), t8(4), + r64(0), r32(1), r16(2), r8(3), t8(4) }; -const byte far_data byte_bit_run_length_2[256] = { - r32(0), r16(1), r8(2), t8(3), - r32(0), r16(1), r8(2), t8(3), - r32(0), r16(1), r8(2), t8(3), - r32(0), r16(1), r8(2), t8(3) +const byte far_data byte_bit_run_length_2[256] = +{ + r32(0), r16(1), r8(2), t8(3), + r32(0), r16(1), r8(2), t8(3), + r32(0), r16(1), r8(2), t8(3), + r32(0), r16(1), r8(2), t8(3) }; -const byte far_data byte_bit_run_length_3[256] = { - r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), - r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), - r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), - r16(0), r8(1), t8(2), r16(0), r8(1), t8(2) +const byte far_data byte_bit_run_length_3[256] = +{ + r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), + r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), + r16(0), r8(1), t8(2), r16(0), r8(1), t8(2), + r16(0), r8(1), t8(2), r16(0), r8(1), t8(2) }; -const byte far_data byte_bit_run_length_4[256] = { - r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), - r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), - r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), - r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), +const byte far_data byte_bit_run_length_4[256] = +{ + r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), + r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), + r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), + r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), r8(0), t8(1), }; + #define rr8(a,b,c,d,e,f,g,h)\ a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h,\ a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h,\ @@ -94,29 +103,32 @@ const byte far_data byte_bit_run_length_4[256] = { a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h,\ a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h,\ a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h, a,b,c,d,e,f,g,h -const byte far_data byte_bit_run_length_5[256] = { - rr8(0,0,0,0,1,1,2,11) +const byte far_data byte_bit_run_length_5[256] = +{ + rr8(0, 0, 0, 0, 1, 1, 2, 11) }; -const byte far_data byte_bit_run_length_6[256] = { - rr8(0,0,1,10,0,0,1,10) +const byte far_data byte_bit_run_length_6[256] = +{ + rr8(0, 0, 1, 10, 0, 0, 1, 10) }; -const byte far_data byte_bit_run_length_7[256] = { - rr8(0,9,0,9,0,9,0,9) +const byte far_data byte_bit_run_length_7[256] = +{ + rr8(0, 9, 0, 9, 0, 9, 0, 9) }; /* Pointer tables indexed by bit number. */ const byte *byte_bit_run_length[8] = -{ byte_bit_run_length_0, byte_bit_run_length_1, - byte_bit_run_length_2, byte_bit_run_length_3, - byte_bit_run_length_4, byte_bit_run_length_5, - byte_bit_run_length_6, byte_bit_run_length_7 +{byte_bit_run_length_0, byte_bit_run_length_1, + byte_bit_run_length_2, byte_bit_run_length_3, + byte_bit_run_length_4, byte_bit_run_length_5, + byte_bit_run_length_6, byte_bit_run_length_7 }; const byte *byte_bit_run_length_neg[8] = -{ byte_bit_run_length_0, byte_bit_run_length_7, - byte_bit_run_length_6, byte_bit_run_length_5, - byte_bit_run_length_4, byte_bit_run_length_3, - byte_bit_run_length_2, byte_bit_run_length_1 +{byte_bit_run_length_0, byte_bit_run_length_7, + byte_bit_run_length_6, byte_bit_run_length_5, + byte_bit_run_length_4, byte_bit_run_length_3, + byte_bit_run_length_2, byte_bit_run_length_1 }; /* Some C compilers insist on having executable code in every file.... */ |