Initial revision

This commit is contained in:
cvs
2000-02-07 10:38:55 +00:00
commit fdc6b051c9
846 changed files with 230218 additions and 0 deletions

35
hardsup/table.h Normal file
View File

@@ -0,0 +1,35 @@
/*---------------------------------------------------------------------------
A general purpose translation table and interpolation module.
Interpolation tables are read from a file, which is meant to
contain pairs of val1 val2 per line.
Mark Koennecke, October 1997
copyright: see copyright.h
-----------------------------------------------------------------------------*/
#ifndef SICSTABLE
#define SICSTABLE
typedef struct __SicsTable *pSTable;
/*------------------------- live & death ----------------------------------*/
pSTable CreateTable(FILE *fd);
/*
creates a new table from a given file. The file is meant to have
been positioned to the first entry for the table in the file.
This leaves the caller free to examine a header, if any.
*/
void DeleteTable(pSTable self);
/*------------------------- Interpolation --------------------------------*/
int InterpolateVal1(pSTable pTable, float fKey, float *fResult);
/*
Returns a result from the second column for a key from the
first column.
*/
int InterpolateVal2(pSTable pTable, float fKey, float *fResult);
/*
Returns a result from the first column for a key from the
second column.
*/
#endif