diff options
author | Leo Howell <leo@lwh.jp> | 2009-10-08 14:38:37 +0900 |
---|---|---|
committer | Leo Howell <leo@lwh.jp> | 2009-10-08 14:38:37 +0900 |
commit | 62e8a6f2ad89be06c7e649c0fc4c564ecad2d070 (patch) | |
tree | a870eb56ba9c02e5807d3ce3d556bca98c1f2e8c /lpg/libqr/code-create.c | |
parent | ad59de83b7f82cb812d23ac2bb948ac32fe0ac71 (diff) | |
download | pdf-simple-sign-62e8a6f2ad89be06c7e649c0fc4c564ecad2d070.tar.gz pdf-simple-sign-62e8a6f2ad89be06c7e649c0fc4c564ecad2d070.tar.xz pdf-simple-sign-62e8a6f2ad89be06c7e649c0fc4c564ecad2d070.zip |
code format --> version
Diffstat (limited to 'lpg/libqr/code-create.c')
-rw-r--r-- | lpg/libqr/code-create.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lpg/libqr/code-create.c b/lpg/libqr/code-create.c index 9ce46f7..6c56f45 100644 --- a/lpg/libqr/code-create.c +++ b/lpg/libqr/code-create.c @@ -73,7 +73,7 @@ static int draw_functional(struct qr_code * code, unsigned int mask) { struct qr_bitmap * bmp; - int dim = code_side_length(code->format); + int dim = qr_code_width(code); int i; bmp = qr_bitmap_create(dim, dim, 0); @@ -146,11 +146,11 @@ static int pad_data(struct qr_bitstream * bits, size_t limit) return 0; } -static struct qr_bitstream * make_data(int format, - enum qr_ec_level ec, - struct qr_bitstream * data) +static struct qr_bitstream * make_data(int version, + enum qr_ec_level ec, + struct qr_bitstream * data) { - const size_t total_bits = code_total_capacity(format); + const size_t total_bits = code_total_capacity(version); const size_t total_words = total_bits / 8; size_t block_count, data_words, rs_words; size_t i; @@ -246,15 +246,14 @@ struct qr_code * qr_code_create(enum qr_ec_level ec, if (!code) return 0; - dim = code_side_length(data->format); - - code->format = data->format; + code->version = data->version; + dim = qr_code_width(code); code->modules = qr_bitmap_create(dim, dim, 1); if (!code->modules) goto fail; - bits = make_data(data->format, ec, data->bits); + bits = make_data(data->version, ec, data->bits); if (!bits) goto fail; |