Skip to content

Commit

Permalink
Remove a few leftover defined(DOS) that remained in logical expressio…
Browse files Browse the repository at this point in the history
…ns, update endif comments
  • Loading branch information
nbriggs committed Mar 29, 2021
1 parent fde861e commit b10c48a
Show file tree
Hide file tree
Showing 15 changed files with 50 additions and 52 deletions.
2 changes: 1 addition & 1 deletion src/bbtsub.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ extern int MonoOrColor;
/* take care of cursor movement & hiding */
/* (during bitblts to screen) ourselves. */
/*******************************************/
#if defined(SUNDISPLAY) || defined(DOS)
#if defined(SUNDISPLAY)
#define REALCURSOR
#else
#undef REALCURSOR
Expand Down
8 changes: 4 additions & 4 deletions src/bitblt.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
{
PILOTBBT *pbt;
DLword *srcbase, *dstbase;
#if defined(SUNDISPLAY) || defined(DOS)
#if defined(SUNDISPLAY)
int displayflg;
#endif
int sx, dx, w, h, srcbpl, dstbpl, backwardflg;
Expand Down Expand Up @@ -100,7 +100,7 @@ LispPTR N_OP_pilotbitblt(LispPTR pilot_bt_tbl,int tos)
/* if displayflg != 0 then source or destination is DisplayBitMap */
ScreenLocked = T;

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

#ifdef SUNDISPLAY
if (displayflg) HideCursor;
#endif /* SUNDISPLAY / DOS */
#endif /* SUNDISPLAY */

new_bitblt_code

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

#ifdef XWINDOW
flush_display_lineregion(dx, dstbase, w, h);
Expand Down
3 changes: 1 addition & 2 deletions src/dsk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2493,8 +2493,7 @@ static int make_directory(register char *dir)
/* Read thru DIR and gather all files that match FILE into */
/* VARRAY. DIR's case must match existing directory's, but */
/* FILE name matching is case-insensitive. For UNIX, the */
/* versionless file is marked with a version# of 0; for DOS, */
/* version 0 is the back-up copy of the file. */
/* versionless file is marked with a version# of 0 */
/* */
/************************************************************************/

Expand Down
2 changes: 1 addition & 1 deletion src/dspif.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void make_dsp_instance(DspInterface dsp, char *lispbitmap, int width_hint, int h
fprintf(stderr, "Can't open display.");
exit(-1);
}
#endif /* DOS | XWINDOW */
#endif /* XWINDOW */
} /* Now we know the maximum capabilities of the hardware. */

/*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
#include <sys/mbuf.h>
#endif
#include <nlist.h>
#endif /* DOS */
#endif

#include "commondefs.h"
#include "lispemul.h"
Expand Down
27 changes: 14 additions & 13 deletions src/initdsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,12 @@
#include "xcursordefs.h"
#endif

#if defined(XWINDOW) || defined(DOS)
#if defined(XWINDOW)
#include "devif.h"
DLword *DisplayRegion68k_end_addr;
extern DspInterface currentdsp;
#endif /* DOS */
int DisplayWidth8;
#endif /* XWINDOW */

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

#if (defined(XWINDOW) || defined(DOS))
#if defined(XWINDOW)
(currentdsp->device.enter)(currentdsp);
displaywidth = currentdsp->Display.width;
displayheight = currentdsp->Display.height;
Expand Down Expand Up @@ -576,12 +577,12 @@ void display_before_exit() {

#endif /* SUNDISPLAY */

#if defined(XWINDOW) || defined(DOS)
#if defined(XWINDOW)
(currentdsp->device.exit)(currentdsp);
#endif /* DOS */
#endif /* XWINDOW */
}

#if defined(DISPLAYBUFFER) || defined(DOS)
#if defined(DISPLAYBUFFER)
/************************************************************************/
/* */
/* i n _ d i s p l a y _ s e g m e n t */
Expand Down Expand Up @@ -623,7 +624,7 @@ void flush_display_buffer() {
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, currentdsp->Visible.x,
currentdsp->Visible.y, currentdsp->Visible.width,
currentdsp->Visible.height);
#endif /* DOS */
#endif /* XWINDOW */
}

/************************************************************************/
Expand Down Expand Up @@ -652,11 +653,11 @@ void flush_display_region(int x, int y, int w, int h)

#endif /* SUNDISPLAY */

