|
|
Power 6/32 Unix version 1.21
/* $Header: /var/lib/cvsd/repos/cci/cci/usr/src/usr.bin/cdb/transBsd/aux.c,v 1.1.1.1 2019/07/28 12:25:33 root Exp $ */
/* (C) Copyright 1985 Third Eye Software, Inc. - All Rights Reserved */
#include "tes42.h"
/* A U X B T I N T */
export void AuxBtInit()
{
AddAux(0);
AddAux(AuxFBType(btInt));
AddAux(AuxFBType(btChar));
AddAux(AuxFBType(btLong));
AddAux(AuxFBType(btShort));
AddAux(AuxFBType(btUChar));
AddAux(AuxFBType(btUShort));
AddAux(AuxFBType(btULong));
AddAux(AuxFBType(btUInt));
AddAux(AuxFBType(btFloat));
AddAux(AuxFBType(btDouble));
AddAux(AuxFBType(btNil));
AddAux(AuxFBType(btNil));
} /* AuxBtInit */
/* A D D A U X */
export int AddAux(aux)
AUXU aux;
{
if (viauxMac >= viauxMax)
panic("Aux overrrun");
viaux = viauxMac++;
vrgAux[viaux]= aux;
return(viaux);
} /* Add Aux */
/* C H A N G E A U X */
export void ChangeAux(iaux, aux)
int iaux;
AUXU aux;
{
if (iaux > viauxMac)
panic("Change non-existant aux");
vrgAux[iaux]= aux;
} /* ChangeAux */
/* A U X F I A U X */
export AUXU AuxFIaux(iaux)
{
if (iaux >= viauxMac)
panic("Change non-existant aux");
return(vrgAux[iaux]);
} /* AuxFIaux */
/* A D D T Q */
export void AddTq(iaux, tq)
int tq;
int iaux;
{
AUXU aux;
aux = AuxFIaux(iaux);
if (aux.ti.tq5 != tqNil)
panic("tq overflow");
aux.ti.tq5= aux.ti.tq4;
aux.ti.tq4= aux.ti.tq3;
aux.ti.tq3= aux.ti.tq2;
aux.ti.tq2= aux.ti.tq1;
aux.ti.tq1= aux.ti.tq0;
aux.ti.tq0= tq;
ChangeAux(iaux, aux);
} /* AddTq */
/* A U X F B T */
export AUXU AuxFBType(bt)
int bt;
{
AUXU aux;
aux.isym = 0; /* zero out the word */
aux.ti.bt= bt;
return(aux);
} /* AuxFBType */
/* I A U X F C O P Y T Y */
export int IauxFCopyTy(iauxType)
long iauxType;
{
int iaux;
AUXU aux;
int cAux= 0;
aux = AuxFIaux(iauxType);
if (FComplexBt(aux.ti.bt))
cAux++;
if (aux.ti.tq0 == tqArray) cAux++;
if (aux.ti.tq1 == tqArray) cAux++;
if (aux.ti.tq2 == tqArray) cAux++;
if (aux.ti.tq3 == tqArray) cAux++;
if (aux.ti.tq4 == tqArray) cAux++;
if (aux.ti.tq5 == tqArray) cAux++;
iaux= AddAux(aux);
for (iauxType++; cAux; cAux--)
AddAux(AuxFIaux(iauxType++));
return(iaux);
} /* IauxFCopyTy */
/* P A T C H T Q */
export void PatchTq(iaux, tq)
int tq;
int iaux;
{
AUXU aux;
aux= AuxFIaux(iaux);
if (aux.ti.tq0 == tqNil)
aux.ti.tq0= tq;
else if (aux.ti.tq1 == tqNil)
aux.ti.tq1= tq;
else if (aux.ti.tq2 == tqNil)
aux.ti.tq2= tq;
else if (aux.ti.tq3 == tqNil)
aux.ti.tq3= tq;
else if (aux.ti.tq4 == tqNil)
aux.ti.tq4= tq;
else if (aux.ti.tq5 == tqNil)
aux.ti.tq5= tq;
else
panic("ran out of tqs");
ChangeAux(iaux, aux);
} /* PatchTq */
/* A U X D I M */
export void AuxDim(dim)
int dim;
{
AUXU aux;
aux.dim.dnLow = 0;
aux.dim.dnMac = dim;
AddAux(aux);
} /* AuxDim */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.