1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-03-26 10:03:18 +00:00

warning: macro argument should be enclosed in parentheses [bugprone-macro-parentheses] (#374)

Except where the expansion would be syntactically invalid,
for example "goto macroarg;" detection of which is a bug in clang-tidy,
so warn it off with a NOLINT...(bugprone-macro-parentheses)
This commit is contained in:
Nick Briggs
2021-03-20 16:31:23 -07:00
committed by GitHub
parent f6da80f8b3
commit 36ccd9a5f5
37 changed files with 384 additions and 379 deletions

View File

@@ -249,29 +249,29 @@ extern int ScreenLocked; /* for mouse tracking */
(EQ Operation (QUOTE ERASE))) 0)
(T 1))))))
*****************************************************************/
#define PixOperationLisp(SRCTYPE, OPERATION) \
(SRCTYPE == INVERT_atom \
? (OPERATION == REPLACE_atom \
? PIX_NOT(PIX_SRC) \
: (OPERATION == PAINT_atom \
? PIX_NOT(PIX_SRC) | PIX_DST \
: (OPERATION == ERASE_atom \
? PIX_SRC & PIX_DST \
: (OPERATION == INVERT_atom ? PIX_NOT(PIX_SRC) ^ PIX_DST : ERROR)))) \
: /* SRCTYPE == INPUT, TEXTURE */ \
(OPERATION == REPLACE_atom \
? PIX_SRC \
: (OPERATION == PAINT_atom \
? PIX_SRC | PIX_DST \
: (OPERATION == ERASE_atom \
? PIX_NOT(PIX_SRC) & PIX_DST \
: (OPERATION == INVERT_atom ? PIX_SRC ^ PIX_DST : ERROR)))))
#define PixOperationLisp(SRCTYPE, OPERATION) \
((SRCTYPE) == INVERT_atom \
? ((OPERATION) == REPLACE_atom \
? PIX_NOT(PIX_SRC) \
: ((OPERATION) == PAINT_atom \
? PIX_NOT(PIX_SRC) | PIX_DST \
: ((OPERATION) == ERASE_atom \
? PIX_SRC & PIX_DST \
: ((OPERATION) == INVERT_atom ? PIX_NOT(PIX_SRC) ^ PIX_DST : ERROR)))) \
: /* SRCTYPE == INPUT, TEXTURE */ \
((OPERATION) == REPLACE_atom \
? PIX_SRC \
: ((OPERATION) == PAINT_atom \
? PIX_SRC | PIX_DST \
: ((OPERATION) == ERASE_atom \
? PIX_NOT(PIX_SRC) & PIX_DST \
: ((OPERATION) == INVERT_atom ? PIX_SRC ^ PIX_DST : ERROR)))))
#define bbop(SRCTYPE, OPERATION) \
(OPERATION == PAINT_atom \
? op_fn_or \
: (OPERATION == ERASE_atom ? op_fn_and \
: (OPERATION == INVERT_atom ? op_fn_xor : op_repl_src)))
#define bbop(SRCTYPE, OPERATION) \
((OPERATION) == PAINT_atom \
? op_fn_or \
: ((OPERATION) == ERASE_atom ? op_fn_and \
: ((OPERATION) == INVERT_atom ? op_fn_xor : op_repl_src)))
/********************************************************/
/* */
@@ -284,9 +284,9 @@ extern int ScreenLocked; /* for mouse tracking */
/* */
/********************************************************/
#define bbsrc_type(SRCTYPE, OPERATION) \
(SRCTYPE == INVERT_atom ? (OPERATION == ERASE_atom ? 0 : 1) /* SRCTYPE == INPUT, TEXTURE */ \
: (OPERATION == ERASE_atom ? 1 : 0))
#define bbsrc_type(SRCTYPE, OPERATION) \
((SRCTYPE) == INVERT_atom ? ((OPERATION) == ERASE_atom ? 0 : 1) /* SRCTYPE == INPUT, TEXTURE */ \
: ((OPERATION) == ERASE_atom ? 1 : 0))
extern struct pixrect *SrcePixRect, *DestPixRect, *TexturePixRect;
extern struct pixrect *BlackTexturePixRect, *WhiteTexturePixRect;

View File

