mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-09 13:41:59 -04:00
Handle UNICODE_MODE ECI conversion for reduced charset barcodes and QRCODE/MICROQR
This commit is contained in:
parent
385a0a246f
commit
fed7378675
36 changed files with 17680 additions and 7275 deletions
|
@ -28,6 +28,7 @@
|
|||
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGE.
|
||||
*/
|
||||
/* vim: set ts=4 sw=4 et : */
|
||||
|
||||
/* This code attempts to implement Han Xin Code according to AIMD-015:2010 (Rev 0.8) */
|
||||
|
||||
|
@ -368,6 +369,7 @@ static void calculate_binary(char binary[], char mode[], int source[], const siz
|
|||
printf("Numeric\n");
|
||||
}
|
||||
|
||||
count = 0; /* Suppress gcc -Wmaybe-uninitialized */
|
||||
i = 0;
|
||||
|
||||
while (i < block_length) {
|
||||
|
@ -1131,8 +1133,8 @@ int hx_apply_bitmask(unsigned char *grid, int size) {
|
|||
unsigned char p;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
unsigned char mask[size * size];
|
||||
unsigned char eval[size * size];
|
||||
unsigned char mask[(unsigned int)(size * size)]; /* Cast to suppress gcc -Walloc-size-larger-than */
|
||||
unsigned char eval[(unsigned int)(size * size)];
|
||||
#else
|
||||
unsigned char* mask = (unsigned char *) _alloca((size * size) * sizeof (unsigned char));
|
||||
unsigned char* eval = (unsigned char *) _alloca((size * size) * sizeof (unsigned char));
|
||||
|
@ -1249,7 +1251,7 @@ int han_xin(struct zint_symbol *symbol, const unsigned char source[], size_t len
|
|||
unsigned char *grid;
|
||||
#endif
|
||||
|
||||
if ((symbol->input_mode == DATA_MODE) || (symbol->eci != 0)) {
|
||||
if (((symbol->input_mode & 0x07) == DATA_MODE) || (symbol->eci != 0)) {
|
||||
for (i = 0; i < length; i++) {
|
||||
gbdata[i] = (int) source[i];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue