"Fossies" - the Fresh Open Source Software Archive

Member "PerlCDF38_0/cdf.h" (7 Nov 2019, 80160 Bytes) of package /linux/misc/PerlCDF38_0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "cdf.h" see the Fossies "Dox" file reference documentation and the last Fossies "Diffs" side-by-side code changes report: 36_4_vs_37_0.

    1 /******************************************************************************
    2 * Copyright 1996-2016 United States Government as represented by the
    3 * Administrator of the National Aeronautics and Space Administration.
    4 * All Rights Reserved.
    5 ******************************************************************************/
    6 /******************************************************************************
    7 *
    8 *  NSSDC/CDF                CDF Header file for C/C++ applications.
    9 *
   10 *  Version 3.5d, 14-Dec-97, Hughes STX.
   11 *
   12 *  Modification history:
   13 *
   14 *   V1.0  22-Jan-91, R Kulkarni Original version (for CDF V2.0).
   15 *            J Love
   16 *   V2.0   3-Jun-91, J Love     Modified for CDF V2.1 enhancements,
   17 *               namely the INTERNAL interface and the
   18 *               MULTI/SINGLE file option.  Added
   19 *               macros to replace C i/f functions.
   20 *   V2.1  20-Jun-91, J Love Added function prototypes.
   21 *   V2.2   8-Aug-91, J Love Increment for CDF V2.1.2.  Use
   22 *               'CDFlib'.  Renamed a few items.
   23 *   V3.0  19-May-92, J Love IBM PC & HP-UX port.  CDF V2.2.
   24 *   V3.1  23-Sep-92, J Love CDF V2.3 (shareable/NeXT/zVar).
   25 *   V3.1a  5-Oct-92, J Love CDF V2.3.0a (NeXT/encoding).
   26 *   V3.1b  6-Oct-92, J Love CDF V2.3.0b (CDFcompare).
   27 *   V3.1c 27-Oct-92, J Love CDF V2.3.0c (pad values).
   28 *   V3.2  12-Jan-94, J Love CDF V2.4.
   29 *   V3.2a  4-Feb-94, J Love DEC Alpha/OpenVMS port.
   30 *   V3.2b 22-Feb-94, J Love Spelling lesson.
   31 *   V3.3   8-Dec-94, J Love CDF V2.5.
   32 *   V3.3a  3-Mar-95, J Love Solaris 2.3 IDL i/f.
   33 *   V3.4  28-Mar-95, J Love POSIX.
   34 *   V3.4a  8-May-95, J Love ILLEGAL_EPOCH_VALUE.
   35 *   V3.4b  9-Jun-95, J Love EPOCH custom format.
   36 *   V3.4c 20-Jul-95, J Love CDFexport-related changes.
   37 *   V3.5  12-Sep-96, J Love CDF V2.6.
   38 *   V3.5a 21-Feb-97, J Love Removed RICE.
   39 *   V3.5b  9-Mar-97, J Love Windows NT for MS Visual C++ 4.0 on an IBM PC.
   40 *   V3.5c  2-Sep-97, J Love `__STDC__' not defined for all AIX compilers.
   41 *   V3.5d 14-Dec-97, J Love Added ALPHAVMSi encoding.
   42 *   V3.6  08-Apr-04, M Liu      Added  new data type CDF_EPOCH16 and some
   43 *                               epoch functions related to the new type.
   44 *   V3.7  28-Apr-09, M Liu      Modified MAC_ENCODING/DECODEING to PPC_ENCODING
   45 *                               /DECODING as Mac and Linux can run on PPC box.
   46 *   V3.8  10-Dec-10, M Liu      Added encodeEPOCH4, encodeEPOCH16_4,
   47 *                               parseEPOCH4, parseEPOCH16_4 to handle epochs
   48 *                               conforming to ISO 8601.
   49 *   V3.9  04-Apr-11, M Liu      Added a few new functions for TT2000 epoch.
   50 *   V3.10 03-Jan-12, M Liu      Added CDFgetzVarAllRecordsByVarID,
   51 *                               CDFgetzVarRangeRecordsByVarID,
   52 *                               CDFgetVarAllRecordsByVarName,
   53 *                               CDFgetVarRangeRecordsByVarName functions, and
   54 *                               a set of similar functions for put operations.
   55 *                               Added a new error message.
   56 *   V3.11 29-May-12, M Liu      Added CDFinsertVarRecordsByVarID and
   57 *                               CDFinsertVarRecorsByVarName.
   58 *   V3.12 28-May-14, M Liu      Added function items for record deletion:
   59 *                               r/zVAR__RECORDS_RENUMBER_.
   60 *   V3.13 20-Oct-16, M Liu      Added a new set CDFread functions with CDFdata
   61 *                               type. Moved a few functions from cdfdist.h to
   62 *                               here.
   63 *   V3.14 10-Jan-18, M Liu      Added ARM and IA64 openVMS encoding.
   64 ******************************************************************************/
   65 
   66 #if !defined(CDFh_INCLUDEd__)
   67 #define CDFh_INCLUDEd__
   68 
   69 /******************************************************************************
   70 * CDF defined types
   71 ******************************************************************************/
   72 
   73 typedef void *CDFid;
   74 typedef long CDFstatus;
   75 typedef void *CDFdata;
   76 
   77 /******************************************************************************
   78 * CDF defined variables
   79 ******************************************************************************/
   80 
   81 static double *TT2000NULL = 0;
   82 
   83 /******************************************************************************
   84 * Limits
   85 ******************************************************************************/
   86 
   87 #define CDF_MIN_DIMS    0               /* Min number of dimensions a CDF
   88                        variable may have */
   89 #define CDF_MAX_DIMS    10              /* Max number of dimensions a CDF
   90                        variable may have */
   91 
   92 /******************************************************************************
   93 * Lengths
   94 ******************************************************************************/
   95 
   96 #define CDF_VAR_NAME_LEN        64
   97 #define CDF_ATTR_NAME_LEN       64
   98 
   99 #define CDF_VAR_NAME_LEN256     256
  100 #define CDF_ATTR_NAME_LEN256    256
  101 
  102 #define CDF_COPYRIGHT_LEN       256
  103 #define CDF_STATUSTEXT_LEN      200
  104 #define CDF_PATHNAME_LEN        512
  105 
  106 #define EPOCH_STRING_LEN    24
  107 #define EPOCH1_STRING_LEN   16
  108 #define EPOCH2_STRING_LEN   14
  109 #define EPOCH3_STRING_LEN   24
  110 #define EPOCH4_STRING_LEN   23
  111 
  112 #define EPOCH16_STRING_LEN      36
  113 #define EPOCH16_1_STRING_LEN    24
  114 #define EPOCH16_2_STRING_LEN    14
  115 #define EPOCH16_3_STRING_LEN    36
  116 #define EPOCH16_4_STRING_LEN    32
  117 
  118 #define TT2000_0_STRING_LEN     30
  119 #define TT2000_1_STRING_LEN     19
  120 #define TT2000_2_STRING_LEN     14
  121 #define TT2000_3_STRING_LEN     29
  122 #define TT2000_4_STRING_LEN     30
  123 
  124 #define EPOCHx_STRING_MAX   50
  125 #define EPOCHx_FORMAT_MAX   68
  126 
  127 /******************************************************************************
  128 * Data types.
  129 ******************************************************************************/
  130 
  131 #define CDF_INT1        1L
  132 #define CDF_INT2        2L
  133 #define CDF_INT4        4L
  134 #define CDF_INT8        8L
  135 #define CDF_UINT1       11L
  136 #define CDF_UINT2       12L
  137 #define CDF_UINT4       14L
  138 #define CDF_REAL4       21L
  139 #define CDF_REAL8       22L
  140 #define CDF_EPOCH       31L /* Standard style. */
  141 #define CDF_EPOCH16     32L /* Extended style. */
  142 #define CDF_TIME_TT2000     33L /* One more style with leap seconds
  143                        and J2000 base time. */
  144 #define CDF_BYTE        41L     /* same as CDF_INT1 (signed) */
  145 #define CDF_FLOAT       44L     /* same as CDF_REAL4 */
  146 #define CDF_DOUBLE      45L     /* same as CDF_REAL8 */
  147 #define CDF_CHAR        51L     /* a "string" data type */
  148 #define CDF_UCHAR       52L     /* a "string" data type */
  149 
  150 /******************************************************************************
  151 * Encoding (for data only, everything else is network encoding).
  152 ******************************************************************************/
  153 
  154 #define NETWORK_ENCODING        1L
  155 #define SUN_ENCODING            2L
  156 #define VAX_ENCODING            3L
  157 #define DECSTATION_ENCODING     4L
  158 #define SGi_ENCODING            5L
  159 #define IBMPC_ENCODING          6L
  160 #define IBMRS_ENCODING          7L
  161 #define HOST_ENCODING           8L
  162 #define PPC_ENCODING            9L
  163 #define HP_ENCODING             11L
  164 #define NeXT_ENCODING           12L
  165 #define ALPHAOSF1_ENCODING      13L
  166 #define ALPHAVMSd_ENCODING      14L
  167 #define ALPHAVMSg_ENCODING      15L
  168 #define ALPHAVMSi_ENCODING      16L
  169 #define ARM_LITTLE_ENCODING     17L
  170 #define ARM_BIG_ENCODING        18L
  171 #define IA64VMSi_ENCODING       19L
  172 #define IA64VMSd_ENCODING       20L
  173 #define IA64VMSg_ENCODING       21L
  174 
  175 /******************************************************************************
  176 * Decodings.
  177 ******************************************************************************/
  178 
  179 #define NETWORK_DECODING        NETWORK_ENCODING
  180 #define SUN_DECODING            SUN_ENCODING
  181 #define VAX_DECODING            VAX_ENCODING
  182 #define DECSTATION_DECODING     DECSTATION_ENCODING
  183 #define SGi_DECODING            SGi_ENCODING
  184 #define IBMPC_DECODING          IBMPC_ENCODING
  185 #define IBMRS_DECODING          IBMRS_ENCODING
  186 #define HOST_DECODING           HOST_ENCODING
  187 #define PPC_DECODING            PPC_ENCODING
  188 #define MAC_ENCODING            PPC_ENCODING
  189 #define MAC_DECODING            PPC_ENCODING
  190 #define HP_DECODING             HP_ENCODING
  191 #define NeXT_DECODING           NeXT_ENCODING
  192 #define ALPHAOSF1_DECODING      ALPHAOSF1_ENCODING
  193 #define ALPHAVMSd_DECODING      ALPHAVMSd_ENCODING
  194 #define ALPHAVMSg_DECODING      ALPHAVMSg_ENCODING
  195 #define ALPHAVMSi_DECODING      ALPHAVMSi_ENCODING
  196 #define ARM_LITTLE_DECODING     ARM_LITTLE_ENCODING
  197 #define ARM_BIG_DECODING        ARM_BIG_ENCODING
  198 #define IA64VMSi_DECODING       IA64VMSi_ENCODING
  199 #define IA64VMSd_DECODING       IA64VMSd_ENCODING
  200 #define IA64VMSg_DECODING       IA64VMSg_ENCODING
  201 
  202 /******************************************************************************
  203 * Variance flags
  204 ******************************************************************************/
  205 
  206 #define VARY   (-1L)        /* TRUE record or dimension variance flag */
  207 #define NOVARY 0L           /* FALSE record or dimension variance flag */
  208 
  209 /******************************************************************************
  210 * Majorities
  211 ******************************************************************************/
  212 
  213 #define ROW_MAJOR       1L
  214 #define COLUMN_MAJOR    2L
  215 
  216 /******************************************************************************
  217 * Formats.
  218 ******************************************************************************/
  219 
  220 #define SINGLE_FILE     1L
  221 #define MULTI_FILE      2L
  222 
  223 /******************************************************************************
  224 * Checksum
  225 ******************************************************************************/
  226 
  227 #define NO_CHECKSUM     0L
  228 #define MD5_CHECKSUM    1L
  229 #define OTHER_CHECKSUM  2L
  230 
  231 /******************************************************************************
  232 * Attribute scopes
  233 ******************************************************************************/
  234 
  235 #define GLOBAL_SCOPE            1L
  236 #define VARIABLE_SCOPE          2L
  237 
  238 /******************************************************************************
  239 * Readonly modes.
  240 ******************************************************************************/
  241 
  242 #define READONLYon              (-1L)
  243 #define READONLYoff             0L
  244 
  245 /******************************************************************************
  246 * Validate data modes.
  247 ******************************************************************************/
  248 
  249 #define VALIDATEFILEon          (-1L)
  250 #define VALIDATEFILEoff         0L
  251 
  252 /******************************************************************************
  253 * zModes.
  254 ******************************************************************************/
  255 
  256 #define zMODEoff                0L
  257 #define zMODEon1                1L
  258 #define zMODEon2                2L
  259 
  260 /******************************************************************************
  261 * Negative to positive floating point zero modes.
  262 ******************************************************************************/
  263 
  264 #define NEGtoPOSfp0on           (-1L)
  265 #define NEGtoPOSfp0off          0L
  266 
  267 /******************************************************************************
  268 * Backward file mode. 
  269 ******************************************************************************/
  270 
  271 #define BACKWARDFILEon          1
  272 #define BACKWARDFILEoff         0
  273 
  274 /******************************************************************************
  275 * Compression/sparseness constants.
  276 ******************************************************************************/
  277 
  278 #define CDF_MAX_PARMS           5
  279 #define NO_COMPRESSION          0L
  280 #define RLE_COMPRESSION         1L
  281 #define HUFF_COMPRESSION        2L
  282 #define AHUFF_COMPRESSION       3L
  283 /**************************************************
  284 * Compression `4' used to be RICE.  Do not reuse! *
  285 **************************************************/
  286 #define GZIP_COMPRESSION        5L
  287 
  288 #define RLE_OF_ZEROs            0L
  289 #define OPTIMAL_ENCODING_TREES      0L
  290 #define NO_SPARSEARRAYS         0L
  291 #define NO_SPARSERECORDS        0L
  292 #define PAD_SPARSERECORDS       1L
  293 #define PREV_SPARSERECORDS      2L
  294 
  295 /*****************************************************************************
  296 * Invalid/reserved constants.
  297 *****************************************************************************/
  298 
  299 #define RESERVED_CDFID      ((CDFid) NULL)      /* Indicates that a CDF hasn't
  300                            been selected yet. */
  301 #define RESERVED_CDFSTATUS  ((CDFstatus) (-1))  /* Indicates that a CDFstatus
  302                            hasn't been selected yet. */
  303 
  304 #define ILLEGAL_EPOCH_VALUE (-1.0)
  305 #define ILLEGAL_TT2000_VALUE    (-9223372036854775805LL) 
  306                                              /* as
  307                                                 1707-09-22T12:12:10.961224195*/
  308 
  309 #define FILLED_TT2000_VALUE (-9223372036854775807LL-1)
  310 
  311 /******************************************************************************
  312 * Status codes (CDFstatus)
  313 *  - informatory codes are greater than CDF_OK
  314 ******************************************************************************/
  315 
  316 #define VIRTUAL_RECORD_DATA             ((CDFstatus) 1001)
  317 #define DID_NOT_COMPRESS        ((CDFstatus) 1002)
  318 #define VAR_ALREADY_CLOSED              ((CDFstatus) 1003)
  319 #define SINGLE_FILE_FORMAT              ((CDFstatus) 1004)
  320 #define NO_PADVALUE_SPECIFIED           ((CDFstatus) 1005)
  321 #define NO_VARS_IN_CDF                  ((CDFstatus) 1006)
  322 #define MULTI_FILE_FORMAT       ((CDFstatus) 1007)
  323 #define SOME_ALREADY_ALLOCATED      ((CDFstatus) 1008)
  324 #define PRECEEDING_RECORDS_ALLOCATED    ((CDFstatus) 1009)
  325 #define TT2000_CDF_MAYNEEDUPDATE        ((CDFstatus) 1010)
  326 #define BLOCKINGFACTOR_TOO_SMALL        ((CDFstatus) 1011)
  327 #define BLOCKINGFACTOR_TOO_SMALL2       ((CDFstatus) 1012)
  328 
  329 #define CDF_OK                          ((CDFstatus) 0)
  330 
  331 #define ATTR_NAME_TRUNC                 ((CDFstatus) (-1001))
  332 #define CDF_NAME_TRUNC                  ((CDFstatus) (-1002))
  333 #define VAR_NAME_TRUNC                  ((CDFstatus) (-1003))
  334 #define NEGATIVE_FP_ZERO        ((CDFstatus) (-1004))
  335                     /* -1005 unused. */
  336 #define FORCED_PARAMETER        ((CDFstatus) (-1006))
  337 #define NA_FOR_VARIABLE         ((CDFstatus) (-1007))
  338 
  339 #define CDF_WARN                        ((CDFstatus) (-2000))
  340 
  341 #define ATTR_EXISTS                     ((CDFstatus) (-2001))
  342 #define BAD_CDF_ID                      ((CDFstatus) (-2002))
  343 #define BAD_DATA_TYPE                   ((CDFstatus) (-2003))
  344 #define BAD_DIM_SIZE                    ((CDFstatus) (-2004))
  345 #define BAD_DIM_INDEX                   ((CDFstatus) (-2005))
  346 #define BAD_ENCODING                    ((CDFstatus) (-2006))
  347 #define BAD_MAJORITY                    ((CDFstatus) (-2007))
  348 #define BAD_NUM_DIMS                    ((CDFstatus) (-2008))
  349 #define BAD_REC_NUM                     ((CDFstatus) (-2009))
  350 #define BAD_SCOPE                       ((CDFstatus) (-2010))
  351 #define BAD_NUM_ELEMS                   ((CDFstatus) (-2011))
  352 #define CDF_OPEN_ERROR                  ((CDFstatus) (-2012))
  353 #define CDF_EXISTS                      ((CDFstatus) (-2013))
  354 #define BAD_FORMAT                      ((CDFstatus) (-2014))
  355 #define BAD_ALLOCATE_RECS       ((CDFstatus) (-2015))
  356 #define BAD_CDF_EXTENSION       ((CDFstatus) (-2016))
  357 #define NO_SUCH_ATTR                    ((CDFstatus) (-2017))
  358 #define NO_SUCH_ENTRY                   ((CDFstatus) (-2018))
  359 #define NO_SUCH_VAR                     ((CDFstatus) (-2019))
  360 #define VAR_READ_ERROR                  ((CDFstatus) (-2020))
  361 #define VAR_WRITE_ERROR                 ((CDFstatus) (-2021))
  362 #define BAD_ARGUMENT                    ((CDFstatus) (-2022))
  363 #define IBM_PC_OVERFLOW                 ((CDFstatus) (-2023))
  364 #define TOO_MANY_VARS                   ((CDFstatus) (-2024))
  365 #define VAR_EXISTS                      ((CDFstatus) (-2025))
  366 #define BAD_MALLOC                      ((CDFstatus) (-2026))
  367 #define NOT_A_CDF                       ((CDFstatus) (-2027))
  368 #define CORRUPTED_V2_CDF                ((CDFstatus) (-2028))
  369 #define VAR_OPEN_ERROR                  ((CDFstatus) (-2029))
  370 #define BAD_INITIAL_RECS                ((CDFstatus) (-2030))
  371 #define BAD_BLOCKING_FACTOR             ((CDFstatus) (-2031))
  372 #define END_OF_VAR                      ((CDFstatus) (-2032))
  373                     /* -2033 unused. */
  374 #define BAD_CDFSTATUS                   ((CDFstatus) (-2034))
  375 #define CDF_INTERNAL_ERROR      ((CDFstatus) (-2035))
  376 #define BAD_NUM_VARS            ((CDFstatus) (-2036))
  377 #define BAD_REC_COUNT                   ((CDFstatus) (-2037))
  378 #define BAD_REC_INTERVAL                ((CDFstatus) (-2038))
  379 #define BAD_DIM_COUNT                   ((CDFstatus) (-2039))
  380 #define BAD_DIM_INTERVAL                ((CDFstatus) (-2040))
  381 #define BAD_VAR_NUM                     ((CDFstatus) (-2041))
  382 #define BAD_ATTR_NUM                    ((CDFstatus) (-2042))
  383 #define BAD_ENTRY_NUM                   ((CDFstatus) (-2043))
  384 #define BAD_ATTR_NAME                   ((CDFstatus) (-2044))
  385 #define BAD_VAR_NAME                    ((CDFstatus) (-2045))
  386 #define NO_ATTR_SELECTED                ((CDFstatus) (-2046))
  387 #define NO_ENTRY_SELECTED               ((CDFstatus) (-2047))
  388 #define NO_VAR_SELECTED                 ((CDFstatus) (-2048))
  389 #define BAD_CDF_NAME                    ((CDFstatus) (-2049))
  390                     /* -2050 unused. */
  391 #define CANNOT_CHANGE                   ((CDFstatus) (-2051))
  392 #define NO_STATUS_SELECTED              ((CDFstatus) (-2052))
  393 #define NO_CDF_SELECTED                 ((CDFstatus) (-2053))
  394 #define READ_ONLY_DISTRIBUTION          ((CDFstatus) (-2054))
  395 #define CDF_CLOSE_ERROR                 ((CDFstatus) (-2055))
  396 #define VAR_CLOSE_ERROR                 ((CDFstatus) (-2056))
  397                     /* -2057 unused. */
  398 #define BAD_FNC_OR_ITEM                 ((CDFstatus) (-2058))
  399                     /* -2059 unused. */
  400 #define ILLEGAL_ON_V1_CDF               ((CDFstatus) (-2060))
  401                     /* -2061 unused. */
  402                     /* -2062 unused. */
  403 #define BAD_CACHE_SIZE                  ((CDFstatus) (-2063))
  404                     /* -2064 unused. */
  405                     /* -2065 unused. */
  406 #define CDF_CREATE_ERROR                ((CDFstatus) (-2066))
  407 #define NO_SUCH_CDF                     ((CDFstatus) (-2067))
  408 #define VAR_CREATE_ERROR                ((CDFstatus) (-2068))
  409                     /* -2069 unused. */
  410 #define READ_ONLY_MODE                  ((CDFstatus) (-2070))
  411 #define ILLEGAL_IN_zMODE                ((CDFstatus) (-2071))
  412 #define BAD_zMODE                       ((CDFstatus) (-2072))
  413 #define BAD_READONLY_MODE               ((CDFstatus) (-2073))
  414 #define CDF_READ_ERROR                  ((CDFstatus) (-2074))
  415 #define CDF_WRITE_ERROR                 ((CDFstatus) (-2075))
  416 #define ILLEGAL_FOR_SCOPE               ((CDFstatus) (-2076))
  417 #define NO_MORE_ACCESS                  ((CDFstatus) (-2077))
  418                     /* -2078 unused. */
  419 #define BAD_DECODING                ((CDFstatus) (-2079))
  420                     /* -2080 unused. */
  421 #define BAD_NEGtoPOSfp0_MODE        ((CDFstatus) (-2081))
  422 #define UNSUPPORTED_OPERATION       ((CDFstatus) (-2082))
  423 #define CDF_SAVE_ERROR          ((CDFstatus) (-2083))
  424 #define VAR_SAVE_ERROR          ((CDFstatus) (-2084))
  425                     /* -2085 unused. */
  426 #define NO_WRITE_ACCESS                 ((CDFstatus) (-2086))
  427 #define NO_DELETE_ACCESS                ((CDFstatus) (-2087))
  428 #define CDF_DELETE_ERROR        ((CDFstatus) (-2088))
  429 #define VAR_DELETE_ERROR        ((CDFstatus) (-2089))
  430 #define UNKNOWN_COMPRESSION     ((CDFstatus) (-2090))
  431 #define CANNOT_COMPRESS         ((CDFstatus) (-2091))
  432 #define DECOMPRESSION_ERROR     ((CDFstatus) (-2092))
  433 #define COMPRESSION_ERROR       ((CDFstatus) (-2093))
  434                     /* -2094 unused. */
  435                     /* -2095 unused. */
  436 #define EMPTY_COMPRESSED_CDF        ((CDFstatus) (-2096))
  437 #define BAD_COMPRESSION_PARM        ((CDFstatus) (-2097))
  438 #define UNKNOWN_SPARSENESS      ((CDFstatus) (-2098))
  439 #define CANNOT_SPARSERECORDS        ((CDFstatus) (-2099))
  440 #define CANNOT_SPARSEARRAYS     ((CDFstatus) (-2100))
  441 #define TOO_MANY_PARMS          ((CDFstatus) (-2101))
  442 #define NO_SUCH_RECORD          ((CDFstatus) (-2102))
  443 #define CANNOT_ALLOCATE_RECORDS     ((CDFstatus) (-2103))
  444                     /* -2104 unused. */
  445                     /* -2105 unused. */
  446 #define SCRATCH_DELETE_ERROR        ((CDFstatus) (-2106))
  447 #define SCRATCH_CREATE_ERROR        ((CDFstatus) (-2107))
  448 #define SCRATCH_READ_ERROR      ((CDFstatus) (-2108))
  449 #define SCRATCH_WRITE_ERROR     ((CDFstatus) (-2109))
  450 #define BAD_SPARSEARRAYS_PARM       ((CDFstatus) (-2110))
  451 #define BAD_SCRATCH_DIR         ((CDFstatus) (-2111))
  452 #define NOT_A_CDF_OR_NOT_SUPPORTED      ((CDFstatus) (-2113))
  453 #define CORRUPTED_V3_CDF                ((CDFstatus) (-2223))
  454 #define ILLEGAL_EPOCH_FIELD             ((CDFstatus) (-2224))
  455 #define BAD_CHECKSUM                    ((CDFstatus) (-2225)) 
  456 #define CHECKSUM_ERROR                  ((CDFstatus) (-2226))
  457 #define CHECKSUM_NOT_ALLOWED            ((CDFstatus) (-2227))
  458 #define IS_A_NETCDF                     ((CDFstatus) (-2228))
  459 #define TT2000_TIME_ERROR               ((CDFstatus) (-2229))
  460 #define UNABLE_TO_PROCESS_CDF           ((CDFstatus) (-2230))
  461 #define ZLIB_COMPRESS_ERROR             ((CDFstatus) (-2231))
  462 #define ZLIB_UNCOMPRESS_ERROR           ((CDFstatus) (-2232))
  463 #define CANNOT_INSERT_RECORDS           ((CDFstatus) (-2233))
  464 #define TT2000_USED_OUTDATED_TABLE      ((CDFstatus) (-2234))
  465 #define BADDATE_LEAPSECOND_UPDATED      ((CDFstatus) (-2235))
  466 #define FUNCTION_NOT_SUPPORTED          ((CDFstatus) (-2236))
  467 #define TRY_TO_READ_NONSTRING_DATA      ((CDFstatus) (-2237))
  468 #define BAD_NUM_STRINGS                 ((CDFstatus) (-2238))
  469 
  470 /******************************************************************************
  471 * Functions (for INTERNAL interface).
  472 * NOTE: These values must be different from those of the items.
  473 ******************************************************************************/
  474 
  475 #define CREATE_         1001L
  476 #define OPEN_           1002L
  477 #define DELETE_         1003L
  478 #define CLOSE_          1004L
  479 #define SELECT_         1005L
  480 #define CONFIRM_        1006L
  481 #define GET_            1007L
  482 #define PUT_            1008L
  483 
  484 #define SAVE_                   1009L
  485 #define BACKWARD_               1010L
  486 #define GETCDFFILEBACKWARD_     1011L
  487 #define CHECKSUM_               1012L
  488 #define GETCDFCHECKSUM_         1013L
  489 #define VALIDATE_               1014L
  490 #define GETCDFVALIDATE_         1015L
  491 #define GETLEAPSECONDSENVVAR_   1016L
  492 
  493 #define NULL_           1000L
  494 
  495 /******************************************************************************
  496 * Items on which functions are performed (for INTERNAL interface).
  497 * NOTE: These values must be different from those of the functions.
  498 ******************************************************************************/
  499 
  500 #define CDF_                    1L
  501 #define CDF_NAME_               2L
  502 #define CDF_ENCODING_           3L
  503 #define CDF_DECODING_       4L
  504 #define CDF_MAJORITY_           5L
  505 #define CDF_FORMAT_             6L
  506 #define CDF_COPYRIGHT_          7L
  507 #define CDF_NUMrVARS_           8L
  508 #define CDF_NUMzVARS_           9L
  509 #define CDF_NUMATTRS_           10L
  510 #define CDF_NUMgATTRS_          11L
  511 #define CDF_NUMvATTRS_          12L
  512 #define CDF_VERSION_            13L
  513 #define CDF_RELEASE_            14L
  514 #define CDF_INCREMENT_          15L
  515 #define CDF_STATUS_             16L
  516 #define CDF_READONLY_MODE_      17L
  517 #define CDF_zMODE_              18L
  518 #define CDF_NEGtoPOSfp0_MODE_   19L
  519 #define LIB_COPYRIGHT_          20L
  520 #define LIB_VERSION_            21L
  521 #define LIB_RELEASE_            22L
  522 #define LIB_INCREMENT_          23L
  523 #define LIB_subINCREMENT_       24L
  524 #define rVARs_NUMDIMS_          25L
  525 #define rVARs_DIMSIZES_         26L
  526 #define rVARs_MAXREC_           27L
  527 #define rVARs_RECDATA_      28L
  528 #define rVARs_RECNUMBER_        29L
  529 #define rVARs_RECCOUNT_         30L
  530 #define rVARs_RECINTERVAL_      31L
  531 #define rVARs_DIMINDICES_       32L
  532 #define rVARs_DIMCOUNTS_        33L
  533 #define rVARs_DIMINTERVALS_     34L
  534 #define rVAR_                   35L
  535 #define rVAR_NAME_              36L
  536 #define rVAR_DATATYPE_          37L
  537 #define rVAR_NUMELEMS_          38L
  538 #define rVAR_RECVARY_           39L
  539 #define rVAR_DIMVARYS_          40L
  540 #define rVAR_NUMBER_            41L
  541 #define rVAR_DATA_              42L
  542 #define rVAR_HYPERDATA_         43L
  543 #define rVAR_SEQDATA_           44L
  544 #define rVAR_SEQPOS_            45L
  545 #define rVAR_MAXREC_            46L
  546 #define rVAR_MAXallocREC_       47L
  547 #define rVAR_DATASPEC_          48L
  548 #define rVAR_PADVALUE_          49L
  549 #define rVAR_INITIALRECS_       50L
  550 #define rVAR_BLOCKINGFACTOR_    51L
  551 #define rVAR_nINDEXRECORDS_ 52L
  552 #define rVAR_nINDEXENTRIES_ 53L
  553 #define rVAR_EXISTENCE_     54L
  554 #define zVARs_MAXREC_       55L
  555 #define zVARs_RECDATA_      56L
  556 #define zVAR_                   57L
  557 #define zVAR_NAME_              58L
  558 #define zVAR_DATATYPE_          59L
  559 #define zVAR_NUMELEMS_          60L
  560 #define zVAR_NUMDIMS_           61L
  561 #define zVAR_DIMSIZES_          62L
  562 #define zVAR_RECVARY_           63L
  563 #define zVAR_DIMVARYS_          64L
  564 #define zVAR_NUMBER_            65L
  565 #define zVAR_DATA_              66L
  566 #define zVAR_HYPERDATA_         67L
  567 #define zVAR_SEQDATA_           68L
  568 #define zVAR_SEQPOS_            69L
  569 #define zVAR_MAXREC_            70L
  570 #define zVAR_MAXallocREC_       71L
  571 #define zVAR_DATASPEC_          72L
  572 #define zVAR_PADVALUE_          73L
  573 #define zVAR_INITIALRECS_       74L
  574 #define zVAR_BLOCKINGFACTOR_    75L
  575 #define zVAR_nINDEXRECORDS_ 76L
  576 #define zVAR_nINDEXENTRIES_ 77L
  577 #define zVAR_EXISTENCE_     78L
  578 #define zVAR_RECNUMBER_         79L
  579 #define zVAR_RECCOUNT_          80L
  580 #define zVAR_RECINTERVAL_       81L
  581 #define zVAR_DIMINDICES_        82L
  582 #define zVAR_DIMCOUNTS_         83L
  583 #define zVAR_DIMINTERVALS_      84L
  584 #define ATTR_                   85L
  585 #define ATTR_SCOPE_             86L
  586 #define ATTR_NAME_              87L
  587 #define ATTR_NUMBER_            88L
  588 #define ATTR_MAXgENTRY_         89L
  589 #define ATTR_NUMgENTRIES_       90L
  590 #define ATTR_MAXrENTRY_         91L
  591 #define ATTR_NUMrENTRIES_       92L
  592 #define ATTR_MAXzENTRY_         93L
  593 #define ATTR_NUMzENTRIES_       94L
  594 #define ATTR_EXISTENCE_     95L
  595 #define gENTRY_                 96L
  596 #define gENTRY_EXISTENCE_       97L
  597 #define gENTRY_DATATYPE_        98L
  598 #define gENTRY_NUMELEMS_        99L
  599 #define gENTRY_DATASPEC_        100L
  600 #define gENTRY_DATA_            101L
  601 #define rENTRY_                 102L
  602 #define rENTRY_NAME_        103L
  603 #define rENTRY_EXISTENCE_       104L
  604 #define rENTRY_DATATYPE_        105L
  605 #define rENTRY_NUMELEMS_        106L
  606 #define rENTRY_DATASPEC_        107L
  607 #define rENTRY_DATA_            108L
  608 #define zENTRY_                 109L
  609 #define zENTRY_NAME_        110L
  610 #define zENTRY_EXISTENCE_       111L
  611 #define zENTRY_DATATYPE_        112L
  612 #define zENTRY_NUMELEMS_        113L
  613 #define zENTRY_DATASPEC_        114L
  614 #define zENTRY_DATA_            115L
  615 #define STATUS_TEXT_            116L
  616 #define CDF_CACHESIZE_      117L
  617 #define rVARs_CACHESIZE_    118L
  618 #define zVARs_CACHESIZE_    119L
  619 #define rVAR_CACHESIZE_     120L
  620 #define zVAR_CACHESIZE_     121L
  621 #define zVARs_RECNUMBER_    122L
  622 #define rVAR_ALLOCATERECS_  123L
  623 #define zVAR_ALLOCATERECS_  124L
  624 #define DATATYPE_SIZE_      125L
  625 #define CURgENTRY_EXISTENCE_    126L
  626 #define CURrENTRY_EXISTENCE_    127L
  627 #define CURzENTRY_EXISTENCE_    128L
  628 #define CDF_INFO_       129L
  629 #define CDF_COMPRESSION_    130L
  630 #define zVAR_COMPRESSION_   131L
  631 #define zVAR_SPARSERECORDS_ 132L
  632 #define zVAR_SPARSEARRAYS_  133L
  633 #define zVAR_ALLOCATEBLOCK_ 134L
  634 #define zVAR_NUMRECS_       135L
  635 #define zVAR_NUMallocRECS_  136L
  636 #define rVAR_COMPRESSION_   137L
  637 #define rVAR_SPARSERECORDS_ 138L
  638 #define rVAR_SPARSEARRAYS_  139L
  639 #define rVAR_ALLOCATEBLOCK_ 140L
  640 #define rVAR_NUMRECS_       141L
  641 #define rVAR_NUMallocRECS_  142L
  642 #define rVAR_ALLOCATEDFROM_ 143L
  643 #define rVAR_ALLOCATEDTO_   144L
  644 #define zVAR_ALLOCATEDFROM_ 145L
  645 #define zVAR_ALLOCATEDTO_   146L
  646 #define zVAR_nINDEXLEVELS_  147L
  647 #define rVAR_nINDEXLEVELS_  148L
  648 #define CDF_SCRATCHDIR_     149L
  649 #define rVAR_RESERVEPERCENT_    150L
  650 #define zVAR_RESERVEPERCENT_    151L
  651 #define rVAR_RECORDS_       152L
  652 #define zVAR_RECORDS_       153L
  653 #define STAGE_CACHESIZE_    154L
  654 #define COMPRESS_CACHESIZE_ 155L
  655 #define CDF_CHECKSUM_           156L
  656 #define rVAR_RECORDS_RENUMBER_  157L
  657 #define zVAR_RECORDS_RENUMBER_  158L
  658 #define CDF_LEAPSECONDLASTUPDATED_ 159L
  659 #define rENTRY_STRINGSDATA_     160L
  660 #define zENTRY_STRINGSDATA_     161L
  661 #define rENTRY_NUMSTRINGS_      162L
  662 #define zENTRY_NUMSTRINGS_      163L
  663 
  664 #define CDFwithSTATS_       200L    /* For CDF internal use only! */
  665 #define CDF_ACCESS_     201L    /* For CDF internal use only! */
  666 
  667 #define TT2000END       -99999.999
  668 #define STRINGDELIMITER     "\\N "
  669 
  670 /******************************************************************************
  671 * C interface macros.
  672 ******************************************************************************/
  673 
  674 #define CDFattrCreate CDFcreateAttr
  675 #define CDFattrNum CDFgetAttrNum
  676 #define CDFvarCreate CDFcreaterVar
  677 #define CDFvarNum CDFgetVarNum
  678 #define CDFerror CDFgetStatusText
  679 #define CDFattrRename CDFrenameAttr
  680 #define CDFopenCDF CDFopen
  681 #define CDFdeleteCDF CDFdelete
  682 #define CDFcloseCDF CDFclose
  683 #define CDFselectCDF CDFselect
  684 
  685 #define CDFattrEntryInquire(id,attrNum,entryNum,dataType,numElems) \
  686 CDFinquireAttrEntry(id,0,attrNum,entryNum,dataType,numElems)
  687 #define CDFinquireAttrgEntry(id,attrNum,entryNum,dataType,numElems) \
  688 CDFinquireAttrEntry(id,1,attrNum,entryNum,dataType,numElems)
  689 #define CDFinquireAttrrEntry(id,attrNum,entryNum,dataType,numElems) \
  690 CDFinquireAttrEntry(id,2,attrNum,entryNum,dataType,numElems)
  691 #define CDFinquireAttrzEntry(id,attrNum,entryNum,dataType,numElems) \
  692 CDFinquireAttrEntry(id,3,attrNum,entryNum,dataType,numElems)
  693 
  694 #define CDFinquireAttr1Info(id,attrNum,attrName,attrScope,maxEntry) \
  695 CDFinquireAttrInfo(id,0,attrNum,attrName,attrScope,maxEntry)
  696 #define CDFinquireAttr2Info(id,attrNum,attrName,attrScope,maxEntry) \
  697 CDFinquireAttrInfo(id,1,attrNum,attrName,attrScope,maxEntry)
  698 
  699 #define CDFattrPut(id,attrNum,entryNum,dataType,numElems,value) \
  700 CDFputAttrEntry(id,0,attrNum,entryNum,dataType,numElems,value)
  701 #define CDFputAttrgEntry(id,attrNum,entryNum,dataType,numElems,value) \
  702 CDFputAttrEntry(id,1,attrNum,entryNum,dataType,numElems,value)
  703 #define CDFputAttrrEntry(id,attrNum,entryNum,dataType,numElems,value) \
  704 CDFputAttrEntry(id,2,attrNum,entryNum,dataType,numElems,value)
  705 #define CDFputAttrzEntry(id,attrNum,entryNum,dataType,numElems,value) \
  706 CDFputAttrEntry(id,3,attrNum,entryNum,dataType,numElems,value)
  707 
  708 #define CDFattrGet(id,attrNum,entryNum,value) \
  709 CDFgetAttrEntry(id,0,attrNum,entryNum,value)
  710 #define CDFgetAttrgEntry(id,attrNum,entryNum,value) \
  711 CDFgetAttrEntry(id,1,attrNum,entryNum,value)
  712 #define CDFgetAttrrEntry(id,attrNum,entryNum,value) \
  713 CDFgetAttrEntry(id,2,attrNum,entryNum,value)
  714 #define CDFgetAttrzEntry(id,attrNum,entryNum,value) \
  715 CDFgetAttrEntry(id,3,attrNum,entryNum,value)
  716 
  717 #define CDFgetAttrrEntryStrings(id,attrNum,entryNum,numStrings,strings) \
  718 CDFgetAttrEntryStrings(id,0,attrNum,entryNum,numStrings,strings)
  719 #define CDFgetAttrzEntryStrings(id,attrNum,entryNum,numStrings,strings) \
  720 CDFgetAttrEntryStrings(id,1,attrNum,entryNum,numStrings,strings)
  721 
  722 #define CDFputAttrrEntryStrings(id,attrNum,entryNum,numStrings,strings) \
  723 CDFputAttrEntryStrings(id,0,attrNum,entryNum,numStrings,strings)
  724 #define CDFputAttrzEntryStrings(id,attrNum,entryNum,numStrings,strings) \
  725 CDFputAttrEntryStrings(id,1,attrNum,entryNum,numStrings,strings)
  726 
  727 #define CDFgetAttrgEntryDataType(id,attrNum,entryNum,dataType) \
  728 CDFgetAttrEntryDataType(id,1,attrNum,entryNum,dataType)
  729 #define CDFgetAttrrEntryDataType(id,attrNum,entryNum,dataType) \
  730 CDFgetAttrEntryDataType(id,2,attrNum,entryNum,dataType)
  731 #define CDFgetAttrzEntryDataType(id,attrNum,entryNum,dataType) \
  732 CDFgetAttrEntryDataType(id,3,attrNum,entryNum,dataType)
  733 
  734 #define CDFsetAttrgEntryDataSpec(id,attrNum,entryNum,dataType) \
  735 CDFsetAttrEntryDataSpec(id,1,attrNum,entryNum,dataType,(long)-99)
  736 #define CDFsetAttrrEntryDataSpec(id,attrNum,entryNum,dataType) \
  737 CDFsetAttrEntryDataSpec(id,2,attrNum,entryNum,dataType,(long)-99)
  738 #define CDFsetAttrzEntryDataSpec(id,attrNum,entryNum,dataType) \
  739 CDFsetAttrEntryDataSpec(id,3,attrNum,entryNum,dataType,(long)-99)
  740 
  741 #define CDFvarRename CDFrenamerVar
  742 #define CDFrenamerVar(id,varNum,varName) CDFrenameVar(id,0,varNum,varName)
  743 #define CDFrenamezVar(id,varNum,varName) CDFrenameVar(id,1,varNum,varName)
  744 
  745 #define CDFinquirerVar(id,varN,varName,dataType,numElems,numDims,dimSizes,recVary,dimVarys) \
  746 CDFinquireVar(id,0,varN,varName,dataType,numElems,numDims,dimSizes,recVary,dimVarys)
  747 #define CDFinquirezVar(id,varN,varName,dataType,numElems,numDims,dimSizes,recVary,dimVarys) \
  748 CDFinquireVar(id,1,varN,varName,dataType,numElems,numDims,dimSizes,recVary,dimVarys)
  749 
  750 #define CDFvarPut CDFputrVarData
  751 #define CDFputrVarData(id,varNum,recNum,indices,value) \
  752 CDFputVarData(id,0,varNum,recNum,indices,value)
  753 #define CDFputzVarData(id,varNum,recNum,indices,value) \
  754 CDFputVarData(id,1,varNum,recNum,indices,value)
  755 
  756 #define CDFvarGet CDFgetrVarData
  757 #define CDFgetrVarData(id,varNum,recNum,indices,value) \
  758 CDFgetVarData(id,0,varNum,recNum,indices,value)
  759 #define CDFgetzVarData(id,varNum,recNum,indices,value) \
  760 CDFgetVarData(id,1,varNum,recNum,indices,value)
  761 
  762 #define CDFvarHyperPut CDFhyperPutrVarData
  763 #define CDFhyperPutrVarData(id,varNum,recS,recC,recI,indices,counts,intervals,buff) \
  764 CDFhyperPutVarData(id,0,varNum,recS,recC,recI,indices,counts,intervals,buff)
  765 #define CDFhyperPutzVarData(id,varNum,recS,recC,recI,indices,counts,intervals,buff) \
  766 CDFhyperPutVarData(id,1,varNum,recS,recC,recI,indices,counts,intervals,buff)
  767 
  768 #define CDFvarHyperGet CDFhyperGetrVarData
  769 #define CDFhyperGetrVarData(id,varNum,recS,recC,recI,indices,counts,intervals,buff) \
  770 CDFhyperGetVarData(id,0,varNum,recS,recC,recI,indices,counts,intervals,buff)
  771 #define CDFhyperGetzVarData(id,varNum,recS,recC,recI,indices,counts,intervals,buff) \
  772 CDFhyperGetVarData(id,1,varNum,recS,recC,recI,indices,counts,intervals,buff)
  773 
  774 #define CDFvarClose CDFcloserVar
  775 #define CDFcloserVar(id,varNum) CDFcloseVar(id,0,varNum)
  776 #define CDFclosezVar(id,varNum) CDFcloseVar(id,1,varNum)
  777 
  778 #define CDFdeleteAttrgEntry(id,attrNum,entryNum) \
  779 CDFdeleteAttrEntry(id,1,attrNum,entryNum)
  780 #define CDFdeleteAttrrEntry(id,attrNum,entryNum) \
  781 CDFdeleteAttrEntry(id,2,attrNum,entryNum)
  782 #define CDFdeleteAttrzEntry(id,attrNum,entryNum) \
  783 CDFdeleteAttrEntry(id,3,attrNum,entryNum)
  784 
  785 #define CDFgetNumAttrgEntries(id,attrNum,numEntries) \
  786 CDFgetNumAttrEntries(id,1,attrNum,numEntries)
  787 #define CDFgetNumAttrrEntries(id,attrNum,numEntries) \
  788 CDFgetNumAttrEntries(id,2,attrNum,numEntries)
  789 #define CDFgetNumAttrzEntries(id,attrNum,numEntries) \
  790 CDFgetNumAttrEntries(id,3,attrNum,numEntries)
  791 
  792 #define CDFgetAttrMaxgEntry(id,attrNum,maxEntry) \
  793 CDFgetAttrMaxEntry(id,1,attrNum,maxEntry)
  794 #define CDFgetAttrMaxrEntry(id,attrNum,maxEntry) \
  795 CDFgetAttrMaxEntry(id,2,attrNum,maxEntry)
  796 #define CDFgetAttrMaxzEntry(id,attrNum,maxEntry) \
  797 CDFgetAttrMaxEntry(id,3,attrNum,maxEntry)
  798 
  799 #define CDFgetAttrgEntryNumElements(id,attrNum,entryNum,numElems) \
  800 CDFgetAttrEntryNumElements(id,1,attrNum,entryNum,numElems)
  801 #define CDFgetAttrrEntryNumElements(id,attrNum,entryNum,numElems) \
  802 CDFgetAttrEntryNumElements(id,2,attrNum,entryNum,numElems)
  803 #define CDFgetAttrzEntryNumElements(id,attrNum,entryNum,numElems) \
  804 CDFgetAttrEntryNumElements(id,3,attrNum,entryNum,numElems)
  805 
  806 #define CDFgetAttrrEntryNumStrings(id,attrNum,entryNum,numStrings) \
  807 CDFgetAttrEntryNumStrings(id,0,attrNum,entryNum,numStrings)
  808 #define CDFgetAttrzEntryNumStrings(id,attrNum,entryNum,numStrings) \
  809 CDFgetAttrEntryNumStrings(id,1,attrNum,entryNum,numStrings)
  810 
  811 #define CDFgetNumrVars(id,numVars) CDFgetNumVars(id,0,numVars)
  812 #define CDFgetNumzVars(id,numVars) CDFgetNumVars(id,1,numVars)
  813 
  814 #define CDFdeletezVar(id,varNum) CDFdeleteVar(id,1,varNum)
  815 
  816 #define CDFdeletezVarRecords(id,varNum,sRec,eRec) \
  817 CDFdeleteVarRecords(id,1,varNum,sRec,eRec)
  818 
  819 #define CDFdeletezVarRecordsRenumber(id,varNum,sRec,eRec) \
  820 CDFdeleteVarRecordsRenumber(id,1,varNum,sRec,eRec)
  821 
  822 #define CDFgetzVarName(id,varNum,varName) \
  823 CDFgetVarName(id,1,varNum,varName)
  824 
  825 #define CDFgetzVarMaxWrittenRecNum(id,varNum,maxRec) \
  826 CDFgetVarMaxWrittenRecNum(id,1,varNum,maxRec)
  827 
  828 #define CDFgetzVarsMaxWrittenRecNum(id,maxRec) \
  829 CDFgetVarsMaxWrittenRecNum(id,1,maxRec)
  830 
  831 #define CDFgetzVarMaxAllocRecNum(id,varNum,maxAllocRec) \
  832 CDFgetVarMaxAllocRecNum(id,1,varNum,maxAllocRec)
  833 
  834 #define CDFgetzVarDataType(id,varNum,dataType) \
  835 CDFgetVarDataType(id,1,varNum,dataType)
  836 
  837 #define CDFgetzVarAllocRecords(id,varNum,allocRecs) \
  838 CDFgetVarAllocRecords(id,1,varNum,allocRecs)
  839 #define CDFsetzVarAllocRecords(id,varNum,allocRecs) \
  840 CDFsetVarAllocRecords(id,1,varNum,allocRecs)
  841 
  842 #define CDFsetzVarAllocBlockRecords(id,varNum,firstRec,lastRec) \
  843 CDFsetVarAllocBlockRecords(id,1,varNum,firstRec,lastRec)
  844 
  845 #define CDFgetzVarBlockingFactor(id,varNum,bf) \
  846 CDFgetVarBlockingFactor(id,1,varNum,bf)
  847 #define CDFsetzVarBlockingFactor(id,varNum,bf) \
  848 CDFsetVarBlockingFactor(id,1,varNum,bf)
  849 
  850 #define CDFgetzVarCompression(id,varNum,cType,cParms,cPct) \
  851 CDFgetVarCompression(id,1,varNum,cType,cParms,cPct)
  852 #define CDFsetzVarCompression(id,varNum,cType,cParms) \
  853 CDFsetVarCompression(id,1,varNum,cType,cParms)
  854 
  855 #define CDFsetzVarDataSpec(id,varNum,dataType) \
  856 CDFsetVarDataSpec(id,1,varNum,dataType,(long)-99)
  857 
  858 #define CDFsetzVarDimVariances(id,varNum,dimVarys) \
  859 CDFsetVarDimVariances(id,1,varNum,dimVarys)
  860 
  861 #define CDFgetzVarDimVariances(id,varNum,dimVarys) \
  862 CDFgetVarDimVariances(id,1,varNum,dimVarys)
  863 
  864 #define CDFgetzVarNumElements(id,varNum,numEles) \
  865 CDFgetVarNumElements(id,1,varNum,numEles)
  866 
  867 #define CDFgetzVarNumRecsWritten(id,varNum,numRecs) \
  868 CDFgetVarNumRecsWritten(id,1,varNum,numRecs)
  869 
  870 #define CDFsetzVarInitialRecs(id,varNum,initRecs) \
  871 CDFsetVarInitialRecs(id,1,varNum,initRecs)
  872 
  873 #define CDFgetzVarPadValue(id,varNum,pad) \
  874 CDFgetVarPadValue(id,1,varNum,pad)
  875 #define CDFsetzVarPadValue(id,varNum,pad) \
  876 CDFsetVarPadValue(id,1,varNum,pad)
  877 
  878 #define CDFgetzVarRecVariance(id,varNum,recVary) \
  879 CDFgetVarRecVariance(id,1,varNum,recVary)
  880 #define CDFsetzVarRecVariance(id,varNum,recVary) \
  881 CDFsetVarRecVariance(id,1,varNum,recVary)
  882 
  883 #define CDFgetzVarSeqData(id,varNum,data) \
  884 CDFgetVarSeqData(id,1,varNum,data)
  885 #define CDFputzVarSeqData(id,varNum,data) \
  886 CDFputVarSeqData(id,1,varNum,data)
  887 
  888 #define CDFgetzVarSparseRecords(id,varNum,sprecs) \
  889 CDFgetVarSparseRecords(id,1,varNum,sprecs)
  890 #define CDFsetzVarSparseRecords(id,varNum,sprecs) \
  891 CDFsetVarSparseRecords(id,1,varNum,sprecs)
  892 
  893 #define CDFgetzVarsRecordData(id,numVars,varNames,recNum,bufferPtr) \
  894 CDFgetVarsRecordDatabyNames(id,1,numVars,varNames,recNum,bufferPtr)
  895 #define CDFputzVarsRecordData(id,numVars,varNames,recNum,bufferPtr) \
  896 CDFputVarsRecordDatabyNames(id,1,numVars,varNames,recNum,bufferPtr)
  897 
  898 #define CDFgetzVarsRecordDatabyNumbers(id,numVars,varNumbers,recNum,buffer) \
  899 CDFgetVarsRecordDatabyNumbers(id,1,numVars,varNumbers,recNum,buffer)
  900 #define CDFputzVarsRecordDatabyNumbers(id,numVars,varNumbers,recNum,buffer) \
  901 CDFputVarsRecordDatabyNumbers(id,1,numVars,varNumbers,recNum,buffer)
  902 
  903 #define CDFgetzVarRecordData(id,varNum,recNum,buffer) \
  904 CDFgetVarRecordData(id,1,varNum,recNum,buffer)
  905 #define CDFputzVarRecordData(id,varNum,recNum,buffer) \
  906 CDFputVarRecordData(id,1,varNum,recNum,buffer)
  907 
  908 #define CDFsetzVarCacheSize(id,varNum,numBuffers) \
  909 CDFsetVarCacheSize(id,1,varNum,numBuffers)
  910 
  911 #define CDFsetzVarsCacheSize(id,numBuffers) \
  912 CDFsetVarsCacheSize(id,1,numBuffers)
  913 
  914 #define CDFgetzVarCacheSize(id,varNum,numBuffers) \
  915 CDFgetVarCacheSize(id,1,varNum,numBuffers)
  916 
  917 #define CDFconfirmzVarExistence(id,varName) \
  918 CDFconfirmVarExistence(id,1,varName)
  919 
  920 #define CDFconfirmzVarPadValueExistence(id,varNum) \
  921 CDFconfirmVarPadValueExistence(id,1,varNum)
  922 
  923 #define CDFgetzVarReservePercent(id,varNum,percent) \
  924 CDFgetVarReservePercent(id,1,varNum,percent)
  925 
  926 #define CDFsetzVarReservePercent(id,varNum,percent) \
  927 CDFsetVarReservePercent(id,1,varNum,percent)
  928 
  929 #define CDFgetzVarSeqPos(id,varNum,recNum,indices) \
  930 CDFgetVarSeqPos(id,1,varNum,recNum,indices)
  931 #define CDFsetzVarSeqPos(id,varNum,recNum,indices) \
  932 CDFsetVarSeqPos(id,1,varNum,recNum,indices)
  933 
  934 #define CDFgetzVarAllRecordsByVarID(id,varNum,buffer) \
  935 CDFgetVarAllRecordsByVarID(id,1,varNum,buffer)
  936 #define CDFputzVarAllRecordsByVarID(id,varNum,numRecs,buffer) \
  937 CDFputVarAllRecordsByVarID(id,1,varNum,numRecs,buffer)
  938 
  939 #define CDFgetzVarRangeRecordsByVarID(id,varNum,startRec,stopRec,buffer) \
  940 CDFgetVarRangeRecordsByVarID(id,1,varNum,startRec,stopRec,buffer)
  941 #define CDFputzVarRangeRecordsByVarID(id,varNum,startRec,stopRec,buffer) \
  942 CDFputVarRangeRecordsByVarID(id,1,varNum,startRec,stopRec,buffer)
  943 
  944 #define CDFinsertzVarRecordsByVarID(id,varNum,startRec,numRecs,buffer) \
  945 CDFinsertVarRecordsByVarID(id,1,varNum,startRec,numRecs,buffer)
  946 #define CDFinsertrVarRecordsByVarID(id,varNum,startRec,numRecs,buffer) \
  947 CDFinsertVarRecordsByVarID(id,0,varNum,startRec,numRecs,buffer)
  948 
  949 /*
  950  * CLOSE_  *
  951  *         */
  952 
  953 #define CDFclose(id) \
  954 CDFlib (SELECT_, CDF_, id, \
  955         CLOSE_, CDF_, \
  956         NULL_)
  957 
  958 #define CDFcloseVar(id,zVar,varNum) \
  959 CDFlib (SELECT_, CDF_, id, \
  960                  (zVar?zVAR_:rVAR_), varNum, \
  961         CLOSE_, (zVar? zVAR_: rVAR_), \
  962         NULL_)
  963 
  964 /*
  965  * CONFIRM_  *
  966  *           */
  967 
  968 #define CDFconfirmAttrExistence(id,attrName) \
  969 CDFlib (SELECT_, CDF_, id, \
  970         CONFIRM_, ATTR_EXISTENCE_, attrName, \
  971         NULL_)
  972 
  973 #define CDFgetCacheSize(id,numBuffers) \
  974 CDFlib (SELECT_, CDF_, id, \
  975         CONFIRM_, CDF_CACHESIZE_, numBuffers, \
  976         NULL_)
  977 
  978 #define CDFgetVarCacheSize(id,zVar,varNum,numBuffers) \
  979 CDFlib (SELECT_, CDF_, id, \
  980                  (zVar?zVAR_:rVAR_), varNum, \
  981         CONFIRM_, (zVar?zVAR_CACHESIZE_:rVAR_CACHESIZE_), numBuffers, \
  982         NULL_)
  983 
  984 #define CDFgetDecoding(id,decoding) \
  985 CDFlib (SELECT_, CDF_, id, \
  986         CONFIRM_, CDF_DECODING_, decoding, \
  987         NULL_)
  988 
  989 #define CDFgetName(id,cdfName) \
  990 CDFlib (SELECT_, CDF_, id, \
  991         CONFIRM_, CDF_NAME_, cdfName, \
  992         NULL_)
  993 
  994 #define CDFgetNegtoPosfp0Mode(id,negtoPosfp0) \
  995 CDFlib (SELECT_, CDF_, id, \
  996         CONFIRM_, CDF_NEGtoPOSfp0_MODE_, negtoPosfp0, \
  997         NULL_)
  998 
  999 #define CDFgetReadOnlyMode(id,readOnlyMode) \
 1000 CDFlib (SELECT_, CDF_, id, \
 1001         CONFIRM_, CDF_READONLY_MODE_, readOnlyMode, \
 1002         NULL_)
 1003 
 1004 #define CDFgetzMode(id,zMode) \
 1005 CDFlib (SELECT_, CDF_, id, \
 1006         CONFIRM_, CDF_zMODE_, zMode, \
 1007         NULL_)
 1008 
 1009 #define CDFgetCompressionCacheSize(id,numBuffers) \
 1010 CDFlib (SELECT_, CDF_, id, \
 1011         CONFIRM_, COMPRESS_CACHESIZE_, numBuffers, \
 1012         NULL_)
 1013 
 1014 #define CDFconfirmgEntryExistence(id,attrNum,entryNum) \
 1015 CDFlib (SELECT_, CDF_, id, \
 1016                  ATTR_, attrNum, \
 1017         CONFIRM_, gENTRY_EXISTENCE_, entryNum, \
 1018         NULL_)
 1019 
 1020 #define CDFconfirmrEntryExistence(id,attrNum,entryNum) \
 1021 CDFlib (SELECT_, CDF_, id, \
 1022                  ATTR_, attrNum, \
 1023         CONFIRM_, rENTRY_EXISTENCE_, entryNum, \
 1024         NULL_)
 1025 
 1026 #define CDFgetStageCacheSize(id,numBuffers) \
 1027 CDFlib (SELECT_, CDF_, id, \
 1028         CONFIRM_, STAGE_CACHESIZE_, numBuffers, \
 1029         NULL_)
 1030 
 1031 #define CDFconfirmVarExistence(id,zVar,varName) \
 1032 CDFlib (SELECT_, CDF_, id, \
 1033         CONFIRM_, (zVar?zVAR_EXISTENCE_:rVAR_EXISTENCE_), varName, \
 1034         NULL_)
 1035 
 1036 #define CDFconfirmVarPadValueExistence(id,zVar,varNum) \
 1037 CDFlib (SELECT_, CDF_, id, \
 1038          (zVar?zVAR_:rVAR_), varNum, \
 1039         CONFIRM_, (zVar?zVAR_PADVALUE_:rVAR_PADVALUE_), \
 1040         NULL_)
 1041 
 1042 #define CDFgetVarReservePercent(id,zVar,varNum,percent) \
 1043 CDFlib (SELECT_, CDF_, id, \
 1044          (zVar?zVAR_:rVAR_), varNum, \
 1045         CONFIRM_, (zVar?zVAR_RESERVEPERCENT_:rVAR_RESERVEPERCENT_), percent, \
 1046         NULL_)
 1047 
 1048 #define CDFgetVarSeqPos(id,zVar,varNum,recNum,indices) \
 1049 CDFlib (SELECT_, CDF_, id, \
 1050          (zVar?zVAR_:rVAR_), varNum, \
 1051         CONFIRM_, (zVar?zVAR_SEQPOS_:rVAR_SEQPOS_), recNum, indices, \
 1052         NULL_)
 1053 
 1054 #define CDFconfirmzEntryExistence(id,attrNum,entryNum) \
 1055 CDFlib (SELECT_, CDF_, id, \
 1056                  ATTR_, attrNum, \
 1057         CONFIRM_, zENTRY_EXISTENCE_, entryNum, \
 1058         NULL_)
 1059 
 1060 #define CDFconfirmChecksum(id) \
 1061 CDFlib (SELECT_, CDF_, id, \
 1062         CONFIRM_, CDF_CHECKSUM_, \
 1063         NULL_)
 1064 
 1065 /*
 1066  * CREATE_ *
 1067  *         */
 1068 
 1069 #define CDFcreate(CDFname,numDims,dimSizes,encoding,majority,id) \
 1070 CDFlib (CREATE_, CDF_, CDFname, numDims, dimSizes, id, \
 1071         PUT_, CDF_ENCODING_, encoding, \
 1072               CDF_MAJORITY_, majority, \
 1073         NULL_)
 1074 
 1075 #define CDFcreateAttr(id,attrName,attrScope,attrNum) \
 1076 CDFlib (SELECT_, CDF_, id, \
 1077         CREATE_, ATTR_, attrName, attrScope, attrNum, \
 1078         NULL_)
 1079 
 1080 #define CDFcreaterVar(id,varName,dataType,numElements,recVary,dimVarys,varNum) \
 1081 CDFlib (SELECT_, CDF_, id, \
 1082         CREATE_, rVAR_, varName, dataType, numElements, \
 1083                         recVary, dimVarys, varNum, \
 1084         NULL_)
 1085 
 1086 #define CDFcreatezVar(id,varName,dataType,numElements,numDims,dimSizes,recVary,dimVarys,varNum) \
 1087 CDFlib (SELECT_, CDF_, id, \
 1088         CREATE_, zVAR_, varName, dataType, numElements, \
 1089                         numDims,dimSizes, recVary, dimVarys, varNum, \
 1090         NULL_)
 1091 
 1092 /*
 1093  * DELETE_ *
 1094  *         */
 1095 
 1096 #define CDFdelete(id) \
 1097 CDFlib (SELECT_, CDF_, id, \
 1098         DELETE_, CDF_, \
 1099         NULL_)
 1100 
 1101 #define CDFdeleteAttr(id,attrNum) \
 1102 CDFlib (SELECT_, CDF_, id, \
 1103                  ATTR_, attrNum, \
 1104         DELETE_, ATTR_, \
 1105         NULL_)
 1106 
 1107 #define CDFdeleteVar(id,zVar,varNum) \
 1108 CDFlib (SELECT_, CDF_, id, \
 1109                  (zVar? zVAR_: rVAR_), varNum, \
 1110         DELETE_, (zVar? zVAR_: rVAR_), \
 1111         NULL_)
 1112 
 1113 #define CDFdeleteVarRecords(id,zVar,varNum,firstRec,lastRec) \
 1114 CDFlib (SELECT_, CDF_, id, \
 1115                  (zVar? zVAR_: rVAR_), varNum, \
 1116         DELETE_, (zVar? zVAR_RECORDS_: rVAR_RECORDS_), firstRec, lastRec, \
 1117         NULL_)
 1118 
 1119 #define CDFdeleteVarRecordsRenumber(id,zVar,varNum,firstRec,lastRec) \
 1120 CDFlib (SELECT_, CDF_, id, \
 1121                  (zVar? zVAR_: rVAR_), varNum, \
 1122         DELETE_, (zVar? zVAR_RECORDS_RENUMBER_: rVAR_RECORDS_RENUMBER_), \
 1123                   firstRec, lastRec, \
 1124         NULL_)
 1125 
 1126 /*
 1127  * GET_ *
 1128  *      */
 1129 
 1130 #define CDFgetAttrName(id,attrNum,attrName) \
 1131 CDFlib (SELECT_, CDF_, id, \
 1132                  ATTR_, attrNum, \
 1133         GET_, ATTR_NAME_, attrName, \
 1134         NULL_)
 1135 
 1136 #define CDFgetAttrScope(id,attrNum,attrScope) \
 1137 CDFlib (SELECT_, CDF_, id, \
 1138                  ATTR_, attrNum, \
 1139         GET_, ATTR_SCOPE_, attrScope, \
 1140         NULL_)
 1141 
 1142 #define CDFgetCompression(id,cType, cParms, cPercent) \
 1143 CDFlib (SELECT_, CDF_, id, \
 1144         GET_, CDF_COMPRESSION_, cType, cParms, cPercent, \
 1145         NULL_)
 1146 
 1147 #define CDFgetCopyright(id,copyright) \
 1148 CDFlib (SELECT_, CDF_, id, \
 1149         GET_, CDF_COPYRIGHT_, copyright, \
 1150         NULL_)
 1151 
 1152 #define CDFgetEncoding(id,encoding) \
 1153 CDFlib (SELECT_, CDF_, id, \
 1154         GET_, CDF_ENCODING_, encoding, \
 1155         NULL_)
 1156 
 1157 #define CDFgetFormat(id,format) \
 1158 CDFlib (SELECT_, CDF_, id, \
 1159         GET_, CDF_FORMAT_, format, \
 1160         NULL_)
 1161 
 1162 #define CDFgetLeapSecondLastUpdated(id,lastUpdated) \
 1163 CDFlib (SELECT_, CDF_, id, \
 1164         GET_, CDF_LEAPSECONDLASTUPDATED_, lastUpdated, \
 1165         NULL_)
 1166 
 1167 #define CDFgetCompressionInfo(name,cType,cParms,cSize,uSize) \
 1168 CDFlib (GET_, CDF_INFO_, name, cType, cParms, cSize, uSize, \
 1169         NULL_)
 1170 
 1171 #define CDFgetMajority(id,majority) \
 1172 CDFlib (SELECT_, CDF_, id, \
 1173         GET_, CDF_MAJORITY_, majority, \
 1174         NULL_)
 1175 
 1176 #define CDFgetNumAttributes(id,numAttrs) \
 1177 CDFlib (SELECT_, CDF_, id, \
 1178         GET_, CDF_NUMATTRS_, numAttrs, \
 1179         NULL_)
 1180 
 1181 #define CDFgetNumgAttributes(id,numgAttrs) \
 1182 CDFlib (SELECT_, CDF_, id, \
 1183         GET_, CDF_NUMgATTRS_, numgAttrs, \
 1184         NULL_)
 1185 
 1186 #define CDFgetNumVars(id,zVar,numVars) \
 1187 CDFlib (SELECT_, CDF_, id, \
 1188         GET_, (zVar?CDF_NUMzVARS_:CDF_NUMrVARS_), numVars, \
 1189         NULL_)
 1190 
 1191 #define CDFgetNumvAttributes(id,numvAttrs) \
 1192 CDFlib (SELECT_, CDF_, id, \
 1193         GET_, CDF_NUMvATTRS_, numvAttrs, \
 1194         NULL_)
 1195 
 1196 #define CDFdoc(id,version,release,copyright) \
 1197 CDFlib (SELECT_, CDF_, id, \
 1198         GET_, CDF_VERSION_, version, \
 1199               CDF_RELEASE_, release, \
 1200               CDF_COPYRIGHT_, copyright, \
 1201         NULL_)
 1202 
 1203 #define CDFgetDataTypeSize(dataType,numBytes) \
 1204 CDFlib (GET_, DATATYPE_SIZE_, dataType, numBytes, \
 1205         NULL_)
 1206 
 1207 #define CDFgetLibraryCopyright(copyright) \
 1208 CDFlib (GET_, LIB_COPYRIGHT_, copyright, \
 1209         NULL_)
 1210 
 1211 #define CDFgetLibraryVersion(version,release,increment,subincrement) \
 1212 CDFlib (GET_, LIB_VERSION_, version, \
 1213               LIB_RELEASE_, release, \
 1214               LIB_INCREMENT_, increment, \
 1215               LIB_subINCREMENT_, subincrement, \
 1216         NULL_)
 1217 
 1218 #define CDFgetVersion(id,version,release,increment) \
 1219 CDFlib (SELECT_, CDF_, id, \
 1220         GET_, CDF_VERSION_, version, \
 1221               CDF_RELEASE_, release, \
 1222               CDF_INCREMENT_, increment, \
 1223         NULL_)
 1224 
 1225 #define CDFgetVarBlockingFactor(id,zVar,varNum,bf) \
 1226 CDFlib (SELECT_, CDF_, id, \
 1227                  (zVar?zVAR_:rVAR_), varNum, \
 1228         GET_, (zVar?zVAR_BLOCKINGFACTOR_:rVAR_BLOCKINGFACTOR_), bf, \
 1229         NULL_)
 1230 
 1231 #define CDFgetVarCompression(id,zVar,varNum,cType,cParms,cPct) \
 1232 CDFlib (SELECT_, CDF_, id, \
 1233                  (zVar?zVAR_:rVAR_), varNum, \
 1234         GET_, (zVar?zVAR_COMPRESSION_:rVAR_COMPRESSION_), cType, cParms, cPct, \
 1235         NULL_)
 1236 
 1237 #define CDFgetVarData(id,zVar,varNum,recNum,indices,value) \
 1238 CDFlib (SELECT_, CDF_, id, \
 1239                  (zVar?zVAR_:rVAR_), varNum, \
 1240                  (zVar?zVAR_RECNUMBER_:rVARs_RECNUMBER_), recNum, \
 1241                  (zVar?zVAR_DIMINDICES_:rVARs_DIMINDICES_), indices, \
 1242         GET_, (zVar?zVAR_DATA_:rVAR_DATA_), value, \
 1243         NULL_)
 1244 
 1245 #define CDFgetVarDataType(id,zVar,varNum,dataType) \
 1246 CDFlib (SELECT_, CDF_, id, \
 1247                  (zVar?zVAR_:rVAR_), varNum, \
 1248         GET_, (zVar?zVAR_DATATYPE_:rVAR_DATATYPE_), dataType, \
 1249         NULL_)
 1250 
 1251 #define CDFgetVarDimVariances(id,zVar,varNum,dimVarys) \
 1252 CDFlib (SELECT_, CDF_, id, \
 1253                  (zVar?zVAR_:rVAR_), varNum, \
 1254         GET_, (zVar?zVAR_DIMVARYS_:rVAR_DIMVARYS_), dimVarys, \
 1255         NULL_)
 1256 
 1257 #define CDFgetVarMaxAllocRecNum(id,zVar,varNum,maxAllocRec) \
 1258 CDFlib (SELECT_, CDF_, id, \
 1259                  (zVar?zVAR_:rVAR_), varNum, \
 1260         GET_, (zVar?zVAR_MAXallocREC_:rVAR_MAXallocREC_), maxAllocRec, \
 1261         NULL_)
 1262 
 1263 #define CDFgetVarMaxWrittenRecNum(id,zVar,varNum,maxRec) \
 1264 CDFlib (SELECT_, CDF_, id, \
 1265                  (zVar?zVAR_:rVAR_), varNum, \
 1266         GET_, (zVar?zVAR_MAXREC_:rVAR_MAXREC_), maxRec, \
 1267         NULL_)
 1268 
 1269 #define CDFgetVarAllocRecords(id,zVar,varNum,numAllocRecs) \
 1270 CDFlib (SELECT_, CDF_, id, \
 1271                  (zVar?zVAR_:rVAR_), varNum, \
 1272         GET_, (zVar?zVAR_NUMallocRECS_:rVAR_NUMallocRECS_), numAllocRecs, \
 1273         NULL_)
 1274 
 1275 #define CDFgetVarNumElements(id,zVar,varNum,numElements) \
 1276 CDFlib (SELECT_, CDF_, id, \
 1277                  (zVar?zVAR_:rVAR_), varNum, \
 1278         GET_, (zVar?zVAR_NUMELEMS_:rVAR_NUMELEMS_), numElements, \
 1279         NULL_)
 1280 
 1281 #define CDFgetVarNumRecsWritten(id,zVar,varNum,numRecs) \
 1282 CDFlib (SELECT_, CDF_, id, \
 1283                  (zVar?zVAR_:rVAR_), varNum, \
 1284         GET_, (zVar?zVAR_NUMRECS_:rVAR_NUMRECS_), numRecs, \
 1285         NULL_)
 1286 
 1287 #define CDFgetVarPadValue(id,zVar,varNum,padValue) \
 1288 CDFlib (SELECT_, CDF_, id, \
 1289                  (zVar?zVAR_:rVAR_), varNum, \
 1290         GET_, (zVar?zVAR_PADVALUE_:rVAR_PADVALUE_), padValue, \
 1291         NULL_)
 1292 
 1293 #define CDFgetVarRecVariance(id,zVar,varNum,recVary) \
 1294 CDFlib (SELECT_, CDF_, id, \
 1295                  (zVar?zVAR_:rVAR_), varNum, \
 1296         GET_, (zVar?zVAR_RECVARY_:rVAR_RECVARY_), recVary, \
 1297         NULL_)
 1298 
 1299 #define CDFgetVarSeqData(id,zVar,varNum,seqData) \
 1300 CDFlib (SELECT_, CDF_, id, \
 1301                  (zVar?zVAR_:rVAR_), varNum, \
 1302         GET_, (zVar?zVAR_SEQDATA_:rVAR_SEQDATA_), seqData, \
 1303         NULL_)
 1304 
 1305 #define CDFgetVarsRecordDatabyNumbers(id,zVar,numVars,varNums,recNum,buffer) \
 1306 CDFlib (SELECT_, CDF_, id, \
 1307                  (zVar?zVARs_RECNUMBER_:rVARs_RECNUMBER_), recNum, \
 1308         GET_, (zVar?zVARs_RECDATA_:rVARs_RECDATA_), numVars, varNums, buffer, \
 1309         NULL_)
 1310 
 1311 #define CDFgetVarSparseRecords(id,zVar,varNum,sparseRecs) \
 1312 CDFlib (SELECT_, CDF_, id, \
 1313                  (zVar?zVAR_:rVAR_), varNum, \
 1314         GET_, (zVar?zVAR_SPARSERECORDS_:rVAR_SPARSERECORDS_), sparseRecs, \
 1315         NULL_)
 1316 
 1317 #define CDFgetrVarsDimSizes(id,dimSizes) \
 1318 CDFlib (SELECT_, CDF_, id, \
 1319         GET_, rVARs_DIMSIZES_, dimSizes, \
 1320         NULL_)
 1321 
 1322 #define CDFgetzVarDimSizes(id,varNum,dimSizes) \
 1323 CDFlib (SELECT_, CDF_, id, \
 1324                  zVAR_, varNum, \
 1325         GET_, zVAR_DIMSIZES_, dimSizes, \
 1326         NULL_)
 1327 
 1328 #define CDFgetVarName(id,zVar,varNum,varName) \
 1329 CDFlib (SELECT_, CDF_, id, \
 1330                  (zVar?zVAR_:rVAR_), varNum, \
 1331         GET_, (zVar?zVAR_NAME_:rVAR_NAME_), varName, \
 1332         NULL_)
 1333 
 1334 #define CDFgetzVarNumDims(id,varNum,numDims) \
 1335 CDFlib (SELECT_, CDF_, id, \
 1336                  zVAR_, varNum, \
 1337         GET_, zVAR_NUMDIMS_, numDims, \
 1338         NULL_)
 1339 
 1340 #define CDFgetrVarsNumDims(id,numDims) \
 1341 CDFlib (SELECT_, CDF_, id, \
 1342         GET_, rVARs_NUMDIMS_, numDims, \
 1343         NULL_)
 1344 
 1345 #define CDFgetStatusText(status,text) \
 1346 CDFlib (SELECT_, CDF_STATUS_, status, \
 1347         GET_, STATUS_TEXT_, text, \
 1348         NULL_)
 1349 
 1350 #define CDFhyperGetVarData(id,zVar,varN,recS,recC,recI,indices,counts,intervals,buff) \
 1351 CDFlib (SELECT_, CDF_, id, \
 1352                  (zVar?zVAR_:rVAR_), varN, \
 1353                  (zVar?zVAR_RECNUMBER_:rVARs_RECNUMBER_), recS, \
 1354                  (zVar?zVAR_RECCOUNT_:rVARs_RECCOUNT_), recC, \
 1355                  (zVar?zVAR_RECINTERVAL_:rVARs_RECINTERVAL_), recI, \
 1356                  (zVar?zVAR_DIMINDICES_:rVARs_DIMINDICES_), indices, \
 1357                  (zVar?zVAR_DIMCOUNTS_:rVARs_DIMCOUNTS_), counts, \
 1358                  (zVar?zVAR_DIMINTERVALS_:rVARs_DIMINTERVALS_), intervals, \
 1359         GET_, (zVar?zVAR_HYPERDATA_:rVAR_HYPERDATA_), buff, \
 1360         NULL_)
 1361 
 1362 #define CDFgetMaxWrittenRecNums(id,maxRecrVars,maxReczVars) \
 1363 CDFlib (SELECT_, CDF_, id, \
 1364         GET_, rVARs_MAXREC_, maxRecrVars, \
 1365               zVARs_MAXREC_, maxReczVars, \
 1366         NULL_)
 1367 
 1368 #define CDFgetVarsMaxWrittenRecNum(id,zVar,maxRecVar) \
 1369 CDFlib (SELECT_, CDF_, id, \
 1370         GET_, (zVar?zVARs_MAXREC_:rVARs_MAXREC_), maxRecVar, \
 1371         NULL_)
 1372 
 1373 #define CDFinquireVar(id,zVar,varN,varName,dataType,numElements,numDims,dimSizes,recVary,dimVarys) \
 1374 CDFlib (SELECT_, CDF_, id, \
 1375                  (zVar?zVAR_:rVAR_), varN, \
 1376         GET_, (zVar?zVAR_NAME_:rVAR_NAME_), varName, \
 1377               (zVar?zVAR_DATATYPE_:rVAR_DATATYPE_), dataType, \
 1378               (zVar?zVAR_NUMELEMS_:rVAR_NUMELEMS_), numElements, \
 1379               (zVar?zVAR_NUMDIMS_:rVARs_NUMDIMS_), numDims, \
 1380               (zVar?zVAR_DIMSIZES_:rVARs_DIMSIZES_), dimSizes, \
 1381               (zVar?zVAR_RECVARY_:rVAR_RECVARY_), recVary, \
 1382               (zVar?zVAR_DIMVARYS_:rVAR_DIMVARYS_), dimVarys, \
 1383         NULL_)
 1384 
 1385 #define CDFvarInquire(id,varN,varName,dataType,numElements,recVary,dimVarys) \
 1386 CDFlib (SELECT_, CDF_, id, \
 1387                  rVAR_, varN, \
 1388         GET_, rVAR_NAME_, varName, \
 1389               rVAR_DATATYPE_, dataType, \
 1390               rVAR_NUMELEMS_, numElements, \
 1391               rVAR_RECVARY_, recVary, \
 1392               rVAR_DIMVARYS_, dimVarys, \
 1393         NULL_)
 1394 #define CDFinquire(id,numDims,dimSizes,encoding,majority,maxRec,nVars,nAttrs) \
 1395 CDFlib (SELECT_, CDF_, id, \
 1396         GET_, rVARs_NUMDIMS_, numDims, \
 1397               rVARs_DIMSIZES_, dimSizes, \
 1398               CDF_ENCODING_, encoding, \
 1399               CDF_MAJORITY_, majority, \
 1400               rVARs_MAXREC_, maxRec, \
 1401               CDF_NUMrVARS_, nVars, \
 1402               CDF_NUMATTRS_, nAttrs, \
 1403         NULL_)
 1404 #define CDFinquireCDF(id,numDims,dimSizes,encoding,majority,maxrRec,nrVars,maxzRec,nzVars,nAttrs) \
 1405 CDFlib (SELECT_, CDF_, id, \
 1406         GET_, rVARs_NUMDIMS_, numDims, \
 1407               rVARs_DIMSIZES_, dimSizes, \
 1408               CDF_ENCODING_, encoding, \
 1409               CDF_MAJORITY_, majority, \
 1410               rVARs_MAXREC_, maxrRec, \
 1411               CDF_NUMrVARS_, nrVars, \
 1412               zVARs_MAXREC_, maxzRec, \
 1413               CDF_NUMzVARS_, nzVars, \
 1414               CDF_NUMATTRS_, nAttrs, \
 1415         NULL_)
 1416 
 1417 #define CDFgetChecksum(id,checksum) \
 1418 CDFlib (SELECT_, CDF_, id, \
 1419         GET_, CDF_CHECKSUM_, checksum, \
 1420         NULL_)
 1421 
 1422 /*
 1423  * OPEN_ *
 1424  *       */
 1425 
 1426 #define CDFopen(CDFname,id) \
 1427 CDFlib (OPEN_, CDF_, CDFname, id, \
 1428         NULL_)
 1429 
 1430 /*
 1431  * PUT_ *
 1432  *      */
 1433 
 1434 #define CDFsetAttrScope(id,attrNum,attrScope) \
 1435 CDFlib (SELECT_, CDF_, id, \
 1436                  ATTR_, attrNum, \
 1437         PUT_, ATTR_SCOPE_, attrScope, \
 1438         NULL_)
 1439 
 1440 #define CDFsetCompression(id,cType, cParms) \
 1441 CDFlib (SELECT_, CDF_, id, \
 1442         PUT_, CDF_COMPRESSION_, cType, cParms, \
 1443         NULL_)
 1444 
 1445 #define CDFsetEncoding(id,encoding) \
 1446 CDFlib (SELECT_, CDF_, id, \
 1447         PUT_, CDF_ENCODING_, encoding, \
 1448         NULL_)
 1449 
 1450 #define CDFsetFormat(id,format) \
 1451 CDFlib (SELECT_, CDF_, id, \
 1452         PUT_, CDF_FORMAT_, format, \
 1453         NULL_)
 1454 
 1455 #define CDFsetLeapSecondLastUpdated(id,lastUpdated) \
 1456 CDFlib (SELECT_, CDF_, id, \
 1457         PUT_, CDF_LEAPSECONDLASTUPDATED_, lastUpdated, \
 1458         NULL_)
 1459 
 1460 #define CDFsetMajority(id,majority) \
 1461 CDFlib (SELECT_, CDF_, id, \
 1462         PUT_, CDF_MAJORITY_, majority, \
 1463         NULL_)
 1464 
 1465 #define CDFrenameAttr(id,attrNum,attrName) \
 1466 CDFlib (SELECT_, CDF_, id, \
 1467          ATTR_, attrNum, \
 1468     PUT_, ATTR_NAME_, attrName, \
 1469     NULL_)
 1470 
 1471 #define CDFrenameVar(id,zVar,varNum,varName) \
 1472 CDFlib (SELECT_, CDF_, id, \
 1473          (zVar?zVAR_:rVAR_), varNum, \
 1474     PUT_, (zVar?zVAR_NAME_:rVAR_NAME_), varName, \
 1475     NULL_)
 1476 
 1477 #define CDFsetVarAllocRecords(id,zVar,varNum,allocRecs) \
 1478 CDFlib (SELECT_, CDF_, id, \
 1479                  (zVar?zVAR_:rVAR_), varNum, \
 1480         PUT_, (zVar?zVAR_ALLOCATERECS_:rVAR_ALLOCATERECS_), allocRecs, \
 1481         NULL_)
 1482 
 1483 #define CDFsetVarAllocBlockRecords(id,zVar,varNum,firstRec, lastRec) \
 1484 CDFlib (SELECT_, CDF_, id, \
 1485                  (zVar?zVAR_:rVAR_), varNum, \
 1486         PUT_, (zVar?zVAR_ALLOCATEBLOCK_:rVAR_ALLOCATEBLOCK_), firstRec, \
 1487                                                               lastRec, \
 1488         NULL_)
 1489 
 1490 #define CDFsetVarBlockingFactor(id,zVar,varNum,bf) \
 1491 CDFlib (SELECT_, CDF_, id, \
 1492                  (zVar?zVAR_:rVAR_), varNum, \
 1493         PUT_, (zVar?zVAR_BLOCKINGFACTOR_:rVAR_BLOCKINGFACTOR_), bf, \
 1494         NULL_)
 1495 
 1496 #define CDFsetVarCompression(id,zVar,varNum,cType,cParms) \
 1497 CDFlib (SELECT_, CDF_, id, \
 1498                  (zVar?zVAR_:rVAR_), varNum, \
 1499         PUT_, (zVar?zVAR_COMPRESSION_:rVAR_COMPRESSION_), cType, cParms, \
 1500         NULL_)
 1501 
 1502 #define CDFsetVarDataSpec(id,zVar,varNum,dataType,numElems) \
 1503 CDFlib (SELECT_, CDF_, id, \
 1504                  (zVar?zVAR_:rVAR_), varNum, \
 1505         PUT_, (zVar?zVAR_DATASPEC_:rVAR_DATASPEC_), dataType, numElems, \
 1506         NULL_)
 1507 
 1508 #define CDFsetVarDimVariances(id,zVar,varNum,dimVarys) \
 1509 CDFlib (SELECT_, CDF_, id, \
 1510                  (zVar?zVAR_:rVAR_), varNum, \
 1511         PUT_, (zVar?zVAR_DIMVARYS_:rVAR_DIMVARYS_), dimVarys, \
 1512         NULL_)
 1513 
 1514 #define CDFsetVarInitialRecs(id,zVar,varNum,numRecs) \
 1515 CDFlib (SELECT_, CDF_, id, \
 1516                  (zVar?zVAR_:rVAR_), varNum, \
 1517         PUT_, (zVar?zVAR_INITIALRECS_:rVAR_INITIALRECS_), numRecs, \
 1518         NULL_)
 1519 
 1520 #define CDFsetVarPadValue(id,zVar,varNum,padValue) \
 1521 CDFlib (SELECT_, CDF_, id, \
 1522                 (zVar?zVAR_:rVAR_), varNum, \
 1523         PUT_, (zVar?zVAR_PADVALUE_:rVAR_PADVALUE_), padValue, \
 1524         NULL_)
 1525 
 1526 #define CDFsetVarRecVariance(id,zVar,varNum,recVary) \
 1527 CDFlib (SELECT_, CDF_, id, \
 1528                  (zVar?zVAR_:rVAR_), varNum, \
 1529         PUT_, (zVar?zVAR_RECVARY_:rVAR_RECVARY_), recVary, \
 1530         NULL_)
 1531 
 1532 #define CDFputVarSeqData(id,zVar,varNum,seqData) \
 1533 CDFlib (SELECT_, CDF_, id, \
 1534                  (zVar?zVAR_:rVAR_), varNum, \
 1535         PUT_, (zVar?zVAR_SEQDATA_:rVAR_SEQDATA_), seqData, \
 1536         NULL_)
 1537 
 1538 #define CDFsetVarSparseRecords(id,zVar,varNum,sparseRecs) \
 1539 CDFlib (SELECT_, CDF_, id, \
 1540                  (zVar?zVAR_:rVAR_), varNum, \
 1541         PUT_, (zVar?zVAR_SPARSERECORDS_:rVAR_SPARSERECORDS_), sparseRecs, \
 1542         NULL_)
 1543 
 1544 #define CDFputVarData(id,zVar,varNum,recNum,indices,value) \
 1545 CDFlib (SELECT_, CDF_, id, \
 1546                  (zVar?zVAR_:rVAR_), varNum, \
 1547                  (zVar?zVAR_RECNUMBER_:rVARs_RECNUMBER_), recNum, \
 1548                  (zVar?zVAR_DIMINDICES_:rVARs_DIMINDICES_), indices, \
 1549         PUT_, (zVar?zVAR_DATA_:rVAR_DATA_), value, \
 1550         NULL_)
 1551 
 1552 #define CDFputVarsRecordDatabyNumbers(id,zVar,numVars,varNums,recNum,buffer) \
 1553 CDFlib (SELECT_, CDF_, id, \
 1554                  (zVar?zVARs_RECNUMBER_:rVARs_RECNUMBER_), recNum, \
 1555         PUT_, (zVar?zVARs_RECDATA_:rVARs_RECDATA_), numVars, varNums, buffer, \
 1556         NULL_)
 1557 
 1558 #define CDFhyperPutVarData(id,zVar,varN,recS,recC,recI,indices,counts,intervals,buff) \
 1559 CDFlib (SELECT_, CDF_, id, \
 1560          (zVar?zVAR_:rVAR_), varN, \
 1561          (zVar?zVAR_RECNUMBER_:rVARs_RECNUMBER_), recS, \
 1562          (zVar?zVAR_RECCOUNT_:rVARs_RECCOUNT_), recC, \
 1563          (zVar?zVAR_RECINTERVAL_:rVARs_RECINTERVAL_), recI, \
 1564          (zVar?zVAR_DIMINDICES_:rVARs_DIMINDICES_), indices, \
 1565          (zVar?zVAR_DIMCOUNTS_:rVARs_DIMCOUNTS_), counts, \
 1566          (zVar?zVAR_DIMINTERVALS_:rVARs_DIMINTERVALS_), intervals, \
 1567     PUT_, (zVar?zVAR_HYPERDATA_:rVAR_HYPERDATA_), buff, \
 1568     NULL_)
 1569 
 1570 #define CDFsetChecksum(id,checksum) \
 1571 CDFlib (SELECT_, CDF_, id, \
 1572         PUT_, CDF_CHECKSUM_, checksum, \
 1573         NULL_)
 1574 
 1575 /*
 1576  * SELECT_ *
 1577  *         */
 1578 
 1579 #define CDFselect(id) \
 1580 CDFlib (SELECT_, CDF_, id, \
 1581         NULL_)
 1582 
 1583 #define CDFsetDecoding(id,decoding) \
 1584 CDFlib (SELECT_, CDF_, id, \
 1585                  CDF_DECODING_, decoding, \
 1586         NULL_)
 1587 
 1588 #define CDFsetCacheSize(id,numBuffers) \
 1589 CDFlib (SELECT_, CDF_, id, \
 1590                  CDF_CACHESIZE_, numBuffers, \
 1591         NULL_)
 1592 
 1593 #define CDFsetVarCacheSize(id,zVar,varNum,numBuffers) \
 1594 CDFlib (SELECT_, CDF_, id, \
 1595                  (zVar?zVAR_:rVAR_), varNum, \
 1596                  (zVar?zVAR_CACHESIZE_:rVAR_CACHESIZE_), numBuffers, \
 1597         NULL_)
 1598 
 1599 #define CDFsetVarsCacheSize(id,zVar,numBuffers) \
 1600 CDFlib (SELECT_, CDF_, id, \
 1601                  (zVar?zVARs_CACHESIZE_:rVARs_CACHESIZE_), numBuffers, \
 1602         NULL_)
 1603 
 1604 #define CDFsetVarSeqPos(id,zVar,varNum,recNum,indices) \
 1605 CDFlib (SELECT_, CDF_, id, \
 1606                  (zVar?zVAR_:rVAR_), varNum, \
 1607                  (zVar?zVAR_SEQPOS_:rVAR_SEQPOS_), recNum, indices, \
 1608         NULL_)
 1609 
 1610 #define CDFsetNegtoPosfp0Mode(id,negtoPosfp0) \
 1611 CDFlib (SELECT_, CDF_, id, \
 1612                  CDF_NEGtoPOSfp0_MODE_, negtoPosfp0, \
 1613         NULL_)
 1614 
 1615 #define CDFsetReadOnlyMode(id,readOnlyMode) \
 1616 CDFlib (SELECT_, CDF_, id, \
 1617                  CDF_READONLY_MODE_, readOnlyMode, \
 1618         NULL_)
 1619 
 1620 #define CDFsetVarReservePercent(id,zVar,varNum,percent) \
 1621 CDFlib (SELECT_, CDF_, id, \
 1622                  (zVar?zVAR_:rVAR_), varNum, \
 1623                  (zVar?zVAR_RESERVEPERCENT_:rVAR_RESERVEPERCENT_), percent, \
 1624         NULL_)
 1625 
 1626 #define CDFsetCompressionCacheSize(id,numBuffers) \
 1627 CDFlib (SELECT_, CDF_, id, \
 1628                  COMPRESS_CACHESIZE_, numBuffers, \
 1629         NULL_)
 1630 
 1631 #define CDFsetStageCacheSize(id,numBuffers) \
 1632 CDFlib (SELECT_, CDF_, id, \
 1633                  STAGE_CACHESIZE_, numBuffers, \
 1634         NULL_)
 1635 
 1636 #define CDFsetzMode(id,zMode) \
 1637 CDFlib (SELECT_, CDF_, id, \
 1638                  CDF_zMODE_, zMode, \
 1639         NULL_)
 1640 
 1641 /******************************************************************************
 1642 * TT2000 macros define'd
 1643 ******************************************************************************/
 1644 #define CDF_TT2000_from_UTC_string parseTT2000
 1645 #define CDF_TT2000_to_UTC_string encodeTT2000
 1646 #define CDF_TT2000_from_UTC_parts computeTT2000
 1647 #define CDF_TT2000_to_UTC_parts breakdownTT2000
 1648 
 1649 #define TT2000breakdown breakdownTT2000
 1650 
 1651 /******************************************************************************
 1652 * Function prototypes.
 1653 *     It is assumed that `__cplusplus' is defined for ALL C++ compilers.  If
 1654 * ANSI function prototypes are not desired (for whatever reason), define
 1655 * noPROTOs on the compile command line.  Otherwise, ANSI function prototypes
 1656 * will be used where appropriate.
 1657 ******************************************************************************/
 1658 
 1659 #if !defined(noPROTOs)
 1660 #  if defined(__STDC__)
 1661 #    define PROTOs_
 1662 #  else
 1663 #    if defined(vms)
 1664 #      define PROTOs_
 1665 #    endif
 1666 #    if defined(__MSDOS__) || defined(MSDOS)
 1667 #      define PROTOs_
 1668 #    endif
 1669 #    if defined(macintosh) || defined(THINK_C)
 1670 #      define PROTOs_
 1671 #    endif
 1672 #    if defined(WIN32)
 1673 #      define PROTOs_
 1674 #    endif
 1675 #    if defined(AIX)
 1676 #      define PROTOs_
 1677 #    endif
 1678 #  endif
 1679 #endif
 1680 
 1681 #if defined(PROTOs_)
 1682 #  define PROTOARGs(args) args
 1683 #else
 1684 #  define PROTOARGs(args) ()
 1685 #endif
 1686 
 1687 #if defined(BUILDINGforIDL)
 1688 #  define STATICforIDL static
 1689 #  define VISIBLE_PREFIX static
 1690 #else
 1691 #  if defined(WIN32) && defined(BUILDINGforDLL)
 1692 #    if defined(LIBCDF_SOURCE_)
 1693 #      define VISIBLE_PREFIX _declspec(dllexport)
 1694 #    else
 1695 #      define VISIBLE_PREFIX _declspec(dllimport)
 1696 #    endif
 1697 #  else
 1698 #    define VISIBLE_PREFIX \
 1699 
 1700 #  endif
 1701 #  define STATICforIDL \
 1702 
 1703 #endif
 1704 
 1705 #if defined(__cplusplus)
 1706 extern "C" {
 1707 #endif
 1708 
 1709 #if defined(BUILDINGforIDL)
 1710 /* Isn't a prototype needed? */
 1711 #else
 1712 #if !defined(__CFM68K__) || defined(__USING_STATIC_LIBS__) || !defined(CFM68KDLL)
 1713 VISIBLE_PREFIX CDFstatus CDFlib PROTOARGs((long op1, ...));
 1714 #endif
 1715 #endif
 1716 VISIBLE_PREFIX CDFstatus CDFcreateCDF PROTOARGs((
 1717   char *name, CDFid *id
 1718 ));
 1719 VISIBLE_PREFIX CDFstatus CDFattrInquire PROTOARGs((
 1720   CDFid id, long attrNum, char *attrName, long *attrScope,
 1721   long *maxgrEntry
 1722 )); 
 1723 VISIBLE_PREFIX CDFstatus CDFinquireAttr PROTOARGs((
 1724   CDFid id, long attrNum, char *attrName, long *attrScope,
 1725   long *maxgEntry, long *maxrEntry, long *maxzEntry
 1726 ));
 1727 VISIBLE_PREFIX CDFstatus CDFinquireAttrEntry PROTOARGs((
 1728   CDFid id, int grzEntry, long attrNum, long entryNum, long *dataType,
 1729   long *numElems
 1730 ));
 1731 VISIBLE_PREFIX CDFstatus CDFinquireAttrInfo PROTOARGs((
 1732   CDFid id, int zEntry, long attrNum, char *attrName, long *attrScope,
 1733   long *maxEntry
 1734 ));
 1735 VISIBLE_PREFIX CDFstatus CDFputAttrEntry PROTOARGs((
 1736   CDFid id, int grzEntry, long attrNum, long entryNum, long dataType,
 1737   long numElems, void *value
 1738 ));
 1739 VISIBLE_PREFIX CDFstatus CDFgetAttrEntry PROTOARGs((
 1740   CDFid id, int grzEntry, long attrNum, long entryNum, void *value
 1741 ));
 1742 VISIBLE_PREFIX CDFstatus CDFgetAttrEntryNumStrings PROTOARGs((
 1743   CDFid id, int rzEntry, long attrNum, long entryNum, 
 1744   long *numStrings
 1745 ));
 1746 VISIBLE_PREFIX CDFstatus CDFgetAttrEntryStrings PROTOARGs((
 1747   CDFid id, int rzEntry, long attrNum, long entryNum, 
 1748   long *numStrings, char ***strings
 1749 ));
 1750 VISIBLE_PREFIX CDFstatus CDFputAttrEntryStrings PROTOARGs((
 1751   CDFid id, int rzEntry, long attrNum, long entryNum, 
 1752   long numStrings, char **strings
 1753 ));
 1754 VISIBLE_PREFIX void CDFdataFree PROTOARGs((CDFdata value));
 1755 VISIBLE_PREFIX CDFstatus CDFreadgAttrEntry PROTOARGs((
 1756   CDFid id, long attrNum, long entryNum, long *dataType, long *numElms,
 1757   CDFdata *value
 1758 ));
 1759 VISIBLE_PREFIX CDFstatus CDFreadzAttrEntry PROTOARGs((
 1760   CDFid id, long attrNum, long entryNum, long *dataType, long *numElms,
 1761   CDFdata *value
 1762 ));
 1763 VISIBLE_PREFIX CDFstatus CDFdeleteAttrEntry PROTOARGs((
 1764   CDFid id, int grzEntry, long attrNum, long entryNum
 1765 ));
 1766 VISIBLE_PREFIX CDFstatus CDFsetAttrEntryDataSpec PROTOARGs((
 1767   CDFid id, int grzEntry, long attrNum, long entryNum, long dataType,
 1768   long numElems
 1769 ));
 1770 VISIBLE_PREFIX long CDFgetAttrNum PROTOARGs((CDFid id, char *attrName));
 1771 VISIBLE_PREFIX long CDFgetVarNum PROTOARGs((CDFid id, char *varName));
 1772 VISIBLE_PREFIX CDFstatus CDFgetNumAttrEntries PROTOARGs((
 1773   CDFid id, int grzEntry, long attrNum, long *numEntries
 1774 ));
 1775 VISIBLE_PREFIX CDFstatus CDFgetAttrMaxEntry PROTOARGs((
 1776   CDFid id, int grzEntry, long attrNum, long *maxEntry
 1777 ));
 1778 VISIBLE_PREFIX CDFstatus CDFgetAttrEntryDataType PROTOARGs((
 1779   CDFid id, int grzEntry, long attrNum, long entryNum, long *dataType
 1780 ));
 1781 VISIBLE_PREFIX CDFstatus CDFgetAttrEntryNumElements PROTOARGs((
 1782   CDFid id, int grzEntry, long attrNum, long entryNum, long *numElements
 1783 ));
 1784 VISIBLE_PREFIX CDFstatus CDFgetVarRecordData PROTOARGs((
 1785   CDFid id, int zVar, long varNum, long recNum, void *buffer
 1786 ));
 1787 VISIBLE_PREFIX CDFstatus CDFputVarRecordData PROTOARGs((
 1788   CDFid id, int zVar, long varNum, long recNum, void *buffer
 1789 ));
 1790 VISIBLE_PREFIX CDFstatus CDFgetVarsRecordDatabyNames PROTOARGs((
 1791   CDFid id, int zVar, long numVars, char *varNames[], long recNum,
 1792   void *buffer[]
 1793 ));
 1794 VISIBLE_PREFIX CDFstatus CDFputVarsRecordDatabyNames PROTOARGs((
 1795   CDFid id, int zVar, long numVars, char *varNames[], long recNum,
 1796   void *buffer[]
 1797 ));
 1798 VISIBLE_PREFIX CDFstatus CDFgetVarAllRecordsByVarID PROTOARGs((
 1799   CDFid id, int zVar, long varNum, void *buffer
 1800 ));
 1801 VISIBLE_PREFIX CDFstatus CDFgetzVarSpec PROTOARGs((
 1802   CDFid id, long varNum, long *dataType, long *numElems,
 1803   long *numDims, long *dimSizes, long *recVary, long *dimsVary 
 1804 ));
 1805 VISIBLE_PREFIX CDFstatus CDFreadzVarPadValue PROTOARGs((
 1806   CDFid id, long varNum, long *dataType, long *numElms, CDFdata *buffer
 1807 ));
 1808 VISIBLE_PREFIX CDFstatus CDFreadzVarAllByVarID PROTOARGs((
 1809   CDFid id, long varNum, long *numRecs, long *dataType, long *numElems,
 1810   long *numDims, long *dimSizes, long *recVary, long *dimsVary, 
 1811   CDFdata *buffer
 1812 ));
 1813 VISIBLE_PREFIX CDFstatus CDFreadzVarDataByVarID PROTOARGs((
 1814   CDFid id, long varNum, long *numRecs, CDFdata *buffer
 1815 ));
 1816 VISIBLE_PREFIX CDFstatus CDFreadzVarRangeDataByVarID PROTOARGs((
 1817   CDFid id, long varNum, long strNum, long stpNum, CDFdata *buffer
 1818 ));
 1819 VISIBLE_PREFIX CDFstatus CDFputVarAllRecordsByVarID PROTOARGs((
 1820   CDFid id, int zVar, long varNum, long numRec, void *buffer
 1821 ));
 1822 VISIBLE_PREFIX CDFstatus CDFgetVarRangeRecordsByVarID PROTOARGs((
 1823   CDFid id, int zVar, long varNum, long startRec, long stopRec,
 1824   void *buffer
 1825 ));
 1826 VISIBLE_PREFIX CDFstatus CDFputVarRangeRecordsByVarID PROTOARGs((
 1827   CDFid id, int zVar, long varNum, long startRec, long stopRec,
 1828   void *buffer
 1829 ));
 1830 VISIBLE_PREFIX CDFstatus CDFgetVarAllRecordsByVarName PROTOARGs((
 1831   CDFid id, char *varName, void *buffer
 1832 ));
 1833 VISIBLE_PREFIX CDFstatus CDFreadzVarAllByVarName PROTOARGs((
 1834   CDFid id, char *varName, long *numRecs, long *dataType, long *numElems,
 1835   long *numDims, long *dimSizes, long *recVary, long *dimsVary, 
 1836   CDFdata *buffer
 1837 ));
 1838 VISIBLE_PREFIX CDFstatus CDFreadzVarDataByVarName PROTOARGs((
 1839   CDFid id, char *varName, long *numRecs, CDFdata *buffer
 1840 ));
 1841 VISIBLE_PREFIX CDFstatus CDFreadzVarRangeDataByVarName PROTOARGs((
 1842   CDFid id, char *varName, long strNum, long stpNum, CDFdata *buffer
 1843 ));
 1844 VISIBLE_PREFIX CDFstatus CDFputVarAllRecordsByVarName PROTOARGs((
 1845   CDFid id, char *varName, long numRecs, void *buffer
 1846 ));
 1847 VISIBLE_PREFIX CDFstatus CDFgetVarRangeRecordsByVarName PROTOARGs((
 1848   CDFid id, char *varName, long startRec, long stopRec, void *buffer
 1849 ));
 1850 VISIBLE_PREFIX CDFstatus CDFputVarRangeRecordsByVarName PROTOARGs((
 1851   CDFid id, char *varName, long startRec, long stopRec, void *buffer
 1852 ));
 1853 VISIBLE_PREFIX CDFstatus CDFinsertVarRecordsByVarID PROTOARGs((
 1854   CDFid id, int zVar, long varNum, long startRec,long numRecs,
 1855   void *buffer
 1856 ));
 1857 VISIBLE_PREFIX CDFstatus CDFinsertVarRecordsByVarName PROTOARGs((
 1858   CDFid id, char *varName, long startRec, long numRecs, void *buffer
 1859 ));
 1860 VISIBLE_PREFIX CDFstatus CDFdeleteRecordsForAll PROTOARGs((
 1861   CDFid id, long startRec, long endRec
 1862 ));
 1863 VISIBLE_PREFIX void CDFsetFileBackward PROTOARGs((
 1864   int flag
 1865 ));
 1866 VISIBLE_PREFIX void CDFsetFileBackwardFlag PROTOARGs((
 1867   int flag
 1868 ));
 1869 VISIBLE_PREFIX int CDFgetFileBackward PROTOARGs(());
 1870 VISIBLE_PREFIX int CDFgetFileBackwardFlag PROTOARGs(());
 1871 VISIBLE_PREFIX void CDFsetChecksumMode PROTOARGs((
 1872   long flag
 1873 ));
 1874 VISIBLE_PREFIX long CDFgetChecksumMode PROTOARGs(());
 1875 VISIBLE_PREFIX int CDFgetFileBackwardEnvVar PROTOARGs(());
 1876 VISIBLE_PREFIX void CDFsetValidate PROTOARGs((long mode));
 1877 VISIBLE_PREFIX int CDFgetValidate PROTOARGs(());
 1878 VISIBLE_PREFIX int CDFgetValidateDebug PROTOARGs(());
 1879 VISIBLE_PREFIX void ROWtoCOL PROTOARGs((
 1880   void *iBuffer, void *oBuffer, long numDims, long dimSizes[], long nValueBytes
 1881 ));
 1882 VISIBLE_PREFIX int CDFelemSize PROTOARGs((long));
 1883 VISIBLE_PREFIX void COLtoROW PROTOARGs((
 1884   void *iBuffer, void *oBuffer, long numDims, long dimSizes[], long nValueBytes
 1885 ));
 1886 VISIBLE_PREFIX int CDFstrcmpIgCase PROTOARGs((char *string1, char *string2));
 1887 VISIBLE_PREFIX char *CDFstrstrIgCase PROTOARGs((char *string1, char *string2));
 1888 VISIBLE_PREFIX void StringBreakIntoStrings PROTOARGs((
 1889 char *string, long numElms, long numStrs, char ***strings
 1890 ));
 1891 
 1892 #if !defined(__CFM68K__) || defined(__USING_STATIC_LIBS__) || !defined(CFM68KDLL)
 1893 VISIBLE_PREFIX void EPOCHbreakdown PROTOARGs((
 1894   double epoch, long *year, long *month, long *day, long *hour, long *minute,
 1895   long *second, long *msec
 1896 ));
 1897 VISIBLE_PREFIX double computeEPOCH PROTOARGs((
 1898   long year, long month, long day, long hour, long minute, long second,
 1899   long msec
 1900 ));
 1901 VISIBLE_PREFIX double toParseEPOCH PROTOARGs((char *inString));
 1902 VISIBLE_PREFIX double parseEPOCH PROTOARGs((char *inString));
 1903 VISIBLE_PREFIX double parseEPOCH1 PROTOARGs((char *inString));
 1904 VISIBLE_PREFIX double parseEPOCH2 PROTOARGs((char *inString));
 1905 VISIBLE_PREFIX double parseEPOCH3 PROTOARGs((char *inString));
 1906 VISIBLE_PREFIX double parseEPOCH4 PROTOARGs((char *inString));
 1907 VISIBLE_PREFIX void   toEncodeEPOCH PROTOARGs((
 1908   double epoch, int style, char *epString
 1909 ));
 1910 VISIBLE_PREFIX void   encodeEPOCH PROTOARGs((
 1911   double epoch, char epString[EPOCH_STRING_LEN+1]
 1912 ));
 1913 VISIBLE_PREFIX void   encodeEPOCH1 PROTOARGs((
 1914   double epoch, char epString[EPOCH1_STRING_LEN+1]
 1915 ));
 1916 VISIBLE_PREFIX void   encodeEPOCH2 PROTOARGs((
 1917   double epoch, char epString[EPOCH2_STRING_LEN+1]
 1918 ));
 1919 VISIBLE_PREFIX void   encodeEPOCH3 PROTOARGs((
 1920   double epoch, char epString[EPOCH3_STRING_LEN+1]
 1921 ));
 1922 VISIBLE_PREFIX void   encodeEPOCH4 PROTOARGs((
 1923   double epoch, char epString[EPOCH4_STRING_LEN+1]
 1924 ));
 1925 VISIBLE_PREFIX void   encodeEPOCHx PROTOARGs((
 1926   double epoch, char format[EPOCHx_FORMAT_MAX],
 1927   char encoded[EPOCHx_STRING_MAX]
 1928 ));
 1929 VISIBLE_PREFIX void EPOCHtoUnixTime PROTOARGs((
 1930   double *epoch,
 1931   double *unitTime,
 1932   int    numTimes
 1933 ));
 1934 VISIBLE_PREFIX void UnixTimetoEPOCH PROTOARGs((
 1935   double *unitTime,
 1936   double *epoch,
 1937   int    numTimes
 1938 ));
 1939 VISIBLE_PREFIX void   EPOCH16breakdown PROTOARGs((
 1940   double *epoch, long *year, long *month, long *day, long *hour,
 1941   long *minute, long *second, long *msec, long *usec, long *nsec, long *psec
 1942 ));
 1943 VISIBLE_PREFIX double computeEPOCH16 PROTOARGs((
 1944   long year, long month, long day, long hour, long minute, long second,
 1945   long msec, long usec, long nsec, long psec, double *epoch
 1946 ));
 1947 VISIBLE_PREFIX double toParseEPOCH16 PROTOARGs((char *inString,
 1948   double *epoch
 1949 ));
 1950 VISIBLE_PREFIX double parseEPOCH16 PROTOARGs((char *inString,
 1951   double *epoch
 1952 ));
 1953 VISIBLE_PREFIX double parseEPOCH16_1 PROTOARGs((char *inStringch,
 1954   double *epoch
 1955 ));
 1956 VISIBLE_PREFIX double parseEPOCH16_2 PROTOARGs((char *inStringch,
 1957   double *epoch
 1958 ));
 1959 VISIBLE_PREFIX double parseEPOCH16_3 PROTOARGs((char *inStringch,
 1960   double *epoch
 1961 ));
 1962 VISIBLE_PREFIX double parseEPOCH16_4 PROTOARGs((char *inStringch,
 1963   double *epoch
 1964 ));
 1965 VISIBLE_PREFIX void   toEncodeEPOCH16 PROTOARGs((
 1966   double *epoch, int style, char *epString
 1967 ));
 1968 VISIBLE_PREFIX void   encodeEPOCH16 PROTOARGs((
 1969   double *epoch, char epString[EPOCH16_STRING_LEN+1]
 1970 ));
 1971 VISIBLE_PREFIX void   encodeEPOCH16_1 PROTOARGs((
 1972   double *epoch, char epString[EPOCH16_1_STRING_LEN+1]
 1973 ));
 1974 VISIBLE_PREFIX void   encodeEPOCH16_2 PROTOARGs((
 1975   double *epoch, char epString[EPOCH16_2_STRING_LEN+1]
 1976 ));
 1977 VISIBLE_PREFIX void   encodeEPOCH16_3 PROTOARGs((
 1978   double *epoch, char epString[EPOCH16_3_STRING_LEN+1]
 1979 ));
 1980 VISIBLE_PREFIX void   encodeEPOCH16_4 PROTOARGs((
 1981   double *epoch, char epString[EPOCH16_4_STRING_LEN+1]
 1982 ));
 1983 VISIBLE_PREFIX void   encodeEPOCH16_x PROTOARGs((
 1984   double *epoch, char format[EPOCHx_FORMAT_MAX],
 1985   char encoded[EPOCHx_STRING_MAX]
 1986 ));
 1987 VISIBLE_PREFIX void EPOCH16toUnixTime PROTOARGs((
 1988   double *epoch,
 1989   double *unixTime,
 1990   int    numTimes
 1991 ));
 1992 VISIBLE_PREFIX void UnixTimetoEPOCH16 PROTOARGs((
 1993   double *unixTime,
 1994   double *epoch,
 1995   int    numTimes
 1996 ));
 1997 /******************************************************************************
 1998 * A new set of functions to handle CDF_TIME_TT2000 time type.
 1999 ******************************************************************************/
 2000 VISIBLE_PREFIX void breakdownTT2000 PROTOARGs((
 2001   long long tt2000, double *year, double *month, double *day, ...
 2002 ));
 2003 VISIBLE_PREFIX long long computeTT2000 PROTOARGs((
 2004   double year, double month, double day, ...
 2005 ));
 2006 VISIBLE_PREFIX double CDF_TT2000_to_UTC_EPOCH PROTOARGs((
 2007   long long time
 2008 ));
 2009 VISIBLE_PREFIX long long CDF_TT2000_from_UTC_EPOCH PROTOARGs((
 2010   double epoch
 2011 ));
 2012 VISIBLE_PREFIX double CDF_TT2000_to_UTC_EPOCH16 PROTOARGs((
 2013   long long time, double *epoch16
 2014 ));
 2015 VISIBLE_PREFIX long long CDF_TT2000_from_UTC_EPOCH16 PROTOARGs((
 2016   double *epoch16
 2017 ));
 2018 VISIBLE_PREFIX void toEncodeTT2000 PROTOARGs((
 2019   long long time, int style, char *string
 2020 ));
 2021 VISIBLE_PREFIX void encodeTT2000 PROTOARGs((
 2022   long long time, char *string, ...
 2023 ));
 2024 VISIBLE_PREFIX long long toParseTT2000 PROTOARGs((
 2025   char *string
 2026 ));
 2027 VISIBLE_PREFIX long long parseTT2000 PROTOARGs((
 2028   char *string
 2029 ));
 2030 VISIBLE_PREFIX long long computeTT2000withBasedLeapDay PROTOARGs((
 2031   long yy, long mm, long dd, long hh, long mn, long ss, long ms,
 2032   long us, long ns, int yymmdd
 2033 ));
 2034 VISIBLE_PREFIX void breakdownTT2000withBasedLeapDay PROTOARGs((
 2035   long long tt2000, int yymmdd, 
 2036   long *yy, long *mm, long *dd, long *hh, long *mn, long *ss,
 2037   long *ms, long *us, long *ns
 2038 ));
 2039 VISIBLE_PREFIX long long parseTT2000withBasedLeapDay PROTOARGs((
 2040   char *tt2000, int yymmdd
 2041 ));
 2042 VISIBLE_PREFIX void encodeTT2000withBasedLeapDay PROTOARGs((
 2043   long long tt2000,
 2044   int yymmdd,
 2045   char *string
 2046 ));
 2047 VISIBLE_PREFIX void TT2000toUnixTime PROTOARGs((
 2048   long long *epoch,
 2049   double *unixTime,
 2050   int    numTimes
 2051 ));
 2052 VISIBLE_PREFIX void UnixTimetoTT2000 PROTOARGs((
 2053   double *unixTime,
 2054   long long *epoch,
 2055   int    numTimes
 2056 ));
 2057 VISIBLE_PREFIX void CDFClearLeapSecondsTable PROTOARGs(());
 2058 VISIBLE_PREFIX void CDFfillLeapSecondsTable PROTOARGs((
 2059   double **table
 2060 ));
 2061 VISIBLE_PREFIX int CDFgetRowsinLeapSecondsTable PROTOARGs(());
 2062 #if defined(vms)
 2063 VISIBLE_PREFIX void CDFgetLastDateinLeapSecondsTBL PROTOARGs((
 2064   long *year, long *month, long *day
 2065 ));
 2066 #else
 2067 VISIBLE_PREFIX void CDFgetLastDateinLeapSecondsTable PROTOARGs((
 2068   long *year, long *month, long *day
 2069 ));
 2070 #endif
 2071 VISIBLE_PREFIX char *CDFgetLeapSecondsTableEnvVar PROTOARGs(());
 2072 VISIBLE_PREFIX int CDFgetLeapSecondsTableStatus PROTOARGs(());
 2073 #endif
 2074 VISIBLE_PREFIX void CDF_Free_String PROTOARGs((
 2075   long numStrings, char **strings
 2076 ));
 2077 VISIBLE_PREFIX long FindNumberOfItems PROTOARGs((
 2078   char *string, long numElems, char *delimiter
 2079 ));
 2080 #if defined(__cplusplus)
 2081 }
 2082 #endif
 2083 
 2084 /******************************************************************************
 2085 * Synonyms for compatibility with older releases.
 2086 ******************************************************************************/
 2087 
 2088 #define CDF_DOCUMENT_LEN            CDF_COPYRIGHT_LEN
 2089 #define CDF_ERRTEXT_LEN             CDF_STATUSTEXT_LEN
 2090 #define CDF_NUMDIMS_                rVARs_NUMDIMS_
 2091 #define CDF_DIMSIZES_               rVARs_DIMSIZES_
 2092 #define CDF_MAXREC_                 rVARs_MAXREC_
 2093 #define CDF_RECNUMBER_              rVARs_RECNUMBER_
 2094 #define CDF_RECCOUNT_               rVARs_RECCOUNT_
 2095 #define CDF_RECINTERVAL_            rVARs_RECINTERVAL_
 2096 #define CDF_DIMINDICES_             rVARs_DIMINDICES_
 2097 #define CDF_DIMCOUNTS_              rVARs_DIMCOUNTS_
 2098 #define CDF_DIMINTERVALS_           rVARs_DIMINTERVALS_
 2099 #define CDF_NUMVARS_                CDF_NUMrVARS_
 2100 #define VAR_                        rVAR_
 2101 #define VAR_NAME_                   rVAR_NAME_
 2102 #define VAR_DATATYPE_               rVAR_DATATYPE_
 2103 #define VAR_NUMELEMS_               rVAR_NUMELEMS_
 2104 #define VAR_RECVARY_                rVAR_RECVARY_
 2105 #define VAR_DIMVARYS_               rVAR_DIMVARYS_
 2106 #define VAR_NUMBER_                 rVAR_NUMBER_
 2107 #define VAR_DATA_                   rVAR_DATA_
 2108 #define VAR_HYPERDATA_              rVAR_HYPERDATA_
 2109 #define VAR_SEQDATA_                rVAR_SEQDATA_
 2110 #define VAR_SEQPOS_                 rVAR_SEQPOS_
 2111 #define VAR_MAXREC_                 rVAR_MAXREC_
 2112 #define VAR_DATASPEC_               rVAR_DATASPEC_
 2113 #define VAR_FILLVALUE_              rVAR_PADVALUE_
 2114 #define VAR_INITIALRECS_            rVAR_INITIALRECS_
 2115 #define VAR_EXTENDRECS_             rVAR_BLOCKINGFACTOR_
 2116 #define ATTR_MAXENTRY_              ATTR_MAXrENTRY_
 2117 #define ATTR_NUMENTRIES_            ATTR_NUMrENTRIES_
 2118 #define ENTRY_                      rENTRY_
 2119 #define ENTRY_DATATYPE_             rENTRY_DATATYPE_
 2120 #define ENTRY_NUMELEMS_             rENTRY_NUMELEMS_
 2121 #define ENTRY_DATA_                 rENTRY_DATA_
 2122 #define MIPSEL_ENCODING         DECSTATION_ENCODING
 2123 #define MIPSEB_ENCODING         SGi_ENCODING
 2124 #define rVAR_EXISTANCE_         rVAR_EXISTENCE_
 2125 #define zVAR_EXISTANCE_         zVAR_EXISTENCE_
 2126 #define ATTR_EXISTANCE_         ATTR_EXISTENCE_
 2127 #define gENTRY_EXISTANCE_       gENTRY_EXISTENCE_
 2128 #define rENTRY_EXISTANCE_       rENTRY_EXISTENCE_
 2129 #define zENTRY_EXISTANCE_       zENTRY_EXISTENCE_
 2130 #define GLOBAL_SCOPE_ASSUMED        GLOBAL_SCOPE
 2131 #define VARIABLE_SCOPE_ASSUMED      VARIABLE_SCOPE
 2132 #define BAD_EXTEND_RECS         BAD_BLOCKING_FACTOR
 2133 #define rVAR_EXTENDRECS_        rVAR_BLOCKINGFACTOR_
 2134 #define zVAR_EXTENDRECS_        zVAR_BLOCKINGFACTOR_
 2135 #define COL_MAJOR           COLUMN_MAJOR
 2136 #define NONE_CHECKSUM           NO_CHECKSUM
 2137 
 2138 #define StrlaststrIgCase        StrLaststrIgCase     
 2139 #define Strlaststr                      StrLaststr
 2140 
 2141 /*****************************************************************************/
 2142 
 2143 #endif