1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-02-10 02:00:17 +00:00

Make the table for reversing bits const (#306)

This commit is contained in:
Nick Briggs
2021-01-26 20:40:15 -08:00
committed by GitHub
parent f7113d53ee
commit 100248e7a7
4 changed files with 4 additions and 5 deletions

View File

@@ -77,7 +77,7 @@ void word_swap_page(unsigned short *page, int longwordcount) {
/* */
/****************************************************************/
unsigned char reversedbits[256] = {
const unsigned char reversedbits[256] = {
/* table of bytes with their bits reversed */
0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0,

View File

@@ -708,7 +708,6 @@ void flush_display_region(int x, int y, int w, int h)
#ifdef BYTESWAP
void byte_swapped_displayregion(int x, int y, int w, int h)
{
extern unsigned char reversedbits[];
register unsigned int *longptr;
/* Get QUAD byte aligned pointer */

View File

@@ -64,6 +64,8 @@ extern DLword ERASE_atom;
extern DLword PAINT_atom;
extern DLword REPLACE_atom;
extern const unsigned char reversedbits[];
/**************************************************************/
/* Xerrhandler. */
/* Utility function to make URaid the error handler for X. */
@@ -2529,7 +2531,6 @@ MNXGrabPointer(LispArgs args)
Pixmap bits;
Window promptw;
int res, i;
extern unsigned char reversedbits[];
unsigned char *src;
unsigned char srcbits[32]; /* holds the reversed bits for cursor */
@@ -2738,7 +2739,6 @@ MNXSetCursor(LispArgs args) /* args[0] = Medley screen */
Cursor new_cursor;
Window win;
unsigned char srcbits[32]; /* hold the reversed-bits for cursor */
extern unsigned char reversedbits[];
unsigned char *src;
int i;

View File

@@ -193,7 +193,7 @@ void init_Xcursor(Display *display, Window window)
void set_Xcursor(DspInterface dsp, const uint8_t *bitmap, int hotspot_x, int hotspot_y, Cursor *return_cursor, int from_lisp)
{
extern unsigned char reversedbits[];
extern const unsigned char reversedbits[];
unsigned char image[32];
int i;
Pixmap Cursor_src, Cursor_msk;