@@ -777,7 +777,7 @@ void nts(struct frameex1 *fxp) {
#define VARTYPE_PVAR (2)
#define VARTYPE_IVAR (0)
#define VAROFFSET(X) (X & 0xFFFFFFF)
#define VAROFFSET(X) ((X) & 0xFFFFFFF)
void nt1(LispPTR *start, int size, char *str) {
LispPTR *endp, *entry2p;

View File

@@ -77,14 +77,14 @@ extern int Dummy_errno;
separate_version(tname, tver, 0); \
\
if ((pp = (char *)strrchr(tname, '.')) == NULL) { \
*text = '\0'; \
*(text) = '\0'; \
} else { \
*pp = '\0'; \
strcpy(text, pp + 1); \
} \
\
if ((pp = (char *)strrchr(pname, '.')) == NULL) { \
*pext = '\0'; \
*(pext) = '\0'; \
} else { \
*pp = '\0'; \
strcpy(pext, pp + 1); \
@@ -104,9 +104,9 @@ extern int Dummy_errno;
SetupMatch(tname, pname, text, pext, tver); \
\
if (match_pattern(tname, pname) && match_pattern(text, pext) && match_pattern(tver, ver)) \
goto matchtag; \
goto matchtag; /* NOLINT(bugprone-macro-parentheses) */ \
else \
goto unmatchtag; \
goto unmatchtag; /* NOLINT(bugprone-macro-parentheses) */ \
}
#define MatchP_Case(target, name, ver, matchtag, unmatchtag) \
@@ -120,9 +120,9 @@ extern int Dummy_errno;
SetupMatch(tname, pname, text, pext, tver); \
\
if (match_pattern(tname, pname) && match_pattern(text, pext) && match_pattern(tver, ver)) \
goto matchtag; \
goto matchtag; /* NOLINT(bugprone-macro-parentheses) */ \
else \
goto unmatchtag; \
goto unmatchtag; /* NOLINT(bugprone-macro-parentheses) */ \
}
/*
@@ -292,13 +292,13 @@ int MAXFINFO;
#define AllocFinfo(fp) \
{ \
if (FreeFinfoList != (FINFO *)NULL) { \
fp = FreeFinfoList; \
FreeFinfoList = fp->next; \
} else if ((fp = (FINFO *)calloc(1, sizeof(FINFO))) == NULL) { \
fp = (FINFO *)NULL; \
} else if ((fp->prop = (FPROP *)calloc(1, sizeof(FPROP))) == NULL) { \
(fp) = FreeFinfoList; \
FreeFinfoList = (fp)->next; \
} else if (((fp) = (FINFO *)calloc(1, sizeof(FINFO))) == NULL) { \
(fp) = (FINFO *)NULL; \
} else if (((fp)->prop = (FPROP *)calloc(1, sizeof(FPROP))) == NULL) { \
free(fp); \
fp = (FINFO *)NULL; \
(fp) = (FINFO *)NULL; \
} \
}

View File

@@ -2830,10 +2830,10 @@ static int make_directory(register char *dir)
#define FindHighestVersion(varray, mentry, max_no) \
{ \
register FileName *centry; \
for (centry = varray, max_no = 0; centry->version_no != LASTVERSIONARRAY; centry++) { \
if (centry->version_no > max_no) { \
max_no = centry->version_no; \
mentry = centry; \
for (centry = (varray), (max_no) = 0; centry->version_no != LASTVERSIONARRAY; centry++) { \
if (centry->version_no > (max_no)) { \
(max_no) = centry->version_no; \
(mentry) = centry; \
} \
} \
}
@@ -2878,10 +2878,10 @@ static int make_directory(register char *dir)
#define FindLowestVersion(varray, mentry, min_no) \
{ \
register FileName *centry; \
for (centry = varray, min_no = MAXVERSION; centry->version_no != LASTVERSIONARRAY; centry++) { \
if (centry->version_no < min_no && centry->version_no != 0) { \
min_no = centry->version_no; \
mentry = centry; \
for (centry = (varray), (min_no) = MAXVERSION; centry->version_no != LASTVERSIONARRAY; centry++) { \
if (centry->version_no < (min_no) && centry->version_no != 0) { \
(min_no) = centry->version_no; \
(mentry) = centry; \
} \
} \
}
@@ -2915,10 +2915,10 @@ static int make_directory(register char *dir)
{ \
register FileName *centry; \
\
sentry = (FileName *)NULL; \
(sentry) = (FileName *)NULL; \
for (centry = varray; centry->version_no != LASTVERSIONARRAY; centry++) \
if (centry->version_no == ver_no) { \
sentry = centry; \
if (centry->version_no == (ver_no)) { \
(sentry) = centry; \
break; \
} \
}

View File

@@ -68,12 +68,12 @@ BIGNUM (integer that can't be represented bigger than 32 bits)
*/
#define IF_IMMEDIATE(arg, doit, doitsmall) \
switch (SEGMASK & arg) { \
case ATOM_OFFSET: doit; \
case S_CHARACTER: doit; \
case S_POSITIVE: doitsmall; \
case S_NEGATIVE: doitsmall; \
#define IF_IMMEDIATE(arg, doit, doitsmall) \
switch (SEGMASK & (arg)) { \
case ATOM_OFFSET: doit; /* NOLINT(bugprone-macro-parentheses) */ \
case S_CHARACTER: doit; /* NOLINT(bugprone-macro-parentheses) */ \
case S_POSITIVE: doitsmall; /* NOLINT(bugprone-macro-parentheses) */ \
case S_NEGATIVE: doitsmall; /* NOLINT(bugprone-macro-parentheses) */ \
}
/************************************************************************/

View File

@@ -374,7 +374,7 @@ LispPTR N_OP_fvar_(register LispPTR tos, register int n) {
#define VALS_HI_RET(x) ((int)(x) << 17) + VALS_HI + ((unsigned short)(x) >> 15)
#define STK_HI_RET(x) ((int)(x) << 16) | 1 | ((unsigned int)(x) >> 16)
#define STK_HI_RET(x) (((int)(x) << 16) | 1 | ((unsigned int)(x) >> 16))
#else
@@ -389,7 +389,7 @@ LispPTR N_OP_fvar_(register LispPTR tos, register int n) {
: (swapx((int)(x) + NEWATOM_VALUE_OFFSET)))
#endif /* BIGVM */
#define STK_HI_RET(x) ((unsigned int)(x) << 16) | 1 | ((unsigned int)(x) >> 16)
#define STK_HI_RET(x) (((unsigned int)(x) << 16) | 1 | ((unsigned int)(x) >> 16))
#endif /* BIGATOMS */

View File

@@ -46,15 +46,15 @@
#include "commondefs.h"
#include "gchtfinddefs.h"
#define min(a, b) ((a > b) ? b : a)
#define min(a, b) (((a) > (b)) ? (b) : (a))
#define ENDOFX 0
#define GCONST 111
#define Reprobefn(bits, index) (((bits ^ ((bits) >> 8)) & min(63, index)) | 1)
#define Fn16bits(a, b) ((a + b) & 0x0ffff)
#define Reprobefn(bits, index) ((((bits) ^ ((bits) >> 8)) & min(63, index)) | 1)
#define Fn16bits(a, b) (((a) + (b)) & 0x0ffff)
#define Hashingbits(item) (HILOC(item) ^ (((LOLOC(item) & 0x1fff) << 3) ^ (LOLOC(item) >> 9)))
#define Getikvalue(base, index) (*(LispPTR *)Addr68k_from_LADDR(base + (index << 1)))
#define Getikvalue(base, index) (*(LispPTR *)Addr68k_from_LADDR((base) + ((index) << 1)))
#ifndef BYTESWAP
typedef struct implicit_key_hash_table {

View File

@@ -72,8 +72,8 @@
#define Boundp(frame_field) ((frame_field == 0) ? 1 : 0)
#endif /* NEVER */
#define min(a, b) ((a > b) ? b : a)
#define Trailer(ldatum, datum68) (ldatum + 2 * (datum68->arlen - ARRAYBLOCKTRAILERCELLS))
#define min(a, b) (((a) > (b)) ? (b) : (a))
#define Trailer(ldatum, datum68) ((ldatum) + 2 * ((datum68)->arlen - ARRAYBLOCKTRAILERCELLS))
#define BucketIndex(n) min(integerlength(n), MAXBUCKETINDEX)
#define FreeBlockChainN(n) ((POINTERMASK & *FreeBlockBuckets_word) + 2 * BucketIndex(n))

View File

@@ -24,12 +24,12 @@
#include "gcrdefs.h"
#include "storagedefs.h"
#define Evenp(num, prim) ((num % prim) == 0)
#define Evenp(num, prim) (((num) % (prim)) == 0)
#ifdef BIGVM
/* HTCOLLMAX should be in half-entries, not in words */
#define HTCOLLMAX (HTCOLL_SIZE / DLWORDSPER_CELL) - 16
#define HTCOLLMAX ((HTCOLL_SIZE / DLWORDSPER_CELL) - 16)
#else
#define HTCOLLMAX HTCOLL_SIZE - 16
#define HTCOLLMAX (HTCOLL_SIZE - 16)
#endif /* BIGVM */
/* GetLink gets a new entry from the GC collision table */
@@ -43,10 +43,10 @@
return (NIL); \
}; \
GETGC((GCENTRY *)HTcoll + 1) = linkoff + 2; \
var = (GCENTRY *)(HTcoll + linkoff); \
(var) = (GCENTRY *)(HTcoll + linkoff); \
} else { \
GETGC(HTcoll) = GETGC((GCENTRY *)(HTcoll + linkoff + 1)); \
var = (GCENTRY *)(HTcoll + linkoff); \
(var) = (GCENTRY *)(HTcoll + linkoff); \
} \
}
@@ -82,20 +82,20 @@
* NewEntry is never called in the course of the reclamation.
* Thus STKREF case is not needed.
*/
#define NewEntry(entry, hiptr, casep, ptr) \
{ \
switch (casep) { \
case ADDREF: \
GETGC(entry) = hiptr | (2 << HTCNTSHIFT); /* set count = 2 */ \
IncAllocCnt(1); \
return NIL; /* not new 0 entry */ \
case DELREF: \
GETGC(entry) = hiptr; /* set count = 0 */ \
IncAllocCnt(1); \
return ptr; /* new 0 entry */ \
default: error("GC error: new entry touches stack bit"); \
return NIL; /* NOT REACHED */ \
} \
#define NewEntry(entry, hiptr, casep, ptr) \
{ \
switch (casep) { \
case ADDREF: \
GETGC(entry) = (hiptr) | (2 << HTCNTSHIFT); /* set count = 2 */ \
IncAllocCnt(1); \
return NIL; /* not new 0 entry */ \
case DELREF: \
GETGC(entry) = hiptr; /* set count = 0 */ \
IncAllocCnt(1); \
return ptr; /* new 0 entry */ \
default: error("GC error: new entry touches stack bit"); \
return NIL; /* NOT REACHED */ \
} \
}
/*
@@ -106,13 +106,13 @@
{ \
switch (casep) { \
case ADDREF: \
GETGC(entry) = hiptr | (2 << HTCNTSHIFT); /* set count = 2 */ \
GETGC(entry) = (hiptr) | (2 << HTCNTSHIFT); /* set count = 2 */ \
return NIL; /* not new 0 entry */ \
case DELREF: \
GETGC(entry) = hiptr; /* set count = 0 */ \
return ptr; /* new 0 entry */ \
case STKREF: /* set refcnt to 1, stack bit to 1 */ \
GETGC(entry) = hiptr | (1 << HTCNTSHIFT) | HTSTKMASK; \
GETGC(entry) = (hiptr) | (1 << HTCNTSHIFT) | HTSTKMASK; \
return NIL; \
default: error("GC error: new entry when turning off stack bit"); \
return NIL; /* NOT REACHED */ \
@@ -134,29 +134,29 @@
*/
#define ModEntry(entry, contents, ptr, casep, remove) \
{ \
if ((contents & HTCNTMASK) == HTCNTMASK) { /* overflow; return non-zero */ \
if (((contents) & HTCNTMASK) == HTCNTMASK) { /* overflow; return non-zero */ \
modify_big_reference_count(entry, casep, ptr); \
return NIL; \
} \
switch (casep) { \
case ADDREF: \
contents += (1 << HTCNTSHIFT); \
if ((contents & HTCNTMASK) == HTCNTMASK) { /* overflow */ \
(contents) += (1 << HTCNTSHIFT); \
if (((contents) & HTCNTMASK) == HTCNTMASK) { /* overflow */ \
GETGC(entry) = contents; \
enter_big_reference_count(ptr); \
return NIL; \
} \
if ((contents & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) { \
if (((contents) & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) { \
DecAllocCnt(1); \
goto remove; \
goto remove; /* NOLINT(bugprone-macro-parentheses) */ \
} \
break; \
case DELREF: \
if ((contents >> HTCNTSHIFT) == 0) error("attempt to decrement 0 reference count"); \
contents -= (1 << HTCNTSHIFT); \
if ((contents & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) { \
if (((contents) >> HTCNTSHIFT) == 0) error("attempt to decrement 0 reference count"); \
(contents) -= (1 << HTCNTSHIFT); \
if (((contents) & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) { \
DecAllocCnt(1); \
goto remove; \
goto remove; /* NOLINT(bugprone-macro-parentheses) */ \
} \
break; \
default: error("GC error: mod entry touches stack bit"); \
@@ -171,14 +171,14 @@
*/
#define RecModEntry(entry, contents, ptr, casep, remove) \
{ \
if ((contents & HTCNTMASK) == HTCNTMASK) { /* overflow; return non-zero */ \
if (((contents) & HTCNTMASK) == HTCNTMASK) { /* overflow; return non-zero */ \
modify_big_reference_count(entry, casep, ptr); \
return NIL; \
} \
switch (casep) { \
case ADDREF: \
contents += (1 << HTCNTSHIFT); \
if ((contents & HTCNTMASK) == HTCNTMASK) { \
(contents) += (1 << HTCNTSHIFT); \
if (((contents) & HTCNTMASK) == HTCNTMASK) { \
/* overflow */ \
GETGC(entry) = contents; \
enter_big_reference_count(ptr); \
@@ -186,11 +186,11 @@
} \
break; /* check for possibly deleting entry */ \
case DELREF: \
if ((contents >> HTCNTSHIFT) == 0) error("attempt to decrement 0 reference count"); \
contents -= (1 << HTCNTSHIFT); \
if (((contents) >> HTCNTSHIFT) == 0) error("attempt to decrement 0 reference count"); \
(contents) -= (1 << HTCNTSHIFT); \
break; \
case STKREF: \
GETGC(entry) = contents | HTSTKMASK; \
GETGC(entry) = (contents) | HTSTKMASK; \
return NIL; \
/* \
case UNSTKREF: \
@@ -198,7 +198,8 @@
break; \
*/ \
} \
if ((contents & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) goto remove; \
/* NOLINTNEXTLINE(bugprone-macro-parentheses) */ \
if (((contents) & HTCNTSTKMASK) == (1 << HTCNTSHIFT)) goto remove; \
GETGC(entry) = contents; \
return NIL; \
}

View File

@@ -74,7 +74,7 @@
#define Boundp(frame_field) ((frame_field) == 0)
#define Stkref(ptr) REC_GCLOOKUP(ptr, STKREF)
#define GcreclaimLp(ptr) \
while ((ptr = gcreccell(ptr)) != NIL) REC_GCLOOKUP(ptr, ADDREF)
while (((ptr) = gcreccell(ptr)) != NIL) REC_GCLOOKUP(ptr, ADDREF)
#define HTLPTR ((struct htlinkptr *)(entry))
#define HENTRY ((struct hashentry *)(entry))
#define HTMAIN_ENTRY_COUNT (HTMAIN_SIZE >> 1)

View File

@@ -44,12 +44,12 @@
#define HTBIGENTRYSIZE 4
#define WORDSPERPAGE 256
#define MAXTYPENUMBER INIT_TYPENUM
#define Oddp(num) (((num % 2) != 0) ? 1 : 0)
#define Evenp(num, prim) (((num % prim) == 0) ? 1 : 0)
#define Oddp(num) ((((num) % 2) != 0) ? 1 : 0)
#define Evenp(num, prim) ((((num) % (prim)) == 0) ? 1 : 0)
#define Increment_Allocation_Count(n) \
if (*Reclaim_cnt_word != NIL) { \
if (*Reclaim_cnt_word > n) \
(*Reclaim_cnt_word) -= n; \
if (*Reclaim_cnt_word > (n)) \
(*Reclaim_cnt_word) -= (n); \
else { \
*Reclaim_cnt_word = NIL; \
doreclaim(); \

View File

@@ -91,16 +91,16 @@
#endif /* NEWCDRCODING */
#define TODO_LIMIT 1000
#define ADD_TO_DO(ptr, offset) \
if (do_count < TODO_LIMIT) { \
if (ptr & 0xF0000000) error("illegal ptr in addtodo"); \
to_do[do_count] = (ptr); \
to_do_offset[do_count] = offset; \
todo_uses++; \
/*REC_GCLOOKUP((ptr), ADDREF);*/ \
do_count++; \
} else { /* error("GC missing some to-do's"); */ \
todo_misses++; \
#define ADD_TO_DO(ptr, offset) \
if (do_count < TODO_LIMIT) { \
if ((ptr) & 0xF0000000) error("illegal ptr in addtodo"); \
to_do[do_count] = (ptr); \
to_do_offset[do_count] = offset; \
todo_uses++; \
/*REC_GCLOOKUP((ptr), ADDREF);*/ \
do_count++; \
} else { /* error("GC missing some to-do's"); */ \
todo_misses++; \
}
unsigned todo_uses = 0;

View File

@@ -56,7 +56,7 @@
#ifdef BIGVM
#define HTSTKBIT 0x10000 /* = 512 */
#define HTENDS ((struct hashentry *)htlptr)
#define GetStkCnt(entry1) (entry1 >> 16)
#define GetStkCnt(entry1) ((entry1) >> 16)
#else
#define HTSTKBIT 0x200 /* = 512 */
#define HTENDS ((struct hashentry *)htlptr)

View File

@@ -41,7 +41,7 @@
#define MAKE_FXCOPY(fx68k) \
{ \
BEFORE_CONTEXTSW; \
if ((fx68k = (FX *)make_FXcopy(fx68k)) == 0) { return (1); /* Whole space exhausted */ } \
if (((fx68k) = (FX *)make_FXcopy(fx68k)) == 0) { return (1); /* Whole space exhausted */ } \
AFTER_CONTEXTSW; \
CHECK_FX(fx68k); \
}

View File

@@ -545,22 +545,22 @@ typedef struct {
LispPTR CUDATA;
} CURSOR;
#define CursorClippingX(posx, width) \
{ \
if (displaywidth < (posx + HARD_CURSORWIDTH)) { \
LastCursorClippingX = width = displaywidth - posx; \
} else { \
LastCursorClippingX = width = HARD_CURSORWIDTH; \
} \
#define CursorClippingX(posx, width) \
{ \
if (displaywidth < ((posx) + HARD_CURSORWIDTH)) { \
LastCursorClippingX = (width) = displaywidth - (posx); \
} else { \
LastCursorClippingX = (width) = HARD_CURSORWIDTH; \
} \
}
#define CursorClippingY(posy, height) \
{ \
if (displayheight < (posy + HARD_CURSORHEIGHT)) { \
LastCursorClippingY = height = displayheight - posy; \
} else { \
LastCursorClippingY = height = HARD_CURSORHEIGHT; \
} \
#define CursorClippingY(posy, height) \
{ \
if (displayheight < ((posy) + HARD_CURSORHEIGHT)) { \
LastCursorClippingY = (height) = displayheight - (posy); \
} else { \
LastCursorClippingY = (height) = HARD_CURSORHEIGHT; \
} \
}
extern int displaywidth, displayheight;

View File

@@ -31,13 +31,13 @@ unsigned int BMask_tbl[] = {0xf, 7, 3, 1};
/***************************************************************
Macro:WriteLongW
**************************************************************/
#define WriteLongW(srcpattern, destptr, op1, op2) \
{ \
register int cnt; \
register u_char *des, *src; \
for (cnt = 0, des = (u_char *)destptr, src = (u_char *)(&(srcpattern)); cnt < 4; \
cnt++, des++, src++) \
(*des) op1(*src); \
#define WriteLongW(srcpattern, destptr, op1, op2) \
{ \
register int cnt; \
register u_char *des, *src; \
for (cnt = 0, des = (u_char *)(destptr), src = (u_char *)(&(srcpattern)); cnt < 4; \
cnt++, des++, src++) \
(*des) op1(*src); \
}
/***************************************************************
@@ -104,14 +104,14 @@ unsigned int BMask_tbl[] = {0xf, 7, 3, 1};
case 1: \
case 2: \
case 3: \
destc = (u_char *)dstLptr; \
while (width--) { \
if (BitMaskArray[mod = (offset % 16)] & *srcw) \
destc = (u_char *)(dstLptr); \
while ((width)--) { \
if (BitMaskArray[mod = ((offset) % 16)] & *srcw) \
(*destc++) op1(color1); \
else \
(*destc++) op1(color0); \
if (mod == 15) srcw++; \
offset++; \
(offset)++; \
} /* WHILE END */ \
break; \
default:; /* error */ \

View File

@@ -58,7 +58,7 @@ static const char il_string[] = "INTERLISP";
#define METH_CACHE_INDEX(CLASS, SELECTOR) (1023 & ((CLASS) ^ (SELECTOR)))
#define IV_CACHE_INDEX(VARLIST, IV) (1023 & ((VARLIST) ^ (IV)))
#define LC_TYPEP(obj, typeATOM) (DTD_FROM_LADDR((obj)) == typeATOM)
#define LC_TYPEP(obj, typeATOM) (DTD_FROM_LADDR((obj)) == (typeATOM))
#define INSTANCEP(obj) (LC_TYPEP((obj), atom_instance))
#define CLASSP(obj) (LC_TYPEP((obj), atom_class))
@@ -80,10 +80,10 @@ static const char il_string[] = "INTERLISP";
#define GET_IV_INDEX(objptr, iv, dest, otherwise) \
{ \
register struct LCIVCacheEntry *ce; \
register LispPTR iNames = objptr->iNames; \
register LispPTR iNames = (objptr)->iNames; \
\
ce = &(LCIVCache[IV_CACHE_INDEX(iNames, iv)]); \
if (ce->iNames == iNames && ce->iv == iv) { \
if (ce->iNames == iNames && ce->iv == (iv)) { \
(dest) = POSINT_FROM_SMALLP(ce->index); \
} else { \
if (!Listp(iNames)) { \
@@ -91,8 +91,8 @@ static const char il_string[] = "INTERLISP";
} else { \
register int i = 0; \
while (1) { \
if (car(iNames) == iv) { \
ce->iNames = objptr->iNames; \
if (car(iNames) == (iv)) { \
ce->iNames = (objptr)->iNames; \
ce->iv = iv; \
ce->index = SMALLP_FROM_POSINT(i); \
(dest) = i; \

View File

@@ -87,7 +87,7 @@ LispPTR fmemb(register LispPTR item, register LispPTR list) {
if (GetTypeNumber(parm) != TYPE_LISTP) { \
SAVE_ERROR_EXIT2(tcstk, tos); \
} else \
dest = cadr(parm); \
(dest) = cadr(parm); \
}
LispPTR N_OP_listget(register LispPTR plist, register LispPTR tos) {

View File

@@ -243,10 +243,10 @@ v filename\t\tSaves the virtual memory on the filename (Not Bootable)\n\
?\t\t\tDisplays this summary";
#endif /* DOS */
#define ADD_RANGEP(address) \
if ((address < 0) || (POINTERMASK < address)) { \
printf("Address out of range.\n"); \
return (T); \
#define ADD_RANGEP(address) \
if (((address) < 0) || (POINTERMASK < (address))) { \
printf("Address out of range.\n"); \
return (T); \
}
#define URMAXCOMM 512

View File

@@ -67,12 +67,12 @@
/* Error return values from VMEMSAVE */
#define COMPLETESYSOUT NIL
#define BADFILENAME S_POSITIVE | 1
#define NOFILESPACE S_POSITIVE | 2
#define FILECANNOTOPEN S_POSITIVE | 3
#define FILECANNOTSEEK S_POSITIVE | 4
#define FILECANNOTWRITE S_POSITIVE | 5
#define FILETIMEOUT S_POSITIVE | 6
#define BADFILENAME (S_POSITIVE | 1)
#define NOFILESPACE (S_POSITIVE | 2)
#define FILECANNOTOPEN (S_POSITIVE | 3)
#define FILECANNOTSEEK (S_POSITIVE | 4)
#define FILECANNOTWRITE (S_POSITIVE | 5)
#define FILETIMEOUT (S_POSITIVE | 6)
extern int LispWindowFd;
extern struct pixrect *CursorBitMap, *InvisibleCursorBitMap;

View File

@@ -43,8 +43,9 @@
#endif /* OS5 */
#define PERCENT_OF_SCREEN 95
#define DISPLAY_MAX 65536 * 16 * 2 /* same magic number is */
/* in loadsysout.c */
/* DISPLAY_MAX same magic number is in ldsout.c */
#define DISPLAY_MAX (65536 * 16 * 2)
extern DLword *Lisp_world;
extern char Display_Name[128];
extern DLword *DisplayRegion68k;