From 3af4ffd175dcaf8aaf735f3f9564da54c4f29403 Mon Sep 17 00:00:00 2001 From: Leo Uino Date: Thu, 14 Jul 2011 11:36:58 +0900 Subject: Create common header --- lpg/libqr/code-create.c | 1 + lpg/libqr/code-layout.c | 1 + lpg/libqr/code-parse.c | 2 +- lpg/libqr/constants.h | 2 +- lpg/libqr/qr/code.h | 7 ------- lpg/libqr/qr/common.h | 14 ++++++++++++++ lpg/libqr/qr/data.h | 18 ------------------ lpg/libqr/qr/types.h | 18 ++++++++++++++++++ 8 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 lpg/libqr/qr/common.h (limited to 'lpg/libqr') 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 #include #include +#include #include #include #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 #include +#include #include #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 #include #include -#include +#include #include #include 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 +#include 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 + +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 #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 -- cgit v1.2.3-70-g09d2