From 85890b88df7d4cc315167409e6364418e5348324 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Tue, 3 Aug 2004 20:57:06 +0000 Subject: Const policed the grayscale lib & plugin git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4985 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/lib/gray_drawgraymap.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'apps/plugins/lib/gray_drawgraymap.c') diff --git a/apps/plugins/lib/gray_drawgraymap.c b/apps/plugins/lib/gray_drawgraymap.c index dc33446527..c8ee93fef1 100644 --- a/apps/plugins/lib/gray_drawgraymap.c +++ b/apps/plugins/lib/gray_drawgraymap.c @@ -30,16 +30,16 @@ #include "gray.h" /* Prototypes */ -static void _writearray(unsigned char *address, unsigned char *src, int stride, - unsigned mask); +static void _writearray(unsigned char *address, const unsigned char *src, + int stride, unsigned mask); /* Write an 8-pixel block, defined by their brightnesses in a graymap. * Address is the byte in the first bitplane, src is the graymap start address, * stride is the increment for the graymap to get to the next pixel, mask * determines which pixels of the destination block are changed. For "0" bits, * the src address is not incremented! */ -static void _writearray(unsigned char *address, unsigned char *src, int stride, - unsigned mask) +static void _writearray(unsigned char *address, const unsigned char *src, + int stride, unsigned mask) { unsigned long pat_stack[8]; register unsigned char *end_addr; @@ -217,12 +217,13 @@ asm ( This is the only drawing function NOT using the drawinfo. */ -void gray_drawgraymap(unsigned char *src, int x, int y, int nx, int ny, +void gray_drawgraymap(const unsigned char *src, int x, int y, int nx, int ny, int stride) { int shift; unsigned mask_top, mask_bottom; - unsigned char *src_row, *dst, *dst_row; + const unsigned char *src_row; + unsigned char *dst, *dst_row; if ((unsigned) x >= (unsigned) _graybuf->width || (unsigned) y >= (unsigned) _graybuf->height) -- cgit v1.2.3