DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: ┃ T e

⟦df6f16a8c⟧ TextFile

    Length: 7910 (0x1ee6)
    Types: TextFile
    Names: »extern.h«

Derivation

└─⟦a0efdde77⟧ Bits:30001252 EUUGD11 Tape, 1987 Spring Conference Helsinki
    └─ ⟦this⟧ »EUUGD11/gnu-31mar87/scheme/microcode/extern.h« 

TextFile

/* Emacs, -*-C-*-an't you guess? */

/****************************************************************
*                                                               *
*                         Copyright (c) 1986                    *
*               Massachusetts Institute of Technology           *
*                                                               *
* This material was developed by the Scheme project at the      *
* Massachusetts Institute of Technology, Department of          *
* Electrical Engineering and Computer Science.  Permission to   *
* copy this software, to redistribute it, and to use it for any *
* purpose is granted, subject to the following restrictions and *
* understandings.                                               *
*                                                               *
* 1. Any copy made of this software must include this copyright *
* notice in full.                                               *
*                                                               *
* 2. Users of this software agree to make their best efforts (a)*
* to return to the MIT Scheme project any improvements or       *
* extensions that they make, so that these may be included in   *
* future releases; and (b) to inform MIT of noteworthy uses of  *
* this software.                                                *
*                                                               *
* 3.  All materials developed as a consequence of the use of    *
* this software shall duly acknowledge such use, in accordance  *
* with the usual standards of acknowledging credit in academic  *
* research.                                                     *
*                                                               *
* 4. MIT has made no warrantee or representation that the       *
* operation of this software will be error-free, and MIT is     *
* under no obligation to provide any services, by way of        *
* maintenance, update, or otherwise.                            *
*                                                               *
* 5.  In conjunction with products arising from the use of this *
* material, there shall be no use of the name of the            *
* Massachusetts Institute of Technology nor of any adaptation   *
* thereof in any advertising, promotional, or sales literature  *
* without prior written consent from MIT in each case.          *
*                                                               *
****************************************************************/

/* File: EXTERN.H
 *
 * External declarations.
 *
 */
\f


#ifdef ENABLE_DEBUGGING_TOOLS

extern Boolean Eval_Debug, Hex_Input_Debug, Cont_Debug,
               File_Load_Debug, Reloc_Debug, Intern_Debug,
               Primitive_Debug, Define_Debug, Lookup_Debug, GC_Debug,
               Upgrade_Debug, Trace_On_Error, Dump_Debug, Per_File,
               Bignum_Debug;
#else
#define Eval_Debug		false
#define Hex_Input_Debug		false
#define File_Load_Debug		false
#define Reloc_Debug		false
#define Intern_Debug		false
#define Cont_Debug		false
#define Primitive_Debug		false
#define Lookup_Debug		false
#define Define_Debug		false
#define GC_Debug		false
#define Upgrade_Debug		false
#define Trace_On_Error          false
#define Dump_Debug		false
#define Per_File		false
#define Bignum_Debug		false
#endif
\f


extern Pointer
  Env,		 	/* The environment */
  Ext_Val,		/* The value returned from primitives or apply */
  Return,		/* The return address code */
  Ext_Expression,	/* Expression to EVALuate */
 *History,              /* History register */
 *Free,			/* Next free word in heap */
 *MemTop,		/* Top of heap space available */
 *Ext_Stack_Pointer,	/* Next available slot in control stack */
 *Stack_Top,		/* Top of control stack */
 *Stack_Guard,		/* Guard area at end of stack */
 *Constant_Space,	/* Bottom of constant+pure space */
 *Free_Constant,	/* Next free cell in constant+pure area */
 *Constant_Top,		/* End of constant space, if any */
 *Unused_Heap,		/* Bottom of unused heap for GC */
 *Unused_Heap_Top,	/* Top of unused heap for GC */
 *Heap_Top,		/* Top of current heap space */
 *Heap_Bottom,		/* Bottom of current heap space */
 *Local_Heap_Base,	/* Per-processor CONSing area */
 *Heap;			/* Bottom of all heap space */
\f

		
extern long ErrCode,	/* Error code returned to user */
            IntCode,	/* Interrupts requesting */
 	    IntEnb,	/* Interrupts enabled */
            GC_Reserve;	/* Scheme pointer overflow space in heap */

