Skip to content

Commit b10c48a

Browse files
committed
Remove a few leftover defined(DOS) that remained in logical expressions, update endif comments
1 parent fde861e commit b10c48a

File tree

15 files changed

+50
-52
lines changed

15 files changed

+50
-52
lines changed

src/bbtsub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ extern int MonoOrColor;
9999
/* take care of cursor movement & hiding */
100100
/* (during bitblts to screen) ourselves. */
101101
/*******************************************/
102-
#if defined(SUNDISPLAY) || defined(DOS)
102+
#if defined(SUNDISPLAY)
103103
#define REALCURSOR
104104
#else
105105
#undef REALCURSOR

src/bitblt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
6666
{
6767
PILOTBBT *pbt;
6868
DLword *srcbase, *dstbase;
69-
#if defined(SUNDISPLAY) || defined(DOS)
69+
#if defined(SUNDISPLAY)
7070
int displayflg;
7171
#endif
7272
int sx, dx, w, h, srcbpl, dstbpl, backwardflg;
@@ -100,7 +100,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
100100
/* if displayflg != 0 then source or destination is DisplayBitMap */
101101
ScreenLocked = T;
102102

103-
#if SUNDISPLAY || DOS
103+
#if SUNDISPLAY
104104
displayflg = cursorin(pbt->pbtdesthi, (pbt->pbtdestlo + (dx >> 4)), w, h, backwardflg) ||
105105
cursorin(pbt->pbtsourcehi, (pbt->pbtsourcelo + (sx >> 4)), w, h, backwardflg);
106106
#endif /* SUNDISPLAY */
@@ -118,7 +118,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
118118

119119
#ifdef SUNDISPLAY
120120
if (displayflg) HideCursor;
121-
#endif /* SUNDISPLAY / DOS */
121+
#endif /* SUNDISPLAY */
122122

123123
new_bitblt_code
124124

@@ -131,7 +131,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
131131
if (in_display_segment(dstbase)) flush_display_lineregion(dx, dstbase, w, h);
132132
#endif
133133
if (displayflg) ShowCursor;
134-
#endif /* SUNDISPLAY / DOS */
134+
#endif /* SUNDISPLAY */
135135

136136
#ifdef XWINDOW
137137
flush_display_lineregion(dx, dstbase, w, h);

src/dsk.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2493,8 +2493,7 @@ static int make_directory(register char *dir)
24932493
/* Read thru DIR and gather all files that match FILE into */
24942494
/* VARRAY. DIR's case must match existing directory's, but */
24952495
/* FILE name matching is case-insensitive. For UNIX, the */
2496-
/* versionless file is marked with a version# of 0; for DOS, */
2497-
/* version 0 is the back-up copy of the file. */
2496+
/* versionless file is marked with a version# of 0 */
24982497
/* */
24992498
/************************************************************************/
25002499

src/dspif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h
4040
fprintf(stderr, "Can't open display.");
4141
exit(-1);
4242
}
43-
#endif /* DOS | XWINDOW */
43+
#endif /* XWINDOW */
4444
} /* Now we know the maximum capabilities of the hardware. */
4545

4646
/*********************************************************************/

src/ether.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
#include <sys/mbuf.h>
5959
#endif
6060
#include <nlist.h>
61-
#endif /* DOS */
61+
#endif
6262

6363
#include "commondefs.h"
6464
#include "lispemul.h"

src/initdsp.c

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,12 @@
6060
#include "xcursordefs.h"
6161
#endif
6262

63-
#if defined(XWINDOW) || defined(DOS)
63+
#if defined(XWINDOW)
6464
#include "devif.h"
6565
DLword *DisplayRegion68k_end_addr;
6666
extern DspInterface currentdsp;
67-
#endif /* DOS */
67+
int DisplayWidth8;
68+
#endif /* XWINDOW */
6869

6970
/* from /usr/include/sun/fbio.h some machines don't have following def. */
7071
#ifndef FBTYPE_SUNROP_COLOR
@@ -329,7 +330,7 @@ void init_display2(DLword *display_addr, int display_max)
329330
displayheight = my_screen.fb_height;
330331
#endif /* SUNDISPLAY */
331332

