aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/code-create.c
diff options
context:
space:
mode:
authorLeo Howell <leo@lwh.jp>2009-09-15 07:56:20 +0900
committerLeo Howell <leo@lwh.jp>2009-09-15 07:56:20 +0900
commit55d8ac4768d03001b746ce0af0ad0e15031e4041 (patch)
treee79c1eb983e12b790ffa7c10f7ed7675b7e820ce /lpg/libqr/code-create.c
parentd8f5f47084245b5b2d589d60db316f8943a96c5b (diff)
downloadpdf-simple-sign-55d8ac4768d03001b746ce0af0ad0e15031e4041.tar.gz
pdf-simple-sign-55d8ac4768d03001b746ce0af0ad0e15031e4041.tar.xz
pdf-simple-sign-55d8ac4768d03001b746ce0af0ad0e15031e4041.zip
RS encode (not working yet)
Diffstat (limited to 'lpg/libqr/code-create.c')
-rw-r--r--lpg/libqr/code-create.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/lpg/libqr/code-create.c b/lpg/libqr/code-create.c
index d09c2fe..484dbe3 100644
--- a/lpg/libqr/code-create.c
+++ b/lpg/libqr/code-create.c
@@ -5,6 +5,7 @@
#include "code-common.h"
#include "data-common.h"
+#include "rs.h"
#define MIN(a, b) ((b) < (a) ? (b) : (a))
@@ -29,7 +30,15 @@ static int add_ecc(struct bitstream * bits, int format, enum qr_ec_level ec)
{
puts("Before ecc:");
x_dump(bits);
-
+ {
+ const int g[10] = { 251, 67, 61, 118, 70, 64, 94, 32, 45 };
+ int rs_words = 10; /* 1-M */
+ struct bitstream * rs;
+
+ rs = rs_generate_words(rs_words, g, bits);
+ puts("ecc part:");
+ x_dump(rs);
+ }
return -1;
}