This is object.h in view mode; [Download] [Up]
Changes file for /usr/local/src/kcl/h/object.h Created on Wed May 22 12:49:06 1991 Usage \n@s[Original text\n@s|Replacement Text\n@s] See the file rascal.ics.utexas.edu:/usr2/ftp/merge.c for a program to merge change files. Anything not between "\n@s[" and "\n@s]" is a simply a comment. This file was constructed using emacs and merge.el Enhancements Copyright (c) W. Schelter All rights reserved. by (Bill Schelter) wfs@carl.ma.utexas.edu ****Change:(orig (17 17 a)) @s[#define FALSE 0 /* boolean false value */ @s|#define FALSE 0 /* boolean false value */ #ifdef SGC #define FIRSTWORD short t; char s,m #else #define FIRSTWORD short t; short m #endif @s] ****Change:(orig (20 20 c)) @s[#define PAGESIZE 2048 /* page size in bytes */ @s|#ifndef PAGEWIDTH @s] ****Change:(orig (21 21 a)) @s[#define PAGEWIDTH 11 /* page width */ @s|#define PAGEWIDTH 11 /* page width */ #endif @s] ****Change:(orig (22 22 a)) @s[ /* log2(PAGESIZE) */ @s| /* log2(PAGESIZE) */ #define PAGESIZE (1 << PAGEWIDTH) /* page size in bytes */ @s] ****Change:(orig (23 23 a)) @s[ @s| @s] ****Change:(orig (41 41 a)) @s[#define CBMINSIZE 64 /* contiguous block minimal size */ @s|#define CBMINSIZE 64 /* contiguous block minimal size */ #ifndef CHAR_SIZE #define CHAR_SIZE 8 /* number of bits in a char */ #endif @s] ****Change:(orig (46 46 a)) @s[typedef double longfloat; @s|typedef double longfloat; typedef unsigned short fatchar; @s] ****Change:(orig (47 47 a)) @s[ @s| #define SIGNED_CHAR(x) (((char ) -1) < (char )0 ? (char) x \ : (x >= (1<<(CHAR_SIZE-1)) ? \ x - (((int)(1<<(CHAR_SIZE-1))) << 1) \ : (char ) x)) @s] ****Change:(orig (52 52 a)) @s[typedef union lispunion *object; @s|typedef union lispunion *object; typedef union int_object iobject; union int_object {object o; int i;}; @s] ****Change:(orig (64 64 c)) @s[struct fixnum_struct { short t, m; @s|struct fixnum_struct { FIRSTWORD; @s] ****Change:(orig (77 77 c)) @s[struct shortfloat_struct { short t, m; @s|struct shortfloat_struct { FIRSTWORD; @s] ****Change:(orig (83 83 c)) @s[struct longfloat_struct { short t, m; @s|struct longfloat_struct { FIRSTWORD; @s] ****Change:(orig (89 91 c)) @s[ short t, m; struct bignum *big_cdr; /* bignum cdr */ int big_car; /* bignum car */ @s| FIRSTWORD; long *big_self; /* bignum body */ int big_length; /* bignum length */ @s] ****Change:(orig (95 95 c)) @s[struct ratio { short t, m; @s|struct ratio { FIRSTWORD; @s] ****Change:(orig (103 103 c)) @s[struct complex { short t, m; @s|struct complex { FIRSTWORD; @s] ****Change:(orig (111 111 c)) @s[struct character { short t, m; @s|struct character { FIRSTWORD; @s] ****Change:(orig (122 122 c)) @s[struct character character_table[]; @s|struct character character_table1[256+128]; @s] ****Change:(orig (124 124 c)) @s[#endif @s|#endif #define character_table (character_table1+128) @s] ****Change:(orig (140 140 c)) @s[struct symbol { short t, m; @s|struct symbol { FIRSTWORD; @s] ****Change:(orig (170 170 c)) @s[struct package { short t, m; @s|struct package { FIRSTWORD; @s] ****Change:(orig (179 179 a)) @s[ object *p_external; /* hashtable for external symbols */ @s| object *p_external; /* hashtable for external symbols */ int p_internal_size; /* size of internal hash table*/ int p_external_size; /* size of external hash table */ int p_internal_fp; /* [rough] number of symbols */ int p_external_fp; /* [rough] number of symbols */ @s] ****Change:(orig (198 198 c)) @s[struct cons { short t, m; @s|struct cons { FIRSTWORD; @s] ****Change:(orig (215 215 c)) @s[struct hashtable { /* hash table header */ short t, m; @s|struct hashtable { /* hash table header */ FIRSTWORD; @s] ****Change:(orig (232 233 c)) @s[ aet_lf /* long-float */ }; @s| aet_lf, /* long-float */ aet_char, /* signed char */ aet_uchar, /* unsigned char */ aet_short, /* signed short */ aet_ushort, /* unsigned short */ }; @s] ****Change:(orig (236 236 c)) @s[struct array { /* array header */ short t, m; @s|struct array { /* array header */ FIRSTWORD; @s] ****Change:(orig (248 248 a)) @s[ short a_offset; /* bitvector offset */ }; @s| short a_offset; /* bitvector offset */ }; @s] ****Change:(orig (250 250 c)) @s[struct vector { /* vector header */ short t, m; @s|struct vector { /* vector header */ FIRSTWORD; @s] ****Change:(orig (264 264 c)) @s[struct string { /* string header */ short t, m; @s|struct string { /* string header */ FIRSTWORD; @s] ****Change:(orig (277 277 c)) @s[struct ustring { short t, m; @s|struct ustring { FIRSTWORD; @s] ****Change:(orig (286 286 a)) @s[ object ust_displaced; }; @s| object ust_displaced; }; #define USHORT(x,i) (((unsigned short *)(x)->ust.ust_self)[i]) @s] ****Change:(orig (288 288 c)) @s[struct bitvector { /* bitvector header */ short t, m; @s|struct bitvector { /* bitvector header */ FIRSTWORD; @s] ****Change:(orig (305 305 c)) @s[struct fixarray { /* fixnum array header */ short t, m; @s|struct fixarray { /* fixnum array header */ FIRSTWORD; @s] ****Change:(orig (317 317 c)) @s[struct sfarray { /* short-float array header */ short t, m; @s|struct sfarray { /* short-float array header */ FIRSTWORD; @s] ****Change:(orig (330 330 c)) @s[struct lfarray { /* long-float array header */ short t, m; @s|struct lfarray { /* long-float array header */ FIRSTWORD; @s] ****Change:(orig (343 344 c)) @s[ short t, m; object str_name; /* structure name */ @s| FIRSTWORD; object str_def; /* structure definition (a structure) */ @s] ****Change:(orig (346 346 d)) @s[ int str_length; /* structure length */ @s| @s] ****Change:(orig (348 348 a)) @s[}; @s|}; struct s_data {object name; int length; object raw; object included; object includes; object staticp; object print_function; object slot_descriptions; object slot_position; int size; object has_holes; }; #define S_DATA(x) ((struct s_data *)((x)->str.str_self)) #define SLOT_TYPE(def,i) (((S_DATA(def))->raw->ust.ust_self[i])) #define SLOT_POS(def,i) USHORT(S_DATA(def)->slot_position,i) #define STREF(type,x,i) (*((type *)(((char *)((x)->str.str_self))+(i)))) @s] ****Change:(orig (360 360 c)) @s[ smm_string_output /* string output */ @s| smm_string_output, /* string output */ smm_user_defined /* for user defined */ @s] ****Change:(orig (364 364 c)) @s[struct stream { short t, m; @s|struct stream { FIRSTWORD; @s] ****Change:(orig (369 369 a)) @s[ int sm_int1; /* some int */ @s| int sm_int1; /* some int */ char *sm_buffer; /* ptr to BUFSIZE block of storage */ @s] ****Change:(orig (373 373 a)) @s[ /* of enum smmode */ }; @s| /* of enum smmode */ }; @s] ****Change:(orig (374 374 a)) @s[#ifdef BSD @s|#ifdef BSD #ifdef SUN3 #define BASEFF (unsigned char *)0xffffffff #else @s] ****Change:(orig (376 376 a)) @s[#define BASEFF (char *)0xffffffff #endif @s|#define BASEFF (char *)0xffffffff #endif #endif @s] ****Change:(orig (392 392 c)) @s[struct random { short t, m; @s|struct random { FIRSTWORD; @s] ****Change:(orig (417 417 c)) @s[struct readtable { /* read table */ short t, m; @s|struct readtable { /* read table */ FIRSTWORD; @s] ****Change:(orig (422 422 c)) @s[struct pathname { short t, m; @s|struct pathname { FIRSTWORD; @s] ****Change:(orig (432 432 c)) @s[struct cfun { /* compiled function header */ short t, m; @s|struct cfun { /* compiled function header */ FIRSTWORD; @s] ****Change:(orig (437 438 d)) @s[ char *cf_start; /* start address of the code */ int cf_size; /* code size */ @s| @s] ****Change:(orig (442 442 c)) @s[struct cclosure { /* compiled closure header */ short t, m; @s|struct cclosure { /* compiled closure header */ FIRSTWORD; @s] ****Change:(orig (448 449 d)) @s[ char *cc_start; /* start address of the code */ int cc_size; /* code size */ @s| @s] ****Change:(orig (451 451 a)) @s[ object *cc_turbo; /* turbo charger */ }; @s| object *cc_turbo; /* turbo charger */ }; struct sfun { FIRSTWORD; object sfn_name; /* name */ int (*sfn_self)(); /* C start address of code */ object sfn_data; /* To object holding VV vector */ int sfn_argd; /* description of args + number */ @s] ****Change:(orig (452 452 a)) @s[ @s| }; struct vfun { FIRSTWORD; object vfn_name; /* name */ int (*vfn_self)(); /* C start address of code */ object vfn_data; /* To object holding VV data */ unsigned short vfn_minargs; /* Min args and where varargs start */ unsigned short vfn_maxargs; /* Max number of args */ }; struct cfdata { FIRSTWORD; char *cfd_start; /* beginning of contblock for fun */ int cfd_size; /* size of contblock */ int cfd_fillp; /* size of self */ object *cfd_self; /* body */ }; struct fat_string { /* vector header */ FIRSTWORD; unsigned fs_raw : 24; /* tells if the things in leader are raw */ unsigned char fs_leader_length; /* leader_Length */ int fs_dim; /* dimension */ int fs_fillp; /* fill pointer */ /* For simple vectors, */ /* fs_fillp is equal to fs_dim. */ #define fs_leader(ar,i) (((object *)((ar)->fs.fs_self))[-(i+1)]) fatchar *fs_self; /* pointer to the vector Note the leader starts at (int *) *fs_self - fs_leader_length */ }; struct dclosure { /* compiled closure header */ FIRSTWORD; int (*dc_self)(); /* entry address */ object *dc_env; /* environment */ }; @s] ****Change:(orig (454 454 c)) @s[struct spice { short t, m; @s|struct spice { FIRSTWORD; @s] ****Change:(orig (462 462 c)) @s[struct dummy { short t, m; @s|struct dummy { FIRSTWORD; @s] ****Change:(orig (485 485 a)) @s[ struct array a; /* array */ @s| struct array a; /* array */ struct fat_string fs; /* fat string fatchar 's */ struct dclosure dc; @s] ****Change:(orig (498 499 c)) @s[ struct cfun cf; /* compiled function */ struct cclosure cc; /* compiled closure */ @s| struct cfun cf; /* compiled function uses value stack] */ struct cclosure cc; /* compiled closure uses value stack */ struct sfun sfn; /* simple function */ struct vfun vfn; /* function with variable number of args */ struct cfdata cfd; /* compiled fun data */ @s] ****Change:(orig (513 513 c)) @s[struct freelist { short t, m; @s|struct freelist { FIRSTWORD; @s] ****Change:(orig (523 524 c)) @s[ t_cons = 0, t_start = t_cons, @s| t_cons, t_start = 0 , /* t_cons, */ @s] ****Change:(orig (546 546 a)) @s[ t_pathname, t_cfun, t_cclosure, @s| t_pathname, t_cfun, t_cclosure, t_sfun, t_gfun, t_vfun, t_cfdata, @s] ****Change:(orig (547 547 a)) @s[ t_spice, @s| t_spice, t_fat_string, t_dclosure, @s] ****Change:(orig (553 553 d)) @s[ t_other /* other */ }; @s| t_other /* other */ }; @s] ****Change:(orig (555 561 d)) @s[ Type map. enum type type_map[MAXPAGE]; */ @s,char type_map[MAXPAGE]; /* @s| @s] ****Change:(orig (572 573 c)) @s[ int tm_size; /* element size in bytes */ int tm_nppage; /* number per page */ @s| short tm_size; /* element size in bytes */ short tm_nppage; /* number per page */ @s] ****Change:(orig (581 581 a)) @s[ int tm_gbccount; /* GBC count */ @s| int tm_gbccount; /* GBC count */ object tm_alt_free; /* Alternate free list (swap with tm_free) */ int tm_alt_nfree; /* Alternate nfree (length of nfree) */ short tm_sgc; /* this type has at least this many sgc pages */ short tm_sgc_minfree; /* number free on a page to qualify for being an sgc page */ short tm_sgc_max; /* max on sgc pages */ short tm_min_grow; /* min amount to grow when growing */ short tm_max_grow; /* max amount to grow when growing */ short tm_growth_percent; /* percent to increase maxpages */ @s] ****Change:(orig (587 587 c)) @s[struct typemanager tm_table[(int)t_end]; @s|struct typemanager tm_table[ 32 /* (int) t_relocatable */]; @s] ****Change:(orig (627 627 c)) @s[char *core_end; /* core end */ #define HOLEPAGE 128 @s|char *core_end; /* core end */ char *tmp_alloc; @s] ****Change:(orig (629 632 c)) @s[#ifdef ATT #undef HOLEPAGE #define HOLEPAGE 32 #endif @s|/* make f allocate enough extra, so that we can round up, the address given to an even multiple. Special case of size == 0 , in which case we just want an aligned number in the address range */ @s] ****Change:(orig (634 636 c)) @s[#ifdef E15 #undef HOLEPAGE #define HOLEPAGE 32 @s|#define ALLOC_ALIGNED(f, size,align) \ (align <= sizeof(long) ? (char *)((f)(size)) : \ (tmp_alloc = (char *)((f)(size+(size ?(align)-1 : 0)))+(align)-1 , \ (char *)(align * (((unsigned int)tmp_alloc)/align)))) #define AR_ALLOC(f,n,type) (type *) \ (ALLOC_ALIGNED(f,(n)*sizeof(type),sizeof(type))) #ifndef HOLEPAGE #define HOLEPAGE 128 @s] ****Change:(orig (638 638 a)) @s[#endif @s|#endif @s] ****Change:(orig (666 666 a)) @s[#define TIME_ZONE (-9) int FIXtemp; @s|#define TIME_ZONE (-9) int FIXtemp; /* For IEEEFLOAT, the double may have exponent in the second word (little endian) or first word.*/ #if defined(I386) || defined(LITTLE_ENDIAN) #define HIND 1 /* (int) of double where the exponent and most signif is */ #define LIND 0 /* low part of a double */ #else /* big endian */ #define HIND 0 #define LIND 1 #endif #ifndef VOL #define VOL #endif @s] ****Change:(orig (669 669 a)) @s[#define isDigit(xxx) (((xxx)&0200) == 0 && isdigit(xxx)) @s|#define isDigit(xxx) (((xxx)&0200) == 0 && isdigit(xxx)) enum ftype {f_object,f_fixnum}; char *alloca_val; /* ...xx|xx|xxxx|xxxx| ret Narg */ /* a9a8a7a6a5a4a3a4a3a2a1a0rrrrnnnnnnnn ai=argtype(i) ret nargs */ #define SFUN_NARGS(x) (x & 0xff) /* 8 bits */ #define RESTYPE(x) (x<<8) /* 4 bits */ #define ARGTYPE(i,x) ((x) <<(12+(i*2))) #define ARGTYPE1(x) (1 | ARGTYPE(0,x)) #define ARGTYPE2(x,y) (2 | ARGTYPE(0,x) | ARGTYPE(1,y)) #define ARGTYPE3(x,y,z) (3 | ARGTYPE(0,x) | ARGTYPE(1,y) | ARGTYPE(2,z)) object make_si_sfun(); object MVloc[10]; /* Set new to be an (object *) whose [i]'th elmt is the ith elmnt in a va_list MUST_COPY_VA_LIST should be true, if ((vl[0] != va_arg(ap,object)) || (vl[1] != va_arg(ap,object)) || .. vl[n-1] != va_arg(ap,object)) Normal machines have va_list an ordinary array and a copy is unnecessary. */ #ifndef MUST_COPY_VA_LIST #define COERCE_VA_LIST(new,vl,n) new = (object *) (vl) #else #define COERCE_VA_LIST(new,vl,n) \ object Xxvl[65]; \ {int i; \ new=Xxvl; \ if (n >= 65) FEerror("Too long vl"); \ for (i=0 ; i < (n); i++) new[i]=va_arg(vl,object);} #endif #define make_si_vfun(s,f,min,max) \ make_si_vfun1(s,f,min | (max << 8)) /* Number of args supplied to a variable arg t_vfun Used by the C function to set optionals */ struct call_data { object fun; int argd;}; struct call_data fcall; #define VFUN_NARGS fcall.argd /* we sometimes have to touch the header of arrays or structures to make sure the page is writable */ #ifdef SGC #define SGC_TOUCH(x) if ((x)->d.m) system_error(); (x)->d.m=0 #else #define SGC_TOUCH(x) #endif object funcall_cfun(); object clear_compiler_properties(); object siSlambda_block_expanded; @s]
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.