1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-16 08:15:31 +00:00
Interlisp.maiko/inc/lsptypes.h
Nick Briggs 6528ac38e3 Remove proprietary license from all files.
The code is being re-licensed under the MIT license.

	modified:   bin/fixid
	modified:   bin/launch.asm
	modified:   bin/makefile-hpux.hp9000-x
	modified:   bin/makefile-init.sgi
	modified:   bin/makefile-init.sparc
	modified:   bin/makefile-init.sparc-multi
	modified:   bin/makefile-irix.sgi-x
	modified:   bin/makefile-sunos4.sparc
	modified:   bin/makefile-sunos4.sparc%
	modified:   bin/makefile-sunos4.sparc-multi
	modified:   bin/makefile-sunos5.386-x
	modified:   bin/makefile-sunos5.i386-x
	modified:   bin/makefile-sunos5.sparc-x
	modified:   bin/makefile-tail
	modified:   bin/makeisc
	modified:   bin/makeright
	modified:   inc/Check.h
	modified:   inc/MyWindow.h
	modified:   inc/Stipple.h
	modified:   inc/XCursors.h
	modified:   inc/XKeymap.h
	modified:   inc/XVersion.h
	modified:   inc/Xdeflt.h
	modified:   inc/Xicon.h
	modified:   inc/address.h
	modified:   inc/arith.h
	modified:   inc/arith2.h
	modified:   inc/array.h
	modified:   inc/bb.h
	modified:   inc/cell.h
	modified:   inc/cell.h%
	modified:   inc/copyright
	modified:   inc/dbprint.h
	modified:   inc/debug.h
	modified:   inc/devif.h
	modified:   inc/display.h
	modified:   inc/dspdata.h
	modified:   inc/ether.h
	modified:   inc/fast_dsp.h
	modified:   inc/fp.h
	modified:   inc/gc.h
	modified:   inc/gc.h.save
	modified:   inc/gcscan.h
	modified:   inc/hdw_conf.h
	modified:   inc/ifpage.h
	modified:   inc/inlineC.h
	modified:   inc/inlnMIPS.h
	modified:   inc/inlnPS2.h
	modified:   inc/inlndos.h
	modified:   inc/iopage.h
	modified:   inc/kbdif.h
	modified:   inc/keyboard.h
	modified:   inc/keyboard.h%
	modified:   inc/keysym.h
	modified:   inc/ldeXdefs.h
	modified:   inc/lispemul.h
	modified:   inc/lispemul.h.save
	modified:   inc/lispmap.h
	modified:   inc/lldsp.h
	modified:   inc/lnk-Xdeflt.h
	modified:   inc/lnk-debug.h
	modified:   inc/lnk-fast_dsp.h
	modified:   inc/lnk-inlineC.h
	modified:   inc/lnk-lispmap.h
	modified:   inc/lnk-tosfns.h
	modified:   inc/lnk-tosret.h
	modified:   inc/locfile.h
	modified:   inc/lpdefs.h
	modified:   inc/lpglobl.h
	modified:   inc/lspglob.h
	modified:   inc/lsptypes.h
	modified:   inc/medleyfp.h
	modified:   inc/mnxdefs.h
	modified:   inc/my.h
	modified:   inc/native.h
	modified:   inc/ocr.h
	modified:   inc/osmsg.h
	modified:   inc/picture.h
	modified:   inc/pilotbbt.h
	modified:   inc/print.h
	modified:   inc/profile.h
	modified:   inc/rawrs232c.h
	modified:   inc/return.h
	modified:   inc/rs232c.h
	modified:   inc/stack.h
	modified:   inc/stream.h
	modified:   inc/stream.h%
	modified:   inc/stream.h2
	modified:   inc/sysatms.h
	modified:   inc/timeout.h
	modified:   inc/tos1defs.h
	modified:   inc/tosfns.h
	modified:   inc/tosret.h
	modified:   inc/tty.h
	modified:   inc/version.h
	modified:   inc/vmemsave.h
	modified:   inc/xbitmaps.h
	modified:   inc/xdefs.h
	modified:   src/Cldeetr.c
	modified:   src/allocmds.c
	modified:   src/arith2.c
	modified:   src/arith3.c
	modified:   src/arith4.c
	modified:   src/array.c
	modified:   src/array2.c
	modified:   src/array3.c
	modified:   src/array4.c
	modified:   src/array5.c
	modified:   src/array6.c
	modified:   src/asmbbt.c
	modified:   src/asmbitblt.c
	modified:   src/atom.c
	modified:   src/bbtSPARC.s
	modified:   src/bbtsub.c
	modified:   src/bin.c
	modified:   src/binds.c
	modified:   src/bitblt.c
	modified:   src/blt.c
	modified:   src/byteswap.c
	modified:   src/call-c.c
	modified:   src/car-cdr.c
	modified:   src/cdaudio.c
	modified:   src/cdrom.c
	modified:   src/chardev.c
	modified:   src/chatter.c
	modified:   src/codeconv.c
	modified:   src/codetbl.c
	modified:   src/colorbltfns.c
	modified:   src/common.c
	modified:   src/conspage.c
	modified:   src/cr
	modified:   src/dbgtool.c
	modified:   src/dir.c
	modified:   src/doscomm.c
	modified:   src/doskbd.c
	modified:   src/dosmouse.c
	modified:   src/draw.c
	modified:   src/dsk.c
	modified:   src/dspif.c
	modified:   src/dspsubrs.c
	modified:   src/ejlisp.c
	modified:   src/eqf.c
	modified:   src/ether.c
	modified:   src/findkey.c
	modified:   src/foreign.c
	modified:   src/fp.c
	modified:   src/fvar.c
	modified:   src/gc.c
	modified:   src/gc2.c
	modified:   src/gcarray.c
	modified:   src/gccode.c
	modified:   src/gcfinal.c
	modified:   src/gchtfind.c
	modified:   src/gcmain3.c
	modified:   src/gcoflow.c
	modified:   src/gcr.c
	modified:   src/gcrcell.c
	modified:   src/gcscan.c
	modified:   src/gvar2.c
	modified:   src/hacks.c
	modified:   src/hardrtn.c
	modified:   src/imagefile.c
	modified:   src/imagefile2.c
	modified:   src/inet.c
	modified:   src/initdsp.c
	modified:   src/initkbd.c
	modified:   src/initsout.c
	modified:   src/intcall.c
	modified:   src/kbdif.c
	modified:   src/kbdsubrs.c
	modified:   src/keyevent.c
	modified:   src/keylib.c
	modified:   src/keymaker.c
	modified:   src/keytst.c
	modified:   src/keytstno.c
	modified:   src/kprint.c
	modified:   src/launch.asm
	modified:   src/ldeboot.c
	modified:   src/ldeether.c
	modified:   src/ldsout.c
	modified:   src/lineblt8.c
	modified:   src/lisp2c.c
	modified:   src/llcolor.c
	modified:   src/llstk.c
	modified:   src/loader.c
	modified:   src/loopsops.c
	modified:   src/lowlev1.c
	modified:   src/lowlev2.c
	modified:   src/lpdual.c
	modified:   src/lpkit.c
	modified:   src/lplexyy.c
	modified:   src/lpmain.c
	modified:   src/lpread.c
	modified:   src/lpsolve.c
	modified:   src/lptran.c
	modified:   src/lpwrite.c
	modified:   src/lpytab.c
	modified:   src/lsthandl.c
	modified:   src/main.c
	modified:   src/misc7.c
	modified:   src/miscn.c
	modified:   src/mkatom.c
	modified:   src/mkcell.c
	modified:   src/mkkey.c
	modified:   src/mkvdate.c
	modified:   src/mnwevent.c
	modified:   src/mnxmeth.c
	modified:   src/mouseif.c
	modified:   src/mvs.c
	modified:   src/ocr.c
	modified:   src/ocrproc.c
	modified:   src/oether.c
	modified:   src/oldeether.c
	modified:   src/optck.c
	modified:   src/osmsg.c
	modified:   src/perrno.c
	modified:   src/picture.c
	modified:   src/rawcolor.c
	modified:   src/rawrs232c.c
	modified:   src/return.c
	modified:   src/rpc.c
	modified:   src/rplcons.c
	modified:   src/rs232c.c
	modified:   src/setsout.c
	modified:   src/shift.c
	modified:   src/socdvr.c
	modified:   src/storage.c
	modified:   src/subr.c
	modified:   src/subr0374.c
	modified:   src/sxhash.c
	modified:   src/testdsp.c
	modified:   src/testtool.c
	modified:   src/timeoday.c
	modified:   src/timeofday.c
	modified:   src/timer.c
	modified:   src/truecolor.c
	modified:   src/tstsout.c
	modified:   src/tty.c
	modified:   src/typeof.c
	modified:   src/ubf1.c
	modified:   src/ubf2.c
	modified:   src/ubf3.c
	modified:   src/ufn.c
	modified:   src/ufs.c
	modified:   src/unixcomm.c
	modified:   src/unixfork.c
	modified:   src/unwind.c
	modified:   src/uraid.c
	modified:   src/usrsubr.c
	modified:   src/uutils.c
	modified:   src/vars3.c
	modified:   src/vesafns.asm
	modified:   src/vesainit.c
	modified:   src/vgainit.c
	modified:   src/vmemsave.c
	modified:   src/xbbt.c
	modified:   src/xc.c
	modified:   src/xc.c.orig
	modified:   src/xcursor.c
	modified:   src/xinit.c
	modified:   src/xlspwin.c
	modified:   src/xmkicon.c
	modified:   src/xrdopt.c
	modified:   src/xscroll.c
	modified:   src/xwinman.c
	modified:   src/z2.c