extern char *Primitive_Names[], *Return_Names[];
extern long MAX_PRIMITIVE, MAX_RETURN;

extern char Arg_Count_Table[],
            *CONT_PRINT_RETURN_MESSAGE,
            *CONT_PRINT_EXPR_MESSAGE,
            *RESTORE_CONT_RETURN_MESSAGE,
            *RESTORE_CONT_EXPR_MESSAGE;

extern int GC_Type_Map[];

extern Boolean Photo_Open; /* Photo file open */
extern jmp_buf *Back_To_Eval;
extern Boolean Trapping, Can_Do_Cursor;
extern Pointer Old_Return_Code, *Return_Hook_Address, 
       *Previous_Restore_History;
\f


/* And file "channels" */

extern FILE *(Channels[FILE_CHANNELS]);
extern FILE *File_Handle;	/* Used by Fasload/Fasdump */
extern FILE *Photo_File_Handle;	/* Used by Photo */

extern int Saved_argc;
extern char **Saved_argv;
extern char *OS_Name, *OS_Variant;
extern long Heap_Size, Constant_Size, Stack_Size;

/* External primitive data */

typedef struct ext_desc	/* User supplied primitive data */
{ Pointer (*proc)();	/* Location of actual procedure */
  int arity;		/* Number of arguments */
  char *name;		/* Name of primitive */
} External_Descriptor;

extern External_Descriptor Ext_Prim_Desc[];
extern long MAX_EXTERNAL_PRIMITIVE, Get_Ext_Number();
extern Pointer Undefined_Externals, Apply_External(), Make_Prim_Exts();
\f


/* String utilities */

extern Boolean String_Equal();
extern Pointer Make_String(), C_String_To_Scheme_String();
#define Scheme_String_To_C_String(Scheme_String) 		\
   ((char *) Nth_Vector_Loc(Scheme_String, STRING_CHARS))

/* Symbol and variable utilities */

extern long Lex_Ref(), Local_Set(), Lex_Set(),
            Symbol_Lex_Ref(), Symbol_Lex_Set(),
            Intern(), Lex_Test();
extern Pointer Hash();

/* Numeric utilities */

extern int Scheme_Integer_To_C_Integer();
extern Pointer C_Integer_To_Scheme_Integer(),
               Big_To_Float(), Big_To_Fix(), Fix_To_Big();

/* Random and OS utilities */

extern int Parse_Option();
extern Boolean Open_File(), Restore_History(), Open_Dump_File();
extern long OS_Term_Code(), NColumns(), NLines(), System_Clock();
extern void OS_Flush_Output_Buffer(), OS_Clear_Screen();
extern void Restartable_Exit(), Load_Data();

/* Memory management utilities */

extern void GC(), GCFlip();
extern Pointer Impurify_For_Side_Effect(), *GCLoop();

/* Interpreter utilities */

extern term_type Microcode_Termination();
extern void Interpret(), Do_Micro_Error(), Setup_Interrupt(), 
	    Back_Out_Of_Primitive(), Throw(), 
	    Stop_History();
extern Pointer (*(Primitive_Table[]))(), *Make_Dummy_History();

/* Debugging utilities */

extern void Back_Trace(), Handle_Debug_Flags(),
            Find_Symbol(), Show_Env(), Show_Pure(), 
	    Print_Return(), Print_Expression(), Print_Primitive();
\f


/* Conditional utilities */

#ifdef COMPILE_FUTURES
extern void Clear_Timer(), Set_Timer();
#endif

#ifdef METERING
extern void Clear_Perfinfo_Data();
#endif

#ifdef COMPILER

extern Pointer Registers[];

/* Registers[] is formatted as follows (see regblock.c) */

#define REGBLOCK_VAL		0
#define REGBLOCK_STACKGUARD	1
#define REGBLOCK_MEMTOP		2
#define REGBLOCK_ROUTINES	3
#define REGBLOCK_DISPLAYS	17
#define REGBLOCK_NDISPLAYS	25
#define REGBLOCK_TEMPORARIES	(REGBLOCK_DISPLAYS+REGBLOCK_NDISPLAYS)
#define REGBLOCK_NTEMPS		25

extern void Return_To_Interpreter(), Compiler_Entry_GC(), 
            Compiler_Recursion_GC();

extern int Enter_Compiler();
#else
#define REGBLOCK_NDISPLAYS	25
#endif