/*****************************************************************************
*                                                                            *
*      COMMON OCEANOGRAPHIC DATA ACCESS SYSTEM (CODAS)                       *
*                                                                            *
*      WRITTEN BY:  RAMON CABRERA, ERIC FIRING, and JULIE RANADA             *
*                   JOINT INSTITUTE FOR MARINE AND ATMOSPHERIC RESEARCH      *
*                   1000 POPE ROAD  MSB 404                                  *
*                   HONOLULU, HI 96822                                       *
*                                                                            *
*      VERSION:     3.00                                                     *
*                                                                            *
*      DATE:        APRIL 1989                                               *
*                                                                            *
*****************************************************************************/
/*
       FILE:  unscale.h

              FLOATING POINT SUPPORT FUNCTIONS

*/
#ifndef unscale_included
#define unscale_included
#ifndef dbhost_included
#include "dbhost.h"        /* PROTOTYPE_ALLOWED */
#endif
#ifndef dbext_included
#include "dbext.h"         /* FLOAT, SHORT, ... */
#endif
#if PROTOTYPE_ALLOWED
int UNSCALE_BYTE_TO_FLOAT  (FLOAT float_array[], BYTE byte_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_UBYTE_TO_FLOAT (FLOAT float_array[], UBYTE ubyte_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_SHORT_TO_FLOAT (FLOAT float_array[], SHORT short_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_USHORT_TO_FLOAT(FLOAT float_array[], USHORT ushort_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_LONG_TO_FLOAT  (FLOAT float_array[], LONG long_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_ULONG_TO_FLOAT (FLOAT float_array[], ULONG ulong_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_FLOAT_TO_FLOAT (FLOAT float2_array[], FLOAT float_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
int UNSCALE_DOUBLE_TO_FLOAT(FLOAT float_array[], DOUBLE double_array[],
                            FLOAT *scale, FLOAT *offset, unsigned int *nv);
extern int (*unscale[])(FLOAT out_array[], void *in_array,
   FLOAT *scale, FLOAT *offset, unsigned int *nv);
#else
int UNSCALE_BYTE_TO_FLOAT  ();
int UNSCALE_UBYTE_TO_FLOAT ();
int UNSCALE_SHORT_TO_FLOAT ();
int UNSCALE_USHORT_TO_FLOAT();
int UNSCALE_LONG_TO_FLOAT  ();
int UNSCALE_ULONG_TO_FLOAT ();
int UNSCALE_FLOAT_TO_FLOAT ();
int UNSCALE_DOUBLE_TO_FLOAT();
extern int (*unscale[])();
#endif
#endif /* ifndef unscale_included */