#if (defined(XWINDOW) || defined(DOS))
#if defined(XWINDOW)
TPRINT(("Enter flush_display_region x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
TPRINT(("Exit flush_display_region\n"));
#endif /* DOS */
#endif /* XWINDOW */
}
#ifdef BYTESWAP
void byte_swapped_displayregion(int x, int y, int w, int h)
Expand Down Expand Up @@ -702,11 +703,11 @@ void flush_display_lineregion(UNSIGNED x, DLword *ybase, UNSIGNED w, UNSIGNED h)

#endif /* SUNDISPLAY */

#if (defined(XWINDOW) || defined(DOS))
#if defined(XWINDOW)
TPRINT(("Enter flush_display_lineregion x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
TPRINT(("Exit flush_display_lineregion\n"));
#endif /* DOS */
#endif /* XWINDOW */
}

/************************************************************************/
Expand Down Expand Up @@ -735,9 +736,9 @@ void flush_display_ptrregion(DLword *ybase, UNSIGNED bitoffset, UNSIGNED w, UNSI

#if (defined(SUNDISPLAY) && defined(DISPLAYBUFFER))
pr_rop(ColorDisplayPixrect, x, y, w, h, COPY_PIXRECT_TO_COLOR, DisplayRegionPixrect, x, y);
#elif (defined(XWINDOW) || defined(DOS))
#elif defined(XWINDOW)
TPRINT(("Enter flush_display_ptrregion\n x=%d, y=%d, w=%d, h=%d\n", x, y, w, h));
(currentdsp->bitblt_to_screen)(currentdsp, DisplayRegion68k, x, y, w, h);
TPRINT(("Exit flush_display_ptrregion\n"));
#endif /* DOS */
#endif /* SUNDISPLAY & DISPLAYBUFFER, XWINDOW */
}
6 changes: 3 additions & 3 deletions src/initkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ void init_keyboard(int flg) /* if 0 init else re-init */
#elif XWINDOW
init_Xevent(currentdsp);

#endif /* XWINDOW DOS */
#endif /* SUNDISPLAY, XWINDOW */
}

/* ----------------------------------------------------------------*/
Expand All @@ -247,7 +247,7 @@ void device_before_exit() {
}
close(LispKbdFd);

#endif /* SUNDISPLAY DOS*/
#endif /* SUNDISPLAY */
display_before_exit();
}

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

/* KB_SUN4 not defined in older OS versions */
#ifndef KB_SUN4
Expand Down
8 changes: 4 additions & 4 deletions src/kbdsubrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "devif.h"
extern KbdInterface currentkbd;
extern DspInterface currentdsp;
#endif /* DOS */
#endif /* XWINDOW */

/****************************************************
*
Expand Down Expand Up @@ -66,13 +66,13 @@ void KB_enable(LispPTR *args) /* args[0] : ON/OFF flag
FD_SET(LispWindowFd, &LispReadFds);
#elif XWINDOW
enable_Xkeyboard(currentdsp);
#endif /* DOS */
#endif /* SUNDISPLAY, XWINDOW */
} else if (args[0] == NIL) {
#ifdef SUNDISPLAY
FD_CLR(LispWindowFd, &LispReadFds);
#elif XWINDOW
disable_Xkeyboard(currentdsp);
#endif /* DOS */
#endif /* SUNDISPLAY, XWINDOW */
} else {
error("KB_enable: illegal arg \n");
printf("KB_enable: arg = %d\n", args[0]);
Expand Down Expand Up @@ -121,7 +121,7 @@ void KB_beep(LispPTR *args) /* args[0] : ON/OFF flag

#elif XWINDOW
if (args[0] == ATOM_T) beep_Xkeyboard(currentdsp);
#endif /* SUNDISPLAY, XWINDOW, DOS */
#endif /* SUNDISPLAY, XWINDOW */
}

/****************************************************
Expand Down
6 changes: 3 additions & 3 deletions src/keyevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <suntool/window.h>
#include <ctype.h>
#include <sundev/kbio.h>
#endif /* DOS */
#endif /* SUNDISPLAY */

#include "lispemul.h"
#include "lspglob.h"
Expand All @@ -57,11 +57,11 @@
#endif /* MAIKO_ENABLE_ETHERNET */

#include "dbprint.h"
#if (defined(DOS) || defined(XWINDOW))
#if defined(XWINDOW)
#include "devif.h"
extern DspInterface currentdsp;
extern IOPAGE *IOPage68K;
#endif /* DOS */
#endif /* XWINDOW */

/* for contextsw */
#define AS_OPCODE 1
Expand Down
8 changes: 4 additions & 4 deletions src/ldsout.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ int Storage_expanded; /* T or NIL */
/* Load the sysout file into memory. */
/* */
/************************************************************************/
#if defined(DOS) || defined(XWINDOW)
#if defined(XWINDOW)
#include "devif.h"
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
#endif /* XWINDOW */

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

#if (defined(DISPLAYBUFFER) || defined(XWINDOW) || defined(DOS))
#if defined(DISPLAYBUFFER) || defined(XWINDOW)
TPRINT(("Flushing display buffer...\n"));
flush_display_buffer();
TPRINT(("After Flushing display buffer\n"));
#endif /* DISPLAYBUFFER || XWINDOW || DOS */
#endif /* DISPLAYBUFFER || XWINDOW */