2020-08-11 18:39:45 -07:00

714 lines
20 KiB
C
Executable File

/* @(#) lsptypes.h Version 1.4 (12/29/94). copyright Venue */
/************************************************************************/
/* */
/* (C) Copyright 1989-92 Venue. All Rights Reserved. */
/* Manufactured in the United States of America. */
/* */
/************************************************************************/
/**********************************************************************/
/*
File Name : lsptypes.h
Define Constants for Datatype
*/
/**********************************************************************/
/************************************************************************/
/* */
/* T Y P E T A B L E M A S K B I T S */
/* */
/* These are used for quick type checks, and are ORed into the type */
/* number in the DTD. */
/* */
/* [TT_LISPREF renamed to TT_SYMBOLP 2/7/91 by JDS for 3-byte atoms] */
/* */
/************************************************************************/
#define TT_ATOM 0x0800 /* ATOM in CL sense */
#define TT_NUMBERP 0x1000 /* It's a number. */
#define TT_FIXP 0x2000 /* It's an integer. */
#define TT_SYMBOLP 0x4000 /* It's a symbol (LITATOM or NEWATOM. */
#define TT_NOREF 0x8000 /* Don't Refcount these objects. */
/************************************************************************/
/* */
/* T Y P E N U M B E R S */
/* */
/* These are the type numbers "known to the microcode". This must */
/* match the list \BUILT-IN-SYSTEM-TYPES, in LLDATATYPE. It's the */
/* list of types that MUST be known to microcode or emulator, and */
/* which can't rely on the luck of what's loaded when for assignment. */
/* */
/* Change History: 2/27/89 Sybalsky Added BIGNUM-PATHNAME, to */
/* support SXHASH opcode. */
/* 3/1/89 Sybalsky Added type #s for hunked */
/* storage, for use in GC, in */
/* place of absolute #s (!!) */
/* 7/25/90 Osamu Added type# for NEWATOM. */
/************************************************************************/
#define TYPE_ARRAYBLOCK 0 /* Pseudo type # for array blocks */
#define TYPE_SMALLP 1
#define TYPE_FIXP 2
#define TYPE_FLOATP 3
#define TYPE_LITATOM 4
#define TYPE_LISTP 5
#define TYPE_ARRAYP 6
#define TYPE_STRINGP 7 /* old IL strings (obs) */
#define TYPE_STACKP 8
#define TYPE_CHARACTERP 9
#define TYPE_VMEMPAGEP 10
#define TYPE_STREAM 11
#define TYPE_BITMAP 12
#define TYPE_COMPILED_CLOSURE 13
#define TYPE_ONED_ARRAY 14 /* array, string */
#define TYPE_TWOD_ARRAY 15
#define TYPE_GENERAL_ARRAY 16
#define TYPE_BIGNUM 17 /* Bignums */
#define TYPE_RATIO 18 /* Commonlisp rationals */
#define TYPE_COMPLEX 19 /* Commonlisp complex's */
#define TYPE_PATHNAME 20 /* CL path-name structure */
#ifdef BIGATOMS
#define TYPE_NEWATOM 21 /* New Atom */
/* type number 22~30 reserved for future use */
#define TYPE_PTRHUNK1 31 /********************************/
#define TYPE_PTRHUNK2 32 /* */
#define TYPE_PTRHUNK3 33 /* Type numbers for "hunked" */
#define TYPE_PTRHUNK4 34 /* Storage region, used for */
#define TYPE_PTRHUNK5 35 /* small arrays. This range */
#define TYPE_PTRHUNK6 36 /* is for arrays of pointers. */
#define TYPE_PTRHUNK7 37 /* */
#define TYPE_PTRHUNK8 38 /********************************/
#define TYPE_PTRHUNK9 39
#define TYPE_PTRHUNK10 40
#define TYPE_PTRHUNK11 41
#define TYPE_PTRHUNK12 42
#define TYPE_PTRHUNK13 43
#define TYPE_UNBOXEDHUNK1 44 /********************************/
#define TYPE_UNBOXEDHUNK2 45 /* */
#define TYPE_UNBOXEDHUNK3 46 /* This range is for arrays */
#define TYPE_UNBOXEDHUNK4 47 /* of unboxed items -- the */
#define TYPE_UNBOXEDHUNK5 48 /* contents are not GC'd */
#define TYPE_UNBOXEDHUNK6 49 /* */
#define TYPE_UNBOXEDHUNK7 50 /********************************/
#define TYPE_UNBOXEDHUNK8 51
#define TYPE_UNBOXEDHUNK9 52
#define TYPE_UNBOXEDHUNK10 53
#define TYPE_UNBOXEDHUNK11 54
#define TYPE_UNBOXEDHUNK12 55
#define TYPE_UNBOXEDHUNK13 56
#define TYPE_UNBOXEDHUNK14 57
#define TYPE_UNBOXEDHUNK15 58
#define TYPE_UNBOXEDHUNK16 59
#define TYPE_UNBOXEDHUNK17 60
#define TYPE_UNBOXEDHUNK18 61
#define TYPE_UNBOXEDHUNK19 62
#define TYPE_UNBOXEDHUNK20 63
#define TYPE_CODEHUNK1 64 /********************************/
#define TYPE_CODEHUNK2 65 /* */
#define TYPE_CODEHUNK3 66 /* This range is for small */
#define TYPE_CODEHUNK4 67 /* CODE blocks -- the code */
#define TYPE_CODEHUNK5 68 /* for small functions. It */
#define TYPE_CODEHUNK6 69 /* gets reclaimed using the */
#define TYPE_CODEHUNK7 70 /* function reclaimcodeblock. */
#define TYPE_CODEHUNK8 71 /* */
#define TYPE_CODEHUNK9 72 /********************************/
#define TYPE_CODEHUNK10 73
#define INIT_TYPENUM 74
#else
#define TYPE_PTRHUNK1 21 /********************************/
#define TYPE_PTRHUNK2 22 /* */
#define TYPE_PTRHUNK3 23 /* Type numbers for "hunked" */
#define TYPE_PTRHUNK4 24 /* Storage region, used for */
#define TYPE_PTRHUNK5 25 /* small arrays. This range */
#define TYPE_PTRHUNK6 26 /* is for arrays of pointers. */
#define TYPE_PTRHUNK7 27 /* */
#define TYPE_PTRHUNK8 28 /********************************/
#define TYPE_PTRHUNK9 29
#define TYPE_PTRHUNK10 30
#define TYPE_PTRHUNK11 31
#define TYPE_PTRHUNK12 32
#define TYPE_PTRHUNK13 33
#define TYPE_UNBOXEDHUNK1 34 /********************************/
#define TYPE_UNBOXEDHUNK2 35 /* */
#define TYPE_UNBOXEDHUNK3 36 /* This range is for arrays */
#define TYPE_UNBOXEDHUNK4 37 /* of unboxed items -- the */
#define TYPE_UNBOXEDHUNK5 38 /* contents are not GC'd */
#define TYPE_UNBOXEDHUNK6 39 /* */
#define TYPE_UNBOXEDHUNK7 40 /********************************/
#define TYPE_UNBOXEDHUNK8 41
#define TYPE_UNBOXEDHUNK9 42
#define TYPE_UNBOXEDHUNK10 43
#define TYPE_UNBOXEDHUNK11 44
#define TYPE_UNBOXEDHUNK12 45
#define TYPE_UNBOXEDHUNK13 46
#define TYPE_UNBOXEDHUNK14 47
#define TYPE_UNBOXEDHUNK15 48
#define TYPE_UNBOXEDHUNK16 49
#define TYPE_UNBOXEDHUNK17 50
#define TYPE_UNBOXEDHUNK18 51
#define TYPE_UNBOXEDHUNK19 52
#define TYPE_UNBOXEDHUNK20 53
#define TYPE_CODEHUNK1 54 /********************************/
#define TYPE_CODEHUNK2 55 /* */
#define TYPE_CODEHUNK3 56 /* This range is for small */
#define TYPE_CODEHUNK4 57 /* CODE blocks -- the code */
#define TYPE_CODEHUNK5 58 /* for small functions. It */
#define TYPE_CODEHUNK6 59 /* gets reclaimed using the */
#define TYPE_CODEHUNK7 60 /* function reclaimcodeblock. */
#define TYPE_CODEHUNK8 61 /* */
#define TYPE_CODEHUNK9 62 /********************************/
#define TYPE_CODEHUNK10 63
#define INIT_TYPENUM 64
#endif /* BIGATOMS */
#ifndef BYTESWAP
/* Normal byte-order versions of declarations */
#ifdef BIGVM
struct dtd {
unsigned unuse :2 ;
unsigned dtd_obsolate :1 ;
unsigned dtd_finalizable :1 ;
unsigned dtd_name: 28 ; /* type name */
DLword dtd_cnt0 ;
DLword dtd_size ;
LispPTR dtd_free ; /* really a FULLXPOINTER */
unsigned dtd_lockedp : 1 ;
unsigned dtd_hunkp : 1 ;
unsigned dtd_gctype :2 ;
unsigned dtd_descrs: 28;
LispPTR dtd_typespecs;
LispPTR dtd_ptrs ;
int dtd_oldcnt;
int dtd_nextpage ;
DLword dtd_typeentry ;
DLword dtd_supertype ;
};
typedef struct stringp {
unsigned origin : 1 ;
unsigned substringed : 1 ;
unsigned readonly : 1 ;
unsigned nil : 1 ;
unsigned base : 28 ;
unsigned type : 4 ;
unsigned length: 28 ;
LispPTR offset ;
} STRINGP ;
typedef struct oned_array {
unsigned int nil1 : 4 ;
unsigned int base : 28 ;
unsigned int readonlyp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int bitp :1 ;
unsigned int stringp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int displacedp : 1;
unsigned int fillpointerp :1;
unsigned int extendablep : 1;
unsigned int typenumber : 8 ;
DLword offset;
LispPTR fillpointer ;
LispPTR totalsize ; } OneDArray;
typedef struct oned_array NEWSTRINGP;
typedef struct general_array {
unsigned int nil1 : 4 ;
unsigned int base : 28 ;
unsigned int readonlyp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int bitp :1 ;
unsigned int stringp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int displacedp : 1;
unsigned int fillpointerp :1;
unsigned int extendablep : 1;
unsigned int typenumber : 8 ;
unsigned int nil2:16;
LispPTR Dim0;
LispPTR totalsize;
LispPTR Dim1 ;
LispPTR Dim2 ; } LispArray;
typedef struct compiled_closure {
unsigned int nil1 : 4 ;
unsigned int def_ptr : 28; /* function */
unsigned int nil2 : 4 ;
unsigned int env_ptr : 28; /* environment */
} CClosure ;
#else
/* Structure for DTD */
struct dtd {
DLword dtd_namelo ;
DLword dtd_size ;
LispPTR dtd_free ; /* really a FULLXPOINTER */
unsigned unuse :2 ;
unsigned dtd_obsolate :1 ;
unsigned dtd_finalizable :1 ;
unsigned dtd_lockedp : 1 ;
unsigned dtd_hunkp : 1 ;
unsigned dtd_gctype :2 ;
unsigned dtd_descrs : 24;
unsigned dtd_namehi : 8;
unsigned dtd_typespecs : 24 ;
LispPTR dtd_ptrs ;
int dtd_oldcnt;
DLword dtd_cnt0 ;
DLword dtd_nextpage ;
DLword dtd_typeentry ;
DLword dtd_supertype ;
};
typedef struct stringp {
unsigned origin : 1 ;
unsigned substringed : 1 ;
unsigned readonly : 1 ;
unsigned nil : 1 ;
unsigned type : 4 ;
unsigned base : 24 ;
DLword length ;
DLword offset ;
} STRINGP ;
typedef struct oned_array {
unsigned int nil1 : 8 ;
unsigned int base : 24 ;
unsigned int readonlyp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int bitp :1 ;
unsigned int stringp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int displacedp : 1;
unsigned int fillpointerp :1;
unsigned int extendablep : 1;
unsigned int typenumber : 8 ;
DLword offset;
DLword fillpointer ;
DLword totalsize ; } OneDArray;
typedef struct oned_array NEWSTRINGP;
typedef struct general_array {
unsigned int nil1 : 8 ;
unsigned int base : 24 ;
unsigned int readonlyp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int bitp :1 ;
unsigned int stringp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int displacedp : 1;
unsigned int fillpointerp :1;
unsigned int extendablep : 1;
unsigned int typenumber : 8 ;
DLword Dim0;
DLword totalsize;
DLword Dim1 ;
DLword Dim2 ; } LispArray;
typedef struct compiled_closure {
unsigned int nil1 : 8 ;
unsigned int def_ptr : 24; /* function */
unsigned int nil2 : 8 ;
unsigned int env_ptr : 24; /* environment */
} CClosure ;
#endif /* BIGVM */
/* Structure for initialdtdcontents */
struct system_dtd_contents {
char *dtd_name ; /* type name string >> changed 4-feb-87 */
DLword name_len ; /* type name length in BYTE 27-Mar-87 take */
DLword dtd_size ;
};
typedef struct{
LispPTR bmbase;
DLword bmrasterwidth;
DLword bmheight;
DLword bmwidth;
DLword bmbitperpixel;
}BITMAP;
/****************************************************************/
/* Byte- and Word-array access macros */
/* */
/* Use these macros instead of dereferencing a char pointer */
/* so we can encapsulate byte-ordering effects on different */
/* hardware! */
/* */
/****************************************************************/
#define GETBYTE(base) (* (base))
/* GETBASEWORD only works if base points to a 32-bit bounday */
#define GETBASEWORD(base, offset) (* ((base)+(offset)))
/* GETWORDBASEWORD works right with base on a 16-bit boundary. */
#define GETWORDBASEWORD(base, offset) (* (((DLword *)(base))+(offset)))
#define GETWORD(base) (* (base))
#define WORDPTR(base) (base)
#define BYTEPTR(base) (base)
#else
/********************************************************/
/* */
/* Byte-swapped structure definitions, for 80386 &c */
/* */
/********************************************************/
#ifdef BIGVM
struct dtd {
unsigned dtd_name: 28 ; /* type name */
unsigned dtd_finalizable :1 ;
unsigned dtd_obsolate :1 ;
unsigned unuse :2 ;
DLword dtd_size ;
DLword dtd_cnt0 ;
LispPTR dtd_free ; /* really a FULLXPOINTER */
unsigned dtd_descrs: 28;
unsigned dtd_gctype :2 ;
unsigned dtd_hunkp : 1 ;
unsigned dtd_lockedp : 1 ;
LispPTR dtd_typespecs;
LispPTR dtd_ptrs ;
int dtd_oldcnt;
int dtd_nextpage ;
DLword dtd_supertype ;
DLword dtd_typeentry ;
};
typedef struct stringp {
unsigned base : 28 ;
unsigned nil : 1 ;
unsigned readonly : 1 ;
unsigned substringed : 1 ;
unsigned origin : 1 ;
unsigned length: 28 ;
unsigned type : 4 ;
LispPTR offset ;
} STRINGP ;
typedef struct oned_array {
unsigned int base : 28 ;
unsigned int nil1 : 4 ;
DLword offset;
unsigned int typenumber : 8 ;
unsigned int extendablep : 1;
unsigned int fillpointerp :1;
unsigned int displacedp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int stringp : 1;
unsigned int bitp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int readonlyp :1 ;
LispPTR fillpointer ;
LispPTR totalsize ; } OneDArray;
typedef struct oned_array NEWSTRINGP;
typedef struct general_array {
unsigned int base : 28 ;
unsigned int nil1 : 4 ;
unsigned int nil2:16;
unsigned int typenumber : 8 ;
unsigned int extendablep : 1;
unsigned int fillpointerp :1;
unsigned int displacedp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int stringp : 1;
unsigned int bitp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int readonlyp :1 ;
LispPTR Dim0;
LispPTR totalsize;
LispPTR Dim1 ;
LispPTR Dim2 ; } LispArray;
typedef struct compiled_closure {
unsigned int def_ptr : 28; /* function */
unsigned int nil1 : 4 ;
unsigned int env_ptr : 28; /* environment */
unsigned int nil2 : 4 ;
} CClosure ;
#else
/* Structure for DTD */
struct dtd {
DLword dtd_size ;
DLword dtd_namelo ;
LispPTR dtd_free ; /* really a FULLXPOINTER */
unsigned dtd_descrs : 24;
unsigned dtd_gctype :2 ;
unsigned dtd_hunkp : 1 ;
unsigned dtd_lockedp : 1 ;
unsigned dtd_finalizable :1 ;
unsigned dtd_obsolate :1 ;
unsigned unuse :2 ;
unsigned dtd_typespecs : 24 ;
unsigned dtd_namehi : 8;
LispPTR dtd_ptrs ;
int dtd_oldcnt;
DLword dtd_nextpage ;
DLword dtd_cnt0 ;
DLword dtd_supertype ;
DLword dtd_typeentry ;
};
typedef struct stringp
{
unsigned base : 24 ;
unsigned type : 4 ;
unsigned nil : 1 ;
unsigned readonly : 1 ;
unsigned substringed : 1 ;
unsigned origin : 1 ;
DLword offset ;
DLword length ;
} STRINGP ;
typedef struct oned_array
{
unsigned int base : 24 ;
unsigned int nil1 : 8 ;
DLword offset;
unsigned int typenumber : 8 ;
unsigned int extendablep : 1;
unsigned int fillpointerp :1;
unsigned int displacedp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int stringp : 1;
unsigned int bitp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int readonlyp :1 ;
DLword totalsize ;
DLword fillpointer ;
} OneDArray;
typedef struct oned_array NEWSTRINGP;
typedef struct general_array
{
unsigned int base : 24 ;
unsigned int nil1 : 8 ;
DLword Dim0;
unsigned int typenumber : 8 ;
unsigned int extendablep : 1;
unsigned int fillpointerp :1;
unsigned int displacedp : 1;
unsigned int ajustablep : 1; /* as used arrayheader */
unsigned int stringp : 1;
unsigned int bitp :1 ;
unsigned int indirectp : 1; /* as used arrayheader */
unsigned int readonlyp :1 ;
DLword Dim2 ;
DLword Dim1 ;
} LispArray;
typedef struct compiled_closure
{
unsigned int def_ptr : 24; /* function */
unsigned int nil1 : 8 ;
unsigned int env_ptr: 24; /* environment */
unsigned int nil2 : 8 ;
} CClosure ;
#endif /* BIGVM */
/* Structure for initialdtdcontents */
struct system_dtd_contents
{
char *dtd_name ; /* type name string >> changed 4-feb-87 */
DLword dtd_size ;
DLword name_len ; /* type name length in BYTE 27-Mar-87 take */
};
typedef struct
{
LispPTR bmbase;
DLword bmheight;
DLword bmrasterwidth;
DLword bmbitperpixel;
DLword bmwidth;
}BITMAP;
/****************************************************************/
/* Byte- and Word-array access macros */
/* */
/* Use these macros instead of dereferencing a char pointer */
/* so we can encapsulate byte-ordering effects on different */
/* hardware! */
/* */
/****************************************************************/
#define GETBYTE(base) (* (unsigned char *) (3^(UNSIGNED)(base)))
/* GETBASEWORD only works if base points to a 32-bit bounday */
#define GETBASEWORD(base, offset) GETWORDBASEWORD((base),(offset))
#define GETWORDBASEWORD(base, offset) (* (DLword *) (2^(UNSIGNED)((base)+(offset))))
#define GETWORD(base) (* (DLword *) (2^(UNSIGNED)(base)))
#define WORDPTR(base) ((DLword *)(2^(UNSIGNED)(base)))
#define BYTEPTR(base) ((char *) (3^(UNSIGNED)(base)))
#endif /* BYTESWAP */
#define ST_POS16 1
#define ST_BYTE 0
#define THIN_CHAR_TYPENUMBER 67
#define FAT_CHAR_TYPENUMBER 68
/************************************************************************/
/* */
/* T Y P E E N T R Y A C C E S S O R S */
/* */
/* GetDTD Gets the (C-native) address for the DTD */
/* (Data Type Descriptor) for the type whose */
/* number you hand it (LESS the mask bits!). */
/* */
/* GetTypeEntry Gets the entire 16-bit "type number" field */
/* from the DTD, including type-mask bits. */
/* Use this one when you want the mask bits for */
/* a quick category check. */
/* */
/* GetTypeNumber Gets only the Type Number (without mask bits) */
/* from the DTD for the object you give it. */
/* Use this one for doing type checks and */
/* dispatching. */
/* */
/* Listp If 'address' is the address of a cons cell, */
/* returns TRUE. Equivalent to the LISTP pred. */
/* */
/************************************************************************/
#ifndef I386
/* Get DTD pointer(68k) from typenum */
#ifdef BIGVM
#define GetDTD(typnum) (DTDspace + ((typnum)<<4)+((typnum)<<1))
#else
#define GetDTD(typnum) (DTDspace + ((typnum)<<4))
#endif /* BIGVM */
/* Get all type entry */
#define GetTypeEntry(address) ( GETWORD(MDStypetbl+((address)>>9)) )
#else
/* Because the 386i's code generator does bettter with them */
/* in this order (does an add, rather than mov-add) */
/* JDS 22-mar-90 */
/* Get DTD pointer(68k) from typenum */
#define GetDTD(typnum) (((typnum)<<4) + DTDspace)
/* Get all type entry */
#define GetTypeEntry(address) ( GETWORD(((address)>>9) + MDStypetbl) )
#endif /* I386 */
/* the type number is in the low 11 bits */
#define GetTypeNumber(address) (GetTypeEntry(address) & 0x7ff)
/* This MACRO is similar to LISTP */
#define Listp(address) (GetTypeNumber(address) == TYPE_LISTP)
/******************************************/
/* Lisp's PATHNAME datatype */
/* */
/* This MUST change whenever the Lisp */
/* definition of the PATHNAME structure */
/* changes. */
/* */
/******************************************/
typedef
struct
{
LispPTR host;
LispPTR device;
LispPTR directory;
LispPTR name;
LispPTR type;
LispPTR version;
} PATHNAME;
/******************************************/
/* Lisp's COMPLEX datatype */
/* */
/* This MUST change whenever the Lisp */
/* definition of the COMPLEX structure */
/* changes. */
/* */
/******************************************/
typedef
struct
{
LispPTR real;
LispPTR imaginary;
} COMPLEX;
/******************************************/
/* Lisp's RATIO datatype */
/* */
/* This MUST change whenever the Lisp */
/* definition of the RATIO structure */
/* changes. */
/* */
/******************************************/
typedef
struct
{
LispPTR numerator;
LispPTR denominator;
} RATIO;
/******************************************/
/* Lisp's BIGNUM datatype */
/* */
/* This MUST change whenever the Lisp */
/* definition of the BIGNUM structure */
/* changes. */
/* */
/******************************************/
typedef
struct
{
LispPTR contents; /* a list of 12-bit segments of value, */
/* low-order 12 bits first. */
} BIGNUM;