[sixel] make some sixeltable args const

This commit is contained in:
nick black 2021-04-04 05:29:19 -04:00
parent 7e78690597
commit 0c2e3d6e35
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -316,7 +316,7 @@ write_rle(int* printed, int color, FILE* fp, int seenrle, unsigned char crle){
// Emit the sprixel in its entirety, plus enable and disable pixel mode. // Emit the sprixel in its entirety, plus enable and disable pixel mode.
// Closes |fp| on all paths. // Closes |fp| on all paths.
static int static int
write_sixel_data(FILE* fp, int lenx, sixeltable* stab, int* parse_start){ write_sixel_data(FILE* fp, int lenx, const sixeltable* stab, int* parse_start){
*parse_start = fprintf(fp, "\ePq"); *parse_start = fprintf(fp, "\ePq");
// Set Raster Attributes - pan/pad=1 (pixel aspect ratio), Ph=lenx, Pv=leny // Set Raster Attributes - pan/pad=1 (pixel aspect ratio), Ph=lenx, Pv=leny
// using Ph/Pv causes a background to be drawn using color register 0 for all // using Ph/Pv causes a background to be drawn using color register 0 for all
@ -386,7 +386,7 @@ write_sixel_data(FILE* fp, int lenx, sixeltable* stab, int* parse_start){
// stacks. There is also a RLE component, handled in rasterization. // stacks. There is also a RLE component, handled in rasterization.
// A pixel block is indicated by setting cell_pixels_p(). // A pixel block is indicated by setting cell_pixels_p().
static inline int static inline int
sixel_blit_inner(int leny, int lenx, sixeltable* stab, int rows, int cols, sixel_blit_inner(int leny, int lenx, const sixeltable* stab, int rows, int cols,
const blitterargs* bargs, sprixcell_e* tacache){ const blitterargs* bargs, sprixcell_e* tacache){
char* buf = NULL; char* buf = NULL;
size_t size = 0; size_t size = 0;