diff --git a/inc/MyWindow.h b/inc/MyWindow.h index 833f4df..3503901 100644 --- a/inc/MyWindow.h +++ b/inc/MyWindow.h @@ -24,7 +24,6 @@ #define VERTICAL 0 #define HORIZONTAL 1 -#define PERCENT_OF_SCREEN 95 #define SCROLL_PITCH 30 typedef struct _MyEvent diff --git a/inc/arith.h b/inc/arith.h index 9dfeb28..27688fc 100644 --- a/inc/arith.h +++ b/inc/arith.h @@ -9,6 +9,13 @@ /* */ /************************************************************************/ +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "commondefs.h" // for error +#include "lispemul.h" // for SEGMASK, ERROR_EXIT +#include "lispmap.h" // for S_NEGATIVE, S_POSITIVE +#include "lsptypes.h" // for TYPE_FIXP, GetTypeNumber, TYPE_FLOATP +#include "mkcelldefs.h" // for createcell68k + #define MAX_SMALL 65535 /* == 0x0000FFFF */ #define MIN_SMALL (-65536) /* == 0xFFFF0000 */ diff --git a/inc/arith4defs.h b/inc/arith4defs.h index e532071..479c398 100644 --- a/inc/arith4defs.h +++ b/inc/arith4defs.h @@ -1,5 +1,6 @@ #ifndef ARITH4DEFS_H #define ARITH4DEFS_H 1 +#include "lispemul.h" /* for LispPTR */ LispPTR N_OP_times2(int tosm1, int tos); LispPTR N_OP_itimes2(int tosm1, int tos); LispPTR N_OP_quot(int tosm1, int tos); diff --git a/inc/cell.h b/inc/cell.h index 71fd901..ccaff11 100755 --- a/inc/cell.h +++ b/inc/cell.h @@ -9,6 +9,8 @@ /* */ /************************************************************************/ +#include "version.h" + /**********************************************************************/ /* File Name : cell.h @@ -21,7 +23,6 @@ */ /**********************************************************************/ #include "lispemul.h" /* for LispPTR, DLword */ -#include "version.h" /* for BIGVM, NEWCDRCODING, BIGATOMS */ /* CONS CELL (LISTP) definitions moved to lispemulater.h */ diff --git a/inc/dirdefs.h b/inc/dirdefs.h index 763e2c5..e50f881 100644 --- a/inc/dirdefs.h +++ b/inc/dirdefs.h @@ -1,6 +1,65 @@ #ifndef DIRDEFS_H #define DIRDEFS_H 1 -#include "lispemul.h" /* for LispPTR */ +#include // for MAXNAMLEN +#include // for u_short, ino_t +#include "lispemul.h" // for LispPTR +/* + * FINFO and FPROP are used to store the information of the enumerated files + * and directories. They are arranged in a form of linked list. Each list is + * corresponding to the each directory enumeration. All of the informations + * Lisp needs are stored in the list. This list is in the emulator's address space + * and can be specified by "ID" which is the interface between the emulator and Lisp + * code. In this implementation, ID is represented as an integer and is actually + * an index of the array of the lists. + * + * To avoid the overhead of the FINFO and FPROP structure dynamic allocation and + * deallocation, some number of their instances are pre-allocated when the emulator + * starts and managed in a free list. If all of the pre-allocated instances are in + * use, new instances are allocated. The new instances are linked to the free list + * when it is freed. + * + * As described above, the linked list result of the enumeration is stored in a + * array for the subsequent request from Lisp. Lisp code requests the emulator to + * release the list when it enumerated all of the entries in the list or the + * enumerating operation is aborted. + */ + +typedef struct fprop { + unsigned length; /* Byte length of this file. */ + unsigned wdate; /* Written (Creation) date in Lisp sense. */ + unsigned rdate; /* Read date in Lisp sense. */ + unsigned protect; /* Protect mode of this file. */ + char author[256]; /* Author in Lisp sense. */ + u_short au_len; /* Byte length of author. */ + unsigned long nil; /* padding to 8-byte multiple */ +} FPROP; + +/* This structure has a pointer at each end to force alignment to + be correct when a pointer is 8 bytes long. */ +typedef struct finfo { + FPROP *prop; /* File properties Lisp needs. */ + char lname[MAXNAMLEN]; /* Name in Lisp Format. */ + u_short lname_len; /* Byte length of lname. */ + char no_ver_name[MAXNAMLEN]; + /* + * Name in UNIX Format. Does not + * include Version field. + * All lower case. + */ + ino_t ino; /* I-node number of this file. */ + unsigned version; /* Version in Lisp sense. */ + u_short dirp; /* If 1, this file is a directory. */ + struct finfo *next; /* + * Link to a next entry. Last entry is + * indicated by NULL pointer. + */ +} FINFO; + +typedef struct dfinfo { + FINFO *head; /* Head of the linked FINFO structures. */ + FINFO *next; /* FINFO structure generated next time. */ +} DFINFO; + #ifdef DOS int make_old_version(char *old, char *file); #endif diff --git a/inc/display.h b/inc/display.h index 47f582a..5cee6ff 100755 --- a/inc/display.h +++ b/inc/display.h @@ -10,7 +10,6 @@ /* */ /************************************************************************/ #include "lispemul.h" /* for DLword */ -#include "version.h" /* for UNSIGNED */ #define BCPLDISPLAY stdout diff --git a/inc/gcdata.h b/inc/gcdata.h index 4725b7f..9bcd509 100644 --- a/inc/gcdata.h +++ b/inc/gcdata.h @@ -19,6 +19,7 @@ /**********************************************************************/ #include "lispemul.h" /* for LispPTR, DLword */ #include "version.h" /* for USHORT */ +#include "gchtfinddefs.h" #define ADDREF 0 /* for gclookup routine. */ #define DELREF 1 /* for gclookup routine. */ diff --git a/inc/inlineC.h b/inc/inlineC.h index ace3a55..6ac1c1c 100644 --- a/inc/inlineC.h +++ b/inc/inlineC.h @@ -687,8 +687,6 @@ N_OP_POPPED_CALL_2(N_OP_eqq, arg2); \ } while (0) -#define S_CHARACTER 0x70000 - #define AREF1 \ do { \ LispPTR arrayarg; \ diff --git a/inc/lispemul.h b/inc/lispemul.h index d4b2cd0..51624ad 100644 --- a/inc/lispemul.h +++ b/inc/lispemul.h @@ -9,7 +9,9 @@ /* Manufactured in the United States of America. */ /* */ /************************************************************************/ -#include "version.h" /* for BIGVM, BIGATOMS, UNSIGNED, UNALIGNED_FETCH_OK */ +#include "version.h" + +#include "lispmap.h" // for S_POSITIVE #ifndef BYTESWAP /*** Normal byte-order type decls */ diff --git a/inc/lispmap.h b/inc/lispmap.h index b7d19d2..66a24f2 100755 --- a/inc/lispmap.h +++ b/inc/lispmap.h @@ -154,7 +154,7 @@ #define SNEG_SIZE 0x10000 /* for characters */ -#define S_CHAR 0x70000 +#define S_CHARACTER 0x70000 /* for HTMAIN */ #define HTMAIN_HI 22 @@ -307,7 +307,7 @@ #define SNEG_SIZE 0x10000 /* for characters */ -#define S_CHAR 0x70000 +#define S_CHARACTER 0x70000 #ifdef BIGVM /* for HTMAIN */ diff --git a/inc/my.h b/inc/my.h index 5f5b649..e704d0b 100644 --- a/inc/my.h +++ b/inc/my.h @@ -16,12 +16,16 @@ /* Manufactured in the United States of America. */ /* */ /************************************************************************/ -#include "adr68k.h" /* for Addr68k_from_LADDR */ -#include "lispemul.h" /* for LispPTR, DLword */ -#include "lispmap.h" /* for S_NEGATIVE, S_POSITIVE */ -#include "lsptypes.h" /* for GETWORD */ +#include "version.h" // for BIGVM +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "arith.h" // for N_ARITH_SWITCH, N_GETNUMBER +#include "gcdata.h" // for ADDREF, DELREF +#include "lispemul.h" // for ERROR_EXIT, LispPTR, DLword, SEGMASK, state +#include "lispmap.h" // for S_POSITIVE, S_CHARACTER, S_NEGATIVE +#include "lspglob.h" +#include "lsptypes.h" // for GETBYTE, GETWORD, GetTypeNumber, TYPE_FLOATP +#include "mkcelldefs.h" // for createcell68k -#define S_CHARACTER 0x70000 #ifdef BIGVM #define IsNumber(address) ((GETWORD(MDStypetbl +(((address) & 0x0fffff00)>>9))) & 0x1000) #else diff --git a/inc/osmsg.h b/inc/osmsg.h index 243e181..cecdddf 100644 --- a/inc/osmsg.h +++ b/inc/osmsg.h @@ -15,6 +15,7 @@ /* Manufactured in the United States of America. */ /* */ /************************************************************************/ +#include "osmsgdefs.h" // for flush_pty #define OSMESSAGE_PRINT(print_exp) \ { \ diff --git a/inc/stack.h b/inc/stack.h index 7aac6c4..1552a27 100644 --- a/inc/stack.h +++ b/inc/stack.h @@ -8,8 +8,11 @@ /* Manufactured in the United States of America. */ /* */ /************************************************************************/ +#include "version.h" /* for BIGVM, UNSIGNED */ +#include "adr68k.h" /* for LADDR_from_68k */ +#include "address.h" /* for LOLOC */ +#include "commondefs.h" /* for error */ #include "lispemul.h" /* for LispPTR, DLword, FRAMESIZE, DLWORDSPER_CELL */ -#include "version.h" /* for BIGVM, UNSIGNED */ /* ContextSW frame number */ #define CurrentFXP 0 @@ -383,6 +386,7 @@ typedef struct stackp { #ifdef STACKCHECK #include +#include "testtooldefs.h" #define S_CHECK(condition, msg) \ { \ diff --git a/inc/timeout.h b/inc/timeout.h index de006c5..46ffc4e 100644 --- a/inc/timeout.h +++ b/inc/timeout.h @@ -8,7 +8,8 @@ /* Manufactured in the United States of America. */ /* */ /************************************************************************/ -#include "setjmp.h" /* for jmp_buf */ +#include /* for jmp_buf */ +#include /* for alarm */ extern jmp_buf jmpbuf; diff --git a/inc/version.h b/inc/version.h index fafcafe..737809e 100644 --- a/inc/version.h +++ b/inc/version.h @@ -11,8 +11,8 @@ /* */ /************************************************************************/ -#include -#include "maiko/platform.h" +#include +#include "maiko/platform.h" // IWYU pragma: export /************************************************************************/ /* */ diff --git a/inc/xcursordefs.h b/inc/xcursordefs.h index 376691e..c77d532 100644 --- a/inc/xcursordefs.h +++ b/inc/xcursordefs.h @@ -1,7 +1,6 @@ #ifndef XCURSORDEFS_H #define XCURSORDEFS_H 1 #include /* for Cursor, Window */ -#include /* for Display */ #include /* for uint8_t */ #include "devif.h" /* for DspInterface */ void Init_XCursor(void); diff --git a/inc/xinitdefs.h b/inc/xinitdefs.h index 4d22591..ee5bf65 100644 --- a/inc/xinitdefs.h +++ b/inc/xinitdefs.h @@ -1,6 +1,7 @@ #ifndef XINITDEFS_H #define XINITDEFS_H 1 #include "devif.h" /* for DspInterface */ +#include "lispemul.h" /* for LispPTR */ void init_Xevent(DspInterface dsp); void lisp_Xexit(DspInterface dsp); void Xevent_before_raid(DspInterface dsp); diff --git a/src/allocmds.c b/src/allocmds.c index a5b6174..8e89d19 100644 --- a/src/allocmds.c +++ b/src/allocmds.c @@ -25,21 +25,15 @@ */ /**********************************************************************/ -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "cell.h" -#include "lispmap.h" -#include "initatms.h" -#include "lspglob.h" - -#include "allocmdsdefs.h" -#include "commondefs.h" -#include "gcrdefs.h" -#include "perrnodefs.h" -#include "storagedefs.h" -#include "timerdefs.h" +#include "address.h" // for LOLOC +#include "adr68k.h" // for LADDR_from_68k, LPAGE_from_68k, Addr68k_fr... +#include "allocmdsdefs.h" // for alloc_mdspage, initmdspage +#include "commondefs.h" // for error +#include "lispemul.h" // for DLword, LispPTR, DLWORDSPER_PAGE, MDSINCRE... +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" // for MDStypetbl +#include "lsptypes.h" // for GETWORD, GetTypeNumber, TYPE_SMALLP +#include "storagedefs.h" // for newpage, checkfor_storagefull /************************************************************************/ /* */ diff --git a/src/arith2.c b/src/arith2.c index 3f8e950..f5ac386 100644 --- a/src/arith2.c +++ b/src/arith2.c @@ -9,19 +9,12 @@ /************************************************************************/ #include "version.h" - -#include -#include "lispemul.h" +#include "arith.h" // for N_IGETNUMBER, N_ARITH_SWITCH, N_GETNUMBER +#include "arith2defs.h" // for N_OP_difference, N_OP_greaterp, N_OP_idiffer... +#include "fpdefs.h" // for N_OP_fdifference, N_OP_fgreaterp, N_OP_fplus2 +#include "lispemul.h" // for state, ERROR_EXIT, LispPTR, ATOM_T, NIL_PTR #include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" #include "lsptypes.h" -#include "medleyfp.h" -#include "arith.h" - -#include "arith2defs.h" -#include "fpdefs.h" -#include "mkcelldefs.h" /************************************************************ N_OP_plus2 diff --git a/src/arith3.c b/src/arith3.c index 381c762..e2e6912 100644 --- a/src/arith3.c +++ b/src/arith3.c @@ -8,7 +8,6 @@ /* */ /************************************************************************/ -#include "version.h" /************************************************************************/ /* */ @@ -21,17 +20,14 @@ /* */ /************************************************************************/ -#include "lispemul.h" -#include "lispmap.h" +#include "version.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for N_GETNUMBER, N_ARITH_SWITCH +#include "arith3defs.h" // for N_OP_boxidiff, N_OP_boxiplus, N_OP_makenumber +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lispmap.h" // for S_POSITIVE #include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" -#include "arith.h" - -#include "arith3defs.h" -#include "mkcelldefs.h" +#include "lsptypes.h" // for GetTypeNumber, TYPE_FIXP /************************************************************************/ /* */ diff --git a/src/arith4.c b/src/arith4.c index 73ac655..5d60304 100644 --- a/src/arith4.c +++ b/src/arith4.c @@ -8,8 +8,6 @@ /* */ /************************************************************************/ -#include "version.h" - /***********************************************************************/ /* File Name : arith4.c @@ -21,20 +19,13 @@ */ /**********************************************************************/ - -#include "lispemul.h" -#include "lispmap.h" +#include "version.h" +#include "arith.h" // for N_IGETNUMBER, N_ARITH_SWITCH, N_GETNUMBER +#include "arith4defs.h" // for N_OP_iquot, N_OP_iremainder, N_OP_itimes2 +#include "fpdefs.h" // for N_OP_fquotient, N_OP_ftimes2 +#include "lispemul.h" // for state, ERROR_EXIT, LispPTR #include "lspglob.h" #include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" -#include "medleyfp.h" -#include "arith.h" - -#include "arith4defs.h" -#include "fpdefs.h" -#include "mkcelldefs.h" /**********************************************************************/ /* diff --git a/src/array.c b/src/array.c index 1a6011d..4abd4b4 100644 --- a/src/array.c +++ b/src/array.c @@ -8,19 +8,11 @@ /************************************************************************/ #include "version.h" - -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "arraydefs.h" // for N_OP_misc3 #include "emlglob.h" - -#include "arraydefs.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lspglob.h" +#include "my.h" // for aref_switch, N_GetPos /************************************************************ diff --git a/src/array2.c b/src/array2.c index 1b70b03..80f38e2 100644 --- a/src/array2.c +++ b/src/array2.c @@ -7,8 +7,6 @@ /* */ /************************************************************************/ -#include "version.h" - /************************************************************************/ /* */ /* A R R A Y 2 . C */ @@ -16,21 +14,13 @@ /* Contains N_OP_misc4, the ASET opcode. */ /* */ /************************************************************************/ - -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "version.h" +#include "array2defs.h" // for N_OP_misc4 #include "emlglob.h" -#include "gcdata.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" - -#include "array2defs.h" -#include "gchtfinddefs.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lspglob.h" +#include "lsptypes.h" +#include "my.h" // for N_GetPos, aset_switch /************************************************************************/ /* */ diff --git a/src/array3.c b/src/array3.c index 8e5c449..6d9f4b5 100644 --- a/src/array3.c +++ b/src/array3.c @@ -17,18 +17,14 @@ /* */ /************************************************************************/ -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "version.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "array3defs.h" // for N_OP_aref1 #include "emlglob.h" - -#include "array3defs.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lspglob.h" +#include "lsptypes.h" // for OneDArray, GetTypeNumber, TYPE_ONED_ARRAY +#include "my.h" // for aref_switch, N_GetPos /*** N_OP_aref1 -- op 266 (array index) ***/ LispPTR N_OP_aref1(register LispPTR arrayarg, register LispPTR inx) { diff --git a/src/array4.c b/src/array4.c index 4eb13ea..66045bb 100644 --- a/src/array4.c +++ b/src/array4.c @@ -17,19 +17,13 @@ /* */ /************************************************************************/ -#include -#include "lispemul.h" +#include "version.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "array4defs.h" // for N_OP_aset1 +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT #include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "gcdata.h" -#include "my.h" - -#include "array4defs.h" -#include "gchtfinddefs.h" +#include "lsptypes.h" // for OneDArray, GetTypeNumber, TYPE_ONED_ARRAY +#include "my.h" // for N_GetPos, aset_switch /*** N_OP_aset1 -- op 267 (new-value array index) ***/ diff --git a/src/array5.c b/src/array5.c index 5f40fe2..c7f33fc 100644 --- a/src/array5.c +++ b/src/array5.c @@ -7,8 +7,6 @@ /* */ /************************************************************************/ -#include "version.h" - /************************************************************************/ /* */ /* A R R A Y 5 . C */ @@ -17,18 +15,14 @@ /* */ /************************************************************************/ -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "version.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "array5defs.h" // for N_OP_aref2 #include "emlglob.h" - -#include "array5defs.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lspglob.h" +#include "lsptypes.h" // for LispArray, GetTypeNumber, TYPE_TWOD_ARRAY +#include "my.h" // for aref_switch, N_GetPos /************************************************************************/ /* */ @@ -39,7 +33,6 @@ /************************************************************************/ LispPTR N_OP_aref2(LispPTR arrayarg, LispPTR inx0, LispPTR inx1) { -#define REG LispPTR baseL; int arindex, temp; LispArray *arrayblk; diff --git a/src/array6.c b/src/array6.c index fb32f3f..e31dd86 100644 --- a/src/array6.c +++ b/src/array6.c @@ -8,21 +8,13 @@ /************************************************************************/ #include "version.h" - -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "array6defs.h" // for N_OP_aset2 #include "emlglob.h" -#include "gcdata.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" - -#include "array6defs.h" -#include "gchtfinddefs.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT +#include "lspglob.h" +#include "lsptypes.h" // for LispArray, GetTypeNumber, TYPE_TWOD_ARRAY +#include "my.h" // for N_GetPos, aset_switch /*** N_OP_aset2 -- op 357 (new-value array index0 index1) ***/ LispPTR N_OP_aset2(register LispPTR data, LispPTR arrayarg, LispPTR inx0, LispPTR inx1) { diff --git a/src/bin.c b/src/bin.c index 71d5d9e..6664dcb 100644 --- a/src/bin.c +++ b/src/bin.c @@ -7,8 +7,6 @@ /* */ /************************************************************************/ -#include "version.h" - /***********************************************************************/ /* File Name : bin.c @@ -24,18 +22,14 @@ */ /**********************************************************************/ - -#include "lispemul.h" -#include "lispmap.h" +#include "version.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "bindefs.h" // for N_OP_bin #include "emlglob.h" +#include "lispmap.h" // for S_POSITIVE #include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" -#include "stream.h" - -#include "bindefs.h" +#include "lsptypes.h" // for state, ERROR_EXIT, GetTypeNumber, Get_BYTE +#include "stream.h" // for Stream LispPTR N_OP_bin(register int tos) { register Stream *stream68k; /* stream instance on TOS */ diff --git a/src/byteswap.c b/src/byteswap.c index a699b6f..b58a0c3 100644 --- a/src/byteswap.c +++ b/src/byteswap.c @@ -19,13 +19,8 @@ /* */ /***************************************************************************/ -#include "hdw_conf.h" -#include "lispemul.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "stack.h" - #include "byteswapdefs.h" +#include "lsptypes.h" /****************************************************************/ /* */ diff --git a/src/car-cdr.c b/src/car-cdr.c index f0f9072..03e018b 100644 --- a/src/car-cdr.c +++ b/src/car-cdr.c @@ -30,19 +30,17 @@ */ /**********************************************************************/ -#include "lispemul.h" +#include "address.h" // for POINTER_PAGEBASE +#include "adr68k.h" // for Addr68k_from_LADDR, Addr68k_from_LPAGE +#include "car-cdrdefs.h" // for N_OP_car, N_OP_cdr, N_OP_rplaca, N_OP_rplacd +#include "cell.h" // for freecons, conspage, FREECONS, CDR_INDIRECT +#include "commondefs.h" // for error +#include "conspagedefs.h" // for next_conspage #include "emlglob.h" -#include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "gcdata.h" -#include "cell.h" - -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "conspagedefs.h" -#include "gchtfinddefs.h" +#include "gcdata.h" // for GCLOOKUP, ADDREF, DELREF +#include "lispemul.h" // for ConsCell, LispPTR, DLword, NIL_PTR, state +#include "lspglob.h" // for ListpDTD +#include "lsptypes.h" // for Listp, dtd /************************************************************************/ /* */ diff --git a/src/common.c b/src/common.c index 0aea648..6a7790f 100644 --- a/src/common.c +++ b/src/common.c @@ -11,24 +11,20 @@ #include "version.h" -#include -#include -#include -#include -#include /* for memset */ -#include /* for fd_set */ -#include "lispemul.h" -#include "lispmap.h" -#include "adr68k.h" -#include "lspglob.h" +#include // for fcntl, F_GETFL, O_RDONLY, O_RDWR +#include // for setjmp, jmp_buf +#include // for fflush, fprintf, printf, getchar, stderr +#include // for exit +#include // for memset +#include // for fd_set +#include "commondefs.h" // for error, stab, warn +#include "dbprint.h" // for DBPRINT #include "emlglob.h" -#include "stack.h" -#include "dbprint.h" - -#include "commondefs.h" -#include "kprintdefs.h" -#include "uraiddefs.h" -#include "uraidextdefs.h" +#include "kprintdefs.h" // for print +#include "lispemul.h" // for NIL, DLword, LispPTR +#include "lspglob.h" +#include "uraiddefs.h" // for device_after_raid, device_before_raid, ura... +#include "uraidextdefs.h" // for URMAXFXNUM, URaid_inputstring, URaid_FXarray void stab() { DBPRINT(("Now in stab\n")); } diff --git a/src/conspage.c b/src/conspage.c index 2be0fe4..f660186 100644 --- a/src/conspage.c +++ b/src/conspage.c @@ -14,21 +14,18 @@ * @file conspage.c */ -#include -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "cell.h" -#include "lispmap.h" +#include // for NULL +#include "address.h" // for POINTER_PAGE +#include "adr68k.h" // for Addr68k_from_LPAGE, LPAGE_from_68k, LADDR_... +#include "allocmdsdefs.h" // for alloc_mdspage +#include "car-cdrdefs.h" // for find_close_prior_cell +#include "cell.h" // for conspage, freecons, FREECONS, CDR_NIL, CON... +#include "commondefs.h" // for error +#include "conspagedefs.h" // for N_OP_cons, cons, next_conspage +#include "gcdata.h" // for GCLOOKUP, ADDREF, DELREF +#include "lispemul.h" // for ConsCell, DLword, LispPTR, NIL_PTR, DLWORD... #include "lspglob.h" -#include "gcdata.h" - -#include "conspagedefs.h" -#include "allocmdsdefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "gchtfinddefs.h" +#include "lsptypes.h" // for dtd, Listp, TYPE_LISTP /** * Initializes a page of CONS cells, sets up the free count and diff --git a/src/dir.c b/src/dir.c index 54afd6e..6051178 100644 --- a/src/dir.c +++ b/src/dir.c @@ -9,34 +9,32 @@ #include "version.h" -#include -#include -#include -#include -#include -#include -#include -#include - #ifndef DOS -#include -#include -#include +#include // for closedir, MAXNAMLEN, dirent, readdir, ope... +#include // for getpwuid, passwd +#include // for MAXPATHLEN #else /* DOS, now */ #include #define MAXPATHLEN _MAX_PATH #define MAXNAMLEN _MAX_PATH #define alarm(x) 1 #endif /* DOS */ - -#include "lispemul.h" -#include "lispmap.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "arith.h" +#include // for errno, EINTR, ENOENT +#include // for NULL, sprintf, size_t +#include // for calloc, free, strtoul, malloc, qsort +#include // for strcpy, strcmp, strlen, strrchr, strcat +#include // for stat, S_ISDIR, st_atime, st_mtime +#include // for timespec_t +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for GetSmallp +#include "dirdefs.h" // for COM_finish_finfo, COM_gen_files, COM_next... +#include "dskdefs.h" // for separate_version, separate_host, true_name +#include "lispemul.h" // for LispPTR, NIL, ATOM_T +#include "locfile.h" // for VERSIONLEN, DOWNCASE, ToLispTime, STRING_... #include "lspglob.h" -#include "timeout.h" -#include "locfile.h" +#include "lsptypes.h" +#include "timeout.h" // for S_TOUT, TIMEOUT0, TIMEOUT, ERRSETJMP +#include "ufsdefs.h" // for quote_dname, quote_fname, quote_fname_ufs extern int *Lisp_errno; extern int Dummy_errno; @@ -222,62 +220,6 @@ int make_old_version(char *old, char *file) /************ B E G I N O F F I L E - I N F O C O D E **************/ /************************************************************************/ -/* - * FINFO and FPROP are used to store the information of the enumerated files - * and directories. They are arranged in a form of linked list. Each list is - * corresponding to the each directory enumeration. All of the informations - * Lisp needs are stored in the list. This list is in the emulator's address space - * and can be specified by "ID" which is the interface between the emulator and Lisp - * code. In this implementation, ID is represented as an integer and is actually - * an index of the array of the lists. - * - * To avoid the overhead of the FINFO and FPROP structure dynamic allocation and - * deallocation, some number of their instances are pre-allocated when the emulator - * starts and managed in a free list. If all of the pre-allocated instances are in - * use, new instances are allocated. The new instances are linked to the free list - * when it is freed. - * - * As described above, the linked list result of the enumeration is stored in a - * array for the subsequent request from Lisp. Lisp code requests the emulator to - * release the list when it enumerated all of the entries in the list or the - * enumerating operation is aborted. - */ - -typedef struct fprop { - unsigned length; /* Byte length of this file. */ - unsigned wdate; /* Written (Creation) date in Lisp sense. */ - unsigned rdate; /* Read date in Lisp sense. */ - unsigned protect; /* Protect mode of this file. */ - char author[256]; /* Author in Lisp sense. */ - u_short au_len; /* Byte length of author. */ - unsigned long nil; /* padding to 8-byte multiple */ -} FPROP; - -/* This structure has a pointer at each end to force alignment to - be correct when a pointer is 8 bytes long. */ -typedef struct finfo { - FPROP *prop; /* File properties Lisp needs. */ - char lname[MAXNAMLEN]; /* Name in Lisp Format. */ - u_short lname_len; /* Byte length of lname. */ - char no_ver_name[MAXNAMLEN]; - /* - * Name in UNIX Format. Does not - * include Version field. - * All lower case. - */ - ino_t ino; /* I-node number of this file. */ - unsigned version; /* Version in Lisp sense. */ - u_short dirp; /* If 1, this file is a directory. */ - struct finfo *next; /* - * Link to a next entry. Last entry is - * indicated by NULL pointer. - */ -} FINFO; - -typedef struct dfinfo { - FINFO *head; /* Head of the linked FINFO structures. */ - FINFO *next; /* FINFO structure generated next time. */ -} DFINFO; FINFO *FreeFinfoList; #define INITFINFONUM 1024 @@ -310,11 +252,6 @@ int MAXFINFO; FreeFinfoList = fp; \ } -/* XXX: the datatypes need to go into dirdefs.h so that one could include it elsewhere */ -#include "dirdefs.h" -#include "commondefs.h" -#include "dskdefs.h" -#include "ufsdefs.h" /* * For debug aid. @@ -333,7 +270,7 @@ void print_finfo(FINFO *fp) fp = fp->next; } while (fp != (FINFO *)NULL && fp != sp); - if (fp = sp) printf("Circular detected!\n"); + if (fp == sp) printf("Circular detected!\n"); } } #endif /* FSDEBUG */ diff --git a/src/draw.c b/src/draw.c index deac446..ccad645 100644 --- a/src/draw.c +++ b/src/draw.c @@ -17,22 +17,17 @@ #include "version.h" -#include -#include -#include - -#include "lispemul.h" -#include "lspglob.h" -#include "lispmap.h" -#include "lsptypes.h" +#include // for ptrdiff_t +#include // for abs +#include "adr68k.h" // for Addr68k_from_LADDR +#include "display.h" // for DISPLAYBUFFER, DisplayRegion68k, in_display... +#include "drawdefs.h" // for N_OP_drawline #include "emlglob.h" -#include "adr68k.h" -#include "bitblt.h" -#include "display.h" - -#include "drawdefs.h" -#include "bbtsubdefs.h" -#include "initdspdefs.h" +#include "initdspdefs.h" // for flush_display_region +#include "lispemul.h" // for DLword, BITSPER_DLWORD, SEGMASK, state, ERR... +#include "lispmap.h" // for S_NEGATIVE, S_POSITIVE +#include "lspglob.h" +#include "lsptypes.h" // for GETWORD #ifdef DISPLAYBUFFER extern struct pixrect *ColorDisplayPixrect, *DisplayRegionPixrect; diff --git a/src/dsk.c b/src/dsk.c index 24eb678..1ddbb8b 100644 --- a/src/dsk.c +++ b/src/dsk.c @@ -9,23 +9,36 @@ #include "version.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for errno, EINTR, ENOENT, ENFILE, EPERM +#include // for O_RDWR, O_CREAT, open, O_RDONLY, O_TRUNC +#include // for NULL, sprintf, size_t, rename, SEEK_SET +#include // for strtoul +#include // for strcpy, strcmp, strlen, strncpy, strchr +#include // for stat, fstat, mkdir, S_ISREG, st_atime, chmod +#include // for ino_t, time_t, off_t +#include // for unlink, close, link, lseek, access, chdir + +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for GetSmallp +#ifdef BYTESWAP +#include "byteswapdefs.h" // for word_swap_page +#endif +#include "car-cdrdefs.h" // for cdr, car +#include "dskdefs.h" // for COM_changedir, COM_closefile, COM_getfile... +#include "lispemul.h" // for NIL, LispPTR, ATOM_T +#include "locfile.h" // for ConcDirAndName, LASTVERSIONARRAY, ConcNam... +#include "lspglob.h" +#include "lsptypes.h" +#include "timeout.h" // for TIMEOUT, ERRSETJMP, S_TOUT, TIMEOUT0 +#include "ufsdefs.h" // for unixpathname, lisppathname #ifndef DOS -#include -#include -#include -#include -#include -#else /* DOS */ +#include // for MAXNAMLEN, readdir, closedir, opendir +#include // for getpwuid, passwd +#include // for MAXPATHLEN +#include // for statvfs +#include // for timeval, utimes +#else #include #include #include @@ -33,26 +46,7 @@ #define MAXPATHLEN _MAX_PATH #define MAXNAMLEM _MAX_PATH #define alarm(x) 0 -#endif /* DOS */ - -#include "lispemul.h" -#include "lispmap.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lspglob.h" -#include "arith.h" -#include "stream.h" -#include "timeout.h" -#include "locfile.h" -#include "osmsg.h" -#include "dbprint.h" - -#include "dskdefs.h" -#include "byteswapdefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "ufsdefs.h" - +#endif extern int *Lisp_errno; extern int Dummy_errno; diff --git a/src/dspsubrs.c b/src/dspsubrs.c index a6347f1..724fe6e 100644 --- a/src/dspsubrs.c +++ b/src/dspsubrs.c @@ -11,19 +11,16 @@ #include "version.h" -#include - -#include "lispemul.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "display.h" -#include "arith.h" - -#include "dspsubrsdefs.h" -#include "commondefs.h" +#include // for putc +#include "arith.h" // for GetSmalldata +#include "display.h" // for BCPLDISPLAY, CURSORHEIGHT +#include "dspsubrsdefs.h" // for DSP_Cursor, DSP_ScreenHight, DSP_ScreenWidth +#include "lispemul.h" // for LispPTR, DLword, ATOM_T, NIL +#include "lispmap.h" // for S_POSITIVE +#include "lsptypes.h" // for GETWORD #ifdef XWINDOW -#include "xcursordefs.h" -#include "xlspwindefs.h" +#include "xcursordefs.h" // for Set_XCursor +#include "xlspwindefs.h" // for lisp_Xvideocolor, set_Xmouseposition #endif extern int DebugDSP; diff --git a/src/eqf.c b/src/eqf.c index 6a65b98..2680853 100644 --- a/src/eqf.c +++ b/src/eqf.c @@ -17,18 +17,13 @@ #include "version.h" -#include -#include "lispemul.h" +#include "arith.h" // for FIXP_VALUE, FLOATP_VALUE +#include "eqfdefs.h" // for N_OP_clequal, N_OP_eqlop, N_OP_eqq, N_OP_equal +#include "lispemul.h" // for NIL, state, ATOM_T, ERROR_EXIT, SEGMASK, LispPTR +#include "lispmap.h" // for ATOM_OFFSET, S_CHARACTER, S_NEGATIVE, S_POSITIVE #include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "medleyfp.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" - -#include "eqfdefs.h" +#include "lsptypes.h" // for TYPE_FLOATP, GetTypeNumber, TYPE_FIXP, TYPE_SM... +#include "my.h" // for IsNumber, N_MakeFloat /************************************************************ op 072 N_OP_eqlop EQL diff --git a/src/ether.c b/src/ether.c index 8f0c74f..9cb790c 100644 --- a/src/ether.c +++ b/src/ether.c @@ -72,6 +72,8 @@ #include "ether.h" #include "dbprint.h" #include "etherdefs.h" +#include "ifpage.h" +#include "iopage.h" #if defined(USE_DLPI) #define NIOCSETF PFIOCSETF diff --git a/src/foreign.c b/src/foreign.c index 17531de..afc2705 100644 --- a/src/foreign.c +++ b/src/foreign.c @@ -337,7 +337,7 @@ LispPTR call_c_fn(LispPTR *args) { intarg[18], intarg[19], intarg[20], intarg[21], intarg[22], intarg[23], intarg[24], intarg[25], intarg[26], intarg[27], intarg[28], intarg[29], intarg[30], intarg[31]); - return (S_CHAR | tmp); + return (S_CHARACTER | tmp); }; break; case TYPE_FLOATP: fresult = ((PFF)fnaddr)(intarg[0], intarg[1], intarg[2], intarg[3], intarg[4], intarg[5], @@ -598,7 +598,7 @@ LispPTR smashing_c_fn(LispPTR *args) { return (NIL); }; break; case TYPE_CHARACTERP: - return (S_CHAR | + return (S_CHARACTER | (((PFC)fnaddr)(intarg[0], intarg[1], intarg[2], intarg[3], intarg[4], intarg[5], intarg[6], intarg[7], intarg[8], intarg[9], intarg[10], intarg[11], intarg[12], intarg[13], intarg[14], intarg[15], intarg[16], intarg[17], diff --git a/src/fp.c b/src/fp.c index 4b77caa..37cc43b 100644 --- a/src/fp.c +++ b/src/fp.c @@ -16,20 +16,16 @@ /* Floating-point arithmetic code. */ /* */ /************************************************************************/ -#include -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "emlglob.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" -#include "medleyfp.h" -#include "fpdefs.h" +#include "adr68k.h" // for LADDR_from_68k +#include "emlglob.h" +#include "fpdefs.h" // for N_OP_fdifference, N_OP_fgreaterp, N_OP_fplus2 +#include "lispemul.h" // for state, LispPTR, DLword, ERROR_EXIT, ATOM_T +#include "lspglob.h" +#include "lsptypes.h" // for TYPE_FLOATP +#include "medleyfp.h" // for FPCLEAR, FPTEST +#include "mkcelldefs.h" // for createcell68k +#include "my.h" // for N_MakeFloat /************************************************************ N_OP_fplus2 -- op 350 diff --git a/src/fvar.c b/src/fvar.c index 1f30ea7..7fb6b27 100644 --- a/src/fvar.c +++ b/src/fvar.c @@ -9,21 +9,16 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "stack.h" +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "byteswapdefs.h" // for swapx +#include "commondefs.h" // for error #include "emlglob.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "gcdata.h" - -#include "fvardefs.h" -#include "byteswapdefs.h" -#include "commondefs.h" -#include "gchtfinddefs.h" - +#include "fvardefs.h" // for N_OP_fvar_, N_OP_fvarn, N_OP_stkscan, nati... +#include "gcdata.h" // for GCLOOKUP, ADDREF, DELREF +#include "lispmap.h" // for ATOMS_HI, STK_HI +#include "lspglob.h" // for Stackspace +#include "lsptypes.h" // for DLword, LispPTR, GETBASEWORD, state, FRAME... +#include "stack.h" // for fnhead, frameex1, GETNAMETABLE, frameex2 #define MaskShift(x) (((x) << 16) & SEGMASK) diff --git a/src/gc.c b/src/gc.c index caaca1b..f73536d 100644 --- a/src/gc.c +++ b/src/gc.c @@ -9,15 +9,13 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" -#include "lsptypes.h" +#include // for printf #include "emlglob.h" -#include "gcdata.h" -#include "testtooldefs.h" -#include "gcdefs.h" -#include "gchtfinddefs.h" +#include "gcdata.h" // for GCLOOKUPV +#include "gcdefs.h" // for OP_gcref +#include "lspglob.h" +#include "lsptypes.h" // for state, ByteCode, PC, TopOfStack, Get_code_... +#include "testtooldefs.h" // for printPC /************************************************************ diff --git a/src/gc2.c b/src/gc2.c index cb42167..074ab72 100644 --- a/src/gc2.c +++ b/src/gc2.c @@ -22,18 +22,16 @@ */ /**********************************************************************/ -#include -#include "lispemul.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "lspglob.h" +#include // for printf +#include "address.h" // for LOLOC #include "emlglob.h" -#include "address.h" -#include "adr68k.h" -#include "testtooldefs.h" -#include "gc2defs.h" -#include "gcscandefs.h" - +#include "gc2defs.h" // for OP_gcscan1, OP_gcscan2 +#include "gcscandefs.h" // for gcscan1, gcscan2 +#include "lispemul.h" // for state, TopOfStack, NIL, PC, SEGMASK +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" +#include "lsptypes.h" +#include "testtooldefs.h" // for printPC /**********************************************************************/ /* diff --git a/src/gcarray.c b/src/gcarray.c index cf220c7..22b1897 100644 --- a/src/gcarray.c +++ b/src/gcarray.c @@ -42,27 +42,21 @@ /* \Tomtom */ /*************************************************************************/ -#include -#include - -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "stack.h" -#include "cell.h" -#include "ifpage.h" -#include "gcdata.h" -#include "array.h" -#include "debug.h" -#include "lispmap.h" - -#include "gcarraydefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "mkatomdefs.h" -#include "testtooldefs.h" +#include // for printf +#include // for strncmp +#include "adr68k.h" // for Addr68k_from_LADDR +#include "array.h" // for arrayheader +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for PNCell, PLCell, GetPnameCell, GetPropCell +#include "commondefs.h" // for error +#include "debug.h" // for PACKAGE +#include "gcarraydefs.h" // for aref1, find_symbol, get_package_atom, with... +#include "lispemul.h" // for LispPTR, DLword, NIL, SEGMASK, T +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" // for Package_from_Index_word +#include "lsptypes.h" // for GETBYTE, GETWORD +#include "mkatomdefs.h" // for compare_chars, compare_lisp_chars, compute... +#include "testtooldefs.h" // for find_package_from_name /*** not currently used -FS #define min(a,b) ((a > b)?b:a) diff --git a/src/gccode.c b/src/gccode.c index 1d6589e..b861b59 100644 --- a/src/gccode.c +++ b/src/gccode.c @@ -29,22 +29,15 @@ /* \Tomtom */ /************************************************************************/ -#include -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "lispmap.h" -#include "stack.h" -#include "cell.h" -#include "ifpage.h" -#include "gcdata.h" -#include "array.h" - -#include "gccodedefs.h" -#include "commondefs.h" -#include "gchtfinddefs.h" +#include // for sprintf +#include "address.h" // for LOLOC, HILOC +#include "adr68k.h" // for Addr68k_from_LADDR +#include "commondefs.h" // for error +#include "gccodedefs.h" // for code_block_size, map_code_pointers, reclaimc... +#include "gcdata.h" // for REC_GCLOOKUP, DELREF, ADDREF +#include "lspglob.h" // for Deleted_Implicit_Hash_Slot_word, UFNTable +#include "lsptypes.h" // for LispPTR, NIL, UFN, Get_code_BYTE, POINTERMASK +#include "stack.h" // for fnhead #define min(a, b) (((a) > (b)) ? (b) : (a)) diff --git a/src/gcfinal.c b/src/gcfinal.c index 15e2b7e..61c56bc 100644 --- a/src/gcfinal.c +++ b/src/gcfinal.c @@ -42,23 +42,19 @@ /* \Tomtom */ /*************************************************************************/ -#include -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "stack.h" -#include "cell.h" -#include "ifpage.h" -#include "gcdata.h" -#include "array.h" - -#include "gcfinaldefs.h" -#include "commondefs.h" -#include "gccodedefs.h" -#include "gchtfinddefs.h" -#include "llstkdefs.h" +#include // for printf +#include "address.h" // for HILOC +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k, Addr68k... +#include "array.h" // for arrayblock, ARRAYBLOCKTRAILERCELLS, MAXBUCK... +#include "commondefs.h" // for error +#include "gccodedefs.h" // for reclaimcodeblock +#include "gcdata.h" // for DELREF, REC_GCLOOKUP +#include "gcfinaldefs.h" // for arrayblockmerger, checkarrayblock, deleteblock +#include "lispemul.h" // for LispPTR, NIL, T, POINTERMASK, DLword, ATOM_T +#include "llstkdefs.h" // for decusecount68k +#include "lspglob.h" // for FreeBlockBuckets_word, ArrayMerging_word +#include "lsptypes.h" // for WORDPTR +#include "stack.h" // for STACKP, FX #ifdef NEVER #define GetSegnuminColl(entry1) ((entry1 & 0x01fe) >> 1) /* segnum field */ diff --git a/src/gchtfind.c b/src/gchtfind.c index 0feeaa5..af26f90 100644 --- a/src/gchtfind.c +++ b/src/gchtfind.c @@ -10,19 +10,17 @@ #include "version.h" -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "gcdata.h" -#include "lispmap.h" -#include "cell.h" - -#include "gchtfinddefs.h" -#include "commondefs.h" -#include "gcrdefs.h" -#include "storagedefs.h" +#include "address.h" // for LOLOC +#include "adr68k.h" // for LADDR_from_68k +#include "commondefs.h" // for error +#include "gcdata.h" // for GETGC, GCENTRY, ADDREF, DELREF, gc_ovfl +#include "gchtfinddefs.h" // for enter_big_reference_count, htfind, modify_... +#include "gcrdefs.h" // for disablegc1 +#include "lispemul.h" // for LispPTR, NIL, state, DLWORDSPER_CELL, ATOM_T +#include "lispmap.h" // for HTCOLL_SIZE +#include "lspglob.h" // for HTcoll, HTbigcount, HTmain +#include "lsptypes.h" // for WORDPTR +#include "storagedefs.h" // for newpage #define Evenp(num, prim) (((num) % (prim)) == 0) #ifdef BIGVM diff --git a/src/gcmain3.c b/src/gcmain3.c index 6968def..6c1722c 100644 --- a/src/gcmain3.c +++ b/src/gcmain3.c @@ -33,25 +33,21 @@ /* \Tomtom */ /*************************************************************************/ -#include /* for sprintf */ -#include "lispemul.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" +#include // for sprintf +#include "address.h" // for VAG2 +#include "adr68k.h" // for Addr68k_from_LADDR, Addr68k_from_StkOffset +#include "commondefs.h" // for error #include "emlglob.h" -#include "stack.h" -#include "cell.h" -#include "ifpage.h" -#include "gcdata.h" - -#include "gcmain3defs.h" -#include "commondefs.h" -#include "gchtfinddefs.h" -#include "gcrcelldefs.h" -#include "gcscandefs.h" - +#include "gcdata.h" // for GCENTRY, REC_GCLOOKUP, STKREF, hashentry +#include "gcmain3defs.h" // for gcmapscan, gcmapunscan, gcscanstack +#include "gcrcelldefs.h" // for gcreccell +#include "gcscandefs.h" // for gcscan1, gcscan2 +#include "ifpage.h" // for IFPAGE +#include "lispemul.h" // for LispPTR, DLword, NIL, FRAMESIZE, POINTERMASK +#include "lispmap.h" // for HTMAIN_SIZE, STK_HI +#include "lspglob.h" // for HTcoll, HTmain, InterfacePage +#include "lsptypes.h" +#include "stack.h" // for Bframe, fnhead, frameex1, STK_BF, STK_FSB #define WORDSPERCELL 2 #define MAXHTCNT 63 diff --git a/src/gcoflow.c b/src/gcoflow.c index d420151..f14e1ee 100644 --- a/src/gcoflow.c +++ b/src/gcoflow.c @@ -29,23 +29,13 @@ #include "version.h" -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "gcdata.h" +#include "gcdata.h" // for htoverflow, REC_GCLOOKUP +#include "gcoflowdefs.h" // for gc_handleoverflow, gcmaptable +#include "gcrdefs.h" // for doreclaim +#include "lispemul.h" // for NIL, DLword, LispPTR +#include "lspglob.h" // for Reclaim_cnt_word, HToverflow, MaxTypeNumber... +#include "lsptypes.h" // for dtd, GetDTD, TYPE_LISTP -#include "gcoflowdefs.h" -#include "gchtfinddefs.h" -#include "gcrdefs.h" - -#define MAXSMALLP 65535 -#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 Increment_Allocation_Count(n) \ if (*Reclaim_cnt_word != NIL) { \ if (*Reclaim_cnt_word > (n)) \ diff --git a/src/gcr.c b/src/gcr.c index fe51cf2..c89c624 100644 --- a/src/gcr.c +++ b/src/gcr.c @@ -52,28 +52,19 @@ #include "version.h" -#include "lispemul.h" -#include "lispmap.h" +#include "address.h" // for LOLOC +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "commondefs.h" // for error +#include "dspsubrsdefs.h" // for flip_cursor #include "emlglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "stack.h" -#include "gcdata.h" - -#include "gcrdefs.h" -#include "commondefs.h" -#include "dspsubrsdefs.h" -#include "gcmain3defs.h" -#include "timerdefs.h" - -#define MAXSMALLP 65535 -#define HTBIGENTRYSIZE 4 -#define WORDSPERPAGE 256 -#define WORDSPERCELL 2 -#define MAXTYPENUMBER INIT_TYPENUM -#define STK_HI 1 +#include "gcmain3defs.h" // for gcmapscan, gcmapunscan, gcscanstack +#include "gcrdefs.h" // for disablegc1, dogc01, doreclaim, gcarrangeme... +#include "lispemul.h" // for state, NIL, DLword, CurrentStackPTR, ATOM_T +#include "lspglob.h" // for MiscStats, GcDisabled_word, Reclaim_cnt_word +#include "lsptypes.h" // for GETWORD, TT_NOREF +#include "miscstat.h" // for MISCSTATS +#include "stack.h" // for STK_FSB_WORD, frameex1 +#include "timerdefs.h" // for update_miscstats #ifndef BYTESWAP struct interruptstate { @@ -102,7 +93,7 @@ struct interruptstate { void gcarrangementstack(void) { LispPTR tmpnextblock; PushCStack; - tmpnextblock = LADDR_from_68k(CurrentStackPTR += WORDSPERCELL); + tmpnextblock = LADDR_from_68k(CurrentStackPTR += DLWORDSPER_CELL); CURRENTFX->nextblock = LOLOC(tmpnextblock); if ((UNSIGNED)EndSTKP == (UNSIGNED)CurrentStackPTR) error("creating 0-long stack block."); GETWORD(CurrentStackPTR) = STK_FSB_WORD; diff --git a/src/gcrcell.c b/src/gcrcell.c index 9f16d53..5548381 100644 --- a/src/gcrcell.c +++ b/src/gcrcell.c @@ -63,24 +63,19 @@ /* \Tomtom */ /*************************************************************************/ -#include -#include "lispemul.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "stack.h" -#include "cell.h" -#include "ifpage.h" -#include "gcdata.h" -#include "dbprint.h" - -#include "gcrcelldefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "gccodedefs.h" -#include "gcfinaldefs.h" -#include "gchtfinddefs.h" +#include // for printf +#include "address.h" // for POINTER_PAGE +#include "adr68k.h" // for Addr68k_from_LADDR, Addr68k_from_LPAGE +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for conspage, freecons, FREECONS, CDR_INDIRECT +#include "commondefs.h" // for error +#include "gccodedefs.h" // for reclaimcodeblock +#include "gcdata.h" // for DELREF, REC_GCLOOKUPV, ADDREF, REC_GCLOOKUP +#include "gcfinaldefs.h" // for reclaimarrayblock, reclaimstackp, releasing... +#include "gcrcelldefs.h" // for freelistcell, gcreccell +#include "lispemul.h" // for LispPTR, ConsCell, NIL, POINTERMASK, DLword +#include "lspglob.h" // for ListpDTD +#include "lsptypes.h" // for dtd, GetDTD, GetTypeNumber, TYPE_ARRAYBLOCK #ifdef NEWCDRCODING #undef CONSPAGE_LAST diff --git a/src/gvar2.c b/src/gvar2.c index fbf513f..0ba39f4 100644 --- a/src/gvar2.c +++ b/src/gvar2.c @@ -9,18 +9,16 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lsptypes.h" -#include "lspglob.h" -#include "adr68k.h" -#include "gcdata.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "cell.h" // for xpointer +#include "commondefs.h" // for error +#include "dbprint.h" // for DEBUGGER #include "emlglob.h" -#include "cell.h" -#include "dbprint.h" -#include "commondefs.h" -#include "gvar2defs.h" -#include "gchtfinddefs.h" +#include "gcdata.h" // for FRPLPTR +#include "gvar2defs.h" // for N_OP_gvar_, N_OP_rplptr +#include "lispemul.h" // for LispPTR, DLword, NEWATOM_VALUE_OFFSET, NEWAT... +#include "lspglob.h" // for AtomSpace +#include "lsptypes.h" /************************************************************************/ /* */ diff --git a/src/hardrtn.c b/src/hardrtn.c index 6ed187e..c243452 100644 --- a/src/hardrtn.c +++ b/src/hardrtn.c @@ -22,21 +22,18 @@ */ /********************************************************************/ -#include -#include "lispemul.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "adr68k.h" -#include "address.h" -#include "lspglob.h" +#include // for printf +#include "adr68k.h" // for Addr68k_from_StkOffset, StkOffset_from_68K +#include "commondefs.h" // for error #include "emlglob.h" -#include "cell.h" -#include "stack.h" -#include "return.h" - -#include "hardrtndefs.h" -#include "commondefs.h" -#include "llstkdefs.h" +#include "hardrtndefs.h" // for incusecount68k, slowreturn +#include "lispemul.h" // for state, DLword, CURRENTFX, DLWORDSPER_CELL +#include "lispmap.h" // for STK_HI +#include "llstkdefs.h" // for decusecount68k, freestackblock, blt, stack_... +#include "lspglob.h" +#include "lsptypes.h" // for GETWORD +#include "return.h" // for AFTER_CONTEXTSW, BEFORE_CONTEXTSW, FastRetCALL +#include "stack.h" // for FX, frameex1, Bframe, CHECK_FX, StackWord #define MAKE_FXCOPY(fx68k) \ { \ diff --git a/src/initdsp.c b/src/initdsp.c index afc3e3b..9e3451c 100644 --- a/src/initdsp.c +++ b/src/initdsp.c @@ -15,43 +15,34 @@ * Author : Osamu Nakamura */ -#include -#include - +#include // for getpagesize +#ifdef BYTESWAP +#include "byteswapdefs.h" +#endif +#include "dbprint.h" // for DBPRINT, TPRINT +#include "devconf.h" // for SUN2BW +#include "devif.h" // for (anonymous), MRegion, DevRec, DspInterface +#include "display.h" // for DLWORD_PERLINE, DISPLAYBUFFER +#include "emlglob.h" +#include "ifpage.h" // for IFPAGE +#include "initdspdefs.h" // for clear_display, display_before_exit, flush_d... +#include "lispemul.h" // for DLword, BITSPER_DLWORD, T +#include "lspglob.h" +#include "lsptypes.h" +#ifdef XWINDOW +#include "xcursordefs.h" // for Init_XCursor +#endif #ifdef OS4 #include #endif /* OS4 */ -#include "lispemul.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "lspglob.h" -#include "emlglob.h" -#include "display.h" -#include "devconf.h" - -#include "bb.h" -#include "bitblt.h" -#include "pilotbbt.h" -#include "dbprint.h" - -#include "initdspdefs.h" -#ifdef BYTESWAP -#include "byteswapdefs.h" -#endif -#ifdef XWINDOW -#include "xcursordefs.h" -#endif #ifdef DOS #define getpagesize() 512 #endif /* DOS */ #if defined(XWINDOW) || defined(DOS) -#include "devif.h" DLword *DisplayRegion68k_end_addr; extern DspInterface currentdsp; #endif /* DOS */ diff --git a/src/initkbd.c b/src/initkbd.c index e69214b..fa90a00 100644 --- a/src/initkbd.c +++ b/src/initkbd.c @@ -33,6 +33,7 @@ #ifdef XWINDOW +#include #include #include #include diff --git a/src/initsout.c b/src/initsout.c index 9a97df9..5696e24 100644 --- a/src/initsout.c +++ b/src/initsout.c @@ -17,36 +17,34 @@ #include "version.h" -#include -#include -#include -#include -#include - #ifndef DOS -#include +#include // for getpwuid, passwd #endif - -#include "hdw_conf.h" -#include "lispemul.h" -#include "lspglob.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "adr68k.h" -#include "ifpage.h" -#include "iopage.h" -#include "cell.h" -#include "devconf.h" -#include "dbprint.h" -#include "lldsp.h" -#include "gcdata.h" /* for ADDREF & GCLOOKUP */ - -#include "initsoutdefs.h" -#include "byteswapdefs.h" -#include "gcarraydefs.h" -#include "gchtfinddefs.h" -#include "mkcelldefs.h" -#include "testtooldefs.h" +#include // for fprintf, NULL, stderr +#include // for malloc, exit +#include // for strlen, strncpy +#include // for time_t +#include // for gethostid, getuid +#include "adr68k.h" // for Addr68k_from_LADDR +#ifdef BYTESWAP +#include "byteswapdefs.h" // for word_swap_page +#endif +#include "cell.h" // for GetVALCELL68k +#include "dbprint.h" // for DBPRINT +#include "etherdefs.h" // for init_ifpage_ether +#include "gcarraydefs.h" // for get_package_atom +#include "gcdata.h" // for ADDREF, GCLOOKUP +#include "hdw_conf.h" // for KATANA +#include "ifpage.h" // for IFPAGE +#include "initsoutdefs.h" // for build_lisp_map, fixp_value, init_for_bitblt +#include "iopage.h" // for IOPAGE +#include "lispemul.h" // for LispPTR, DLword, NIL, BYTESPER_DLWORD +#include "lispmap.h" // for ATMHT_OFFSET, ATOMS_OFFSET, DEFS_OFFSET +#include "lspglob.h" // for InterfacePage, IOPage, AtomHT, Closure_Cac... +#include "lsptypes.h" // for GetDTD, TYPE_FIXP, TYPE_LISTP +#include "miscstat.h" // for MISCSTATS +#include "mkcelldefs.h" // for N_OP_createcell +#include "testtooldefs.h" // for MakeAtom68k, MAKEATOM #ifdef MAIKO_ENABLE_ETHERNET #include "etherdefs.h" diff --git a/src/intcall.c b/src/intcall.c index 0ce3855..c463a2e 100644 --- a/src/intcall.c +++ b/src/intcall.c @@ -10,23 +10,16 @@ #include "version.h" -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "stack.h" -#include "return.h" +#include "adr68k.h" // for StkOffset_from_68K, Addr68k_from_LADDR, Add... +#include "cell.h" // for definition_cell, GetDEFCELL68k #include "emlglob.h" +#include "intcalldefs.h" // for cause_interruptcall +#include "llstkdefs.h" // for do_stackoverflow #include "lspglob.h" -#include "initatms.h" -#include "cell.h" -#include "tosfns.h" - -#include "intcalldefs.h" -#include "commondefs.h" -#include "llstkdefs.h" -#include "returndefs.h" +#include "lsptypes.h" // for GETWORD +#include "returndefs.h" // for contextsw +#include "stack.h" // for state, CurrentStackPTR, DLword, FX, FuncObj +#include "tosfns.h" // for SWAPPED_FN_CHECK void cause_interruptcall(register unsigned int atom_index) /* Atomindex for Function you want to invoke */ diff --git a/src/keyevent.c b/src/keyevent.c index c7738ff..56f3b38 100644 --- a/src/keyevent.c +++ b/src/keyevent.c @@ -51,6 +51,7 @@ void Mouse_hndlr(void); /* Fields mouse events from driver */ #include "iopage.h" #include "ifpage.h" +#include "miscstat.h" #include "bb.h" #include "bitblt.h" diff --git a/src/kprint.c b/src/kprint.c index 9fdc50f..8cd5909 100644 --- a/src/kprint.c +++ b/src/kprint.c @@ -10,21 +10,18 @@ #include "version.h" -#include -#include "print.h" -#include "address.h" -#include "lispemul.h" -#include "lsptypes.h" -#include "lspglob.h" -#include "initatms.h" -#include "cell.h" +#include // for printf +#include "address.h" // for LOLOC +#include "adr68k.h" // for Addr68k_from_LADDR +#include "car-cdrdefs.h" // for cdr, car #include "emlglob.h" -#include "lispmap.h" -#include "adr68k.h" - -#include "kprintdefs.h" -#include "car-cdrdefs.h" -#include "testtooldefs.h" +#include "kprintdefs.h" // for prindatum, print, print_NEWstring, print_fixp +#include "lispemul.h" // for LispPTR, DLbyte, DLword, POINTERMASK, NIL +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" +#include "lsptypes.h" // for NEWSTRINGP, GETBYTE, GetTypeNumber, TYPE_L... +#include "print.h" // for DOUBLEQUOTE, RIGHT_PAREN, LEFT_PAREN, SPACE +#include "testtooldefs.h" // for print_atomname int PrintMaxLevel = 3; int Printdepth = 0; diff --git a/src/ldsout.c b/src/ldsout.c index 6b25c6f..77573ae 100644 --- a/src/ldsout.c +++ b/src/ldsout.c @@ -11,25 +11,25 @@ #include "version.h" -#include -#include -#include -#include -#include -#include - -#include "adr68k.h" -#include "lispemul.h" +#include // for open, O_RDONLY +#include // for perror, fprintf, printf, stderr, sprintf +#include // for exit, free, malloc, posix_memalign +#include // for memset +#include // for stat, fstat +#include // for lseek, read, close, getpagesize +#include "adr68k.h" // for Addr68k_from_LADDR +#ifdef BYTESWAP +#include "byteswapdefs.h" // for word_swap_page +#endif +#include "dbprint.h" // for DBPRINT, TPRINT +#include "devif.h" // for DspInterface +#include "ifpage.h" // for IFPAGE, IFPAGE_KEYVAL +#include "initdspdefs.h" // for flush_display_buffer, init_display2 +#include "ldsoutdefs.h" // for sysout_loader +#include "lispemul.h" // for BYTESPER_PAGE, GETFPTOVP, DLword, GETPAGEOK +#include "lispmap.h" // for DISPLAY_OFFSET +#include "lspglob.h" // for Lisp_world, native_load_address #include "lsptypes.h" -#include "lispmap.h" -#include "lspglob.h" -#include "ifpage.h" -#include "dbprint.h" - -#include "ldsoutdefs.h" -#include "byteswapdefs.h" -#include "initdspdefs.h" - #define IFPAGE_ADDRESS 512 #define DEFAULT_MAX_SYSOUTSIZE 64 /* in Mbyte */ diff --git a/src/lisp2c.c b/src/lisp2c.c index 30059b0..e924946 100644 --- a/src/lisp2c.c +++ b/src/lisp2c.c @@ -12,21 +12,17 @@ #include "version.h" -#include /* for sprintf */ -#include - -#include "lispemul.h" -#include "lspglob.h" +#include // for sprintf +#include // for abs +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "commondefs.h" // for error #include "emlglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "medleyfp.h" -#include "arith.h" - -#include "lisp2cdefs.h" -#include "commondefs.h" -#include "mkcelldefs.h" +#include "lisp2cdefs.h" // for CIntToLispInt, LispIntToCInt, LispStringLength +#include "lispemul.h" // for LispPTR +#include "lispmap.h" // for S_NEGATIVE, S_POSITIVE +#include "lspglob.h" +#include "lsptypes.h" // for OneDArray, FAT_CHAR_TYPENUMBER, THIN_CHAR_TY... +#include "mkcelldefs.h" // for createcell68k int LispStringP(LispPTR object) { int type; diff --git a/src/llcolor.c b/src/llcolor.c index 595b44a..b80cd70 100644 --- a/src/llcolor.c +++ b/src/llcolor.c @@ -16,7 +16,6 @@ #include #include #include -#include #include "lispemul.h" #include "lispmap.h" diff --git a/src/llstk.c b/src/llstk.c index 49a8fca..d660d82 100644 --- a/src/llstk.c +++ b/src/llstk.c @@ -19,29 +19,24 @@ */ /******************************************************************/ -#include /* for printf */ -#ifdef FSBCHECK -#include /* for memset */ -#endif -#include "lispemul.h" -#include "lispmap.h" -#include "adr68k.h" -#include "address.h" -#include "lsptypes.h" -#include "initatms.h" -#include "lspglob.h" +#include // for printf, putchar +#include // for memset +#include "address.h" // for LOLOC +#include "adr68k.h" // for Addr68k_from_StkOffset, StkOffset_from_68K +#include "commondefs.h" // for error, warn +#include "dbgtooldefs.h" // for sff #include "emlglob.h" -#include "cell.h" -#include "stack.h" -#include "return.h" - -#include "llstkdefs.h" -#include "commondefs.h" -#include "dbgtooldefs.h" -#include "testtooldefs.h" -#include "kprintdefs.h" -#include "storagedefs.h" - +#include "ifpage.h" // for IFPAGE +#include "kprintdefs.h" // for print +#include "lispemul.h" // for DLword, state, CurrentStackPTR, CURRENTFX +#include "lispmap.h" // for STK_HI, STK_OFFSET, S_POSITIVE +#include "llstkdefs.h" // for blt, check_BF, check_FX, check_stack_rooms +#include "lspglob.h" // for InterfacePage, Stackspace, STACKOVERFLOW_word +#include "lsptypes.h" // for GETWORD +#include "return.h" // for AFTER_CONTEXTSW, BEFORE_CONTEXTSW +#include "stack.h" // for StackWord, Bframe, FX, frameex1, STKWORD +#include "storagedefs.h" // for newpage +// #include "testtooldefs.h" // for print_atomname extern int extended_frame; /******************************************************************/ diff --git a/src/loopsops.c b/src/loopsops.c index 768fed3..a2904c8 100644 --- a/src/loopsops.c +++ b/src/loopsops.c @@ -19,20 +19,21 @@ PutValue(object, iv, val) */ -#include "lispemul.h" -#include "lsptypes.h" -#include "cell.h" -#include "lispmap.h" +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for GetVALCELL68k, definition_cell, GetDEFCELL68k +#include "commondefs.h" // for error +#include "gcarraydefs.h" // for get_package_atom +#include "gcdata.h" // for FRPLPTR +#include "lispemul.h" // for LispPTR, state, CurrentStackPTR, NIL_PTR, NIL +#include "lispmap.h" // for S_POSITIVE, STK_OFFSET +#include "loopsopsdefs.h" // for lcfuncall, LCFetchMethod, LCFetchMethodOrHelp #include "lspglob.h" -#include "adr68k.h" -#include "stack.h" -#include "gcdata.h" - -#include "loopsopsdefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "gcarraydefs.h" -#include "gchtfinddefs.h" +#include "lsptypes.h" // for GetDTD, GetTypeNumber, dtd, Listp, GETWORD +#include "stack.h" // for frameex1, fnhead, BF_MARK, FX_MARK, STK_SAFE +#include "version.h" // for UNSIGNED, BIGVM +struct LCIVCacheEntry; +struct LCInstance; static const char il_string[] = "INTERLISP"; #define GET_IL_ATOM(string) get_package_atom((string), (sizeof(string) - 1), il_string, 9, NIL) diff --git a/src/lowlev1.c b/src/lowlev1.c index 09b6a2c..608bc3f 100644 --- a/src/lowlev1.c +++ b/src/lowlev1.c @@ -10,15 +10,13 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "adr68k.h" // for Addr68k_from_LADDR #include "emlglob.h" - -#include "lowlev1defs.h" +#include "lispemul.h" // for LispPTR, state, DLword, POINTERMASK, ERROR_... +#include "lispmap.h" // for S_POSITIVE +#include "lowlev1defs.h" // for N_OP_getbitsnfd, N_OP_putbasen, N_OP_putbas... +#include "lspglob.h" +#include "lsptypes.h" // for GETWORD static const int mask_array[16] = { 1, 3, 7, 0xf, 0x1f, 0x3f, 0x7f, 0xff, diff --git a/src/lowlev2.c b/src/lowlev2.c index f357e09..ee78941 100644 --- a/src/lowlev2.c +++ b/src/lowlev2.c @@ -10,15 +10,13 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "adr68k.h" // for Addr68k_from_LADDR #include "emlglob.h" - -#include "lowlev2defs.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT, SEGMASK, POINTE... +#include "lispmap.h" // for S_POSITIVE, S_NEGATIVE +#include "lowlev2defs.h" // for N_OP_addbase, N_OP_getbasebyte, N_OP_putbas... +#include "lspglob.h" +#include "lsptypes.h" // for GETBYTE, GetTypeNumber, TYPE_FIXP /*** NOTE: these routines likely not called (see inlinedefsC.h) ***/ diff --git a/src/lsthandl.c b/src/lsthandl.c index ed88ba5..e9748b7 100644 --- a/src/lsthandl.c +++ b/src/lsthandl.c @@ -18,17 +18,14 @@ #include "version.h" -#include "lispemul.h" +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for cadr_cell #include "emlglob.h" +#include "lispemul.h" // for state, LispPTR, ERROR_EXIT, NIL_PTR, Scrat... #include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" - -#include "lsthandldefs.h" -#include "car-cdrdefs.h" -#include "vars3defs.h" +#include "lsptypes.h" // for Listp, GetTypeNumber, TYPE_LISTP +#include "lsthandldefs.h" // for N_OP_fmemb, N_OP_listget, fmemb +#include "vars3defs.h" // for cadr /***********************************************************************/ /* N_OP_fmemb */ diff --git a/src/main.c b/src/main.c index 5d9306d..5640d45 100644 --- a/src/main.c +++ b/src/main.c @@ -14,19 +14,15 @@ * This file includes main() */ -#include "lispemul.h" -#include "dbprint.h" - #include -#include #include #include #include +#include #include #include #ifndef DOS -#include #include #include #else /* DOS */ @@ -42,21 +38,17 @@ #endif /* MAIKO_ENABLE_ETHERNET */ #include "emlglob.h" -#include "address.h" #include "adr68k.h" #include "stack.h" #include "return.h" +#include "lispemul.h" #include "lspglob.h" #include "lsptypes.h" #include "lispmap.h" #include "ifpage.h" #include "iopage.h" -#include "debug.h" - -#include "timeout.h" - #include "maindefs.h" #include "commondefs.h" #include "dirdefs.h" @@ -66,6 +58,7 @@ #include "initkbddefs.h" #include "initsoutdefs.h" #include "ldsoutdefs.h" +#include "miscstat.h" #include "storagedefs.h" #include "timerdefs.h" #include "unixcommdefs.h" diff --git a/src/misc7.c b/src/misc7.c index 10ceda5..db4fcbe 100644 --- a/src/misc7.c +++ b/src/misc7.c @@ -11,26 +11,17 @@ /* misc7.c */ -#include -#ifndef DOS -#include -#endif /* DOS */ -#include "lispemul.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for N_GETNUMBER +#include "bbtsubdefs.h" // for n_new_cursorin +#include "dbprint.h" // for DBPRINT +#include "display.h" // for in_display_segment +#include "initdspdefs.h" // for flush_display_ptrregion +#include "lispemul.h" // for LispPTR, DLword, state, BITSPER_DLWORD, ERR... +#include "lispmap.h" // for S_POSITIVE #include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "arith.h" -#include "dbprint.h" -/* osamu '90/02/08 - * add display.h, because in_display_segment() is changed as - * macro. definition is in display.h - */ -#include "display.h" - -#include "misc7defs.h" -#include "bbtsubdefs.h" -#include "initdspdefs.h" +#include "lsptypes.h" // for GETWORDBASEWORD +#include "misc7defs.h" // for N_OP_misc7 /*************************************************/ diff --git a/src/miscn.c b/src/miscn.c index 5ab29f7..bcda295 100644 --- a/src/miscn.c +++ b/src/miscn.c @@ -16,22 +16,18 @@ */ /***********************************************************/ -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lispmap.h" +#include "arith.h" // for N_GETNUMBER +#include "commondefs.h" // for error #include "emlglob.h" +#include "lispemul.h" // for LispPTR, state, CurrentStackPTR, TopOfStack +#include "loopsopsdefs.h" // for LCFetchMethod, LCFetchMethodOrHelp, LCFind... #include "lspglob.h" -#include "arith.h" -#include "subrs.h" - -#include "miscndefs.h" -#include "commondefs.h" -#include "loopsopsdefs.h" -#include "mvsdefs.h" -#include "sxhashdefs.h" -#include "usrsubrdefs.h" +#include "lsptypes.h" +#include "miscndefs.h" // for OP_miscn +#include "mvsdefs.h" // for values, values_list +#include "subrs.h" // for miscn_LCFetchMethod, miscn_LCFetchMethodOr... +#include "sxhashdefs.h" // for STRING_EQUAL_HASHBITS, STRING_HASHBITS +#include "usrsubrdefs.h" // for UserSubr /***********************************************************/ /* diff --git a/src/mkatom.c b/src/mkatom.c index 8c97788..24c16a4 100644 --- a/src/mkatom.c +++ b/src/mkatom.c @@ -31,19 +31,15 @@ /**********************************************************************/ #ifndef BYTESWAP -#include +#include // for memcmp #endif -#include -#include "lispemul.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "cell.h" -#include "dbprint.h" - -#include "mkatomdefs.h" -#include "commondefs.h" -#include "mkcelldefs.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "cell.h" // for PNCell, GetPnameCell +#include "dbprint.h" // for DBPRINT +#include "lispemul.h" // for DLword, LispPTR, T, NIL, POINTERMASK +#include "lispmap.h" // for S_POSITIVE +#include "lsptypes.h" // for GETBYTE, GETWORD +#include "mkatomdefs.h" // for compare_chars, compare_lisp_chars, compute_hash #define ATOMoffset 2 /* NIL NOBIND */ #define MAX_ATOMINDEX 0xffff /* max number of atoms */ @@ -132,7 +128,7 @@ DLword compute_lisp_hash(const char *char_base, DLword offset, DLword length, DL } /* end compute_lisp_hash */ #ifdef BYTESWAP -int bytecmp(const char *char1, const char *char2, int len) +static int bytecmp(const char *char1, const char *char2, int len) { int index; for (index = 0; index < len; index++) { diff --git a/src/mkcell.c b/src/mkcell.c index 0009561..488c82a 100644 --- a/src/mkcell.c +++ b/src/mkcell.c @@ -27,20 +27,16 @@ */ /**********************************************************************/ -#include "lispemul.h" -#include "lispmap.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "allocmdsdefs.h" // for alloc_mdspage, initmdspage +#include "commondefs.h" // for error #include "emlglob.h" +#include "gcdata.h" // for DELREF, GCLOOKUP +#include "lispemul.h" // for LispPTR, DLword, NIL, POINTERMASK, state +#include "lispmap.h" // for S_POSITIVE #include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" -#include "gcdata.h" - -#include "mkcelldefs.h" -#include "allocmdsdefs.h" -#include "commondefs.h" -#include "gchtfinddefs.h" +#include "lsptypes.h" // for dtd, GETWORD, GetDTD +#include "mkcelldefs.h" // for N_OP_createcell, createcell68k #ifdef DTDDEBUG #include "testtooldefs.h" #endif diff --git a/src/mouseif.c b/src/mouseif.c index 099871f..f08654f 100644 --- a/src/mouseif.c +++ b/src/mouseif.c @@ -13,15 +13,14 @@ #include "version.h" -#include "lispemul.h" -#include "dbprint.h" -#include "devif.h" +#include "devif.h" // for MouseInterface, MouseInterfaceRec MouseInterfaceRec curmouse; MouseInterface currentmouse = &curmouse; #ifdef DOS #include +#include "lispemul.h" int nomouseflag = FALSE; extern DLword *Lisp_world; diff --git a/src/mvs.c b/src/mvs.c index ffda634..a28e795 100644 --- a/src/mvs.c +++ b/src/mvs.c @@ -18,22 +18,18 @@ /* */ /************************************************************************/ -#include - -#include "lispemul.h" -#include "lispmap.h" -#include "lspglob.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#ifdef RESWAPPEDCODESTREAM +#include "byteswapdefs.h" // for byte_swap_code_block +#endif +#include "car-cdrdefs.h" // for car +#include "conspagedefs.h" // for cons #include "emlglob.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "opcodes.h" -#include "cell.h" -#include "byteswapdefs.h" - -#include "mvsdefs.h" -#include "car-cdrdefs.h" -#include "conspagedefs.h" - +#include "lspglob.h" // for Stackspace +#include "lsptypes.h" // for ByteCode, LispPTR, state, DLword, FN_OPCOD... +#include "mvsdefs.h" // for make_value_list, simulate_unbind, values +#include "opcodes.h" // for opc_JUMP, opc_FJUMP, opc_FN1, opc_JUMPX +#include "stack.h" // for FX2, GETCLINK /* to optionally swap the fnhead field of a frame */ #ifdef BIGVM diff --git a/src/perrno.c b/src/perrno.c index 26d951d..c7aa4c5 100644 --- a/src/perrno.c +++ b/src/perrno.c @@ -10,14 +10,11 @@ #include "version.h" -#include -#include -#include -#include "lispemul.h" -#include "osmsg.h" - -#include "perrnodefs.h" -#include "osmsgdefs.h" +#include // for errno +#include // for fprintf, perror, stderr, NULL +#include // for strerror +#include "osmsg.h" // for OSMESSAGE_PRINT +#include "perrnodefs.h" // for err_mess, perrorn /************************************************************************/ /* */ diff --git a/src/rplcons.c b/src/rplcons.c index b41965c..4d51f21 100644 --- a/src/rplcons.c +++ b/src/rplcons.c @@ -22,18 +22,13 @@ */ /**********************************************************************/ -#include "lispemul.h" +#include "car-cdrdefs.h" // for N_OP_rplacd +#include "conspagedefs.h" // for cons #include "emlglob.h" +#include "lispemul.h" // for LispPTR, state, ERROR_EXIT, NIL_PTR #include "lspglob.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "gcdata.h" -#include "cell.h" - -#include "rplconsdefs.h" -#include "car-cdrdefs.h" -#include "conspagedefs.h" +#include "lsptypes.h" // for Listp +#include "rplconsdefs.h" // for N_OP_rplcons /***************************************************/ diff --git a/src/setsout.c b/src/setsout.c index b5370bb..f0209f4 100644 --- a/src/setsout.c +++ b/src/setsout.c @@ -20,24 +20,17 @@ /* */ /************************************************************************/ -#include -#include -#include -#include -#include -#include -#include -#include - -#include "adr68k.h" -#include "lispemul.h" -#include "lsptypes.h" -#include "lispmap.h" +#include // for errno +#include // for open, O_RDWR +#include // for perror, printf, sprintf, SEEK_SET, NULL +#include // for exit, strtol +#include // for lseek, close, read, write +#ifdef BYTESWAP +#include "byteswapdefs.h" // for word_swap_page +#endif +#include "ifpage.h" // for IFPAGE #include "lspglob.h" -#include "ifpage.h" -#include "dbprint.h" - -#include "byteswapdefs.h" +#include "lsptypes.h" #define IFPAGE_ADDRESS 512 #define MBYTE 0x100000 /* 1 Mbyte */ diff --git a/src/shift.c b/src/shift.c index 9485851..1c64a5b 100644 --- a/src/shift.c +++ b/src/shift.c @@ -9,17 +9,12 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" +#include "arith.h" // for N_GETNUMBER, N_ARITH_SWITCH #include "emlglob.h" -#include "adr68k.h" -#include "lispmap.h" +#include "lispemul.h" // for state, ERROR_EXIT, LispPTR +#include "lspglob.h" #include "lsptypes.h" -#include "arith.h" - -#include "shiftdefs.h" -#include "mkcelldefs.h" +#include "shiftdefs.h" // for N_OP_llsh1, N_OP_llsh8, N_OP_lrsh1, N_OP_lrsh8 /* * XXX: it feels as though something is not clean here, looks like the diff --git a/src/storage.c b/src/storage.c index d115296..ddabba2 100644 --- a/src/storage.c +++ b/src/storage.c @@ -16,26 +16,22 @@ */ /*****************************************************************/ -#include /* for printf */ -#include "hdw_conf.h" -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lispmap.h" -#include "stack.h" -#include "lspglob.h" -#include "cell.h" -#include "lsptypes.h" -#include "ifpage.h" -#include "gcdata.h" - -#include "storagedefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" -#include "conspagedefs.h" -#include "gcfinaldefs.h" -#include "gchtfinddefs.h" -#include "testtooldefs.h" +#include // for printf +#include "address.h" // for POINTER_PAGE +#include "adr68k.h" // for Addr68k_from_LADDR, LADDR_from_68k +#include "car-cdrdefs.h" // for cdr, car, rplacd, rplaca +#include "commondefs.h" // for error +#include "conspagedefs.h" // for cons +#include "gcdata.h" // for ADDREF, GCLOOKUP +#include "gcfinaldefs.h" // for makefreearrayblock, mergebackward +#include "hdw_conf.h" // for KATANA +#include "ifpage.h" // for IFPAGE +#include "lispemul.h" // for LispPTR, NIL, GETFPTOVP, INTSTAT, ATOM_T +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" // for InterfacePage, FPtoVP, SYSTEMCACHEVARS_word +#include "lsptypes.h" // for Listp +#include "storagedefs.h" // for checkfor_storagefull, init_storage, newpage +#include "testtooldefs.h" // for MAKEATOM #define MINARRAYBLOCKSIZE 4 #define GUARDVMEMFULL 500 diff --git a/src/subr.c b/src/subr.c index adad834..26fe01b 100644 --- a/src/subr.c +++ b/src/subr.c @@ -28,45 +28,42 @@ */ /***********************************************************/ -#include -#include -#include "lispemul.h" -#include "address.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "lspglob.h" -#include "cell.h" -#include "stack.h" -#include "arith.h" -#include "subrs.h" -#include "dbprint.h" - -#include "subrdefs.h" -#include "bbtsubdefs.h" -#include "chardevdefs.h" -#include "commondefs.h" -#include "dirdefs.h" -#include "dskdefs.h" -#include "dspsubrsdefs.h" -#include "etherdefs.h" -#include "gcarraydefs.h" -#include "gcrdefs.h" -#include "inetdefs.h" -#include "kbdsubrsdefs.h" -#include "mkcelldefs.h" -#include "osmsgdefs.h" -#include "rpcdefs.h" -#include "storagedefs.h" -#include "timerdefs.h" -#include "ufsdefs.h" -#include "unixcommdefs.h" -#include "uutilsdefs.h" -#include "uraidextdefs.h" -#include "vmemsavedefs.h" +#include // for printf, sprintf, NULL +#include // for nanosleep, timespec +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for N_GETNUMBER, ARITH_SWITCH +#include "bbtsubdefs.h" // for bitblt_bitmap, bitbltsub, bitshade_bitmap +#include "cell.h" // for PNCell, GetPnameCell +#include "chardevdefs.h" // for CHAR_bin, CHAR_bins, CHAR_bout, CHAR_bouts +#include "commondefs.h" // for error +#include "dbprint.h" // for DBPRINT +#include "dirdefs.h" // for COM_finish_finfo, COM_gen_files, COM_next_... +#include "dskdefs.h" // for COM_changedir, COM_closefile, COM_getfileinfo +#include "dspsubrsdefs.h" // for DSP_Cursor, DSP_ScreenHight, DSP_ScreenWidth +#include "etherdefs.h" // for check_ether, check_sum, ether_ctrlr, ether... #ifdef MAIKO_ENABLE_FOREIGN_FUNCTION_INTERFACE #include "foreigndefs.h" #endif +#include "gcarraydefs.h" // for with_symbol +#include "gcrdefs.h" // for disablegc1, doreclaim +#include "inetdefs.h" // for subr_TCP_ops +#include "kbdsubrsdefs.h" // for KB_beep, KB_enable, KB_setmp +#include "lispemul.h" // for state, LispPTR, NIL_PTR, PopStackTo, TopOf... +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" +#include "lsptypes.h" +#include "osmsgdefs.h" // for mess_read, mess_readp +#include "rpcdefs.h" // for rpc +#include "storagedefs.h" // for newpage +#include "subrdefs.h" // for OP_subrcall, atom_to_str +#include "subrs.h" // for sb_BITBLTSUB, sb_BITBLT_BITMAP, sb_BLTCHAR +#include "timerdefs.h" // for subr_copytimestats, subr_gettime, subr_set... +#include "ufsdefs.h" // for UFS_deletefile, UFS_directorynamep, UFS_ge... +#include "unixcommdefs.h" // for Unix_handlecomm +#include "uraidextdefs.h" // for Uraid_mess +#include "uutilsdefs.h" // for suspend_lisp, check_unix_password, unix_fu... +#include "version.h" // for UNSIGNED +#include "vmemsavedefs.h" // for lisp_finish, vmem_save0 extern LispPTR *PENDINGINTERRUPT68k; diff --git a/src/sxhash.c b/src/sxhash.c index 94b798a..2bf0c65 100644 --- a/src/sxhash.c +++ b/src/sxhash.c @@ -10,23 +10,17 @@ #include "version.h" -#include - -#include "lispemul.h" -#include "lspglob.h" -#include "lispmap.h" -#include "lsptypes.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "arith.h" // for FIXP_VALUE +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for PLCell, PNCell, GetPnameCell, GetPropCell +#include "commondefs.h" // for error #include "emlglob.h" -#include "adr68k.h" -#include "address.h" -#include "stack.h" -#include "cell.h" -#include "array.h" -#include "arith.h" - -#include "sxhashdefs.h" -#include "car-cdrdefs.h" -#include "commondefs.h" +#include "lispemul.h" // for LispPTR, DLword, POINTERMASK, SEGMASK +#include "lispmap.h" // for S_POSITIVE, S_NEGATIVE +#include "lspglob.h" +#include "lsptypes.h" // for OneDArray, PATHNAME, GETBYTE, GETWORD, COMPLEX +#include "sxhashdefs.h" // for STRING_EQUAL_HASHBITS, STRING_HASHBITS, SX_... /** Follows definition in LLARRAYELT: **/ #define EQHASHINGBITS(item) \ diff --git a/src/testtool.c b/src/testtool.c index 6e98366..4b997cd 100644 --- a/src/testtool.c +++ b/src/testtool.c @@ -41,33 +41,30 @@ */ -#include -#include -#include -#include -#include -#include - -#include "lispemul.h" -#include "lispmap.h" -#include "adr68k.h" -#include "lsptypes.h" -#include "lspglob.h" +#include // for PRIoPTR, PRIuPTR +#include // for longjmp, jmp_buf +#include // for int8_t, uint8_t, uintptr_t +#include // for printf, putchar, fflush, getchar, stdin +#include // for exit +#include // for strlen +#include "adr68k.h" // for LADDR_from_68k, Addr68k_from_LADDR, Addr68... +#include "array.h" // for arrayheader +#include "cell.h" // for conspage, PNCell, GetDEFCELL68k, GetPnameCell +#include "commondefs.h" // for error +#include "dbgtooldefs.h" // for get_fn_fvar_name +#include "debug.h" // for PACKAGE #include "emlglob.h" -#include "cell.h" -#include "ifpage.h" -#include "debug.h" -#include "dbprint.h" -#include "tosfns.h" -#include "array.h" - -#include "commondefs.h" -#include "testtooldefs.h" -#include "dbgtooldefs.h" -#include "gcarraydefs.h" -#include "kprintdefs.h" -#include "mkatomdefs.h" -#include "uraidextdefs.h" +#include "gcarraydefs.h" // for aref1 +#include "ifpage.h" // for IFPAGE +#include "kprintdefs.h" // for print, prindatum +#include "lispemul.h" // for DLword, LispPTR, DLbyte, state, T, ConsCell +#include "lispmap.h" // for STK_OFFSET, ATOMS_HI +#include "lspglob.h" // for Package_from_Index_word, Stackspace +#include "lsptypes.h" // for GETWORD, dtd, GETBYTE, NEWSTRINGP, GetType... +#include "mkatomdefs.h" // for compare_chars, make_atom +#include "stack.h" // for Bframe, FX, fnhead, frameex1, BFRAMEPTR +#include "testtooldefs.h" // for print_package_name, GETTOPVAL, MAKEATOM +#include "uraidextdefs.h" // for URaid_scanlink #define URSCAN_ALINK 0 #define URSCAN_CLINK 1 diff --git a/src/timer.c b/src/timer.c index 8f499a3..8d98acb 100644 --- a/src/timer.c +++ b/src/timer.c @@ -60,6 +60,7 @@ extern int ether_fd; #include "lispmap.h" #include "stack.h" #include "dbprint.h" +#include "miscstat.h" #include "timerdefs.h" #include "commondefs.h" diff --git a/src/tstsout.c b/src/tstsout.c index 91dd19e..2e9a080 100644 --- a/src/tstsout.c +++ b/src/tstsout.c @@ -13,23 +13,15 @@ #include "version.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include // for open +#include // for printf, perror, fprintf, sprintf, SEEK_SET +#include // for exit +#include // for strncmp +#include // for O_RDONLY +#include // for close, lseek, read -#include "adr68k.h" -#include "lispemul.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "lspglob.h" -#include "ifpage.h" -#include "dbprint.h" -#include "byteswapdefs.h" +#include "byteswapdefs.h" // for word_swap_page +#include "ifpage.h" // for IFPAGE #define IFPAGE_ADDRESS 512 #define MBYTE 0x100000 /* 1 Mbyte */ diff --git a/src/typeof.c b/src/typeof.c index 892ea04..4e83893 100644 --- a/src/typeof.c +++ b/src/typeof.c @@ -20,13 +20,10 @@ */ -#include "lispemul.h" -#include "lsptypes.h" -#include "cell.h" -#include "lispmap.h" +#include "lispemul.h" // for LispPTR, ATOM_T, NIL_PTR #include "lspglob.h" - -#include "typeofdefs.h" +#include "lsptypes.h" // for dtd, GetDTD, GetTypeNumber +#include "typeofdefs.h" // for N_OP_instancep /************************************************************************/ /* */ diff --git a/src/ubf1.c b/src/ubf1.c index 04b8077..de6e171 100644 --- a/src/ubf1.c +++ b/src/ubf1.c @@ -9,18 +9,14 @@ #include "version.h" -#include -#include "lispemul.h" -#include "adr68k.h" +#include "adr68k.h" // for LADDR_from_68k +#include "arith.h" // for N_ARITH_SWITCH +#include "lispemul.h" // for state, ERROR_EXIT, DLword, LispPTR #include "lspglob.h" -#include "lsptypes.h" -#include "lispmap.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "medleyfp.h" -#include "my.h" - -#include "ubf1defs.h" +#include "lsptypes.h" // for TYPE_FLOATP +#include "mkcelldefs.h" // for createcell68k +#include "my.h" // for N_MakeFloat +#include "ubf1defs.h" // for N_OP_ubfloat1 /************************************************************ OP_ubfloat1 -- op 355 == UBFLOAT1 diff --git a/src/ubf2.c b/src/ubf2.c index 6a6bf80..16944e1 100644 --- a/src/ubf2.c +++ b/src/ubf2.c @@ -11,12 +11,10 @@ #include "version.h" -#include -#include -#include "lispemul.h" -#include "medleyfp.h" - -#include "ubf2defs.h" +#include // for fmodf +#include "lispemul.h" // for state, ERROR_EXIT, ATOM_T, LispPTR, NIL_PTR +#include "medleyfp.h" // for FPCLEAR, FPTEST +#include "ubf2defs.h" // for N_OP_ubfloat2 /************************************************************ OP_ub2 -- op 354 == UBFLOAT2 diff --git a/src/ubf3.c b/src/ubf3.c index 4821bfd..d39f3fa 100644 --- a/src/ubf3.c +++ b/src/ubf3.c @@ -11,14 +11,12 @@ #include "version.h" -#include -#include "lispemul.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "lispemul.h" // for state, ERROR_EXIT, LispPTR, SEGMASK +#include "lispmap.h" // for S_POSITIVE #include "lspglob.h" -#include "adr68k.h" -#include "lispmap.h" -#include "medleyfp.h" - -#include "ubf3defs.h" +#include "medleyfp.h" // for FPCLEAR, FPTEST +#include "ubf3defs.h" // for N_OP_ubfloat3 /************************************************************ N_OP_ubfloat3 -- op 062 diff --git a/src/unwind.c b/src/unwind.c index 3e196de..d2d75d4 100644 --- a/src/unwind.c +++ b/src/unwind.c @@ -21,12 +21,10 @@ */ /******************************************************************/ -#include "lispemul.h" #include "emlglob.h" -#include "stack.h" +#include "lispemul.h" // for LispPTR, state, DLword, PVar, CurrentStackPTR #include "lspglob.h" - -#include "unwinddefs.h" +#include "unwinddefs.h" // for N_OP_unwind LispPTR *N_OP_unwind(register LispPTR *cstkptr, register LispPTR tos, int n, int keep) { register int num; /* number of UNBOUND slot */ diff --git a/src/uraid.c b/src/uraid.c index d33cb8d..ee50862 100644 --- a/src/uraid.c +++ b/src/uraid.c @@ -36,6 +36,9 @@ #include #endif /* DOS */ +#ifdef XWINDOW +#include // for ConnectionNumber +#endif #ifdef OS5 #include @@ -56,6 +59,7 @@ #include "ifpage.h" #include "debug.h" #include "devconf.h" +#include "stack.h" #include "display.h" #include "bitblt.h" diff --git a/src/uutils.c b/src/uutils.c index a741e8f..91dc48f 100644 --- a/src/uutils.c +++ b/src/uutils.c @@ -18,27 +18,22 @@ /* */ /************************************************************************/ -#include -#include -#include -#include -#include -#include - #ifndef DOS -#include +#include // for getpwuid, passwd #endif - -#include "lispemul.h" -#include "adr68k.h" -#include "lsptypes.h" +#include // for killpg, SIGTSTP +#include // for printf, NULL, snprintf, size_t +#include // for getenv +#include // for strcmp, strcpy, strlen, strncpy +#include // for getuid, gethostid, gethostname, getpgrp +#include "adr68k.h" // for Addr68k_from_LADDR +#include "keyboard.h" // for KBEVENT, KB_ALLUP, RING, KEYEVENTSIZE, MAXKE... +#include "lispemul.h" // for LispPTR, DLword, NIL, ATOM_T #include "lspglob.h" -#include "osmsg.h" -#include "keyboard.h" - -#include "uutilsdefs.h" -#include "osmsgdefs.h" -#include "uraiddefs.h" +#include "lsptypes.h" // for GETWORD, OneDArray, GetTypeNumber, THIN_CHAR... +#include "osmsg.h" // for OSMESSAGE_PRINT +#include "uraiddefs.h" // for device_after_raid, device_before_raid +#include "uutilsdefs.h" // for c_string_to_lisp_string, check_unix_password /************************************************************************/ /* */ diff --git a/src/vars3.c b/src/vars3.c index f732632..1e1e055 100644 --- a/src/vars3.c +++ b/src/vars3.c @@ -9,18 +9,16 @@ #include "version.h" -#include -#include "lispemul.h" -#include "lspglob.h" -#include "lispmap.h" -#include "adr68k.h" +#include "adr68k.h" // for Addr68k_from_LADDR +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for cadr_cell, CDR_NIL, CDR_INDIRECT, S_N_CHECK... #include "emlglob.h" -#include "cell.h" -#include "lsptypes.h" -#include "stack.h" - -#include "vars3defs.h" -#include "car-cdrdefs.h" +#include "lispemul.h" // for state, ConsCell, LispPTR, NIL_PTR, DLword +#include "lispmap.h" // for S_POSITIVE +#include "lspglob.h" // for Stackspace +#include "lsptypes.h" // for Listp +#include "stack.h" // for frameex1 +#include "vars3defs.h" // for N_OP_arg0, N_OP_assoc, cadr /******************************************* cadr diff --git a/src/xbbt.c b/src/xbbt.c index 7b67b31..e3d04f0 100644 --- a/src/xbbt.c +++ b/src/xbbt.c @@ -10,15 +10,12 @@ #include "version.h" -#include - -#include -#include - -#include "lispemul.h" -#include "xdefs.h" -#include "devif.h" -#include "xbbtdefs.h" +#include // for XFlush, XPutImage +#include "devif.h" // for (anonymous), MRegion, DspInterface +#include "lispemul.h" // for DLword +#include "version.h" +#include "xbbtdefs.h" // for clipping_Xbitblt +#include "xdefs.h" // for XLOCK, XUNLOCK /************************************************************************/ /* */ diff --git a/src/xc.c b/src/xc.c index 7ee099d..222eb08 100644 --- a/src/xc.c +++ b/src/xc.c @@ -74,6 +74,7 @@ #include "conspagedefs.h" #include "drawdefs.h" #include "eqfdefs.h" +#include "devif.h" #include "findkeydefs.h" #include "fpdefs.h" #include "fvardefs.h" @@ -81,6 +82,7 @@ #include "gcscandefs.h" #include "gvar2defs.h" #include "hardrtndefs.h" +#include "ifpage.h" #include "intcalldefs.h" #include "keyeventdefs.h" #include "llstkdefs.h" diff --git a/src/xcursor.c b/src/xcursor.c index 7737d08..304687d 100644 --- a/src/xcursor.c +++ b/src/xcursor.c @@ -11,20 +11,18 @@ #include "version.h" -#include -#include - -#include -#include -#include "xdefs.h" - -#include "lispemul.h" -#include "iopage.h" -#include "display.h" -#include "dbprint.h" -#include "devif.h" - -#include "xcursordefs.h" +#include // for Cursor, Pixmap, Colormap +#include // for XAllocNamedColor, XCreatePixmapFromBitmapData +#include // for uint8_t +#include // for NULL +#include // for malloc +#include "dbprint.h" // for TPRINT +#include "devif.h" // for (anonymous), DspInterface, DefineCursor +#include "display.h" // for CURSORHEIGHT +#include "iopage.h" // for IOPAGE +#include "lispemul.h" // for DLword +#include "xcursordefs.h" // for Init_XCursor, Set_XCursor, init_Xcursor +#include "xdefs.h" // for XLOCK, XUNLOCK extern IOPAGE *IOPage; diff --git a/src/xinit.c b/src/xinit.c index 09de786..0c87d1d 100644 --- a/src/xinit.c +++ b/src/xinit.c @@ -10,41 +10,23 @@ #include "version.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include // for NoEventMask, MSBFirst, StructureNotifyMask +#include // for XSelectInput, XImage, XFlush, DefaultScreen +#include // for assert +#include // for sig_atomic_t +#include // for false, bool, true +#include // for NULL +#include "adr68k.h" // for Addr68k_from_LADDR +#include "dbprint.h" // for TPRINT +#include "devif.h" // for (anonymous), MRegion, DspInterface, OUTER_S... +#include "dspifdefs.h" // for GenericReturnT +#include "lispemul.h" // for BITSPER_DLWORD, DLword, LispPTR +#include "xbbtdefs.h" // for clipping_Xbitblt +#include "xdefs.h" // for XLOCK, XUNLOCK, DEF_BDRWIDE, DEF_WIN_HEIGHT +#include "xinitdefs.h" // for Open_Display, X_init, Xevent_after_raid +#include "xlspwindefs.h" // for Create_LispWindow +#include "xwinmandefs.h" // for bound -#include "lispemul.h" -#include "dbprint.h" - -#include "xdefs.h" -#include "devif.h" - -#include "adr68k.h" -#include "xinitdefs.h" -#include "dspifdefs.h" -#include "timerdefs.h" -#include "xbbtdefs.h" -#include "xlspwindefs.h" -#include "xwinmandefs.h" - - -#include -#include - -#ifdef OS5 -#include -#include -#endif /* OS5 */ - -#define PERCENT_OF_SCREEN 95 /* DISPLAY_MAX same magic number is in ldsout.c */ #define DISPLAY_MAX (65536 * 16 * 2) diff --git a/src/xlspwin.c b/src/xlspwin.c index e717b67..a6129c7 100644 --- a/src/xlspwin.c +++ b/src/xlspwin.c @@ -13,24 +13,21 @@ #include "version.h" -#include -#include -#include -#include - -#include "lispemul.h" - -#include "xdefs.h" -#include "xbitmaps.h" - -#include "keyboard.h" -#include "devif.h" -#include "dbprint.h" - -#include "xlspwindefs.h" -#include "commondefs.h" -#include "xcursordefs.h" -#include "xmkicondefs.h" +#include // for Cursor, CWOverrideRedirect, GCBackground +#include // for XCreateSimpleWindow, XMapWindow, XChangeWin... +#include // for XSizeHints, XStringListToTextProperty, XWMH... +#include // for NULL +#include "commondefs.h" // for error +#include "dbprint.h" // for TPRINT +#include "devif.h" // for (anonymous), MRegion, OUTER_SB_WIDTH, Defin... +#include "keyboard.h" // for RING, KBEVENT, KB_ALLUP, KEYEVENTSIZE, MAXK... +#include "lispemul.h" // for DLword, ATOM_T, LispPTR, NIL, T +#include "version.h" +#include "xbitmaps.h" // for LISP_CURSOR, default_cursor, horizscroll_cu... +#include "xcursordefs.h" // for set_Xcursor, init_Xcursor +#include "xdefs.h" // for XLOCK, XUNLOCK +#include "xlspwindefs.h" // for Create_LispWindow, DoRing, lisp_Xvideocolor +#include "xmkicondefs.h" // for make_Xicon extern DLword *EmKbdAd068K, *EmKbdAd168K, *EmKbdAd268K, *EmKbdAd368K, *EmKbdAd468K, *EmKbdAd568K, *EmRealUtilin68K; diff --git a/src/xmkicon.c b/src/xmkicon.c index d983ac3..4a76c12 100644 --- a/src/xmkicon.c +++ b/src/xmkicon.c @@ -11,18 +11,13 @@ #include "version.h" -#include -#include - -#include -#include -#include "lispemul.h" -#include "dbprint.h" - -#include "xdefs.h" -#include "devif.h" - -#include "xmkicondefs.h" +#include // for MSBFirst, Pixmap, XYBitmap +#include // for XImage, XCreatePixmap, XPutImage, XReadBitm... +#include // for BitmapFileInvalid, BitmapNoMemory, BitmapOp... +#include // for uint8_t +#include // for fprintf, printf, stderr +#include "devif.h" // for (anonymous), DspInterface +#include "xmkicondefs.h" // for make_Xicon XImage IconImage; diff --git a/src/xrdopt.c b/src/xrdopt.c index c42f9d7..1a2b3c7 100644 --- a/src/xrdopt.c +++ b/src/xrdopt.c @@ -11,27 +11,24 @@ #include "version.h" -#include -#include -#include -#include -#include -#include -#include -#include +#include // for XPointer, True, XParseGeometry, XResource... +#include // for XrmoptionSepArg, XrmGetResource, Xrmoptio... +#include // for errno +#include // for PATH_MAX +#include // for fprintf, NULL, stderr, sscanf +#include // for getenv, exit, strtol +#include // for strncpy, strcat, strcpy, strcmp +#include // for u_char +#include // for access, R_OK +#include "version.h" // for MAIKO_ENABLE_ETHERNET +#include "xdefs.h" // for WINDOW_NAME +#include "xrdoptdefs.h" // for print_Xusage, read_Xoption + #ifdef MAIKO_ENABLE_ETHERNET #if defined(USE_NIT) #include /* needed for Ethernet stuff below */ #endif /* USE_NIT */ #endif /* MAIKO_ENABLE_ETHERNET */ -#include -#include -#include - -#include "xdefs.h" -#include "dbprint.h" - -#include "xrdoptdefs.h" extern int LispWindowRequestedX, LispWindowRequestedY; extern unsigned LispWindowRequestedWidth, LispWindowRequestedHeight; diff --git a/src/xscroll.c b/src/xscroll.c index 25bb005..5f90254 100644 --- a/src/xscroll.c +++ b/src/xscroll.c @@ -11,17 +11,11 @@ #include "version.h" -#include - -#include -#include - -#include "lispemul.h" -#include "xdefs.h" -#include "devif.h" - -#include "xscrolldefs.h" -#include "xwinmandefs.h" +#include // for XMoveWindow +#include "devif.h" // for (anonymous), MRegion, DspInterface +#include "xdefs.h" // for SCROLL_PITCH +#include "xscrolldefs.h" // for JumpScrollHor, JumpScrollVer, Scroll, Scrol... +#include "xwinmandefs.h" // for bound int ScrollPitch = SCROLL_PITCH; diff --git a/src/xwinman.c b/src/xwinman.c index b635f78..5eeecc8 100644 --- a/src/xwinman.c +++ b/src/xwinman.c @@ -11,20 +11,19 @@ #include "version.h" -#include - -#include -#include - -#include "lispemul.h" -#include "miscstat.h" -#include "devif.h" -#include "xdefs.h" -#include "xscroll.h" -#include "xwinmandefs.h" -#include "keyeventdefs.h" -#include "xlspwindefs.h" -#include "xscrolldefs.h" +#include // for Button1, Cursor, ButtonPress, Button2, But... +#include // for XEvent, XMoveResizeWindow, XAnyEvent, XBut... +#include // for printf +#include // for u_char +#include "devif.h" // for (anonymous), MRegion, DefineCursor, OUTER_... +#include "keyeventdefs.h" // for kb_trans +#include "lispemul.h" // for PUTBASEBIT68K, FALSE, TRUE, DLword, state +#include "miscstat.h" // for MISCSTATS +#include "version.h" +#include "xdefs.h" // for XLOCK, XUNLOCK +#include "xlspwindefs.h" // for DoRing +#include "xscrolldefs.h" // for JumpScrollHor, JumpScrollVer, Scroll, Scro... +#include "xwinmandefs.h" // for Set_BitGravity, beep_Xkeyboard, bound, dis... int Mouse_Included = FALSE; diff --git a/src/z2.c b/src/z2.c index ea41962..774acaf 100644 --- a/src/z2.c +++ b/src/z2.c @@ -23,25 +23,17 @@ #include "version.h" -#include -#include "lispemul.h" +#include "car-cdrdefs.h" // for car, cdr +#include "cell.h" // for cadr_cell, S_N_CHECKANDCADR +#include "conspagedefs.h" // for cons #include "emlglob.h" +#include "lispemul.h" // for state, LispPTR, NIL_PTR, ERROR_EXIT, Irq_S... +#include "lispmap.h" // for ATOM_OFFSET, S_CHARACTER, S_NEGATIVE, S_PO... #include "lspglob.h" -#include "lispmap.h" -#include "lsptypes.h" -#include "address.h" -#include "adr68k.h" -#include "cell.h" -#include "stack.h" -#include "gcdata.h" -#include "mkcelldefs.h" -#include "arith.h" -#include "my.h" - -#include "z2defs.h" -#include "car-cdrdefs.h" -#include "conspagedefs.h" -#include "vars3defs.h" +#include "lsptypes.h" // for Listp, GetTypeNumber, TYPE_LISTP +#include "vars3defs.h" // for cadr +#include "version.h" +#include "z2defs.h" // for N_OP_classoc, N_OP_clfmemb, N_OP_restlist /* N_OP_classoc() OP 33Q */ LispPTR N_OP_classoc(LispPTR key, LispPTR list) {