aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/code-create.c
diff options
context:
space:
mode:
authorLeo Uino <leo@norisys.jp>2011-07-17 09:45:26 +0900
committerLeo Uino <leo@norisys.jp>2011-07-17 09:45:26 +0900
commita3234f7d7e36ad7d1bad6a85b868b05addf40e9b (patch)
treeccabef44ef93405d3e082ef1a13710b9aa651b5e /lpg/libqr/code-create.c
parentfed32fca55210ce26e103a7f941a71694945311c (diff)
downloadpdf-simple-sign-a3234f7d7e36ad7d1bad6a85b868b05addf40e9b.tar.gz
pdf-simple-sign-a3234f7d7e36ad7d1bad6a85b868b05addf40e9b.tar.xz
pdf-simple-sign-a3234f7d7e36ad7d1bad6a85b868b05addf40e9b.zip
Tweak some types
Diffstat (limited to 'lpg/libqr/code-create.c')
-rw-r--r--lpg/libqr/code-create.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/lpg/libqr/code-create.c b/lpg/libqr/code-create.c
index d00a41f..cf04eb7 100644
--- a/lpg/libqr/code-create.c
+++ b/lpg/libqr/code-create.c
@@ -25,8 +25,8 @@ static int draw_format(struct qr_bitmap * bmp,
struct qr_code * code,
enum qr_ec_level ec,
int mask);
-static int calc_format_bits(enum qr_ec_level ec, int mask);
-static long calc_version_bits(int version);
+static unsigned int calc_format_bits(enum qr_ec_level ec, int mask);
+static unsigned long calc_version_bits(int version);
#include <stdio.h>
static void x_dump(struct qr_bitstream * bits)
@@ -557,9 +557,9 @@ static int draw_format(struct qr_bitmap * bmp,
return 0;
}
-static int calc_format_bits(enum qr_ec_level ec, int mask)
+static unsigned int calc_format_bits(enum qr_ec_level ec, int mask)
{
- int bits;
+ unsigned int bits;
bits = (ec & 0x3) << 3 | (mask & 0x7);
@@ -573,9 +573,9 @@ static int calc_format_bits(enum qr_ec_level ec, int mask)
return bits;
}
-static long calc_version_bits(int version)
+static unsigned long calc_version_bits(int version)
{
- long bits;
+ unsigned long bits;
bits = version & 0x3F;
@@ -584,7 +584,6 @@ static long calc_version_bits(int version)
bits <<= 18 - 6;
bits |= gf_residue(bits, QR_VERSION_POLY);
-fprintf(stderr, "version bits: %lx\n", bits);
return bits;
}