aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr
diff options
context:
space:
mode:
Diffstat (limited to 'lpg/libqr')
-rw-r--r--lpg/libqr/code-create.c1
-rw-r--r--lpg/libqr/code-layout.c1
-rw-r--r--lpg/libqr/code-parse.c2
-rw-r--r--lpg/libqr/constants.h2
-rw-r--r--lpg/libqr/qr/code.h7
-rw-r--r--lpg/libqr/qr/common.h14
-rw-r--r--lpg/libqr/qr/data.h18
-rw-r--r--lpg/libqr/qr/types.h18
8 files changed, 36 insertions, 27 deletions
diff --git a/lpg/libqr/code-create.c b/lpg/libqr/code-create.c
index 155ffa3..1da7845 100644
--- a/lpg/libqr/code-create.c
+++ b/lpg/libqr/code-create.c
@@ -5,6 +5,7 @@
#include <qr/bitmap.h>
#include <qr/bitstream.h>
#include <qr/code.h>
+#include <qr/common.h>
#include <qr/data.h>
#include <qr/layout.h>
#include "constants.h"
diff --git a/lpg/libqr/code-layout.c b/lpg/libqr/code-layout.c
index 04b6ca6..97cf3af 100644
--- a/lpg/libqr/code-layout.c
+++ b/lpg/libqr/code-layout.c
@@ -5,6 +5,7 @@
#include <qr/bitmap.h>
#include <qr/code.h>
+#include <qr/common.h>
#include <qr/layout.h>
#include "constants.h"
diff --git a/lpg/libqr/code-parse.c b/lpg/libqr/code-parse.c
index 50d621c..f84dcfe 100644
--- a/lpg/libqr/code-parse.c
+++ b/lpg/libqr/code-parse.c
@@ -7,7 +7,7 @@
#include <qr/bitmap.h>
#include <qr/bitstream.h>
#include <qr/code.h>
-#include <qr/data.h>
+#include <qr/common.h>
#include <qr/layout.h>
#include <qr/parse.h>
diff --git a/lpg/libqr/constants.h b/lpg/libqr/constants.h
index 2c19e97..5ae9256 100644
--- a/lpg/libqr/constants.h
+++ b/lpg/libqr/constants.h
@@ -1,7 +1,7 @@
#ifndef QR_CONSTANTS_H
#define QR_CONSTANTS_H
-#include <qr/data.h>
+#include <qr/types.h>
extern const int QR_ALIGNMENT_LOCATION[40][7];
extern const int QR_DATA_WORD_COUNT[40][4];
diff --git a/lpg/libqr/qr/code.h b/lpg/libqr/qr/code.h
index 2392467..e6eb47c 100644
--- a/lpg/libqr/qr/code.h
+++ b/lpg/libqr/qr/code.h
@@ -13,12 +13,5 @@ struct qr_code * qr_code_create(const struct qr_data * data);
void qr_code_destroy(struct qr_code *);
-int qr_code_width(const struct qr_code *);
-
-size_t qr_code_total_capacity(int version);
-
-struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig,
- unsigned int mask);
-
#endif
diff --git a/lpg/libqr/qr/common.h b/lpg/libqr/qr/common.h
new file mode 100644
index 0000000..9caf3e0
--- /dev/null
+++ b/lpg/libqr/qr/common.h
@@ -0,0 +1,14 @@
+#ifndef QR_COMMON_H
+#define QR_COMMON_H
+
+#include <qr/types.h>
+
+struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig,
+ unsigned int mask);
+
+size_t qr_code_total_capacity(int version);
+
+int qr_code_width(const struct qr_code *);
+
+#endif
+
diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h
index a3bb309..3cc665a 100644
--- a/lpg/libqr/qr/data.h
+++ b/lpg/libqr/qr/data.h
@@ -4,24 +4,6 @@
#include <stddef.h>
#include "types.h"
-enum qr_data_type {
- QR_DATA_INVALID = -1,
- QR_DATA_ECI = 7,
- QR_DATA_NUMERIC = 1,
- QR_DATA_ALPHA = 2,
- QR_DATA_8BIT = 4,
- QR_DATA_KANJI = 8, /* JIS X 0208 */
- QR_DATA_MIXED = 3,
- QR_DATA_FNC1 = 9
-};
-
-enum qr_ec_level {
- QR_EC_LEVEL_L = 0x1,
- QR_EC_LEVEL_M = 0x0,
- QR_EC_LEVEL_Q = 0x3,
- QR_EC_LEVEL_H = 0x2
-};
-
struct qr_data {
int version; /* 1 ~ 40 */
enum qr_ec_level ec;
diff --git a/lpg/libqr/qr/types.h b/lpg/libqr/qr/types.h
index bb44cde..3615e3e 100644
--- a/lpg/libqr/qr/types.h
+++ b/lpg/libqr/qr/types.h
@@ -4,5 +4,23 @@
struct qr_data;
struct qr_code;
+enum qr_data_type {
+ QR_DATA_INVALID = -1,
+ QR_DATA_ECI = 7,
+ QR_DATA_NUMERIC = 1,
+ QR_DATA_ALPHA = 2,
+ QR_DATA_8BIT = 4,
+ QR_DATA_KANJI = 8, /* JIS X 0208 */
+ QR_DATA_MIXED = 3,
+ QR_DATA_FNC1 = 9
+};
+
+enum qr_ec_level {
+ QR_EC_LEVEL_L = 0x1,
+ QR_EC_LEVEL_M = 0x0,
+ QR_EC_LEVEL_Q = 0x3,
+ QR_EC_LEVEL_H = 0x2
+};
+
#endif