mirror of
https://git.code.sf.net/p/zint/code
synced 2025-05-29 06:15:23 -04:00
Structural changes and updates from tgotic
This commit is contained in:
parent
7fa4b32c1d
commit
1695eae7dd
17 changed files with 671 additions and 439 deletions
|
@ -23,7 +23,9 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "common.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
static char *C25MatrixTable[10] = {"113311", "311131", "131131", "331111", "113131", "313111",
|
||||
"133111", "111331", "311311", "131311"};
|
||||
|
|
|
@ -55,7 +55,7 @@ all: $(DLL) $(STATLIB)
|
|||
|
||||
$(DLL):$(DLL_OBJ)
|
||||
@echo Linking $@...
|
||||
o2dll.sh -o $@ $(DLL_OBJ) $(LIBS) #-version-info 2:2:0 -version-number 2:2:0
|
||||
o2dll.sh -o $@ $(DLL_OBJ) $(LIBS)
|
||||
|
||||
$(STATLIB): $(LIB_OBJ)
|
||||
@echo Linking $@...
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
symbol->option_2 is used to adjust the width of the resulting symbol (i.e. the
|
||||
number of codeword columns not including row start and end data) */
|
||||
|
||||
/* @(#) $Id: pdf417.c,v 1.15 2009/10/06 19:31:43 hooper114 Exp $ */
|
||||
/* @(#) $Id: pdf417.c,v 1.16 2009/11/17 22:36:04 hooper114 Exp $ */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
@ -294,10 +294,8 @@ void textprocess(int *chainemc, int *mclength, char chaine[], int start, int len
|
|||
wnet++;
|
||||
}
|
||||
/* Now translate the string chainet into codewords */
|
||||
if (block > 0) {
|
||||
chainemc[*(mclength)] = 900;
|
||||
*(mclength) = *(mclength) + 1;
|
||||
}
|
||||
chainemc[*(mclength)] = 900;
|
||||
*(mclength) = *(mclength) + 1;
|
||||
|
||||
for(j = 0; j < wnet; j+= 2) {
|
||||
int cw_number;
|
||||
|
|
|
@ -157,7 +157,7 @@ int estimate_binary_length(char mode[], int length, int gs1)
|
|||
return count;
|
||||
}
|
||||
|
||||
void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1)
|
||||
void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int est_binlen)
|
||||
{
|
||||
/* Convert input data to a binary stream and add padding */
|
||||
int position = 0, debug = 0;
|
||||
|
@ -167,9 +167,9 @@ void qr_binary(int datastream[], int version, int target_binlen, char mode[], in
|
|||
int toggle, percent;
|
||||
|
||||
#ifndef _MSC_VER
|
||||
char binary[target_binlen * 8];
|
||||
char binary[est_binlen + 12];
|
||||
#else
|
||||
char* binary = (char *)_alloca(target_binlen * 8);
|
||||
char* binary = (char *)_alloca(est_binlen + 12);
|
||||
#endif
|
||||
strcpy(binary, "");
|
||||
|
||||
|
@ -1241,7 +1241,7 @@ int qr_code(struct zint_symbol *symbol, unsigned char source[], int length)
|
|||
int* fullstream = (int *)_alloca((qr_total_codewords[version - 1] + 1) * sizeof(int));
|
||||
#endif
|
||||
|
||||
qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1);
|
||||
qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, est_binlen);
|
||||
add_ecc(fullstream, datastream, version, target_binlen, blocks);
|
||||
|
||||
size = qr_sizes[version - 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue