mirror of
https://github.com/zint/zint
synced 2024-11-16 20:57:25 +13:00
Ticket #109: rename datastream in fullstream, as this is the name of the more global variable
This commit is contained in:
parent
458d1c2ca0
commit
cdc7778880
10
backend/qr.c
10
backend/qr.c
@ -660,17 +660,17 @@ static void setup_grid(unsigned char* grid,const int size,const int version) {
|
||||
}
|
||||
}
|
||||
|
||||
static int cwbit(const int* datastream,const int i) {
|
||||
static int cwbit(const int* fullstream,const int i) {
|
||||
int resultant = 0;
|
||||
|
||||
if (datastream[(i / 8)] & (0x80 >> (i % 8))) {
|
||||
if (fullstream[(i / 8)] & (0x80 >> (i % 8))) {
|
||||
resultant = 1;
|
||||
}
|
||||
|
||||
return resultant;
|
||||
}
|
||||
|
||||
static void populate_grid(unsigned char* grid,const int size,const int* datastream,const int cw) {
|
||||
static void populate_grid(unsigned char* grid,const int size,const int* fullstream,const int cw) {
|
||||
int direction = 1; /* up */
|
||||
int row = 0; /* right hand side */
|
||||
|
||||
@ -685,7 +685,7 @@ static void populate_grid(unsigned char* grid,const int size,const int* datastre
|
||||
x--; /* skip over vertical timing pattern */
|
||||
|
||||
if (!(grid[(y * size) + (x + 1)] & 0xf0)) {
|
||||
if (cwbit(datastream, i)) {
|
||||
if (cwbit(fullstream, i)) {
|
||||
grid[(y * size) + (x + 1)] = 0x01;
|
||||
} else {
|
||||
grid[(y * size) + (x + 1)] = 0x00;
|
||||
@ -695,7 +695,7 @@ static void populate_grid(unsigned char* grid,const int size,const int* datastre
|
||||
|
||||
if (i < n) {
|
||||
if (!(grid[(y * size) + x] & 0xf0)) {
|
||||
if (cwbit(datastream, i)) {
|
||||
if (cwbit(fullstream, i)) {
|
||||
grid[(y * size) + x] = 0x01;
|
||||
} else {
|
||||
grid[(y * size) + x] = 0x00;
|
||||
|
Loading…
Reference in New Issue
Block a user