1
0
mirror of https://github.com/Interlisp/maiko.git synced 2026-01-13 23:27:12 +00:00
Interlisp.maiko/src/array3.c
Nick Briggs 6fb4b9a189
Remove sccs id lines (#98)
* Remove static char *id = from all source files.

The same information is included in a comment in each source file.

* Remove unused template file 'id'
2020-12-19 19:08:52 -08:00

62 lines
1.6 KiB
C

/* This is G-file @(#) array3.c Version 2.9 (10/12/88). copyright Xerox & Fuji Xerox */
/************************************************************************/
/* */
/* (C) Copyright 1989-95 Venue. All Rights Reserved. */
/* Manufactured in the United States of America. */
/* */
/************************************************************************/
#include "version.h"
/************************************************************************/
/* */
/* A R R A Y 3 . C */
/* */
/* Contains: N_OP_aref1 */
/* */
/************************************************************************/
#include <stdio.h>
#include "lispemul.h"
#include "lspglob.h"
#include "adr68k.h"
#include "lispmap.h"
#include "lsptypes.h"
#include "emlglob.h"
#include "array3defs.h"
#include "mkcelldefs.h"
#include "arith.h"
#include "my.h"
/*** N_OP_aref1 -- op 266 (array index) ***/
LispPTR N_OP_aref1(register LispPTR arrayarg, register LispPTR inx) {
register LispPTR baseL;
register int type, index;
register OneDArray *arrayblk;
/* verify array */
if (GetTypeNumber(arrayarg) != TYPE_ONED_ARRAY) ERROR_EXIT(inx);
arrayblk = (OneDArray *)Addr68k_from_LADDR(arrayarg);
/* test and setup index */
N_GetPos(inx, index, inx);
if (index >= arrayblk->totalsize) ERROR_EXIT(inx);
index += arrayblk->offset;
/* setup typenumber */
type = 0xFF & arrayblk->typenumber;
/* setup base */
baseL = arrayblk->base;
/* disp on type */
#ifdef OS4
aref_switch(type, inx, baseL, index);
#else
return (aref_switch(type, inx, baseL, index));
#endif
} /* end N_OP_aref1() */