332-
#if (defined(XWINDOW) || defined(DOS))
333+
#if defined(XWINDOW)
333334
(currentdsp->device.enter)(currentdsp);
334335
displaywidth = currentdsp->Display.width;
335336
displayheight = currentdsp->Display.height;
@@ -576,12 +577,12 @@ void display_before_exit() {
576577

577578
#endif /* SUNDISPLAY */
578579

579-
#if defined(XWINDOW) || defined(DOS)
580+
#if defined(XWINDOW)
580581
(currentdsp->device.exit)(currentdsp);
581-
#endif /* DOS */
582+
#endif /* XWINDOW */
582583
}
583584

584-
#if defined(DISPLAYBUFFER) || defined(DOS)
585+
#if defined(DISPLAYBUFFER)
585586
/************************************************************************/
586587
/* */
587588
/* i n _ d i s p l a y _ s e g m e n t */
@@ -623,7 +624,7 @@ void flush_display_buffer() {
623624
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, currentdsp->Visible.x,
624625
currentdsp->Visible.y, currentdsp->Visible.width,
625626
currentdsp->Visible.height);
626-
#endif /* DOS */
627+
#endif /* XWINDOW */
627628
}
628629

629630
/************************************************************************/
@@ -652,11 +653,11 @@ void flush_display_region(int x, int y, int w, int h)
652653

653654
#endif /* SUNDISPLAY */
654655

655-
#if (defined(XWINDOW) || defined(DOS))
656+
#if defined(XWINDOW)
656657
TPRINT(("Enter flush_display_region x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
657658
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
658659
TPRINT(("Exit flush_display_region\n"));
659-
#endif /* DOS */
660+
#endif /* XWINDOW */
660661
}
661662
#ifdef BYTESWAP
662663
void byte_swapped_displayregion(int x, int y, int w, int h)
@@ -702,11 +703,11 @@ void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h)
702703

703704
#endif /* SUNDISPLAY */
704705

705-
#if (defined(XWINDOW) || defined(DOS))
706+
#if defined(XWINDOW)
706707
TPRINT(("Enter flush_display_lineregion x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
707708
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
708709
TPRINT(("Exit flush_display_lineregion\n"));
709-
#endif /* DOS */
710+
#endif /* XWINDOW */
710711
}
711712

712713
/************************************************************************/
@@ -735,9 +736,9 @@ void flush_display_ptrregion(DLword *ybase, UNSIGNED bitoffset, UNSIGNED w, UNSI
735736

736737
#if (defined(SUNDISPLAY) && defined(DISPLAYBUFFER))
737738
pr_rop(ColorDisplayPixrect, x, y, w, h, COPY_PIXRECT_TO_COLOR, DisplayRegionPixrect, x, y);
738-
#elif (defined(XWINDOW) || defined(DOS))
739+
#elif defined(XWINDOW)
739740
TPRINT(("Enter flush_display_ptrregion\n x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
740741
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
741742
TPRINT(("Exit flush_display_ptrregion\n"));
742-
#endif /* DOS */
743+
#endif /* SUNDISPLAY & DISPLAYBUFFER, XWINDOW */
743744
}

src/initkbd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ void init_keyboard(int flg) /* if 0 init else re-init */
226226
#elif XWINDOW
227227
init_Xevent(currentdsp);
228228

229-
#endif /* XWINDOW DOS */
229+
#endif /* SUNDISPLAY, XWINDOW */
230230
}
231231

232232
/* ----------------------------------------------------------------*/
@@ -247,7 +247,7 @@ void device_before_exit() {
247247
}
248248
close(LispKbdFd);
249249

250-
#endif /* SUNDISPLAY DOS*/
250+
#endif /* SUNDISPLAY */
251251
display_before_exit();
252252
}
253253

@@ -307,7 +307,7 @@ void seteventmask(struct inputmask *eventmask)
307307
#define KB_DEC3100 (9 + MIN_KEYTYPE) /* TODO: Can we remove this? */
308308
#define KB_HP9000 (10 + MIN_KEYTYPE) /* TODO: Can we remove this? */
309309
#define KB_X (11 + MIN_KEYTYPE)
310-
#define KB_DOS (12 + MIN_KEYTYPE)
310+
#define KB_DOS (12 + MIN_KEYTYPE) /* TODO: Can we remove this? */
311311

312312
/* KB_SUN4 not defined in older OS versions */
313313
#ifndef KB_SUN4

src/kbdsubrs.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
#include "devif.h"
3737
extern KbdInterface currentkbd;
3838
extern DspInterface currentdsp;
39-
#endif /* DOS */
39+
#endif /* XWINDOW */
4040

4141
/****************************************************
4242
*
@@ -66,13 +66,13 @@ void KB_enable(LispPTR *args) /* args[0] : ON/OFF flag
6666
FD_SET(LispWindowFd, &LispReadFds);
6767
#elif XWINDOW
6868
enable_Xkeyboard(currentdsp);
69-
#endif /* DOS */
69+
#endif /* SUNDISPLAY, XWINDOW */
7070
} else if (args[0] == NIL) {
7171
#ifdef SUNDISPLAY
7272
FD_CLR(LispWindowFd, &LispReadFds);
7373
#elif XWINDOW
7474
disable_Xkeyboard(currentdsp);
75-
#endif /* DOS */
75+
#endif /* SUNDISPLAY, XWINDOW */
7676
} else {
7777
error("KB_enable: illegal arg \n");
7878
printf("KB_enable: arg = %d\n", args[0]);
@@ -121,7 +121,7 @@ void KB_beep(LispPTR *args) /* args[0] : ON/OFF flag
121121

122122
#elif XWINDOW
123123
if (args[0] == ATOM_T) beep_Xkeyboard(currentdsp);
124-
#endif /* SUNDISPLAY, XWINDOW, DOS */
124+
#endif /* SUNDISPLAY, XWINDOW */
125125
}
126126

