From 4d3a9bbf69b9c241c54a0adcea5afe141ea36be6 Mon Sep 17 00:00:00 2001 From: Stephen Adams Date: Thu, 5 Jan 1995 22:46:01 +0000 Subject: [PATCH] Added primitive INDEX-FIXNUM? from the split typecode system to allow some runtime files to be merged. --- v7/src/microcode/fixnum.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/v7/src/microcode/fixnum.c b/v7/src/microcode/fixnum.c index 2cd47a6f1..a86464a04 100644 --- a/v7/src/microcode/fixnum.c +++ b/v7/src/microcode/fixnum.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: fixnum.c,v 9.37 1993/02/11 02:23:12 adams Exp $ +$Id: fixnum.c,v 9.38 1995/01/05 22:46:01 adams Exp $ -Copyright (c) 1987-92 Massachusetts Institute of Technology +Copyright (c) 1987-94 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -69,6 +69,16 @@ DEFINE_PRIMITIVE ("FIXNUM?", Prim_zero_fixnum_p, 1, 1, 0) } } +DEFINE_PRIMITIVE ("INDEX-FIXNUM?", Prim_index_fixnum_p, 1, 1, 0) +{ + PRIMITIVE_HEADER (1); + { + SCHEME_OBJECT argument = (ARG_REF (1)); + PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (FIXNUM_P (argument) && + FIXNUM_TO_LONG(argument) >= 0)); + } +} + DEFINE_PRIMITIVE ("ZERO-FIXNUM?", Prim_zero_fixnum, 1, 1, 0) { PRIMITIVE_HEADER (1); -- 2.25.1