diff options
Diffstat (limited to 'lpg')
-rw-r--r-- | lpg/libqr/qr/bitmap.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/bitstream.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/code.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/common.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/data.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/layout.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/parse.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/types.h | 8 | ||||
-rw-r--r-- | lpg/libqr/qr/version.h | 8 |
9 files changed, 72 insertions, 0 deletions
diff --git a/lpg/libqr/qr/bitmap.h b/lpg/libqr/qr/bitmap.h index d4af471..72da07f 100644 --- a/lpg/libqr/qr/bitmap.h +++ b/lpg/libqr/qr/bitmap.h @@ -1,6 +1,10 @@ #ifndef QR_BITMAP_H #define QR_BITMAP_H +#ifdef __cplusplus +extern "C" { +#endif + struct qr_bitmap { unsigned char * bits; unsigned char * mask; @@ -25,5 +29,9 @@ void qr_bitmap_render(const struct qr_bitmap * bmp, unsigned long mark, unsigned long space); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/bitstream.h b/lpg/libqr/qr/bitstream.h index 9bd8261..aa431e8 100644 --- a/lpg/libqr/qr/bitstream.h +++ b/lpg/libqr/qr/bitstream.h @@ -3,6 +3,10 @@ #include <stddef.h> +#ifdef __cplusplus +extern "C" { +#endif + /** * Note: when writing / reading multiple bits, the * _most_ significant bits come first in the stream. @@ -45,5 +49,9 @@ int qr_bitstream_copy(struct qr_bitstream * dest, struct qr_bitstream * src, size_t count); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/code.h b/lpg/libqr/qr/code.h index e6eb47c..0f5d49c 100644 --- a/lpg/libqr/qr/code.h +++ b/lpg/libqr/qr/code.h @@ -4,6 +4,10 @@ #include <stddef.h> #include "types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct qr_code { int version; struct qr_bitmap * modules; @@ -13,5 +17,9 @@ struct qr_code * qr_code_create(const struct qr_data * data); void qr_code_destroy(struct qr_code *); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/common.h b/lpg/libqr/qr/common.h index 640696a..b7052ad 100644 --- a/lpg/libqr/qr/common.h +++ b/lpg/libqr/qr/common.h @@ -3,6 +3,10 @@ #include <qr/types.h> +#ifdef __cplusplus +extern "C" { +#endif + void qr_mask_apply(struct qr_bitmap * bmp, int mask); size_t qr_code_total_capacity(int version); @@ -20,5 +24,9 @@ void qr_get_rs_block_sizes(int version, int data_length[2], int ec_length[2]); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/data.h b/lpg/libqr/qr/data.h index f2b4b45..06600ab 100644 --- a/lpg/libqr/qr/data.h +++ b/lpg/libqr/qr/data.h @@ -4,6 +4,10 @@ #include <stddef.h> #include "types.h" +#ifdef __cplusplus +extern "C" { +#endif + struct qr_data { int version; /* 1 ~ 40 */ enum qr_ec_level ec; @@ -29,5 +33,9 @@ enum qr_data_type qr_parse_data(const struct qr_data * input, char ** output, size_t * length); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/layout.h b/lpg/libqr/qr/layout.h index 49bebf6..e691bdb 100644 --- a/lpg/libqr/qr/layout.h +++ b/lpg/libqr/qr/layout.h @@ -1,6 +1,10 @@ #ifndef QR_CODE_LAYOUT_H #define QR_CODE_LAYOUT_H +#ifdef __cplusplus +extern "C" { +#endif + struct qr_iterator; void qr_layout_init_mask(struct qr_code *); @@ -10,5 +14,9 @@ unsigned int qr_layout_read(struct qr_iterator *); void qr_layout_write(struct qr_iterator *, unsigned int); void qr_layout_end(struct qr_iterator *); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/parse.h b/lpg/libqr/qr/parse.h index 07a0424..0e08354 100644 --- a/lpg/libqr/qr/parse.h +++ b/lpg/libqr/qr/parse.h @@ -3,6 +3,10 @@ #include "data.h" +#ifdef __cplusplus +extern "C" { +#endif + int qr_code_parse(const void * buffer, size_t line_bits, size_t line_stride, @@ -12,5 +16,9 @@ int qr_code_parse(const void * buffer, int qr_decode_format(unsigned long bits, enum qr_ec_level * ec, int * mask); int qr_decode_version(unsigned long bits, int * version); +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/types.h b/lpg/libqr/qr/types.h index 3615e3e..ae760ab 100644 --- a/lpg/libqr/qr/types.h +++ b/lpg/libqr/qr/types.h @@ -1,6 +1,10 @@ #ifndef QR_TYPES_H #define QR_TYPES_H +#ifdef __cplusplus +extern "C" { +#endif + struct qr_data; struct qr_code; @@ -22,5 +26,9 @@ enum qr_ec_level { QR_EC_LEVEL_H = 0x2 }; +#ifdef __cplusplus +} +#endif + #endif diff --git a/lpg/libqr/qr/version.h b/lpg/libqr/qr/version.h index cd263c0..ce540f4 100644 --- a/lpg/libqr/qr/version.h +++ b/lpg/libqr/qr/version.h @@ -1,10 +1,18 @@ #ifndef QR_VERSION_H #define QR_VERSION_H +#ifdef __cplusplus +extern "C" { +#endif + #define QR_VERSION_MAJOR 0 #define QR_VERSION_MINOR 3 #define QR_VERSION "0.3" +#ifdef __cplusplus +} +#endif + #endif |