Skip to content

Commit f23a43f

Browse files
authored
Merge pull request #522 from Interlisp/nhb-dspbout-and-showdisplay
Improves behavior of display subrs DSPBOUT and SHOWDISPLAY
2 parents 51045b4 + e251f26 commit f23a43f

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/dspsubrs.c

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ extern int Mouse_Included;
4040
****************************************************/
4141

4242
void DSP_dspbout(LispPTR *args) /* args[0] : charcode */
43-
{ putc((args[0] & 0xFFFF) & 0x7f, BCPLDISPLAY); }
43+
{
44+
int charcode = (args[0] & 0x7F);
45+
/* Interlisp-D uses CR as EOL which isn't useful here */
46+
putc((charcode == '\r') ? '\n' : charcode, BCPLDISPLAY);
47+
fflush(BCPLDISPLAY);
48+
}
4449

4550
/****************************************************
4651
*
@@ -52,7 +57,16 @@ void DSP_dspbout(LispPTR *args) /* args[0] : charcode */
5257
extern int DisplayInitialized;
5358

5459
void DSP_showdisplay(LispPTR *args)
55-
{ DisplayInitialized = 1; }
60+
{
61+
LispPTR base = args[0]; /* pointer to the display bitmap */
62+
LispPTR rasterwidth = args[1]; /* should be a smallp */
63+
64+
if (base == NIL) {
65+
DisplayInitialized = 0;
66+
} else {
67+
DisplayInitialized = 1;
68+
}
69+
}
5670

5771
/****************************************************
5872
*

0 commit comments

Comments
 (0)