From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- unix/os/zlocva.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 unix/os/zlocva.c (limited to 'unix/os/zlocva.c') diff --git a/unix/os/zlocva.c b/unix/os/zlocva.c new file mode 100644 index 00000000..975923eb --- /dev/null +++ b/unix/os/zlocva.c @@ -0,0 +1,24 @@ +/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc. + */ + +#include +#define import_kernel +#define import_knames +#define import_spp +#include + +/* ZLOCVA -- Return the address of a variable or array element in XCHAR units. + * Must be able to do signed arithmetic on the integer value returned. + * We ASSUME that XCHAR through XDOUBLE are addressed in the same units. + * The transformation from a machine address into a "location" is machine + * dependent, and is given by the macro ADDR_TO_LOC defined in kernel.h. + */ +int +ZLOCVA ( + XCHAR *variable, + XINT *location +) +{ + *location = ADDR_TO_LOC (variable); + return (XOK); +} -- cgit