1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-04-13 15:14:20 +00:00

Remove USHORT definition and replace uses with DLword

USHORT unnecessarily duplicates the DLword type that represents a
single Lisp 16-bit word.
This commit is contained in:
Nick Briggs
2024-10-14 12:57:02 -07:00
parent 91e0cea9d5
commit b88ea87fa8
4 changed files with 32 additions and 35 deletions

View File

@@ -18,7 +18,7 @@
*/ */
/**********************************************************************/ /**********************************************************************/
#include "lispemul.h" /* for LispPTR, DLword */ #include "lispemul.h" /* for LispPTR, DLword */
#include "version.h" /* for USHORT */ #include "version.h" /* for BIGVM */
#define ADDREF 0 /* for gclookup routine. */ #define ADDREF 0 /* for gclookup routine. */
#define DELREF 1 /* for gclookup routine. */ #define DELREF 1 /* for gclookup routine. */
@@ -162,10 +162,10 @@ struct htoverflow
#else #else
struct hashentry struct hashentry
{ /* GC hashtable entry */ { /* GC hashtable entry */
USHORT count :6; DLword count :6;
USHORT stackref :1; DLword stackref :1;
USHORT segnum :8; DLword segnum :8;
USHORT collision :1; DLword collision :1;
}; };
struct htlinkptr struct htlinkptr
@@ -200,10 +200,10 @@ struct htoverflow
#ifdef BIGVM #ifdef BIGVM
struct hashentry struct hashentry
{ /* GC hashtable entry */ { /* GC hashtable entry */
USHORT collision :1; DLword collision :1;
USHORT segnum :15; DLword segnum :15;
USHORT stackref :1; DLword stackref :1;
USHORT count :15; DLword count :15;
}; };
struct htlinkptr struct htlinkptr
@@ -231,10 +231,10 @@ struct htoverflow
#else #else
struct hashentry struct hashentry
{ /* GC hashtable entry */ { /* GC hashtable entry */
USHORT collision :1; DLword collision :1;
USHORT segnum :8; DLword segnum :8;
USHORT stackref :1; DLword stackref :1;
USHORT count :6; DLword count :6;
}; };
struct htlinkptr struct htlinkptr

View File

@@ -267,22 +267,22 @@ struct state {
/* For bit test */ /* For bit test */
typedef struct wbits { typedef struct wbits {
USHORT LSB : 1; DLword LSB : 1;
USHORT B14 : 1; DLword B14 : 1;
USHORT B13 : 1; DLword B13 : 1;
USHORT B12 : 1; DLword B12 : 1;
USHORT B11 : 1; DLword B11 : 1;
USHORT B10 : 1; DLword B10 : 1;
USHORT B9 : 1; DLword B9 : 1;
USHORT B8 : 1; DLword B8 : 1;
USHORT B7 : 1; DLword B7 : 1;
USHORT B6 : 1; DLword B6 : 1;
USHORT B5 : 1; DLword B5 : 1;
USHORT B4 : 1; DLword B4 : 1;
USHORT B3 : 1; DLword B3 : 1;
USHORT B2 : 1; DLword B2 : 1;
USHORT B1 : 1; DLword B1 : 1;
USHORT xMSB : 1; DLword xMSB : 1;
} WBITS; } WBITS;
#define PUTBASEBIT68K(base68k, offset, bitvalue) \ #define PUTBASEBIT68K(base68k, offset, bitvalue) \

View File

@@ -270,9 +270,9 @@ typedef struct basic_frame {
} Bframe; } Bframe;
typedef struct stkword { typedef struct stkword {
USHORT usecount : 8; DLword usecount : 8;
USHORT nil : 5; DLword nil : 5;
USHORT flags : 3; DLword flags : 3;
} StackWord; } StackWord;
typedef struct stack_block { typedef struct stack_block {

View File

@@ -227,9 +227,6 @@ typedef unsigned char u_char;
typedef unsigned long u_int; typedef unsigned long u_int;
typedef unsigned short u_short; typedef unsigned short u_short;
#undef UNALIGNED_FETCH_OK #undef UNALIGNED_FETCH_OK
typedef unsigned USHORT;
#else
typedef unsigned short USHORT;
#endif /* DOS */ #endif /* DOS */
/****************************************************************/ /****************************************************************/