diff options
Diffstat (limited to 'lpg')
| -rw-r--r-- | lpg/libqr/COPYING | 16 | ||||
| -rw-r--r-- | lpg/libqr/TODO | 9 | ||||
| -rw-r--r-- | lpg/libqr/code-common.c | 2 | ||||
| -rw-r--r-- | lpg/libqr/galois.c | 7 | ||||
| -rw-r--r-- | lpg/libqr/galois.h | 7 | ||||
| -rw-r--r-- | lpg/libqr/qr/bitstream.h | 23 | 
6 files changed, 26 insertions, 38 deletions
diff --git a/lpg/libqr/COPYING b/lpg/libqr/COPYING index 10a9711..ff2f585 100644 --- a/lpg/libqr/COPYING +++ b/lpg/libqr/COPYING @@ -1,16 +1,14 @@ -I, the author, hereby release this work into the public -domain. +I, the author, hereby release this work into the public domain. -Where the above is not possible, I release this work as -"Copyright-Free", or (at your option) under the terms of -the Creative Commons CC0 license: +Where the above is not possible, I release this work as "Copyright  +Free", or (at your option) under the terms of the Creative Commons CC0  +license:      http://creativecommons.org/publicdomain/zero/1.0/ -The author waives all rights concerning the modification, -reproduction and/or distribution of this work, or -derivatives thereof, in whole or part, and in any form. -Attribution is not required. +The author waives all rights concerning the modification, reproduction  +and/or distribution of this work, or derivatives thereof, in whole or  +in part, and in any form. Attribution is not required.  Leo Howell, September 2009 diff --git a/lpg/libqr/TODO b/lpg/libqr/TODO index 3cd0583..1b9671b 100644 --- a/lpg/libqr/TODO +++ b/lpg/libqr/TODO @@ -1,20 +1,11 @@ -* Fix XXX, TODO -* Tidy code -* RELEASE v0.1 -  * Parsing -* RELEASE v0.2  * Detection -* RELEASE v0.3  * Test suite  * No-malloc  * Optimize  * Documentation -* RELEASE v0.4 (BETA) - -* RELEASE v1.0  * Other data types diff --git a/lpg/libqr/code-common.c b/lpg/libqr/code-common.c index bc6621a..a0b8fcc 100644 --- a/lpg/libqr/code-common.c +++ b/lpg/libqr/code-common.c @@ -47,7 +47,7 @@ struct qr_bitmap * qr_mask_apply(const struct qr_bitmap * orig,          struct qr_bitmap * bmp;          int i, j; -        if (mask & ~0x7) +        if (mask > 7)                  return 0;          bmp = qr_bitmap_clone(orig); diff --git a/lpg/libqr/galois.c b/lpg/libqr/galois.c index e21ce22..f0aadfd 100644 --- a/lpg/libqr/galois.c +++ b/lpg/libqr/galois.c @@ -5,8 +5,7 @@  #include "galois.h"  /* Calculate the residue of a modulo m */ -unsigned long gf_residue(unsigned long a, -                         unsigned long m) +unsigned long gf_residue(unsigned long a, unsigned long m)  {          unsigned long o = 1;          int n = 1; @@ -77,8 +76,8 @@ static unsigned int * make_generator(int k)  }  struct qr_bitstream * rs_generate_words(struct qr_bitstream * data, -                                     size_t data_words, -                                     size_t rs_words) +                                        size_t data_words, +                                        size_t rs_words)  {          struct qr_bitstream * ec = 0;          unsigned int * b = 0; diff --git a/lpg/libqr/galois.h b/lpg/libqr/galois.h index 1adeb88..4ca0c93 100644 --- a/lpg/libqr/galois.h +++ b/lpg/libqr/galois.h @@ -1,12 +1,11 @@  #ifndef QR_GALOIS_H  #define QR_GALOIS_H -unsigned long gf_residue(unsigned long a, -                         unsigned long m); +unsigned long gf_residue(unsigned long a, unsigned long m);  struct qr_bitstream * rs_generate_words(struct qr_bitstream * data, -                                     size_t data_words, -                                     size_t rs_words); +                                        size_t data_words, +                                        size_t rs_words);  #endif diff --git a/lpg/libqr/qr/bitstream.h b/lpg/libqr/qr/bitstream.h index cf20694..5ca6b41 100644 --- a/lpg/libqr/qr/bitstream.h +++ b/lpg/libqr/qr/bitstream.h @@ -13,8 +13,8 @@  struct qr_bitstream;  struct qr_bitstream * qr_bitstream_create(void); -int                qr_bitstream_resize(struct qr_bitstream *, size_t bits); -void               qr_bitstream_destroy(struct qr_bitstream *); +int qr_bitstream_resize(struct qr_bitstream *, size_t bits); +void qr_bitstream_destroy(struct qr_bitstream *);  struct qr_bitstream * qr_bitstream_dup(const struct qr_bitstream *);  void qr_bitstream_seek(struct qr_bitstream *, size_t pos); @@ -25,20 +25,21 @@ size_t qr_bitstream_size(const struct qr_bitstream *);  unsigned int qr_bitstream_read(struct qr_bitstream *, size_t bits);  void qr_bitstream_unpack(struct qr_bitstream *, -                      unsigned int * result, -                      size_t         count, -                      size_t         bitsize); +                         unsigned int * result, +                         size_t         count, +                         size_t         bitsize);  int qr_bitstream_write(struct qr_bitstream *, -                    unsigned int value, -                    size_t       bits); +                       unsigned int value, +                       size_t       bits);  int qr_bitstream_pack(struct qr_bitstream *, -                   const unsigned int * values, -                   size_t               count, -                   size_t               bitsize); +                      const unsigned int * values, +                      size_t               count, +                      size_t               bitsize); -int qr_bitstream_cat(struct qr_bitstream *, const struct qr_bitstream * src); +int qr_bitstream_cat(struct qr_bitstream *, +                     const struct qr_bitstream * src);  int qr_bitstream_copy(struct qr_bitstream * dest,                        struct qr_bitstream * src,  | 
