diff --git a/inc/bbtsub.h b/inc/bbtsub.h index d1a8785..898e53f 100644 --- a/inc/bbtsub.h +++ b/inc/bbtsub.h @@ -11,9 +11,12 @@ /* Don Charnley's bitblt code to do them. */ /* */ /********************************************************/ -#if (!(defined(NOPIXRECT)) && !(defined(NEWBITBLT)) && !(defined(I386))) +#if defined(SUNDISPLAY) && \ + !defined(NOPIXRECT) && \ + !defined(NEWBITBLT) && \ + !defined(I386) #define prropstyle 1 -#endif /* NOPIXRECT */ +#endif void bitbltsub(LispPTR *argv); LispPTR n_new_cursorin(DLword *baseaddr, int dx, int dy, int w, int h); diff --git a/src/bitblt.c b/src/bitblt.c index 348f8d1..ec193f1 100644 --- a/src/bitblt.c +++ b/src/bitblt.c @@ -12,8 +12,7 @@ #include -#ifndef NOPIXRECT -#ifndef DOS +#ifdef SUNDISPLAY #include #include @@ -21,7 +20,6 @@ #include #include #include -#endif /* DOS */ #include #endif diff --git a/src/initdsp.c b/src/initdsp.c index 8aa09e7..ada7a32 100644 --- a/src/initdsp.c +++ b/src/initdsp.c @@ -18,35 +18,20 @@ #include #include +#ifdef SUNDISPLAY #ifndef NOPIXRECT -#ifndef DOS -#ifdef XWINDOW -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#else #include #include #include -#endif /* XWINDOW */ -/* #include */ #include #include #include #include #include #include -#endif /* DOS */ #include #endif /* NOPIXRECT */ +#endif /* SUNDISPLAY */ #ifdef OS4 #include @@ -93,8 +78,9 @@ extern DspInterfaceRec _curdsp, _coldsp; #define FBTYPE_SUNFAST_COLOR 12 #endif -#ifndef NOPIXRECT +#ifdef SUNDISPLAY struct screen LispScreen; +#ifndef NOPIXRECT struct pixrect *CursorBitMap, *InvisibleCursorBitMap; struct pixrect *SrcePixRect, *DestPixRect; #ifdef DISPLAYBUFFER @@ -106,6 +92,7 @@ int oldred[2], oldgreen[2], oldblue[2]; #endif /* DEBUG */ #endif /* DISPLAYBUFFER */ #endif /* NOPIXRECT */ +#endif /* SUNDISPLAY */ int LispWindowFd = -1; int FrameBufferFd = -1; @@ -160,25 +147,23 @@ int Win_security_p; /************************************************************************/ void init_cursor() { +#ifdef SUNDISPLAY #ifndef NOPIXRECT CursorBitMap = mem_create(CURSORWIDTH, CURSORHEIGHT, 1); mpr_mdlinebytes(CursorBitMap) = CURSORWIDTH >> 3; /* 2(byte) */ #endif /* NOPIXRECT */ -#ifdef SUNDISPLAY CurrentCursor.cur_xhot = 0; CurrentCursor.cur_yhot = 0; CurrentCursor.cur_shape = CursorBitMap; CurrentCursor.cur_function = PIX_SRC | PIX_DST; -#endif /* SUNDISPLAY */ -/* Invisible Cursor */ + /* Invisible Cursor */ #ifndef NOPIXRECT InvisibleCursorBitMap = mem_create(0, 0, 1); #endif /* NOPIXRECT */ -#ifdef SUNDISPLAY InvisibleCursor.cur_xhot = 0; InvisibleCursor.cur_yhot = 0; InvisibleCursor.cur_shape = InvisibleCursorBitMap; @@ -373,10 +358,10 @@ void init_display2(DLword *display_addr, int display_max) #endif /* DOS */ DBPRINT(("FBIOGTYPE w x h = %d x %d\n", displaywidth, displayheight)); -#if (!defined(XWINDOW) && !defined(DOS)) +#ifdef SUNDISPLAY DBPRINT((" (real) type = %d\n", my_screen.fb_type)); DBPRINT((" (real) bpp = %d\n", my_screen.fb_depth)); -#endif /* XWINDOW */ +#endif /* SUNDISPLAY */ #ifdef SUNDISPLAY /** now attempt to use the FBIOGATTR call for more information **/ @@ -558,11 +543,11 @@ void init_display2(DLword *display_addr, int display_max) DBPRINT(("after clear_display()\n")); -#ifndef NOPIXRECT +#if defined(SUNDISPLAY) && !defined(NOPIXRECT) /* initialize pixrect used in pilotbitblt */ SrcePixRect = mem_point(0, 0, 1, NULL); DestPixRect = mem_point(0, 0, 1, NULL); -#endif /* NOPIXRECT */ +#endif DBPRINT(("exiting init_display\n")); } diff --git a/src/initkbd.c b/src/initkbd.c index e163462..a90b926 100644 --- a/src/initkbd.c +++ b/src/initkbd.c @@ -11,18 +11,16 @@ #include "version.h" #include +#include #include #include #include #include + #ifndef DOS #include #include #endif /* DOS */ -#ifdef SUNDISPLAY -#include -#include -#endif /* SUNDISPLAY */ #ifdef DOS #include /* "#pragma interrupt" & '_chain_intr'*/ @@ -33,15 +31,14 @@ #include #endif /* DOS */ -#include #ifdef SUNDISPLAY -#ifndef DOS +#include +#include #include #include #include #include #include -#endif /* DOS */ #endif /* SUNDISPLAY */ #ifdef DOS @@ -544,7 +541,7 @@ void keyboardtype(int fd) type = KB_X; #elif DOS type = KB_DOS; -#else +#elif SUNDISPLAY if (ioctl(fd, KIOCTYPE, &type) != 0) { error("keyboardtype:IOCTL(KIOCTYPE) fails (cont. w. type-3"); type = KB_SUN3;