Skip to content

Commit 1b86993

Browse files
committed
Start by removing all the ifdef'd DOS code in source and include files
1 parent 081e228 commit 1b86993

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+11
-2280
lines changed

inc/bitblt.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,7 @@ extern int DisplayRasterWidth;
4949
#define MOUSEYH ((int)*EmMouseY68K + YDELTA)
5050

5151

52-
#ifdef DOS
53-
#define HideCursor { (currentdsp->mouse_invisible)(currentdsp, IOPage68K); }
54-
#define ShowCursor { (currentdsp->mouse_visible)(IOPage68K->dlmousex, \
55-
IOPage68K->dlmousey); }
56-
57-
#elif defined(SUNDISPLAY) && defined(OLD_CURSOR)
52+
#if defined(SUNDISPLAY) && defined(OLD_CURSOR)
5853
extern struct winlock DisplayLockArea;
5954
#define HideCursor \
6055
ioctl( LispWindowFd, WINLOCKSCREEN, &DisplayLockArea)
@@ -82,14 +77,7 @@ extern DLword *EmCursorX68K,*EmCursorY68K;
8277

8378
/* Macro for locking and unlocking screen to prevent multiple updates */
8479

85-
#ifdef DOS
86-
#define LOCKSCREEN currentdsp->device.locked++;
87-
#define UNLOCKSCREEN currentdsp->device.locked--;
88-
89-
#else
90-
9180
#define LOCKSCREEN ScreenLocked = T;
9281
#define UNLOCKSCREEN ScreenLocked = NIL;
9382

94-
#endif /* DOS */
9583
#endif /* BITBLT_H */

inc/devif.h

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -154,19 +154,6 @@ typedef struct
154154
{
155155
DevRec device;
156156
PFV device_event; /* Event handler for the keyboard. */
157-
#ifdef DOS
158-
u_char KeyMap[0x80]; /* The key translation table. Use the keycode you
159-
get from the keyboard as an index. The value
160-
gives the lispkeycode.*/
161-
unsigned char lastbyte; /* Last byte that we got from the keyboard. */
162-
unsigned int keyeventsize; /* The sizeof() one kbd event */
163-
unsigned int maxkeyevent; /* Offset to the end of the ringbuffer. */
164-
int eurokbd; /* Keep tabs of the euro-ness of the kbd */
165-
PFV prev_handler; /* The previous keyboard handler.
166-
Keep this around
167-
to restore when we exit Medley */
168-
int URaid; /* Put this in a better place later.. /jarl */
169-
#endif /* DOS */
170157
} KbdInterfaceRec, *KbdInterface;
171158

172159

@@ -221,20 +208,7 @@ typedef struct
221208
unsigned long oldstate; /* Keep the old state around */
222209
unsigned long graphicsmode; /* Magic cookie used to set the state. */
223210
unsigned long numberofbanks;
224-
#ifdef DOS
225-
unsigned long BytesPerLine;
226-
unsigned long DisplayStartAddr;
227-
unsigned long DisplaySegSize;
228-
unsigned long DisplaySegMagnitude;
229-
unsigned long LinesPerBank;
230-
unsigned short LastLineLen[32]; /* length of last line fragment per bank */
231-
unsigned short LinesInBank[32]; /* True # of full lines in this bank */
232-
/* # of lines we can do with the full-line dumpline */
233-
/* for sure. */
234-
unsigned short LinesBeforeBank[32]; /* Scan lines before start of this bank. */
235-
236-
void (* SwitchBank)(); /* Method to switch the bank (see vesa standard) */
237-
#elif XWINDOW
211+
#if XWINDOW
238212
char *identifier;
239213
int BitGravity;
240214
Display *display_id;

inc/dirdefs.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#ifndef DIRDEFS_H
22
#define DIRDEFS_H 1
33
#include "lispemul.h" /* for LispPTR */
4-
#ifdef DOS
5-
int make_old_version(char *old, char *file);
6-
#endif
74
#ifdef FSDEBUG
85
void print_finfo(FINFO *fp);
96
#endif

inc/display.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ extern DLword *DISP_MAX_Address;
4444
#define DISPLAYBUFFER
4545
#endif /* XWINDOW */
4646

47-
#ifdef DOS
48-
#define DISPLAYBUFFER
49-
#endif /* DOS */
50-
5147
#ifdef DISPLAYBUFFER
5248
/************************************************************************/
5349
/* */

inc/dskdefs.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
#ifndef DSKDEFS_H
22
#define DSKDEFS_H 1
33
#include "lispemul.h" /* for LispPTR */
4-
#ifdef DOS
5-
void separate_host(char *lfname, char *host, char *drive);
6-
#else
74
void separate_host(char *lfname, char *host);
8-
#endif
95
LispPTR COM_openfile(register LispPTR *args);
106
LispPTR COM_closefile(register LispPTR *args);
117
LispPTR DSK_getfilename(register LispPTR *args);

