1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-14 23:46:14 +00:00
Nick Briggs 3d9f090e70
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
2022-08-10 11:07:57 -07:00

69 lines
2.1 KiB
C

/* $Id: gc2.c,v 1.3 1999/05/31 23:35:30 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
/************************************************************************/
/* */
/* (C) Copyright 1989-95 Venue. All Rights Reserved. */
/* Manufactured in the United States of America. */
/* */
/************************************************************************/
#include "version.h"
/**********************************************************************/
/*
File Name: gc2.c
Desc: implement opcode SCAN1,SCAN2,GCRECLAIMCELL
Including : OP_scan1
OP_scan2
OP_gcreccell
*/
/**********************************************************************/
#include <stdio.h> // for printf
#include "address.h" // for LOLOC
#include "emlglob.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
/**********************************************************************/
/*
Func Name : OP_gcscan1
*/
/**********************************************************************/
void OP_gcscan1(void) {
#ifdef TRACE
printPC();
printf("TRACE: OP_gcscan1()\n");
#endif
if ((TopOfStack & SEGMASK) == S_POSITIVE) { TopOfStack = gcscan1(LOLOC(TopOfStack)); }
if (TopOfStack != NIL) TopOfStack |= S_POSITIVE;
PC++;
} /* OP_gcscan1 end */
/**********************************************************************/
/*
Func Name : OP_gcscan2
*/
/**********************************************************************/
void OP_gcscan2(void) {
#ifdef TRACE
printPC();
printf("TRACE: OP_gcscan2()\n");
#endif
if ((TopOfStack & SEGMASK) == S_POSITIVE) { TopOfStack = gcscan2(LOLOC(TopOfStack)); }
if (TopOfStack != NIL) TopOfStack |= S_POSITIVE;
PC++;
} /* OP_gcscan2 end */