close(sysout);
return (sys_size);
Expand Down
12 changes: 6 additions & 6 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ int sysout_size = 0; /* ditto */

int flushing = FALSE; /* see dbprint.h if set, all debug/trace printing will call fflush(stdout) after each printf */

#if defined(DOS) || defined(XWINDOW)
#if defined(XWINDOW)
#include "devif.h"
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
#endif /* XWINDOW */

extern time_t MDate;
extern int nokbdflag;
Expand All @@ -261,14 +261,14 @@ const char *helpstring =
-bw <pixels> The Medley screen borderwidth\n\
-g[eometry] <geom>] The Medley screen geometry\n\
-sc[reen] <w>x<h>] The Medley screen geometry\n";
#else /* not DOS, not XWINDOW */
#else /* not XWINDOW */
const char *helpstring =
"\n\
either setenv LDESRCESYSOUT or do:\n\
lde[ether] [sysout-name] [<options>]\n\
-info Print general info about the system\n\
-help Print this message\n";
#endif /* DOS */
#endif /* XWINDOW */

/************************************************************************/
/* */
Expand Down Expand Up @@ -427,9 +427,9 @@ int main(int argc, char *argv[])
if (please_fork) fprintf(stderr, "Failed to find UNIXCOMM file handles; no processes\n");
}

#if defined(DOS) || defined(XWINDOW)
#if defined(XWINDOW)
make_dsp_instance(currentdsp, 0, 0, 0, 1); /* All defaults the first time */
#endif /* DOS || XWINDOW */
#endif /* XWINDOW */

/* Load sysout to VM space and returns real sysout_size(not 0) */
sysout_size = sysout_loader(sysout_name, sysout_size);
Expand Down
2 changes: 0 additions & 2 deletions src/unixcomm.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ Unix Interface Communications
*/

/* Don't compile this at all under DOS. */

#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* Needed for ptsname on glibc systems. */
#endif
Expand Down
12 changes: 6 additions & 6 deletions src/uraid.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ extern int Win_security_p;
#include "etherdefs.h"
#endif

#if defined(DOS) || defined(XWINDOW)
#if defined(XWINDOW)
#include "devif.h"
extern DspInterface currentdsp;
#endif /* DOS || XWINDOW */
#endif /* XWINDOW */

#ifdef COLOR
extern int MonoOrColor;
Expand Down Expand Up @@ -126,7 +126,7 @@ x Xaddress [xnum] Hex-Dump xnum word(16-bits) starting at Xaddress
@ litatom val Sets TOPVAL of litatom to Decimal-val
< Xaddress val Sets the word(16-bits) at the address to val
<<Return or Exit>>
e Exit to UNIX / DOS
e Exit to UNIX
h Context switch to HARDRESET
q Returns from URAID with NO-change
<<Misc>>
Expand Down Expand Up @@ -928,10 +928,10 @@ int device_before_raid() {

#endif /* SUNDISPLAY */

#if defined(XWINDOW) || defined(DOS)
#if defined(XWINDOW)
(currentdsp->cleardisplay)(currentdsp);
(currentdsp->device.before_raid)(currentdsp);
#endif /* XWINDOW || DOS */
#endif /* XWINDOW */

return (0);
}
Expand Down Expand Up @@ -1045,7 +1045,7 @@ int device_after_raid() {
(currentdsp->device.after_raid)(currentdsp);
FD_SET(ConnectionNumber(currentdsp->display_id), &LispReadFds);
flush_display_buffer();
#endif /* XWINDOW | DOS */
#endif /* XWINDOW */

int_unblock();
*EmKbdAd068K = *EmRealUtilin68K = *EmKbdAd168K = *EmKbdAd268K = *EmKbdAd368K = *EmKbdAd468K =
Expand Down
2 changes: 1 addition & 1 deletion src/vmemsave.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ LispPTR vmem_save(char *sysout_file_name)
EmCursorBitMap68K= NullCursor;*/
#endif /* OLD_CURSOR */

#endif /* SUNDISPLAY || DOS */
#endif /* SUNDISPLAY */

/* set FPTOVP */
fptovp = FPtoVP + 1;
Expand Down
2 changes: 1 addition & 1 deletion src/xc.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ register InstPtr pccache asm("si");
register LispPTR *cspcache asm("di");
register LispPTR tscache asm("bx");
#include "inlnPS2.h"
#endif /* DOS */
#endif /* GCC386 */

/* This used to be here for including optimized dispatch
* for SPARC, but it has some other things in it, so we
Expand Down

0 comments on commit b10c48a

Please sign in to comment.