ftp.nice.ch/pub/next/developer/languages/lisp/AKCL.1.599.s.tar.gz#/akcl-1-599/c/frame.c

This is frame.c in view mode; [Download] [Up]

/*
(c) Copyright Taiichi Yuasa and Masami Hagiya, 1984.  All rights reserved.
Copying of this file is authorized to users who have executed the true and
proper "License Agreement for Kyoto Common LISP" with SIGLISP.
*/

/*

	frame.c

	frame and non-local jump
*/

#include "include.h"

unwind(fr, tag)
frame_ptr fr;
object tag;
{
	nlj_fr = fr;
	nlj_tag = tag;
	nlj_active = TRUE;
	while (frs_top != fr
		&& frs_top->frs_class == FRS_CATCH
		/*
		&& frs_top->frs_class != FRS_PROTECT
		&& frs_top->frs_class != FRS_CATCHALL
		*/
	      ) {
		--frs_top;
	}
	lex_env = frs_top->frs_lex;
	ihs_top = frs_top->frs_ihs;
	bds_unwind(frs_top->frs_bds_top);
	longjmp(frs_top->frs_jmpbuf, 0);
	/* never reached */
}

frame_ptr frs_sch (frame_id)
object frame_id;
{
	frame_ptr top;

	for (top = frs_top;  top >= frs_org;  top--)
		if (top->frs_val == frame_id && top->frs_class == FRS_CATCH)
			return(top);
	return(NULL);
}

frame_ptr frs_sch_catch(frame_id)
object frame_id;
{
	frame_ptr top;

	for(top = frs_top;  top >= frs_org  ;top--)
		if (top->frs_val == frame_id && top->frs_class == FRS_CATCH
		    || top->frs_class == FRS_CATCHALL
		   )
			return(top);
	return(NULL);
}



These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.