mirror of
https://github.com/Interlisp/maiko.git
synced 2026-01-31 05:42:25 +00:00
Cleanup of includes and related changes based on include-what-you-use diagnostics (#436)
Remove unused #define PERCENT_OF_SCREEN in MyWindow.h Move structures for dir.c to dirdefs.h where they are used Resolve S_CHAR vs S_CHARACTER in favor of S_CHARACTER and cleanup #defines Fix = vs == bug in FSDEBUG code in dir.c Eliminate duplicate/unused constant definitions in gcr.c Declare static internal function bytecmp in mkatom.c Update many source and include files to include headers for what they use
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#define VERTICAL 0
|
||||
#define HORIZONTAL 1
|
||||
|
||||
#define PERCENT_OF_SCREEN 95
|
||||
#define SCROLL_PITCH 30
|
||||
|
||||
typedef struct _MyEvent
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
@@ -1,6 +1,65 @@
|
||||
#ifndef DIRDEFS_H
|
||||
#define DIRDEFS_H 1
|
||||
#include "lispemul.h" /* for LispPTR */
|
||||
#include <dirent.h> // for MAXNAMLEN
|
||||
#include <sys/types.h> // 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
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#include "lispemul.h" /* for DLword */
|
||||
#include "version.h" /* for UNSIGNED */
|
||||
|
||||
#define BCPLDISPLAY stdout
|
||||
|
||||
|
||||
@@ -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. */
|
||||
|
||||
@@ -687,8 +687,6 @@
|
||||
N_OP_POPPED_CALL_2(N_OP_eqq, arg2); \
|
||||
} while (0)
|
||||
|
||||
#define S_CHARACTER 0x70000
|
||||
|
||||
#define AREF1 \
|
||||
do { \
|
||||
LispPTR arrayarg; \
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
14
inc/my.h
14
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
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
/* Manufactured in the United States of America. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#include "osmsgdefs.h" // for flush_pty
|
||||
|
||||
#define OSMESSAGE_PRINT(print_exp) \
|
||||
{ \
|
||||
|
||||
@@ -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 <stdio.h>
|
||||
#include "testtooldefs.h"
|
||||
|
||||
#define S_CHECK(condition, msg) \
|
||||
{ \
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
/* Manufactured in the United States of America. */
|
||||
/* */
|
||||
/************************************************************************/
|
||||
#include "setjmp.h" /* for jmp_buf */
|
||||
#include <setjmp.h> /* for jmp_buf */
|
||||
#include <unistd.h> /* for alarm */
|
||||
|
||||
extern jmp_buf jmpbuf;
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
/* */
|
||||
/************************************************************************/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include "maiko/platform.h"
|
||||
#include <stdint.h>
|
||||
#include "maiko/platform.h" // IWYU pragma: export
|
||||
|
||||
/************************************************************************/
|
||||
/* */
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#ifndef XCURSORDEFS_H
|
||||
#define XCURSORDEFS_H 1
|
||||
#include <X11/X.h> /* for Cursor, Window */
|
||||
#include <X11/Xlib.h> /* for Display */
|
||||
#include <stdint.h> /* for uint8_t */
|
||||
#include "devif.h" /* for DspInterface */
|
||||
void Init_XCursor(void);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user