inc/kbdif.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,12 @@
1515

1616
typedef struct {
1717
u_char KeyMap[0x80];
18-
#ifdef DOS
19-
u_char lastbyte;
20-
void (*prev_handler)();
21-
#endif /* DOS */
2218
void (* sync_device)(); /* Make reality and emulator coincide with each other */
2319
void (* enter_device)();
2420
void (* exit_device)();
2521
void (* device_event)();
2622
void (* before_raid)();
2723
void (* after_raid)();
2824
int lispkeycode;
29-
#ifdef DOS
30-
int device_active;
31-
int device_locked;
32-
#endif /* DOS */
3325
} KbdInterfaceRec, *KbdInterface;
3426
#endif /* KBDIF_H */

inc/locfile.h

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,8 @@ extern DLword *Lisp_world; /* To access LispSysout area */
312312
* They might be lost in the course of the conversion.
313313
*
314314
*/
315-
#ifdef DOS
316-
317-
/* DOS version of LispVersionToUnixVersion */
318-
/* * * * * This is done this way because DOS can't handle the non-DOS version -- */
319-
/* * * * * it gave "Too many characters in a character constant" errors! */
320-
#include "lispver1.h"
321-
#else /* DOS */
322315
/* NON-DOS version of the macro LispVersionToUnixVersion */
323316
#include "lispver2.h"
324-
#endif /* DOS */
325317

326318

327319
/*
@@ -501,13 +493,9 @@ extern DLword *Lisp_world; /* To access LispSysout area */
501493
(((varray)->version_no == LASTVERSIONARRAY)? 1 : 0)
502494

503495

504-
#ifdef DOS
505-
#define OnlyVersionlessP(varray) 0
506-
#else
507-
#define OnlyVersionlessP(varray) \
496+
#define OnlyVersionlessP(varray) \
508497
(((varray)->version_no == 0 && ((varray) + 1)->version_no == LASTVERSIONARRAY) ? \
509498
1 : 0)
510-
#endif /* DOS */
511499

512500
/* An argument of AddDotNoExtension must be LispVersion convention */
513501
/* Like "foo/fee.fee;3" or "/foo/foo;3" */
@@ -622,20 +610,12 @@ extern int errno;
622610
/* DRIVESEP = OS-specific drive separator character. */
623611
/* (only used with DOS as of 3/93) */
624612
/********************************************************/
625-
#ifdef DOS
626-
#define DIRSEP '\\'
627-
#define DIRSEPSTR "\\"
628-
#define DRIVESEP ':'
629-
#define UNIXDIRSEP '/'
630-
#define MAXNAMLEN _MAX_PATH
631-
#else
632613
#define DIRSEPSTR "/"
633614
#define DIRSEP '/'
634615
#define UNIXDIRSEP '/'
635616
/* system includes may already define MAXNAMLEN */
636617
#if !defined(MAXNAMLEN)
637618
#define MAXNAMLEN NAME_MAX
638619
#endif
639-
#endif
640620

641621
#endif /* LOCFILE_H */

inc/medleyfp.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,6 @@ extern volatile sig_atomic_t FP_error;
3939
#define FPCLEAR FP_error = 0;
4040
#define FPTEST(result) FP_error
4141

42-
#elif defined(DOS)
43-
#include <i32.h>
44-
#define FPCLEAR
45-
#define FPTEST(result) (_getrealerror() & ( I87_ZERO_DIVIDE | I87_OVERFLOW | I87_UNDERFLOW))
46-
4742
#else
4843
#include <math.h>
4944
#define FPCLEAR

inc/ufsdefs.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,7 @@ LispPTR UFS_getfilename(LispPTR *args);
55
LispPTR UFS_deletefile(LispPTR *args);
66
LispPTR UFS_renamefile(LispPTR *args);
77
LispPTR UFS_directorynamep(LispPTR *args);
8-
#ifdef DOS
9-
int unixpathname(char *src, char *dst, int versionp, int genp, char *drive, int *extlenptr, char *rawname);
10-
#else
118
int unixpathname(char *src, char *dst, int versionp, int genp);
12-
#endif
139
int lisppathname(char *fullname, char *lispname, int dirp, int versionp);
1410
int quote_fname(char *file);
1511
int quote_fname_ufs(char *file);

inc/version.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,7 @@ error Must specify RELEASE to build Medley.
233233
/* */
234234
/********************************************************/
235235

236-
#ifdef DOS
237-
typedef unsigned char u_char;
238-
typedef unsigned long u_int;
239-
typedef unsigned short u_short;
240-
#undef UNALIGNED_FETCH_OK
241-
#define USHORT unsigned
242-
#else
243236
#define USHORT unsigned short
244-
#endif /* DOS */
245237

246238
/****************************************************************/
247239
/* End of architecture-specific flag settings */

0 commit comments

Comments
 (0)