Cell used -> cell flags
This commit is contained in:
parent
d85d45f0fa
commit
281dec029a
|
@ -71,11 +71,13 @@ typedef g1m_mcsfile_type_t g1m_mcstype_t;
|
|||
/* ************************************************************************** */
|
||||
/* Helpers */
|
||||
/* ************************************************************************** */
|
||||
/* MCS cell flags */
|
||||
# define g1m_mcscellflag_used 0x0001
|
||||
|
||||
/* List, Matrix, Vector and Spreadsheet cell. */
|
||||
typedef struct g1m_mcs_cell_s {
|
||||
g1m_bcd_t real;
|
||||
g1m_bcd_t imgn;
|
||||
int used;
|
||||
g1m_bcd_t real, imgn;
|
||||
unsigned int flags;
|
||||
} g1m_mcscell_t;
|
||||
/* ************************************************************************** */
|
||||
/* Main structures */
|
||||
|
|
|
@ -221,7 +221,7 @@ static int read_matrix(g1m_mcsfile_t **pfile, g1m_buffer_t *buffer,
|
|||
cells[y][x] = (g1m_mcscell_t){
|
||||
.real = bcd,
|
||||
.imgn = {},
|
||||
.used = 1
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -285,7 +285,7 @@ static int read_list(g1m_mcsfile_t **pfile, g1m_buffer_t *buffer,
|
|||
cells[x][0] = (g1m_mcscell_t){
|
||||
.real = bcd,
|
||||
.imgn = {},
|
||||
.used = 1
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ int g1m_decode_mcs_list(g1m_mcsfile_t **handle, g1m_buffer_t *buffer,
|
|||
tab[y][0] = (g1m_mcscell_t){
|
||||
.real = bcd,
|
||||
.imgn = {},
|
||||
.used = 1
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ int g1m_decode_mcs_matrix(g1m_mcsfile_t **handle, g1m_buffer_t *buffer,
|
|||
tab[y][x] = (g1m_mcscell_t){
|
||||
.real = bcd,
|
||||
.imgn = {},
|
||||
.used = 1
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ int g1m_decode_caspart_matrix(g1m_mcsfile_t *handle, g1m_buffer_t *buffer)
|
|||
handle->cells[cell.y][cell.x] = (g1m_mcscell_t){
|
||||
.real = bcd,
|
||||
.imgn = {},
|
||||
.used = 1
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
|
||||
/* check if its the last cell */
|
||||
|
|
|
@ -82,9 +82,9 @@ int g1m_decode_mcs_spreadsheet(g1m_mcsfile_t **handle, g1m_buffer_t *buffer,
|
|||
|
||||
/* store it */
|
||||
cells[c * 1000 + i] = (g1m_mcscell_t){
|
||||
.used = 1,
|
||||
.real = cell,
|
||||
.imgn = (g1m_bcd_t){}
|
||||
.imgn = (g1m_bcd_t){},
|
||||
.flags = g1m_mcscellflag_used
|
||||
};
|
||||
|
||||
/* check things (max row, max col, cells count) */
|
||||
|
|
|
@ -47,7 +47,7 @@ int g1m_decode_mcs_var(g1m_mcsfile_t **handle, g1m_buffer_t *buffer,
|
|||
for (int i = 0; i < head->count; i++) {
|
||||
g1m_bcd_frommcs(b++, &h->vars[i].real);
|
||||
g1m_bcd_frommcs(b++, &h->vars[i].imgn);
|
||||
h->vars[i].used = 1;
|
||||
h->vars[i].flags = g1m_mcscellflag_used;
|
||||
}
|
||||
|
||||
/* no problem, woop woop */
|
||||
|
|
Reference in New Issue