diff --git a/bin/makefile-tail b/bin/makefile-tail index 92f3e96..619fbe9 100755 --- a/bin/makefile-tail +++ b/bin/makefile-tail @@ -335,7 +335,7 @@ $(OBJECTDIR)bbt386i.o : $(SRCDIR)bbt386i.s $(OBJECTDIR)bbt386i.i $(OBJECTDIR)bbt386i.i : $(SRCDIR)bbt386i.s /lib/cpp $(SRCDIR)bbt386i.s $(OBJECTDIR)bbt386i.i -$(OBJECTDIR)bbtsub.o : $(SRCDIR)bbtsub.c $(REQUIRED-INCS) $(INCDIR)lispemul.h \ +$(OBJECTDIR)bbtsub.o : $(SRCDIR)bbtsub.c $(INCDIR)bbtsub.h $(REQUIRED-INCS) $(INCDIR)lispemul.h \ $(INCDIR)lspglob.h $(INCDIR)lispmap.h $(INCDIR)lsptypes.h \ $(INCDIR)emlglob.h $(INCDIR)adr68k.h $(INCDIR)address.h \ $(INCDIR)pilotbbt.h $(INCDIR)display.h $(INCDIR)dspdata.h \ @@ -372,7 +372,7 @@ $(OBJECTDIR)rawcolor.o : $(SRCDIR)rawcolor.c $(REQUIRED-INCS) $(INCDIR)lispemu $(INCDIR)emlglob.h $(INCDIR)adr68k.h $(INCDIR)address.h \ $(INCDIR)pilotbbt.h $(INCDIR)display.h $(INCDIR)bitblt.h \ $(INCDIR)arith.h $(INCDIR)cell.h $(INCDIR)dspdata.h $(INCDIR)debug.h \ - $(INCDIR)stream.h + $(INCDIR)stream.h $(INCDIR)bbtsub.h $(CC) $(RFLAGS) $(SRCDIR)rawcolor.c $(INLINE) -o $(OBJECTDIR)rawcolor$(OEXT) $(OBJECTDIR)llcolor.o : $(SRCDIR)llcolor.c $(REQUIRED-INCS) $(INCDIR)lispemul.h $(INCDIR)lispmap.h \ @@ -405,7 +405,7 @@ $(OBJECTDIR)mkcell.o : $(SRCDIR)mkcell.c $(REQUIRED-INCS) $(INCDIR)lispemul.h $(OBJECTDIR)draw.o : $(SRCDIR)draw.c $(REQUIRED-INCS) $(INCDIR)lispemul.h \ $(INCDIR)lspglob.h $(INCDIR)adr68k.h \ $(INCDIR)lispmap.h $(INCDIR)lsptypes.h $(INCDIR)emlglob.h \ - $(INCDIR)my.h + $(INCDIR)my.h $(INCDIR)bbtsub.h $(CC) $(RFLAGS) $(SRCDIR)draw.c $(INLINE) -o $(OBJECTDIR)draw$(OEXT) $(OBJECTDIR)z2.o : $(SRCDIR)z2.c $(REQUIRED-INCS) \ @@ -665,7 +665,7 @@ $(OBJECTDIR)lowlev2.o : $(SRCDIR)lowlev2.c $(REQUIRED-INCS) $(INCDIR)lispemul. $(OBJECTDIR)misc7.o : $(SRCDIR)misc7.c $(REQUIRED-INCS) $(INCDIR)lispemul.h \ $(INCDIR)lspglob.h $(INCDIR)adr68k.h \ $(INCDIR)lispmap.h $(INCDIR)lsptypes.h $(INCDIR)emlglob.h \ - $(INCDIR)stack.h $(INCDIR)opcodes.h $(INCDIR)display.h + $(INCDIR)stack.h $(INCDIR)opcodes.h $(INCDIR)display.h $(INCDIR)bbtsub.h $(CC) $(RFLAGS) $(SRCDIR)misc7.c $(INLINE) -o $(OBJECTDIR)misc7$(OEXT) $(OBJECTDIR)mvs.o : $(SRCDIR)mvs.c $(REQUIRED-INCS) $(INCDIR)lispemul.h \ @@ -719,7 +719,7 @@ $(OBJECTDIR)subr.o : $(SRCDIR)subr.c $(REQUIRED-INCS) \ $(INCDIR)lsptypes.h $(INCDIR)lispmap.h $(INCDIR)emlglob.h \ $(INCDIR)lspglob.h $(INCDIR)cell.h $(INCDIR)stack.h \ $(INCDIR)arith.h $(INCDIR)profile.h $(INCDIR)dsk.h $(INCDIR)dir.h $(INCDIR)ufs.h \ - $(INCDIR)chardev.h $(INCDIR)dspsubrs.h $(INCDIR)storage.h + $(INCDIR)chardev.h $(INCDIR)dspsubrs.h $(INCDIR)storage.h $(INCDIR)bbtsub.h $(CC) $(RFLAGS) $(SRCDIR)subr.c $(INLINE) -o $(OBJECTDIR)subr$(OEXT) $(OBJECTDIR)miscn.o : $(SRCDIR)miscn.c $(REQUIRED-INCS) \ diff --git a/inc/bbtsub.h b/inc/bbtsub.h new file mode 100644 index 0000000..b956e34 --- /dev/null +++ b/inc/bbtsub.h @@ -0,0 +1,28 @@ +/***** Don't use PixRect code on 386i for now *****/ +/***** -or on any machine that doesn't support it (HP, e.g.) *****/ + +/********************************************************/ +/* */ +/* prropstyle is DEFINED when we want to use */ +/* pixrect versions of the operations in this */ +/* file, and UNDEFINED, when we want to use */ +/* Don Charnley's bitblt code to do them. */ +/* */ +/********************************************************/ +#if (!(defined(NOPIXRECT)) && !(defined(NEWBITBLT)) && !(defined(I386))) +#define prropstyle 1 +#endif /* NOPIXRECT */ + +void bitbltsub(LispPTR *argv); +LispPTR n_new_cursorin(DLword *baseaddr, int dx, int dy, int w, int h); +LispPTR bitblt_bitmap(LispPTR *args); +LispPTR bitshade_bitmap(LispPTR *args); +#ifndef prropstyle +void bltchar(LispPTR *args); +void newbltchar(LispPTR *args); +#else +LispPTR bltchar(LispPTR *args); +LispPTR newbltchar(LispPTR *args); +#endif +void ccfuncall(unsigned int atom_index, int argnum, int bytenum); +void tedit_bltchar(LispPTR *args); diff --git a/src/bbtsub.c b/src/bbtsub.c index ed15356..9b52530 100644 --- a/src/bbtsub.c +++ b/src/bbtsub.c @@ -89,10 +89,12 @@ extern IOPAGE *IOPage68K; #include "bb.h" #include "bitblt.h" #include "pilotbbt.h" +#include "bbtsub.h" #include "dspdata.h" #include "display.h" #include "dbprint.h" + #if (defined(DOS) || defined(XWINDOW)) #include "devif.h" extern DspInterface currentdsp; @@ -122,21 +124,122 @@ extern int MonoOrColor; #define BITSPERWORD (16) /* temp definition */ -/***** Don't use PixRect code on 386i for now *****/ -/***** -or on any machine that doesn't support it (HP, e.g.) *****/ +#ifndef BYTESWAP +#ifdef BIGVM +typedef struct { + unsigned nil1 : 4; + unsigned pilotbbt : 28; + unsigned nil2 : 4; + unsigned displaydata : 28; + unsigned nil3 : 16; + unsigned char8code : 16; + unsigned nil4 : 16; + unsigned curx : 16; + unsigned nil5 : 16; + unsigned left : 16; + unsigned nil6 : 16; + unsigned right : 16; +} BLTC; +#else +typedef struct { + unsigned nil1 : 8; + unsigned pilotbbt : 24; + unsigned nil2 : 8; + unsigned displaydata : 24; + unsigned nil3 : 16; + unsigned char8code : 16; + unsigned nil4 : 16; + unsigned curx : 16; + unsigned nil5 : 16; + unsigned left : 16; + unsigned nil6 : 16; + unsigned right : 16; +} BLTC; +#endif /* BIGVM */ +#else +#ifdef BIGVM +typedef struct { + unsigned pilotbbt : 28; + unsigned nil1 : 4; + unsigned displaydata : 28; + unsigned nil2 : 4; + unsigned char8code : 16; + unsigned nil3 : 16; + unsigned curx : 16; + unsigned nil4 : 16; + unsigned left : 16; + unsigned nil5 : 16; + unsigned right : 16; + unsigned nil6 : 16; +} BLTC; +#else +typedef struct { + unsigned pilotbbt : 24; + unsigned nil1 : 8; + unsigned displaydata : 24; + unsigned nil2 : 8; + unsigned char8code : 16; + unsigned nil3 : 16; + unsigned curx : 16; + unsigned nil4 : 16; + unsigned left : 16; + unsigned nil5 : 16; + unsigned right : 16; + unsigned nil6 : 16; +} BLTC; +#endif /* BIGVM */ +#endif /* BYTESWAP */ -/********************************************************/ -/* */ -/* prropstyle is DEFINED when we want to use */ -/* pixrect versions of the operations in this */ -/* file, and UNDEFINED, when we want to use */ -/* Don Charnley's bitblt code to do them. */ -/* */ -/********************************************************/ +/****************************************/ +/* */ +/* Arguments to NEWBLTCHAR */ +/* */ +/****************************************/ +#ifndef BYTESWAP +typedef struct { + DLword nil; /* Unused word */ + unsigned charset : 8; /* High 8 bits of character code */ + unsigned char8code : 8; /* Low 8 bits of character code */ + LispPTR displaystream; /* The display stream to print on */ + LispPTR displaydata; /* The image data (margins, etc) */ +} BLTARG; +#else +typedef struct { + unsigned char8code : 8; /* Low 8 bits of character code */ + unsigned charset : 8; /* High 8 bits of character code */ + DLword nil; /* Unused word */ + LispPTR displaystream; /* The display stream to print on */ + LispPTR displaydata; /* The image data (margins, etc) */ +} BLTARG; +#endif /* BYTESWAP */ -#if (!(defined(NOPIXRECT)) && !(defined(NEWBITBLT)) && !(defined(I386))) -#define prropstyle 1 -#endif /* NOPIXRECT */ +#ifndef BYTESWAP +typedef struct tbta { + DLword nil; + unsigned charset : 8; + unsigned char8code : 8; + LispPTR displaystream; + unsigned int nil2 : 16; + unsigned int current_x : 16; /* this is always positive */ + LispPTR displaydata; + LispPTR ddpilotbitblt; + unsigned int nil3 : 16; + unsigned int clipright : 16; /* this is always positive */ +} TBLTARG; +#else +typedef struct tbta { + unsigned char8code : 8; + unsigned charset : 8; + DLword nil; + LispPTR displaystream; + unsigned int current_x : 16; /* this is always positive */ + unsigned int nil2 : 16; + LispPTR displaydata; + LispPTR ddpilotbitblt; + unsigned int clipright : 16; /* this is always positive */ + unsigned int nil3 : 16; +} TBLTARG; +#endif /* BYTESWAP */ extern int LispWindowFd; extern int ScreenLocked; /* for mouse tracking */ @@ -211,8 +314,6 @@ extern DLword REPLACE_atom; extern int kbd_for_makeinit; /*** FOR INIT ***/ -void ccfuncall(unsigned int, int, int); - /************************************************************************/ /* */ /* b i t b l t s u b */ @@ -1049,71 +1150,6 @@ bad_arg: (\PILOTBITBLT LOCAL1 0) *********/ -#ifndef BYTESWAP -#ifdef BIGVM -typedef struct { - unsigned nil1 : 4; - unsigned pilotbbt : 28; - unsigned nil2 : 4; - unsigned displaydata : 28; - unsigned nil3 : 16; - unsigned char8code : 16; - unsigned nil4 : 16; - unsigned curx : 16; - unsigned nil5 : 16; - unsigned left : 16; - unsigned nil6 : 16; - unsigned right : 16; -} BLTC; -#else -typedef struct { - unsigned nil1 : 8; - unsigned pilotbbt : 24; - unsigned nil2 : 8; - unsigned displaydata : 24; - unsigned nil3 : 16; - unsigned char8code : 16; - unsigned nil4 : 16; - unsigned curx : 16; - unsigned nil5 : 16; - unsigned left : 16; - unsigned nil6 : 16; - unsigned right : 16; -} BLTC; -#endif /* BIGVM */ -#else -#ifdef BIGVM -typedef struct { - unsigned pilotbbt : 28; - unsigned nil1 : 4; - unsigned displaydata : 28; - unsigned nil2 : 4; - unsigned char8code : 16; - unsigned nil3 : 16; - unsigned curx : 16; - unsigned nil4 : 16; - unsigned left : 16; - unsigned nil5 : 16; - unsigned right : 16; - unsigned nil6 : 16; -} BLTC; -#else -typedef struct { - unsigned pilotbbt : 24; - unsigned nil1 : 8; - unsigned displaydata : 24; - unsigned nil2 : 8; - unsigned char8code : 16; - unsigned nil3 : 16; - unsigned curx : 16; - unsigned nil4 : 16; - unsigned left : 16; - unsigned nil5 : 16; - unsigned right : 16; - unsigned nil6 : 16; -} BLTC; -#endif /* BIGVM */ -#endif /* BYTESWAP */ /************************************************************************/ /* */ @@ -1123,13 +1159,12 @@ typedef struct { /* */ /* */ /************************************************************************/ - #ifndef prropstyle /********************************************************/ /* Non-PIXRECT version of the code */ /********************************************************/ -void bltchar(register BLTC *args) +void bltchar(LispPTR *args) /* args[0] : PILOTBBT * args[1] : DISPLAYDATA * args[2] : CHAR8CODE @@ -1148,8 +1183,8 @@ void bltchar(register BLTC *args) DLword *srcbase, *dstbase; int gray = 0, num_gray = 0, curr_gray_line = 0; - pbt = (PILOTBBT *)Addr68k_from_LADDR(args->pilotbbt); - dspdata = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); + pbt = (PILOTBBT *)Addr68k_from_LADDR(((BLTC *)args)->pilotbbt); + dspdata = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTC *)args)->displaydata); srcbase = (DLword *)Addr68k_from_LADDR(VAG2(pbt->pbtsourcehi, pbt->pbtsourcelo)); @@ -1158,19 +1193,19 @@ void bltchar(register BLTC *args) srcbpl = abs(pbt->pbtsourcebpl); dstbpl = abs(pbt->pbtdestbpl); h = pbt->pbtheight; - w = args->right - args->left; + w = ((BLTC *)args)->right - ((BLTC *)args)->left; if ((h <= 0) || (w <= 0)) return; - base = GETWORD(Addr68k_from_LADDR(dspdata->ddoffsetscache + args->char8code)); - sx = base + args->left - args->curx; - dx = args->left; + base = GETWORD(Addr68k_from_LADDR(dspdata->ddoffsetscache + ((BLTC *)args)->char8code)); + sx = base + ((BLTC *)args)->left - ((BLTC *)args)->curx; + dx = ((BLTC *)args)->left; #ifdef REALCURSOR /* if displayflg != 0 then source or destination is DisplayBitMap * Now we consider about only destination */ - displayflg = cursorin(pbt->pbtdesthi, (pbt->pbtdestlo + (args->left >> 4)), - (args->right - args->left), pbt->pbtheight, pbt->pbtbackward); + displayflg = cursorin(pbt->pbtdesthi, (pbt->pbtdestlo + (((BLTC *)args)->left >> 4)), + (((BLTC *)args)->right - ((BLTC *)args)->left), pbt->pbtheight, pbt->pbtbackward); #endif /* REALCURSOR */ op = pbt->pbtoperation; @@ -1217,7 +1252,7 @@ void bltchar(register BLTC *args) #else /* prropstyle */ -LispPTR bltchar(register BLTC *args) +LispPTR bltchar(LispPTR *args) /* args[0] : PILOTBBT * args[1] : DISPLAYDATA * args[2] : CHAR8CODE @@ -1234,8 +1269,8 @@ LispPTR bltchar(register BLTC *args) unsigned int pix_op; DLword *dstbase; - pbt = (PILOTBBT *)Addr68k_from_LADDR(args->pilotbbt); - dspdata = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); + pbt = (PILOTBBT *)Addr68k_from_LADDR(((BLTC *)args)->pilotbbt); + dspdata = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTC *)args)->displaydata); (mpr_d(SrcePixRect))->md_image = (short *)Addr68k_from_LADDR(VAG2(pbt->pbtsourcehi, pbt->pbtsourcelo)); @@ -1263,14 +1298,14 @@ LispPTR bltchar(register BLTC *args) mpr_mdlinebytes(DestPixRect) = (destbpl + 7) >> 3; mpr_mdlinebytes(SrcePixRect) = (srcebpl + 7) >> 3; - base = GETWORD(Addr68k_from_LADDR(dspdata->ddoffsetscache + args->char8code)); - srcebit = base + args->left - args->curx; + base = GETWORD(Addr68k_from_LADDR(dspdata->ddoffsetscache + ((BLTC *)args)->char8code)); + srcebit = base + ((BLTC *)args)->left - ((BLTC *)args)->curx; #ifdef REALCURSOR /* if displayflg != 0 then source or destination is DisplayBitMap * Now we consider about only destination */ - displayflg = old_cursorin(pbt->pbtdesthi, pbt->pbtdestlo, args->left, (args->right - args->left), + displayflg = old_cursorin(pbt->pbtdesthi, pbt->pbtdestlo, ((BLTC *)args)->left, (((BLTC *)args)->right - ((BLTC *)args)->left), pbt->pbtheight, y, pbt->pbtbackward); #endif /* REALCURSOR */ @@ -1286,7 +1321,7 @@ LispPTR bltchar(register BLTC *args) if (displayflg) HideCursor; #endif /* REALCURSOR */ - if (pr_rop(DestPixRect, args->left, 0, (args->right - args->left), pbt->pbtheight, pix_op, + if (pr_rop(DestPixRect, ((BLTC *)args)->left, 0, (((BLTC *)args)->right - ((BLTC *)args)->left), pbt->pbtheight, pix_op, SrcePixRect, srcebit, 0) != 0) error("pilotbitblt: pr_rop failed\n"); @@ -1296,17 +1331,17 @@ LispPTR bltchar(register BLTC *args) #endif /* COLOR */ if (in_display_segment(dstbase)) { - /* DBPRINT(("bltchar pix: x %x, y %d, w %d, h %d.\n", args->left, dstbase, - * (args->right - args->left),pbt->pbtheight)); + /* DBPRINT(("bltchar pix: x %x, y %d, w %d, h %d.\n", ((BLTC *)args)->left, dstbase, + * (((BLTC *)args)->right - ((BLTC *)args)->left),pbt->pbtheight)); */ - flush_display_lineregion(args->left, dstbase, (args->right - args->left), pbt->pbtheight); + flush_display_lineregion(((BLTC *)args)->left, dstbase, (((BLTC *)args)->right - ((BLTC *)args)->left), pbt->pbtheight); } #endif #ifdef XWINDOW XLOCK; if (in_display_segment(dstbase)) - flush_display_lineregion(args->left, dstbase, (args->right - args->left), pbt->pbtheight); + flush_display_lineregion(((BLTC *)args)->left, dstbase, (((BLTC *)args)->right - ((BLTC *)args)->left), pbt->pbtheight); XUNLOCK; #endif /* XWINDOW */ @@ -1406,28 +1441,6 @@ LispPTR *TOPWDS68k; /* Top of window stack's DS */ LispPTR BLTCHAR_index; /* Atom # for \PUNTBLTCHAR punt fn */ LispPTR TEDIT_BLTCHAR_index; /* if NIL ,TEDIT is not yet loaded */ -/****************************************/ -/* */ -/* Arguments to NEWBLTCHAR */ -/* */ -/****************************************/ -#ifndef BYTESWAP -typedef struct { - DLword nil; /* Unused word */ - unsigned charset : 8; /* High 8 bits of character code */ - unsigned char8code : 8; /* Low 8 bits of character code */ - LispPTR displaystream; /* The display stream to print on */ - LispPTR displaydata; /* The image data (margins, etc) */ -} BLTARG; -#else -typedef struct { - unsigned char8code : 8; /* Low 8 bits of character code */ - unsigned charset : 8; /* High 8 bits of character code */ - DLword nil; /* Unused word */ - LispPTR displaystream; /* The display stream to print on */ - LispPTR displaydata; /* The image data (margins, etc) */ -} BLTARG; -#endif /* BYTESWAP */ #ifndef prropstyle @@ -1438,7 +1451,7 @@ typedef struct { /* */ /************************************************************************/ -void newbltchar(register BLTARG *args) { +void newbltchar(LispPTR *args) { register DISPLAYDATA *displaydata68k; int right, left, curx; PILOTBBT *pbt; @@ -1450,10 +1463,10 @@ void newbltchar(register BLTARG *args) { DLword *srcbase, *dstbase; int gray = 0, num_gray = 0, curr_gray_line = 0; - displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); + displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTARG *)args)->displaydata); - if ((displaydata68k->ddcharset & 0xFFFF) != args->charset) { - /*if(changecharset_display(displaydata68k, args->charset) ==-1)*/ + if ((displaydata68k->ddcharset & 0xFFFF) != ((BLTARG *)args)->charset) { + /*if(changecharset_display(displaydata68k, ((BLTARG *)args)->charset) ==-1)*/ PUNT_TO_BLTCHAR; } @@ -1466,15 +1479,15 @@ void newbltchar(register BLTARG *args) { right = curx + - GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + args->char8code)); + GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + ((BLTARG *)args)->char8code)); if ((right > rmargin) && (curx > lmargin)) PUNT_TO_BLTCHAR; - if (args->displaystream != *TOPWDS68k) PUNT_TO_BLTCHAR; + if (((BLTARG *)args)->displaystream != *TOPWDS68k) PUNT_TO_BLTCHAR; { register int newpos; newpos = curx + - GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddwidthscache + args->char8code)); + GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddwidthscache + ((BLTARG *)args)->char8code)); if ((0 <= newpos) && (newpos < 65536)) (displaydata68k->ddxposition) = (LispPTR)(S_POSITIVE | newpos); @@ -1508,7 +1521,7 @@ void newbltchar(register BLTARG *args) { srcbpl = abs(pbt->pbtsourcebpl); dstbpl = abs(pbt->pbtdestbpl); - base = GETWORD(Addr68k_from_LADDR(displaydata68k->ddoffsetscache + args->char8code)); + base = GETWORD(Addr68k_from_LADDR(displaydata68k->ddoffsetscache + ((BLTARG *)args)->char8code)); sx = base + left - curx; dx = left; @@ -1562,18 +1575,18 @@ void newbltchar(register BLTARG *args) { /* */ /************************************************************************/ -LispPTR newbltchar(register BLTARG *args) { +LispPTR newbltchar(LispPTR *args) { register DISPLAYDATA *displaydata68k; register int right, left, curx; register PILOTBBT *pbt; register int lmargin, rmargin, xoff; int displayflg; /* T if cursor needs to be taken down */ - displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); + displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((BLTARG *)args)->displaydata); - if ((displaydata68k->ddcharset & 0xFFFF) != args->charset) { + if ((displaydata68k->ddcharset & 0xFFFF) != ((BLTARG *)args)->charset) { /* Currently, this has BUG, so I can't call it */ - /*if(changecharset_display(displaydata68k,args->charset) ==-1)*/ + /*if(changecharset_display(displaydata68k,((BLTARG *)args)->charset) ==-1)*/ { PUNT_TO_BLTCHAR; } } @@ -1586,14 +1599,14 @@ LispPTR newbltchar(register BLTARG *args) { right = curx + - GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + args->char8code)); + GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + ((BLTARG *)args)->char8code)); if ((right > rmargin) && (curx > lmargin)) PUNT_TO_BLTCHAR; - if (args->displaystream != *TOPWDS68k) PUNT_TO_BLTCHAR; + if (((BLTARG *)args)->displaystream != *TOPWDS68k) PUNT_TO_BLTCHAR; { register int newpos; newpos = curx + - GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddwidthscache + args->char8code)); + GETWORD((DLword *)Addr68k_from_LADDR(displaydata68k->ddwidthscache + ((BLTARG *)args)->char8code)); if ((0 <= newpos) && (newpos < 65536)) (displaydata68k->ddxposition) = (LispPTR)(S_POSITIVE | newpos); @@ -1634,7 +1647,7 @@ LispPTR newbltchar(register BLTARG *args) { mpr_mdlinebytes(DestPixRect) = (destbpl + 7) >> 3; mpr_mdlinebytes(SrcePixRect) = (srcebpl + 7) >> 3; - base = GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), args->char8code); + base = GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), ((BLTARG *)args)->char8code); sourcebit = base + left - curx; LOCKSCREEN; @@ -1820,7 +1833,7 @@ typedef struct { /** changecharset_display,sfffixy are not tested *****I don't use TAKE **/ -LispPTR sfffixy(DISPLAYDATA *displaydata68k, CHARSETINFO *csinfo68k, PILOTBBT *pbt68k) +static LispPTR sfffixy(DISPLAYDATA *displaydata68k, CHARSETINFO *csinfo68k, PILOTBBT *pbt68k) { int y; @@ -1858,7 +1871,8 @@ LispPTR sfffixy(DISPLAYDATA *displaydata68k, CHARSETINFO *csinfo68k, PILOTBBT *p } /* sfffixy */ -LispPTR changecharset_display(register DISPLAYDATA *displaydata68k, DLword charset) { +#if 0 +static LispPTR changecharset_display(register DISPLAYDATA *displaydata68k, DLword charset) { register PILOTBBT *pbt68k; register FONTDESC *fontd68k; LispPTR csinfo; @@ -1898,15 +1912,13 @@ LispPTR changecharset_display(register DISPLAYDATA *displaydata68k, DLword chars return (T); } } /* changecharset_display */ - +#endif /******************************************************************/ -void ccfuncall( - atom_index, argnum, - bytenum) register unsigned int atom_index; /* Atomindex for Function you want to invoke */ -register int argnum; /* Number of ARGS on TOS and STK */ -register int bytenum; /* Number of bytes of Caller's - OPCODE(including multi-byte) */ +void ccfuncall(register unsigned int atom_index, register int argnum, register int bytenum) + /* Atomindex for Function you want to invoke */ + /* Number of ARGS on TOS and STK */ + /* Number of bytes of Caller's OPCODE(including multi-byte) */ { register struct definition_cell *defcell68k; /* Definition Cell PTR */ register short pv_num; /* scratch for pv */ @@ -1997,39 +2009,12 @@ register int bytenum; /* Number of bytes of Caller's /* \\TEDIT.BLTCHAR */ /* */ /****************************************************************/ -#ifndef BYTESWAP -typedef struct tbta { - DLword nil; - unsigned charset : 8; - unsigned char8code : 8; - LispPTR displaystream; - unsigned int nil2 : 16; - unsigned int current_x : 16; /* this is allways positive */ - LispPTR displaydata; - LispPTR ddpilotbitblt; - unsigned int nil3 : 16; - unsigned int clipright : 16; /* this is allways positive */ -} TBLTARG; -#else -typedef struct tbta { - unsigned char8code : 8; - unsigned charset : 8; - DLword nil; - LispPTR displaystream; - unsigned int current_x : 16; /* this is allways positive */ - unsigned int nil2 : 16; - LispPTR displaydata; - LispPTR ddpilotbitblt; - unsigned int clipright : 16; /* this is allways positive */ - unsigned int nil3 : 16; -} TBLTARG; -#endif /* BYTESWAP */ #ifndef prropstyle /***************************/ /* Non-PIXRECT version */ /***************************/ -void tedit_bltchar(register TBLTARG *args) +void tedit_bltchar(LispPTR *args) { #define backwardflg 0 #define displayflg 0 @@ -2043,15 +2028,15 @@ void tedit_bltchar(register TBLTARG *args) DLword *srcbase, *dstbase; int gray = 0, num_gray = 0, curr_gray_line = 0; - displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); - if (displaydata68k->ddcharset != args->charset) { - /**if(changecharset_display(displaydata68k, args->charset)== -1)**/ + displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((TBLTARG *)args)->displaydata); + if (displaydata68k->ddcharset != ((TBLTARG *)args)->charset) { + /**if(changecharset_display(displaydata68k, ((TBLTARG *)args)->charset)== -1)**/ { PUNT_TO_TEDIT_BLTCHAR; } } - imagewidth = *((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + args->char8code)); - newx = args->current_x + imagewidth; - dx = args->current_x; - right = IMIN(newx, args->clipright); + imagewidth = *((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + ((TBLTARG *)args)->char8code)); + newx = ((TBLTARG *)args)->current_x + imagewidth; + dx = ((TBLTARG *)args)->current_x; + right = IMIN(newx, ((TBLTARG *)args)->clipright); if (dx < right) { pbt = (PILOTBBT *)Addr68k_from_LADDR(displaydata68k->ddpilotbbt); @@ -2066,7 +2051,7 @@ void tedit_bltchar(register TBLTARG *args) src_comp = pbt->pbtsourcetype; /*dx=left; I'll optimize later*/ - sx = GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), args->char8code); + sx = GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), ((TBLTARG *)args)->char8code); w = IMIN(imagewidth, (right - dx)); #ifdef NEWBITBLT bitblt(srcbase, dstbase, sx, dx, w, h, srcbpl, dstbpl, backwardflg, src_comp, op, gray, @@ -2087,7 +2072,7 @@ void tedit_bltchar(register TBLTARG *args) /* PIXRECT version */ /**********************/ -void tedit_bltchar(register TBLTARG *args) +void tedit_bltchar(LispPTR *args) { register DISPLAYDATA *displaydata68k; register int left, right; @@ -2095,15 +2080,15 @@ void tedit_bltchar(register TBLTARG *args) register int imagewidth, newx; register displayflg; - displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(args->displaydata); - if (displaydata68k->ddcharset != args->charset) { - /**if(changecharset_display(displaydata68k, args->charset)== -1)**/ + displaydata68k = (DISPLAYDATA *)Addr68k_from_LADDR(((TBLTARG *)args)->displaydata); + if (displaydata68k->ddcharset != ((TBLTARG *)args)->charset) { + /**if(changecharset_display(displaydata68k, ((TBLTARG *)args)->charset)== -1)**/ { PUNT_TO_TEDIT_BLTCHAR; } } - imagewidth = *((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + args->char8code)); - newx = args->current_x + imagewidth; - left = IMAX(0, args->current_x); - right = IMIN(newx, args->clipright); + imagewidth = *((DLword *)Addr68k_from_LADDR(displaydata68k->ddcharimagewidths + ((TBLTARG *)args)->char8code)); + newx = ((TBLTARG *)args)->current_x + imagewidth; + left = IMAX(0, ((TBLTARG *)args)->current_x); + right = IMIN(newx, ((TBLTARG *)args)->clipright); LOCKSCREEN; if (left < right) { @@ -2139,7 +2124,7 @@ void tedit_bltchar(register TBLTARG *args) pbt->pbtwidth = IMIN(imagewidth, (right - left)); pbt->pbtsourcebit = - GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), args->char8code); + GETBASE(Addr68k_from_LADDR(displaydata68k->ddoffsetscache), ((TBLTARG *)args)->char8code); if (pr_rop(DestPixRect, left, 0, pbt->pbtwidth, pbt->pbtheight, PixOperation(pbt->pbtsourcetype, pbt->pbtoperation), SrcePixRect, @@ -2157,7 +2142,7 @@ void tedit_bltchar(register TBLTARG *args) #ifndef COLOR /* Lisp addr hi-word, lo-word, ... */ -int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward) +static int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward) { #ifdef INIT init_kbd_startup; @@ -2180,7 +2165,7 @@ int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int b #else /* For MONO and COLOR */ /* Lisp addr hi-word, lo-word, ... */ -int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward) +static int old_cursorin(DLword addrhi, DLword addrlo, int x, int w, int h, int y, int backward) { register DLword *base68k; extern int MonoOrColor; diff --git a/src/colorbltfns.c b/src/colorbltfns.c index 4e2a060..5a94989 100644 --- a/src/colorbltfns.c +++ b/src/colorbltfns.c @@ -37,6 +37,7 @@ static char *id = "$Id: colorbltfns.c,v 1.2 1999/01/03 02:06:52 sybalsky Exp $ C #include "debug.h" #include "arith.h" #include "bitblt.h" +#include "bbtsub.h" #include "lldisplay.h" #define IMIN(x, y) (((x) > (y)) ? (y) : (x)) diff --git a/src/draw.c b/src/draw.c index a72d120..271f907 100644 --- a/src/draw.c +++ b/src/draw.c @@ -38,6 +38,7 @@ static char *id = "$Id: draw.c,v 1.2 1999/01/03 02:06:56 sybalsky Exp $ Copyrigh #include "emlglob.h" #include "adr68k.h" #include "bitblt.h" +#include "bbtsub.h" #include "display.h" #include "my.h" diff --git a/src/misc7.c b/src/misc7.c index 8d69f4b..5a30d66 100644 --- a/src/misc7.c +++ b/src/misc7.c @@ -31,6 +31,7 @@ static char *id = "$Id: misc7.c,v 1.2 1999/01/03 02:07:22 sybalsky Exp $ Copyrig #include "arith.h" #include "my.h" #include "bitblt.h" +#include "bbtsub.h" #include "dbprint.h" /* osamu '90/02/08 * add display.h, because in_display_secment() is changed as diff --git a/src/rawcolor.c b/src/rawcolor.c index 6bcac5e..5eb8233 100644 --- a/src/rawcolor.c +++ b/src/rawcolor.c @@ -38,6 +38,7 @@ static char *id = "$Id: rawcolor.c,v 1.3 2001/12/26 22:17:04 sybalsky Exp $ Copy #include "debug.h" #include "arith.h" #include "bitblt.h" +#include "bbtsub.h" #include "lldsp.h" #define IMIN(x, y) (((x) > (y)) ? (y) : (x)) diff --git a/src/subr.c b/src/subr.c index 5a4bb6f..c84bbc5 100644 --- a/src/subr.c +++ b/src/subr.c @@ -53,6 +53,7 @@ static char *id = "$Id: subr.c,v 1.3 1999/05/31 23:35:42 sybalsky Exp $ Copyrigh #include "chardev.h" #include "dspsubrs.h" #include "storage.h" +#include "bbtsub.h" extern LispPTR *PENDINGINTERRUPT68k;