Ticket #109: rename datastream in fullstream, as this is the name of the more global variable

This commit is contained in:
Harald Oehlmann 2018-11-02 10:30:33 +01:00
parent 458d1c2ca0
commit cdc7778880

View File

@ -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;