127127
/****************************************************

src/keyevent.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <suntool/window.h>
3131
#include <ctype.h>
3232
#include <sundev/kbio.h>
33-
#endif /* DOS */
33+
#endif /* SUNDISPLAY */
3434

3535
#include "lispemul.h"
3636
#include "lspglob.h"
@@ -57,11 +57,11 @@
5757
#endif /* MAIKO_ENABLE_ETHERNET */
5858

5959
#include "dbprint.h"
60-
#if (defined(DOS) || defined(XWINDOW))
60+
#if defined(XWINDOW)
6161
#include "devif.h"
6262
extern DspInterface currentdsp;
6363
extern IOPAGE *IOPage68K;
64-
#endif /* DOS */
64+
#endif /* XWINDOW */
6565

6666
/* for contextsw */
6767
#define AS_OPCODE 1

src/ldsout.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ int Storage_expanded; /* T or NIL */
5050
/* Load the sysout file into memory. */
5151
/* */
5252
/************************************************************************/
53-
#if defined(DOS) || defined(XWINDOW)
53+
#if defined(XWINDOW)
5454
#include "devif.h"
5555
extern DspInterface currentdsp;
56-
#endif /* DOS || XWINDOW */
56+
#endif /* XWINDOW */
5757

5858
/* sys_size is sysout size in megabytes */
5959
int sysout_loader(const char *sysout_file_name, int sys_size) {
@@ -299,11 +299,11 @@ int sysout_loader(const char *sysout_file_name, int sys_size) {
299299
free(fptovp);
300300
DBPRINT(("sysout file is read completely.\n"));
301301

302-
#if (defined(DISPLAYBUFFER) || defined(XWINDOW) || defined(DOS))
302+
#if defined(DISPLAYBUFFER) || defined(XWINDOW)
303303
TPRINT(("Flushing display buffer...\n"));
304304
flush_display_buffer();
305305
TPRINT(("After Flushing display buffer\n"));
306-
#endif /* DISPLAYBUFFER || XWINDOW || DOS */
306+
#endif /* DISPLAYBUFFER || XWINDOW */
307307

308308
close(sysout);
309309
return (sys_size);

0 commit comments

Comments
 (0)