ncdf4a13/libsrc/ncx.h File Reference

#include <config.h>
#include "rnd.h"
#include <stddef.h>
#include <errno.h>
#include <sys/types.h>

Include dependency graph for ncx.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ENOERR   0
#define NC_ERANGE   (-60)
#define NC_ENOMEM   (-61)
#define X_SIZEOF_CHAR   1
#define X_SIZEOF_SHORT   2
#define X_SIZEOF_INT   4
#define X_SIZEOF_FLOAT   4
#define X_SIZEOF_DOUBLE   8
#define X_SIZEOF_OFF_T   (sizeof(off_t))
#define X_SIZEOF_SIZE_T   X_SIZEOF_INT
#define X_SCHAR_MIN   (-128)
#define X_SCHAR_MAX   127
#define X_UCHAR_MAX   255U
#define X_SHORT_MIN   (-32768)
#define X_SHRT_MIN   X_SHORT_MIN
#define X_SHORT_MAX   32767
#define X_SHRT_MAX   X_SHORT_MAX
#define X_USHORT_MAX   65535U
#define X_USHRT_MAX   X_USHORT_MAX
#define X_INT_MIN   (-2147483647-1)
#define X_INT_MAX   2147483647
#define X_UINT_MAX   4294967295U
#define X_FLOAT_MAX   3.402823466e+38f
#define X_FLOAT_MIN   (-X_FLOAT_MAX)
#define X_FLT_MAX   X_FLOAT_MAX
#define X_DOUBLE_MAX   1.7976931348623157e+308
#define X_DOUBLE_MIN   (-X_DOUBLE_MAX)
#define X_DBL_MAX   X_DOUBLE_MAX
#define X_SIZE_MAX   X_UINT_MAX
#define X_OFF_MAX   X_INT_MAX
#define X_ALIGN   4
#define ncx_len_char(nelems)   _RNDUP((nelems), X_ALIGN)
#define ncx_len_short(nelems)   (((nelems) + (nelems)%2) * X_SIZEOF_SHORT)
#define ncx_len_int(nelems)   ((nelems) * X_SIZEOF_INT)
#define ncx_len_long(nelems)   ((nelems) * X_SIZEOF_LONG)
#define ncx_len_float(nelems)   ((nelems) * X_SIZEOF_FLOAT)
#define ncx_len_double(nelems)   ((nelems) * X_SIZEOF_DOUBLE)
#define ncx_getn_char_char(xpp, nelems, fillp)   ncx_getn_text(xpp, nelems, fillp)
#define ncx_putn_char_char(xpp, nelems, fillp)   ncx_putn_text(xpp, nelems, fillp)

Typedefs

typedef signed char schar

Functions

int ncx_get_short_schar (const void *xp, schar *ip)
int ncx_get_short_uchar (const void *xp, uchar *ip)
int ncx_get_short_short (const void *xp, short *ip)
int ncx_get_short_int (const void *xp, int *ip)
int ncx_get_short_long (const void *xp, long *ip)
int ncx_get_short_float (const void *xp, float *ip)
int ncx_get_short_double (const void *xp, double *ip)
int ncx_put_short_schar (void *xp, const schar *ip)
int ncx_put_short_uchar (void *xp, const uchar *ip)
int ncx_put_short_short (void *xp, const short *ip)
int ncx_put_short_int (void *xp, const int *ip)
int ncx_put_short_long (void *xp, const long *ip)
int ncx_put_short_float (void *xp, const float *ip)
int ncx_put_short_double (void *xp, const double *ip)
int ncx_get_int_schar (const void *xp, schar *ip)
int ncx_get_int_uchar (const void *xp, uchar *ip)
int ncx_get_int_short (const void *xp, short *ip)
int ncx_get_int_int (const void *xp, int *ip)
int ncx_get_int_long (const void *xp, long *ip)
int ncx_get_int_float (const void *xp, float *ip)
int ncx_get_int_double (const void *xp, double *ip)
int ncx_put_int_schar (void *xp, const schar *ip)
int ncx_put_int_uchar (void *xp, const uchar *ip)
int ncx_put_int_short (void *xp, const short *ip)
int ncx_put_int_int (void *xp, const int *ip)
int ncx_put_int_long (void *xp, const long *ip)
int ncx_put_int_float (void *xp, const float *ip)
int ncx_put_int_double (void *xp, const double *ip)
int ncx_get_float_schar (const void *xp, schar *ip)
int ncx_get_float_uchar (const void *xp, uchar *ip)
int ncx_get_float_short (const void *xp, short *ip)
int ncx_get_float_int (const void *xp, int *ip)
int ncx_get_float_long (const void *xp, long *ip)
int ncx_get_float_float (const void *xp, float *ip)
int ncx_get_float_double (const void *xp, double *ip)
int ncx_put_float_schar (void *xp, const schar *ip)
int ncx_put_float_uchar (void *xp, const uchar *ip)
int ncx_put_float_short (void *xp, const short *ip)
int ncx_put_float_int (void *xp, const int *ip)
int ncx_put_float_long (void *xp, const long *ip)
int ncx_put_float_float (void *xp, const float *ip)
int ncx_put_float_double (void *xp, const double *ip)
int ncx_get_double_schar (const void *xp, schar *ip)
int ncx_get_double_uchar (const void *xp, uchar *ip)
int ncx_get_double_short (const void *xp, short *ip)
int ncx_get_double_int (const void *xp, int *ip)
int ncx_get_double_long (const void *xp, long *ip)
int ncx_get_double_float (const void *xp, float *ip)
int ncx_get_double_double (const void *xp, double *ip)
int ncx_put_double_schar (void *xp, const schar *ip)
int ncx_put_double_uchar (void *xp, const uchar *ip)
int ncx_put_double_short (void *xp, const short *ip)
int ncx_put_double_int (void *xp, const int *ip)
int ncx_put_double_long (void *xp, const long *ip)
int ncx_put_double_float (void *xp, const float *ip)
int ncx_put_double_double (void *xp, const double *ip)
int ncx_get_size_t (const void **xpp, size_t *ulp)
int ncx_get_off_t (const void **xpp, off_t *lp, size_t sizeof_off_t)
int ncx_put_size_t (void **xpp, const size_t *ulp)
int ncx_put_off_t (void **xpp, const off_t *lp, size_t sizeof_off_t)
int ncx_getn_schar_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_getn_schar_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_getn_schar_short (const void **xpp, size_t nelems, short *ip)
int ncx_getn_schar_int (const void **xpp, size_t nelems, int *ip)
int ncx_getn_schar_long (const void **xpp, size_t nelems, long *ip)
int ncx_getn_schar_float (const void **xpp, size_t nelems, float *ip)
int ncx_getn_schar_double (const void **xpp, size_t nelems, double *ip)
int ncx_pad_getn_schar_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_pad_getn_schar_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_pad_getn_schar_short (const void **xpp, size_t nelems, short *ip)
int ncx_pad_getn_schar_int (const void **xpp, size_t nelems, int *ip)
int ncx_pad_getn_schar_long (const void **xpp, size_t nelems, long *ip)
int ncx_pad_getn_schar_float (const void **xpp, size_t nelems, float *ip)
int ncx_pad_getn_schar_double (const void **xpp, size_t nelems, double *ip)
int ncx_putn_schar_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_putn_schar_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_putn_schar_short (void **xpp, size_t nelems, const short *ip)
int ncx_putn_schar_int (void **xpp, size_t nelems, const int *ip)
int ncx_putn_schar_long (void **xpp, size_t nelems, const long *ip)
int ncx_putn_schar_float (void **xpp, size_t nelems, const float *ip)
int ncx_putn_schar_double (void **xpp, size_t nelems, const double *ip)
int ncx_pad_putn_schar_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_pad_putn_schar_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_pad_putn_schar_short (void **xpp, size_t nelems, const short *ip)
int ncx_pad_putn_schar_int (void **xpp, size_t nelems, const int *ip)
int ncx_pad_putn_schar_long (void **xpp, size_t nelems, const long *ip)
int ncx_pad_putn_schar_float (void **xpp, size_t nelems, const float *ip)
int ncx_pad_putn_schar_double (void **xpp, size_t nelems, const double *ip)
int ncx_getn_short_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_getn_short_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_getn_short_short (const void **xpp, size_t nelems, short *ip)
int ncx_getn_short_int (const void **xpp, size_t nelems, int *ip)
int ncx_getn_short_long (const void **xpp, size_t nelems, long *ip)
int ncx_getn_short_float (const void **xpp, size_t nelems, float *ip)
int ncx_getn_short_double (const void **xpp, size_t nelems, double *ip)
int ncx_pad_getn_short_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_pad_getn_short_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_pad_getn_short_short (const void **xpp, size_t nelems, short *ip)
int ncx_pad_getn_short_int (const void **xpp, size_t nelems, int *ip)
int ncx_pad_getn_short_long (const void **xpp, size_t nelems, long *ip)
int ncx_pad_getn_short_float (const void **xpp, size_t nelems, float *ip)
int ncx_pad_getn_short_double (const void **xpp, size_t nelems, double *ip)
int ncx_putn_short_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_putn_short_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_putn_short_short (void **xpp, size_t nelems, const short *ip)
int ncx_putn_short_int (void **xpp, size_t nelems, const int *ip)
int ncx_putn_short_long (void **xpp, size_t nelems, const long *ip)
int ncx_putn_short_float (void **xpp, size_t nelems, const float *ip)
int ncx_putn_short_double (void **xpp, size_t nelems, const double *ip)
int ncx_pad_putn_short_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_pad_putn_short_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_pad_putn_short_short (void **xpp, size_t nelems, const short *ip)
int ncx_pad_putn_short_int (void **xpp, size_t nelems, const int *ip)
int ncx_pad_putn_short_long (void **xpp, size_t nelems, const long *ip)
int ncx_pad_putn_short_float (void **xpp, size_t nelems, const float *ip)
int ncx_pad_putn_short_double (void **xpp, size_t nelems, const double *ip)
int ncx_getn_int_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_getn_int_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_getn_int_short (const void **xpp, size_t nelems, short *ip)
int ncx_getn_int_int (const void **xpp, size_t nelems, int *ip)
int ncx_getn_int_long (const void **xpp, size_t nelems, long *ip)
int ncx_getn_int_float (const void **xpp, size_t nelems, float *ip)
int ncx_getn_int_double (const void **xpp, size_t nelems, double *ip)
int ncx_putn_int_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_putn_int_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_putn_int_short (void **xpp, size_t nelems, const short *ip)
int ncx_putn_int_int (void **xpp, size_t nelems, const int *ip)
int ncx_putn_int_long (void **xpp, size_t nelems, const long *ip)
int ncx_putn_int_float (void **xpp, size_t nelems, const float *ip)
int ncx_putn_int_double (void **xpp, size_t nelems, const double *ip)
int ncx_getn_float_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_getn_float_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_getn_float_short (const void **xpp, size_t nelems, short *ip)
int ncx_getn_float_int (const void **xpp, size_t nelems, int *ip)
int ncx_getn_float_long (const void **xpp, size_t nelems, long *ip)
int ncx_getn_float_float (const void **xpp, size_t nelems, float *ip)
int ncx_getn_float_double (const void **xpp, size_t nelems, double *ip)
int ncx_putn_float_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_putn_float_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_putn_float_short (void **xpp, size_t nelems, const short *ip)
int ncx_putn_float_int (void **xpp, size_t nelems, const int *ip)
int ncx_putn_float_long (void **xpp, size_t nelems, const long *ip)
int ncx_putn_float_float (void **xpp, size_t nelems, const float *ip)
int ncx_putn_float_double (void **xpp, size_t nelems, const double *ip)
int ncx_getn_double_schar (const void **xpp, size_t nelems, schar *ip)
int ncx_getn_double_uchar (const void **xpp, size_t nelems, uchar *ip)
int ncx_getn_double_short (const void **xpp, size_t nelems, short *ip)
int ncx_getn_double_int (const void **xpp, size_t nelems, int *ip)
int ncx_getn_double_long (const void **xpp, size_t nelems, long *ip)
int ncx_getn_double_float (const void **xpp, size_t nelems, float *ip)
int ncx_getn_double_double (const void **xpp, size_t nelems, double *ip)
int ncx_putn_double_schar (void **xpp, size_t nelems, const schar *ip)
int ncx_putn_double_uchar (void **xpp, size_t nelems, const uchar *ip)
int ncx_putn_double_short (void **xpp, size_t nelems, const short *ip)
int ncx_putn_double_int (void **xpp, size_t nelems, const int *ip)
int ncx_putn_double_long (void **xpp, size_t nelems, const long *ip)
int ncx_putn_double_float (void **xpp, size_t nelems, const float *ip)
int ncx_putn_double_double (void **xpp, size_t nelems, const double *ip)
int ncx_getn_text (const void **xpp, size_t nchars, char *cp)
int ncx_pad_getn_text (const void **xpp, size_t nchars, char *cp)
int ncx_putn_text (void **xpp, size_t nchars, const char *cp)
int ncx_pad_putn_text (void **xpp, size_t nchars, const char *cp)
int ncx_getn_void (const void **xpp, size_t nchars, void *vp)
int ncx_pad_getn_void (const void **xpp, size_t nchars, void *vp)
int ncx_putn_void (void **xpp, size_t nchars, const void *vp)
int ncx_pad_putn_void (void **xpp, size_t nchars, const void *vp)


Define Documentation

#define ENOERR   0
 

Definition at line 50 of file ncx.h.

Referenced by check_v1hs(), fault_v1hs(), fgrow(), fgrow2(), nc_close(), NC_computeshapes(), nc_get_NC(), nc_get_varm_double(), nc_get_varm_float(), nc_get_varm_int(), nc_get_varm_long(), nc_get_varm_schar(), nc_get_varm_short(), nc_get_varm_text(), nc_get_varm_uchar(), NC_lookupattr(), nc_put_att_double(), nc_put_att_float(), nc_put_att_int(), nc_put_att_long(), nc_put_att_schar(), nc_put_att_short(), nc_put_att_uchar(), nc_put_varm_double(), nc_put_varm_float(), nc_put_varm_int(), nc_put_varm_long(), nc_put_varm_schar(), nc_put_varm_short(), nc_put_varm_text(), nc_put_varm_uchar(), ncio_close(), ncio_create(), ncio_filesize(), ncio_open(), ncio_pad_length(), ncio_px_init2(), ncio_px_move(), ncio_px_sync(), ncio_spx_get(), ncio_spx_init2(), ncio_spx_move(), ncio_spx_rel(), ncio_spx_sync(), ncx_get_double_double(), ncx_get_double_float(), ncx_get_double_int(), ncx_get_double_long(), ncx_get_double_schar(), ncx_get_double_short(), ncx_get_double_uchar(), ncx_get_float_double(), ncx_get_float_float(), ncx_get_float_int(), ncx_get_float_long(), ncx_get_float_schar(), ncx_get_float_short(), ncx_get_float_uchar(), ncx_get_int_double(), ncx_get_int_float(), ncx_get_int_int(), ncx_get_int_long(), ncx_get_int_schar(), ncx_get_int_short(), ncx_get_int_uchar(), ncx_get_off_t(), ncx_get_short_double(), ncx_get_short_float(), ncx_get_short_int(), ncx_get_short_long(), ncx_get_short_schar(), ncx_get_short_short(), ncx_get_short_uchar(), ncx_get_size_t(), ncx_getn_double_double(), ncx_getn_double_float(), ncx_getn_double_int(), ncx_getn_double_long(), ncx_getn_double_schar(), ncx_getn_double_short(), ncx_getn_double_uchar(), ncx_getn_float_double(), ncx_getn_float_float(), ncx_getn_float_int(), ncx_getn_float_long(), ncx_getn_float_schar(), ncx_getn_float_short(), ncx_getn_float_uchar(), ncx_getn_int_double(), ncx_getn_int_float(), ncx_getn_int_int(), ncx_getn_int_long(), ncx_getn_int_schar(), ncx_getn_int_short(), ncx_getn_int_uchar(), ncx_getn_schar_double(), ncx_getn_schar_float(), ncx_getn_schar_int(), ncx_getn_schar_long(), ncx_getn_schar_schar(), ncx_getn_schar_short(), ncx_getn_schar_uchar(), ncx_getn_short_double(), ncx_getn_short_float(), ncx_getn_short_int(), ncx_getn_short_long(), ncx_getn_short_schar(), ncx_getn_short_short(), ncx_getn_short_uchar(), ncx_getn_text(), ncx_getn_void(), ncx_pad_getn_schar_double(), ncx_pad_getn_schar_float(), ncx_pad_getn_schar_int(), ncx_pad_getn_schar_long(), ncx_pad_getn_schar_schar(), ncx_pad_getn_schar_short(), ncx_pad_getn_schar_uchar(), ncx_pad_getn_short_double(), ncx_pad_getn_short_float(), ncx_pad_getn_short_int(), ncx_pad_getn_short_long(), ncx_pad_getn_short_schar(), ncx_pad_getn_short_short(), ncx_pad_getn_short_uchar(), ncx_pad_getn_text(), ncx_pad_getn_void(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_schar(), ncx_pad_putn_schar_short(), ncx_pad_putn_schar_uchar(), ncx_pad_putn_short_double(), ncx_pad_putn_short_float(), ncx_pad_putn_short_int(), ncx_pad_putn_short_long(), ncx_pad_putn_short_schar(), ncx_pad_putn_short_short(), ncx_pad_putn_short_uchar(), ncx_pad_putn_text(), ncx_pad_putn_void(), ncx_put_double_double(), ncx_put_double_float(), ncx_put_double_int(), ncx_put_double_long(), ncx_put_double_schar(), ncx_put_double_short(), ncx_put_double_uchar(), ncx_put_float_double(), ncx_put_float_float(), ncx_put_float_int(), ncx_put_float_long(), ncx_put_float_schar(), ncx_put_float_short(), ncx_put_float_uchar(), ncx_put_int_double(), ncx_put_int_float(), ncx_put_int_int(), ncx_put_int_long(), ncx_put_int_schar(), ncx_put_int_short(), ncx_put_int_uchar(), ncx_put_NC(), ncx_put_off_t(), ncx_put_short_double(), ncx_put_short_float(), ncx_put_short_int(), ncx_put_short_long(), ncx_put_short_schar(), ncx_put_short_short(), ncx_put_short_uchar(), ncx_put_size_t(), ncx_putn_double_double(), ncx_putn_double_float(), ncx_putn_double_int(), ncx_putn_double_long(), ncx_putn_double_schar(), ncx_putn_double_short(), ncx_putn_double_uchar(), ncx_putn_float_double(), ncx_putn_float_float(), ncx_putn_float_int(), ncx_putn_float_long(), ncx_putn_float_schar(), ncx_putn_float_short(), ncx_putn_float_uchar(), ncx_putn_int_double(), ncx_putn_int_float(), ncx_putn_int_int(), ncx_putn_int_long(), ncx_putn_int_schar(), ncx_putn_int_short(), ncx_putn_int_uchar(), ncx_putn_schar_double(), ncx_putn_schar_float(), ncx_putn_schar_int(), ncx_putn_schar_long(), ncx_putn_schar_schar(), ncx_putn_schar_short(), ncx_putn_schar_uchar(), ncx_putn_short_double(), ncx_putn_short_float(), ncx_putn_short_int(), ncx_putn_short_long(), ncx_putn_short_schar(), ncx_putn_short_short(), ncx_putn_short_uchar(), ncx_putn_text(), ncx_putn_void(), px_double_buffer(), px_get(), px_pgin(), px_pgout(), px_rel(), rel_v1hs(), v1h_get_NC_attr(), v1h_get_NC_attrarray(), v1h_get_NC_attrV(), v1h_get_NC_dim(), v1h_get_NC_dimarray(), v1h_get_NC_string(), v1h_get_nc_type(), v1h_get_NC_var(), v1h_get_NC_vararray(), v1h_get_NCtype(), v1h_get_size_t(), v1h_put_NC_attr(), v1h_put_NC_attrarray(), v1h_put_NC_attrV(), v1h_put_NC_dim(), v1h_put_NC_dimarray(), v1h_put_NC_string(), v1h_put_nc_type(), v1h_put_NC_var(), v1h_put_NC_vararray(), v1h_put_NCtype(), and v1h_put_size_t().

#define NC_ENOMEM   (-61)
 

Definition at line 56 of file ncx.h.

Referenced by att_list_add(), data_type_convert(), dim_list_add(), dup_NC_attrarrayV(), dup_NC_dimarrayV(), dup_NC_vararrayV(), field_list_add(), file_list_add(), file_list_add_netcdf4(), find_var_shape_grp(), get_fill_value(), incr_NC_attrarray(), incr_NC_dimarray(), incr_NC_vararray(), main(), nc4_enum_member_add(), nc4_get_att(), nc4_grp_list_add(), nc4_put_att(), nc4_type_list_add(), nc4_var_list_add(), nc__create_mp(), nc__open_mp(), nc_copy_att(), nc_copy_var(), nc_def_dim(), nc_def_var(), nc_def_var_full(), nc_delete_mp(), nc_get_varm(), nc_get_varm_double(), nc_get_varm_float(), nc_get_varm_int(), nc_get_varm_long(), nc_get_varm_schar(), nc_get_varm_short(), nc_get_varm_text(), nc_get_varm_uchar(), nc_put_att_double(), nc_put_att_float(), nc_put_att_int(), nc_put_att_long(), nc_put_att_schar(), nc_put_att_short(), nc_put_att_text(), nc_put_att_uchar(), nc_put_varm(), nc_put_varm_double(), nc_put_varm_float(), nc_put_varm_int(), nc_put_varm_long(), nc_put_varm_schar(), nc_put_varm_short(), nc_put_varm_text(), nc_put_varm_uchar(), nc_redef(), nc_rename_att(), nc_rename_dim(), nc_strerror(), pg_att_grpa(), pg_vara(), pg_varm(), read_type(), read_var(), test_nc_strerror(), v1h_get_NC_attr(), v1h_get_NC_attrarray(), v1h_get_NC_dim(), v1h_get_NC_dimarray(), v1h_get_NC_string(), v1h_get_NC_var(), v1h_get_NC_vararray(), and var_create_dataset().

#define NC_ERANGE   (-60)
 

Definition at line 53 of file ncx.h.

Referenced by check_atts_double(), check_atts_float(), check_atts_int(), check_atts_long(), check_atts_schar(), check_atts_short(), check_atts_text(), check_atts_uchar(), check_file(), create_file(), main(), nc4_get_att(), nc4_put_att(), nc_get_var_double(), nc_get_var_float(), nc_get_var_int(), nc_get_var_long(), nc_get_var_schar(), nc_get_var_short(), nc_get_var_text(), nc_get_var_uchar(), nc_get_vara_double(), nc_get_vara_float(), nc_get_vara_int(), nc_get_vara_long(), nc_get_vara_schar(), nc_get_vara_short(), nc_get_vara_text(), nc_get_vara_uchar(), nc_get_varm_double(), nc_get_varm_float(), nc_get_varm_int(), nc_get_varm_long(), nc_get_varm_schar(), nc_get_varm_short(), nc_get_varm_text(), nc_get_varm_uchar(), nc_put_var_double(), nc_put_var_float(), nc_put_var_int(), nc_put_var_long(), nc_put_var_schar(), nc_put_var_short(), nc_put_var_text(), nc_put_var_uchar(), nc_put_vara_double(), nc_put_vara_float(), nc_put_vara_int(), nc_put_vara_long(), nc_put_vara_schar(), nc_put_vara_short(), nc_put_vara_text(), nc_put_vara_uchar(), nc_put_varm_double(), nc_put_varm_float(), nc_put_varm_int(), nc_put_varm_long(), nc_put_varm_schar(), nc_put_varm_short(), nc_put_varm_text(), nc_put_varm_uchar(), nc_strerror(), nco_err_exit(), ncx_get_double_float(), ncx_get_double_int(), ncx_get_double_long(), ncx_get_double_schar(), ncx_get_double_short(), ncx_get_double_uchar(), ncx_get_float_int(), ncx_get_float_long(), ncx_get_float_schar(), ncx_get_float_short(), ncx_get_float_uchar(), ncx_get_int_float(), ncx_get_int_int(), ncx_get_int_long(), ncx_get_int_schar(), ncx_get_int_short(), ncx_get_int_uchar(), ncx_get_short_float(), ncx_get_short_int(), ncx_get_short_schar(), ncx_get_short_short(), ncx_get_short_uchar(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_short(), ncx_put_double_double(), ncx_put_double_float(), ncx_put_double_int(), ncx_put_double_long(), ncx_put_double_short(), ncx_put_float_double(), ncx_put_float_float(), ncx_put_float_int(), ncx_put_float_long(), ncx_put_float_short(), ncx_put_int_double(), ncx_put_int_float(), ncx_put_int_int(), ncx_put_int_long(), ncx_put_int_short(), ncx_put_short_double(), ncx_put_short_float(), ncx_put_short_int(), ncx_put_short_long(), ncx_put_short_short(), ncx_putn_schar_double(), ncx_putn_schar_float(), ncx_putn_schar_int(), ncx_putn_schar_long(), ncx_putn_schar_short(), pg_vara(), pg_varm(), put_atts(), put_vars(), test_nc_get_att_double(), test_nc_get_att_float(), test_nc_get_att_int(), test_nc_get_att_long(), test_nc_get_att_schar(), test_nc_get_att_short(), test_nc_get_att_text(), test_nc_get_att_uchar(), test_nc_get_var1_double(), test_nc_get_var1_float(), test_nc_get_var1_int(), test_nc_get_var1_long(), test_nc_get_var1_schar(), test_nc_get_var1_short(), test_nc_get_var1_text(), test_nc_get_var1_uchar(), test_nc_get_var_double(), test_nc_get_var_float(), test_nc_get_var_int(), test_nc_get_var_long(), test_nc_get_var_schar(), test_nc_get_var_short(), test_nc_get_var_text(), test_nc_get_var_uchar(), test_nc_get_vara_double(), test_nc_get_vara_float(), test_nc_get_vara_int(), test_nc_get_vara_long(), test_nc_get_vara_schar(), test_nc_get_vara_short(), test_nc_get_vara_text(), test_nc_get_vara_uchar(), test_nc_get_varm_double(), test_nc_get_varm_float(), test_nc_get_varm_int(), test_nc_get_varm_long(), test_nc_get_varm_schar(), test_nc_get_varm_short(), test_nc_get_varm_text(), test_nc_get_varm_uchar(), test_nc_get_vars_double(), test_nc_get_vars_float(), test_nc_get_vars_int(), test_nc_get_vars_long(), test_nc_get_vars_schar(), test_nc_get_vars_short(), test_nc_get_vars_text(), test_nc_get_vars_uchar(), test_nc_put_att_double(), test_nc_put_att_float(), test_nc_put_att_int(), test_nc_put_att_long(), test_nc_put_att_schar(), test_nc_put_att_short(), test_nc_put_att_uchar(), test_nc_put_var1_double(), test_nc_put_var1_float(), test_nc_put_var1_int(), test_nc_put_var1_long(), test_nc_put_var1_schar(), test_nc_put_var1_short(), test_nc_put_var1_text(), test_nc_put_var1_uchar(), test_nc_put_var_double(), test_nc_put_var_float(), test_nc_put_var_int(), test_nc_put_var_long(), test_nc_put_var_schar(), test_nc_put_var_short(), test_nc_put_var_text(), test_nc_put_var_uchar(), test_nc_put_vara_double(), test_nc_put_vara_float(), test_nc_put_vara_int(), test_nc_put_vara_long(), test_nc_put_vara_schar(), test_nc_put_vara_short(), test_nc_put_vara_text(), test_nc_put_vara_uchar(), test_nc_put_varm_double(), test_nc_put_varm_float(), test_nc_put_varm_int(), test_nc_put_varm_long(), test_nc_put_varm_schar(), test_nc_put_varm_short(), test_nc_put_varm_text(), test_nc_put_varm_uchar(), test_nc_put_vars_double(), test_nc_put_vars_float(), test_nc_put_vars_int(), test_nc_put_vars_long(), test_nc_put_vars_schar(), test_nc_put_vars_short(), test_nc_put_vars_text(), test_nc_put_vars_uchar(), test_nc_strerror(), and test_redef().

#define ncx_getn_char_char xpp,
nelems,
fillp   )     ncx_getn_text(xpp, nelems, fillp)
 

Definition at line 651 of file ncx.h.

Referenced by getNCvx_char_char().

#define ncx_len_char nelems   )     _RNDUP((nelems), X_ALIGN)
 

Definition at line 123 of file ncx.h.

Referenced by ncx_len_NC_attrV().

#define ncx_len_double nelems   )     ((nelems) * X_SIZEOF_DOUBLE)
 

Definition at line 138 of file ncx.h.

Referenced by ncx_len_NC_attrV().

#define ncx_len_float nelems   )     ((nelems) * X_SIZEOF_FLOAT)
 

Definition at line 135 of file ncx.h.

Referenced by ncx_len_NC_attrV().

#define ncx_len_int nelems   )     ((nelems) * X_SIZEOF_INT)
 

Definition at line 129 of file ncx.h.

Referenced by ncx_len_NC_attrV(), ncx_len_NC_var(), v1h_get_NC_var(), and v1h_put_NC_var().

#define ncx_len_long nelems   )     ((nelems) * X_SIZEOF_LONG)
 

Definition at line 132 of file ncx.h.

#define ncx_len_short nelems   )     (((nelems) + (nelems)%2) * X_SIZEOF_SHORT)
 

Definition at line 126 of file ncx.h.

Referenced by ncx_len_NC_attrV().

#define ncx_putn_char_char xpp,
nelems,
fillp   )     ncx_putn_text(xpp, nelems, fillp)
 

Definition at line 652 of file ncx.h.

Referenced by NC_fill_char(), and putNCvx_char_char().

#define X_ALIGN   4
 

Definition at line 121 of file ncx.h.

Referenced by fill_NC_var(), ncio_spx_get(), ncio_spx_rel(), ncx_len_NC_string(), ncx_pad_getn_schar_double(), ncx_pad_getn_schar_float(), ncx_pad_getn_schar_int(), ncx_pad_getn_schar_long(), ncx_pad_getn_schar_schar(), ncx_pad_getn_schar_short(), ncx_pad_getn_schar_uchar(), ncx_pad_getn_text(), ncx_pad_getn_void(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_schar(), ncx_pad_putn_schar_short(), ncx_pad_putn_schar_uchar(), ncx_pad_putn_text(), ncx_pad_putn_void(), new_NC_string(), px_pgin(), px_pgout(), v1h_get_NC_attrV(), v1h_get_NC_string(), v1h_put_NC_attrV(), and v1h_put_NC_string().

#define X_DBL_MAX   X_DOUBLE_MAX
 

Definition at line 108 of file ncx.h.

#define X_DOUBLE_MAX   1.7976931348623157e+308
 

Definition at line 105 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_double_double(), ncx_put_double_float(), ncx_put_double_int(), ncx_put_double_long(), and ncx_put_double_short().

#define X_DOUBLE_MIN   (-X_DOUBLE_MAX)
 

Definition at line 107 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_double_double(), ncx_put_double_float(), ncx_put_double_int(), ncx_put_double_long(), and ncx_put_double_short().

#define X_FLOAT_MAX   3.402823466e+38f
 

Definition at line 97 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_float_double(), ncx_put_float_float(), ncx_put_float_int(), ncx_put_float_long(), and ncx_put_float_short().

#define X_FLOAT_MIN   (-X_FLOAT_MAX)
 

Definition at line 98 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_float_double(), ncx_put_float_float(), ncx_put_float_int(), ncx_put_float_long(), and ncx_put_float_short().

#define X_FLT_MAX   X_FLOAT_MAX
 

Definition at line 99 of file ncx.h.

#define X_INT_MAX   2147483647
 

Definition at line 95 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), main(), nc4_put_att_tc(), NC_check_vlens(), nc_def_dim(), nc_def_var(), nc_def_var_full(), nc_get_varm_double(), nc_get_varm_float(), nc_get_varm_int(), nc_get_varm_long(), nc_get_varm_schar(), nc_get_varm_short(), nc_get_varm_text(), nc_get_varm_uchar(), nc_put_att_double(), nc_put_att_float(), nc_put_att_int(), nc_put_att_long(), nc_put_att_schar(), nc_put_att_short(), nc_put_att_text(), nc_put_att_uchar(), nc_put_varm_double(), nc_put_varm_float(), nc_put_varm_int(), nc_put_varm_long(), nc_put_varm_schar(), nc_put_varm_short(), nc_put_varm_text(), nc_put_varm_uchar(), NCcoordck(), ncio_spx_get(), ncx_put_int_double(), ncx_put_int_float(), ncx_put_int_int(), ncx_put_int_long(), ncx_put_int_short(), pg_varm(), and px_get().

#define X_INT_MIN   (-2147483647-1)
 

Definition at line 94 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_int_double(), ncx_put_int_float(), ncx_put_int_int(), ncx_put_int_long(), and ncx_put_int_short().

#define X_OFF_MAX   X_INT_MAX
 

Definition at line 111 of file ncx.h.

Referenced by NC_begins().

#define X_SCHAR_MAX   127
 

Definition at line 86 of file ncx.h.

Referenced by convert_type(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_short(), ncx_putn_schar_double(), ncx_putn_schar_float(), ncx_putn_schar_int(), ncx_putn_schar_long(), and ncx_putn_schar_short().

#define X_SCHAR_MIN   (-128)
 

Definition at line 85 of file ncx.h.

Referenced by convert_type(), ncx_pad_putn_schar_double(), ncx_pad_putn_schar_float(), ncx_pad_putn_schar_int(), ncx_pad_putn_schar_long(), ncx_pad_putn_schar_short(), ncx_putn_schar_double(), ncx_putn_schar_float(), ncx_putn_schar_int(), ncx_putn_schar_long(), and ncx_putn_schar_short().

#define X_SHORT_MAX   32767
 

Definition at line 90 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_short_double(), ncx_put_short_float(), ncx_put_short_int(), ncx_put_short_long(), and ncx_put_short_short().

#define X_SHORT_MIN   (-32768)
 

Definition at line 88 of file ncx.h.

Referenced by convert_type(), hash(), inRange(), inRange_float(), ncx_put_short_double(), ncx_put_short_float(), ncx_put_short_int(), ncx_put_short_long(), and ncx_put_short_short().

#define X_SHRT_MAX   X_SHORT_MAX
 

Definition at line 91 of file ncx.h.

#define X_SHRT_MIN   X_SHORT_MIN
 

Definition at line 89 of file ncx.h.

#define X_SIZE_MAX   X_UINT_MAX
 

Definition at line 110 of file ncx.h.

Referenced by ncx_put_size_t().

#define X_SIZEOF_CHAR   1
 

Definition at line 63 of file ncx.h.

Referenced by NC_fill_char(), and NC_fill_schar().

#define X_SIZEOF_DOUBLE   8
 

Definition at line 70 of file ncx.h.

Referenced by fill_NC_var(), NC_fill_double(), ncx_getn_double_float(), ncx_getn_double_int(), ncx_getn_double_long(), ncx_getn_double_schar(), ncx_getn_double_short(), ncx_getn_double_uchar(), ncx_howmany(), and ncx_szof().

#define X_SIZEOF_FLOAT   4
 

Definition at line 69 of file ncx.h.

Referenced by NC_fill_float(), ncx_getn_float_int(), ncx_getn_float_long(), ncx_getn_float_schar(), ncx_getn_float_short(), ncx_getn_float_uchar(), ncx_howmany(), and ncx_szof().

#define X_SIZEOF_INT   4
 

Definition at line 65 of file ncx.h.

Referenced by ncx_getn_int_double(), ncx_getn_int_float(), ncx_getn_int_int(), ncx_getn_int_long(), ncx_getn_int_schar(), ncx_getn_int_short(), ncx_getn_int_uchar(), ncx_howmany(), ncx_putn_int_double(), ncx_putn_int_float(), ncx_putn_int_int(), ncx_putn_int_long(), ncx_putn_int_schar(), ncx_putn_int_short(), ncx_putn_int_uchar(), ncx_szof(), v1h_get_nc_type(), v1h_get_NCtype(), v1h_put_nc_type(), and v1h_put_NCtype().

#define X_SIZEOF_OFF_T   (sizeof(off_t))
 

Definition at line 79 of file ncx.h.

#define X_SIZEOF_SHORT   2
 

Definition at line 64 of file ncx.h.

Referenced by NC_fill_short(), ncx_getn_short_double(), ncx_getn_short_float(), ncx_getn_short_int(), ncx_getn_short_long(), ncx_getn_short_schar(), ncx_getn_short_short(), ncx_getn_short_uchar(), ncx_howmany(), ncx_pad_getn_short_double(), ncx_pad_getn_short_float(), ncx_pad_getn_short_int(), ncx_pad_getn_short_long(), ncx_pad_getn_short_schar(), ncx_pad_getn_short_short(), ncx_pad_getn_short_uchar(), ncx_pad_putn_short_double(), ncx_pad_putn_short_float(), ncx_pad_putn_short_int(), ncx_pad_putn_short_long(), ncx_pad_putn_short_schar(), ncx_pad_putn_short_short(), ncx_pad_putn_short_uchar(), ncx_putn_short_double(), ncx_putn_short_float(), ncx_putn_short_int(), ncx_putn_short_long(), ncx_putn_short_schar(), ncx_putn_short_short(), and ncx_putn_short_uchar().

#define X_SIZEOF_SIZE_T   X_SIZEOF_INT
 

Definition at line 80 of file ncx.h.

Referenced by ncx_get_size_t(), ncx_len_NC(), ncx_len_NC_attr(), ncx_len_NC_attrarray(), ncx_len_NC_dim(), ncx_len_NC_dimarray(), ncx_len_NC_string(), ncx_len_NC_var(), ncx_len_NC_vararray(), ncx_put_size_t(), v1h_get_size_t(), and v1h_put_size_t().

#define X_UCHAR_MAX   255U
 

Definition at line 87 of file ncx.h.

Referenced by convert_type().

#define X_UINT_MAX   4294967295U
 

Definition at line 96 of file ncx.h.

Referenced by convert_type(), NC_begins(), NC_check_vlens(), nc_def_dim(), and NC_var_shape().

#define X_USHORT_MAX   65535U
 

Definition at line 92 of file ncx.h.

Referenced by convert_type().

#define X_USHRT_MAX   X_USHORT_MAX
 

Definition at line 93 of file ncx.h.


Typedef Documentation

typedef signed char schar
 

Definition at line 149 of file ncx.h.


Function Documentation

int ncx_get_double_double const void *  xp,
double *  ip
 

Definition at line 1620 of file ncx.c.

References ENOERR.

Referenced by ncx_getn_double_double().

01621 {
01622         /* TODO */
01623         get_ix_double(xp, ip);
01624         return ENOERR;
01625 }

int ncx_get_double_float const void *  xp,
float *  ip
 

Definition at line 1601 of file ncx.c.

References ENOERR, FLT_MAX, and NC_ERANGE.

Referenced by ncx_getn_double_float().

01602 {
01603         double xx;
01604         get_ix_double(xp, &xx);
01605         if(xx > FLT_MAX || xx < (-FLT_MAX))
01606         {
01607                 *ip = FLT_MAX;
01608                 return NC_ERANGE;
01609         }
01610         if(xx < (-FLT_MAX))
01611         {
01612                 *ip = (-FLT_MAX);
01613                 return NC_ERANGE;
01614         }
01615         *ip = (float) xx;
01616         return ENOERR;
01617 }

int ncx_get_double_int const void *  xp,
int *  ip
 

Definition at line 1579 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_double_int().

01580 {
01581         double xx;
01582         get_ix_double(xp, &xx);
01583         *ip = (int) xx;
01584         if(xx > INT_MAX || xx < INT_MIN)
01585                 return NC_ERANGE;
01586         return ENOERR;
01587 }

int ncx_get_double_long const void *  xp,
long *  ip
 

Definition at line 1590 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_double_long().

01591 {
01592         double xx;
01593         get_ix_double(xp, &xx);
01594         *ip = (long) xx;
01595         if(xx > LONG_MAX || xx < LONG_MIN)
01596                 return NC_ERANGE;
01597         return ENOERR;
01598 }

int ncx_get_double_schar const void *  xp,
schar ip
 

Definition at line 1546 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_double_schar().

01547 {
01548         double xx;
01549         get_ix_double(xp, &xx);
01550         *ip = (schar) xx;
01551         if(xx > SCHAR_MAX || xx < SCHAR_MIN)
01552                 return NC_ERANGE;
01553         return ENOERR;
01554 }

int ncx_get_double_short const void *  xp,
short *  ip
 

Definition at line 1568 of file ncx.c.

References ENOERR, NC_ERANGE, SHORT_MAX, and SHORT_MIN.

Referenced by ncx_getn_double_short().

01569 {
01570         double xx;
01571         get_ix_double(xp, &xx);
01572         *ip = (short) xx;
01573         if(xx > SHORT_MAX || xx < SHORT_MIN)
01574                 return NC_ERANGE;
01575         return ENOERR;
01576 }

int ncx_get_double_uchar const void *  xp,
uchar ip
 

Definition at line 1557 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_double_uchar().

01558 {
01559         double xx;
01560         get_ix_double(xp, &xx);
01561         *ip = (uchar) xx;
01562         if(xx > UCHAR_MAX || xx < 0)
01563                 return NC_ERANGE;
01564         return ENOERR;
01565 }

int ncx_get_float_double const void *  xp,
double *  ip
 

Definition at line 1187 of file ncx.c.

References ENOERR.

Referenced by ncx_getn_float_double().

01188 {
01189         /* TODO */
01190         float xx;
01191         get_ix_float(xp, &xx);
01192         *ip = xx;
01193         return ENOERR;
01194 }

int ncx_get_float_float const void *  xp,
float *  ip
 

Definition at line 1179 of file ncx.c.

References ENOERR.

Referenced by ncx_getn_float_float().

01180 {
01181         /* TODO */
01182         get_ix_float(xp, ip);
01183         return ENOERR;
01184 }

int ncx_get_float_int const void *  xp,
int *  ip
 

Definition at line 1157 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_float_int().

01158 {
01159         float xx;
01160         get_ix_float(xp, &xx);
01161         *ip = (int) xx;
01162         if(xx > (double)INT_MAX || xx < (double)INT_MIN)
01163                 return NC_ERANGE;
01164         return ENOERR;
01165 }

int ncx_get_float_long const void *  xp,
long *  ip
 

Definition at line 1168 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_float_long().

01169 {
01170         float xx;
01171         get_ix_float(xp, &xx);
01172         *ip = (long) xx;
01173         if(xx > LONG_MAX || xx < LONG_MIN)
01174                 return NC_ERANGE;
01175         return ENOERR;
01176 }

int ncx_get_float_schar const void *  xp,
schar ip
 

Definition at line 1124 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_float_schar().

01125 {
01126         float xx;
01127         get_ix_float(xp, &xx);
01128         *ip = (schar) xx;
01129         if(xx > SCHAR_MAX || xx < SCHAR_MIN)
01130                 return NC_ERANGE;
01131         return ENOERR;
01132 }

int ncx_get_float_short const void *  xp,
short *  ip
 

Definition at line 1146 of file ncx.c.

References ENOERR, NC_ERANGE, SHORT_MAX, and SHORT_MIN.

Referenced by ncx_getn_float_short().

01147 {
01148         float xx;
01149         get_ix_float(xp, &xx);
01150         *ip = (short) xx;
01151         if(xx > SHORT_MAX || xx < SHORT_MIN)
01152                 return NC_ERANGE;
01153         return ENOERR;
01154 }

int ncx_get_float_uchar const void *  xp,
uchar ip
 

Definition at line 1135 of file ncx.c.

References ENOERR, and NC_ERANGE.

Referenced by ncx_getn_float_uchar().

01136 {
01137         float xx;
01138         get_ix_float(xp, &xx);
01139         *ip = (uchar) xx;
01140         if(xx > UCHAR_MAX || xx < 0)
01141                 return NC_ERANGE;
01142         return ENOERR;
01143 }

int ncx_get_int_double const void *  xp,
double *  ip
 

Definition at line 554 of file ncx.c.

References ENOERR, and get_ix_int().

Referenced by ncx_getn_int_double().

00555 {
00556         /* assert((DBL_MAX >= X_INT_MAX); */
00557         ix_int xx;
00558         get_ix_int(xp, &xx);
00559         *ip = xx;
00560         return ENOERR;
00561 }

int ncx_get_int_float const void *  xp,
float *  ip
 

Definition at line 541 of file ncx.c.

References ENOERR, FLT_MAX, get_ix_int(), and NC_ERANGE.

Referenced by ncx_getn_int_float().

00542 {
00543         ix_int xx;
00544         get_ix_int(xp, &xx);
00545         *ip = xx;
00546 #if 0   /* TODO: determine when necessary */
00547         if(xx > FLT_MAX || xx < (-FLT_MAX))
00548                 return NC_ERANGE;
00549 #endif
00550         return ENOERR;
00551 }

int ncx_get_int_int const void *  xp,
int *  ip
 

Definition at line 505 of file ncx.c.

References ENOERR, get_ix_int(), and NC_ERANGE.

Referenced by ncx_getn_int_int(), v1h_get_nc_type(), and v1h_get_NCtype().

00506 {
00507 #if SIZEOF_IX_INT == SIZEOF_INT && IX_INT_MAX == INT_MAX
00508         get_ix_int(xp, (ix_int *)ip);
00509         return ENOERR;
00510 #else
00511         ix_int xx;
00512         get_ix_int(xp, &xx);
00513         *ip = xx;
00514 #  if IX_INT_MAX > INT_MAX
00515         if(xx > INT_MAX || xx < INT_MIN)
00516                 return NC_ERANGE;
00517 #  endif
00518         return ENOERR;
00519 #endif
00520 }

int ncx_get_int_long const void *  xp,
long *  ip
 

Definition at line 523 of file ncx.c.

References ENOERR, get_ix_int(), and NC_ERANGE.

Referenced by ncx_getn_int_long().

00524 {
00525 #if SIZEOF_IX_INT == SIZEOF_LONG && IX_INT_MAX == LONG_MAX
00526         get_ix_int(xp, (ix_int *)ip);
00527         return ENOERR;
00528 #else
00529         ix_int xx;
00530         get_ix_int(xp, &xx);
00531         *ip = xx;
00532 #  if IX_INT_MAX > LONG_MAX     /* unlikely */
00533         if(xx > LONG_MAX || xx < LONG_MIN)
00534                 return NC_ERANGE;
00535 #  endif
00536         return ENOERR;
00537 #endif
00538 }

int ncx_get_int_schar const void *  xp,
schar ip
 

Definition at line 465 of file ncx.c.

References ENOERR, get_ix_int(), and NC_ERANGE.

Referenced by ncx_getn_int_schar().

00466 {
00467         ix_int xx;
00468         get_ix_int(xp, &xx);
00469         *ip = xx;
00470         if(xx > SCHAR_MAX || xx < SCHAR_MIN)
00471                 return NC_ERANGE;
00472         return ENOERR;
00473 }

int ncx_get_int_short const void *  xp,
short *  ip
 

Definition at line 487 of file ncx.c.

References ENOERR, get_ix_int(), NC_ERANGE, SHORT_MAX, and SHORT_MIN.

Referenced by ncx_getn_int_short().

00488 {
00489 #if SIZEOF_IX_INT == SIZEOF_SHORT && IX_INT_MAX == SHORT_MAX
00490         get_ix_int(xp, (ix_int *)ip);
00491         return ENOERR;
00492 #else
00493         ix_int xx;
00494         get_ix_int(xp, &xx);
00495         *ip = xx;
00496 #  if IX_INT_MAX > SHORT_MAX
00497         if(xx > SHORT_MAX || xx < SHORT_MIN)
00498                 return NC_ERANGE;
00499 #  endif
00500         return ENOERR;
00501 #endif
00502 }

int ncx_get_int_uchar const void *  xp,
uchar ip
 

Definition at line 476 of file ncx.c.

References ENOERR, get_ix_int(), and NC_ERANGE.

Referenced by ncx_getn_int_uchar().

00477 {
00478         ix_int xx;
00479         get_ix_int(xp, &xx);
00480         *ip = xx;
00481         if(xx > UCHAR_MAX || xx < 0)
00482                 return NC_ERANGE;
00483         return ENOERR;
00484 }

int ncx_get_off_t const void **  xpp,
off_t *  lp,
size_t  sizeof_off_t
 

Definition at line 1790 of file ncx.c.

References ENOERR.

Referenced by v1h_get_NC_var().

01791 {
01792         /* similar to get_ix_int() */
01793         const uchar *cp = (const uchar *) *xpp;
01794         assert(sizeof_off_t == 4 || sizeof_off_t == 8);
01795 
01796         if (sizeof_off_t == 4) {
01797                 *lp = *cp++ << 24;
01798                 *lp |= (*cp++ << 16);
01799                 *lp |= (*cp++ <<  8);
01800                 *lp |= *cp; 
01801         } else {
01802 #if SIZEOF_OFF_T == 4
01803 /* Read a 64-bit offset on a system with only a 32-bit offset */
01804 /* If the offset overflows, set an error code and return */
01805                 *lp =  ((off_t)(*cp++) << 24);
01806                 *lp |= ((off_t)(*cp++) << 16);
01807                 *lp |= ((off_t)(*cp++) <<  8);
01808                 *lp |= ((off_t)(*cp++));
01809 /*
01810  * lp now contains the upper 32-bits of the 64-bit offset.  if lp is
01811  * not zero, then the dataset is larger than can be represented
01812  * on this system.  Set an error code and return.
01813  */
01814                 if (*lp != 0) {
01815                   return ERANGE;
01816                 }
01817 
01818                 *lp  = ((off_t)(*cp++) << 24);
01819                 *lp |= ((off_t)(*cp++) << 16);
01820                 *lp |= ((off_t)(*cp++) <<  8);
01821                 *lp |=  (off_t)*cp;
01822 
01823                 if (*lp < 0) {
01824                   /*
01825                    * If this fails, then the offset is >2^31, but less
01826                    * than 2^32 which is not allowed, but is not caught
01827                    * by the previous check
01828                    */
01829                   return ERANGE;
01830                 }
01831 #else
01832                 *lp =  ((off_t)(*cp++) << 56);
01833                 *lp |= ((off_t)(*cp++) << 48);
01834                 *lp |= ((off_t)(*cp++) << 40);
01835                 *lp |= ((off_t)(*cp++) << 32);
01836                 *lp |= ((off_t)(*cp++) << 24);
01837                 *lp |= ((off_t)(*cp++) << 16);
01838                 *lp |= ((off_t)(*cp++) <<  8);
01839                 *lp |=  (off_t)*cp;
01840 #endif
01841         }
01842         *xpp = (const void *)((const char *)(*xpp) + sizeof_off_t);
01843         return ENOERR;
01844 }

int ncx_get_short_double const void *  xp,
double *  ip
 

Definition at line 314 of file ncx.c.

References ENOERR, and get_ix_short().

Referenced by ncx_getn_short_double(), and ncx_pad_getn_short_double().

00315 {
00316         /* assert(DBL_MAX >= X_SHORT_MAX); */
00317         ix_short xx;
00318         get_ix_short(xp, &xx);
00319         *ip = xx;
00320         return ENOERR;
00321 }

int ncx_get_short_float const void *  xp,
float *  ip
 

Definition at line 301 of file ncx.c.

References ENOERR, FLT_MAX, get_ix_short(), and NC_ERANGE.

Referenced by ncx_getn_short_float(), and ncx_pad_getn_short_float().

00302 {
00303         ix_short xx;
00304         get_ix_short(xp, &xx);
00305         *ip = xx;
00306 #if 0   /* TODO: determine when necessary */
00307         if(xx > FLT_MAX || xx < (-FLT_MAX))
00308                 return NC_ERANGE;
00309 #endif
00310         return ENOERR;
00311 }

int ncx_get_short_int const void *  xp,
int *  ip
 

Definition at line 268 of file ncx.c.

References ENOERR, get_ix_short(), and NC_ERANGE.

Referenced by ncx_getn_short_int(), and ncx_pad_getn_short_int().

00269 {
00270 #if SIZEOF_IX_SHORT == SIZEOF_INT && IX_SHORT_MAX == INT_MAX
00271         get_ix_short(xp, (ix_short *)ip);
00272         return ENOERR;
00273 #else
00274         ix_short xx;
00275         get_ix_short(xp, &xx);
00276         *ip = xx;
00277 #   if IX_SHORT_MAX > INT_MAX
00278         if(xx > INT_MAX || xx < INT_MIN)
00279                 return NC_ERANGE;
00280 #   endif
00281         return ENOERR;
00282 #endif
00283 }

int ncx_get_short_long const void *  xp,
long *  ip
 

Definition at line 286 of file ncx.c.

References ENOERR, and get_ix_short().

Referenced by ncx_getn_short_long(), and ncx_pad_getn_short_long().

00287 {
00288 #if SIZEOF_IX_SHORT == SIZEOF_LONG && IX_SHORT_MAX == LONG_MAX
00289         get_ix_short(xp, (ix_short *)ip);
00290         return ENOERR;
00291 #else
00292         /* assert(LONG_MAX >= X_SHORT_MAX); */
00293         ix_short xx;
00294         get_ix_short(xp, &xx);
00295         *ip = xx;
00296         return ENOERR;
00297 #endif
00298 }

int ncx_get_short_schar const void *  xp,
schar ip
 

Definition at line 228 of file ncx.c.

References ENOERR, get_ix_short(), and NC_ERANGE.

Referenced by ncx_getn_short_schar(), and ncx_pad_getn_short_schar().

00229 {
00230         ix_short xx;
00231         get_ix_short(xp, &xx);
00232         *ip = xx;
00233         if(xx > SCHAR_MAX || xx < SCHAR_MIN)
00234                 return NC_ERANGE;
00235         return ENOERR;
00236 }

int ncx_get_short_short const void *  xp,
short *  ip
 

Definition at line 250 of file ncx.c.

References ENOERR, get_ix_short(), NC_ERANGE, SHORT_MAX, and SHORT_MIN.

Referenced by ncx_getn_short_short(), and ncx_pad_getn_short_short().

00251 {
00252 #if SIZEOF_IX_SHORT == SIZEOF_SHORT && IX_SHORT_MAX == SHORT_MAX
00253         get_ix_short(xp, (ix_short *)ip);
00254         return ENOERR;
00255 #else
00256         ix_short xx;
00257         get_ix_short(xp, &xx);
00258         *ip = xx;
00259 #   if IX_SHORT_MAX > SHORT_MAX
00260         if(xx > SHORT_MAX || xx < SHORT_MIN)
00261                 return NC_ERANGE;
00262 #   endif
00263         return ENOERR;
00264 #endif
00265 }

int ncx_get_short_uchar const void *  xp,
uchar ip
 

Definition at line 239 of file ncx.c.

References ENOERR, get_ix_short(), and NC_ERANGE.

Referenced by ncx_getn_short_uchar(), and ncx_pad_getn_short_uchar().

00240 {
00241         ix_short xx;
00242         get_ix_short(xp, &xx);
00243         *ip = xx;
00244         if(xx > UCHAR_MAX || xx < 0)
00245                 return NC_ERANGE;
00246         return ENOERR;
00247 }

int ncx_get_size_t const void **  xpp,
size_t *  ulp
 

Definition at line 1728 of file ncx.c.

References ENOERR, and X_SIZEOF_SIZE_T.

Referenced by nc_get_NC(), read_numrecs(), and v1h_get_size_t().

01729 {
01730         /* similar to get_ix_int */
01731         const uchar *cp = (const uchar *) *xpp;
01732 
01733         *ulp = (unsigned)(*cp++ << 24);
01734         *ulp |= (*cp++ << 16);
01735         *ulp |= (*cp++ << 8);
01736         *ulp |= *cp; 
01737 
01738         *xpp = (const void *)((const char *)(*xpp) + X_SIZEOF_SIZE_T);
01739         return ENOERR;
01740 }

int ncx_getn_double_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 3859 of file ncx.c.

References ENOERR, and ncx_get_double_double().

Referenced by getNCvx_double_double(), and ncx_pad_getn_Idouble().

03860 {
03861         const char *xp = *xpp;
03862         int status = ENOERR;
03863 
03864         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03865         {
03866                 const int lstatus = ncx_get_double_double(xp, tp);
03867                 if(lstatus != ENOERR)
03868                         status = lstatus;
03869         }
03870 
03871         *xpp = (const void *)xp;
03872         return status;
03873 }

int ncx_getn_double_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 3761 of file ncx.c.

References ENOERR, ncx_get_double_float(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_float(), and ncx_pad_getn_Ifloat().

03762 {
03763         const char *xp = (const char *) *xpp;
03764         int status = ENOERR;
03765 
03766         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03767         {
03768                 const int lstatus = ncx_get_double_float(xp, tp);
03769                 if(lstatus != ENOERR)
03770                         status = lstatus;
03771         }
03772 
03773         *xpp = (const void *)xp;
03774         return status;
03775 }

int ncx_getn_double_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 3727 of file ncx.c.

References ENOERR, ncx_get_double_int(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_int(), and ncx_pad_getn_Iint().

03728 {
03729         const char *xp = (const char *) *xpp;
03730         int status = ENOERR;
03731 
03732         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03733         {
03734                 const int lstatus = ncx_get_double_int(xp, tp);
03735                 if(lstatus != ENOERR)
03736                         status = lstatus;
03737         }
03738 
03739         *xpp = (const void *)xp;
03740         return status;
03741 }

int ncx_getn_double_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 3744 of file ncx.c.

References ENOERR, ncx_get_double_long(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_long(), and ncx_pad_getn_Ilong().

03745 {
03746         const char *xp = (const char *) *xpp;
03747         int status = ENOERR;
03748 
03749         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03750         {
03751                 const int lstatus = ncx_get_double_long(xp, tp);
03752                 if(lstatus != ENOERR)
03753                         status = lstatus;
03754         }
03755 
03756         *xpp = (const void *)xp;
03757         return status;
03758 }

int ncx_getn_double_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 3676 of file ncx.c.

References ENOERR, ncx_get_double_schar(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_schar(), and ncx_pad_getn_Ischar().

03677 {
03678         const char *xp = (const char *) *xpp;
03679         int status = ENOERR;
03680 
03681         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03682         {
03683                 const int lstatus = ncx_get_double_schar(xp, tp);
03684                 if(lstatus != ENOERR)
03685                         status = lstatus;
03686         }
03687 
03688         *xpp = (const void *)xp;
03689         return status;
03690 }

int ncx_getn_double_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 3710 of file ncx.c.

References ENOERR, ncx_get_double_short(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_short(), and ncx_pad_getn_Ishort().

03711 {
03712         const char *xp = (const char *) *xpp;
03713         int status = ENOERR;
03714 
03715         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03716         {
03717                 const int lstatus = ncx_get_double_short(xp, tp);
03718                 if(lstatus != ENOERR)
03719                         status = lstatus;
03720         }
03721 
03722         *xpp = (const void *)xp;
03723         return status;
03724 }

int ncx_getn_double_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 3693 of file ncx.c.

References ENOERR, ncx_get_double_uchar(), and X_SIZEOF_DOUBLE.

Referenced by getNCvx_double_uchar(), and ncx_pad_getn_Iuchar().

03694 {
03695         const char *xp = (const char *) *xpp;
03696         int status = ENOERR;
03697 
03698         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03699         {
03700                 const int lstatus = ncx_get_double_uchar(xp, tp);
03701                 if(lstatus != ENOERR)
03702                         status = lstatus;
03703         }
03704 
03705         *xpp = (const void *)xp;
03706         return status;
03707 }

int ncx_getn_float_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 3450 of file ncx.c.

References ENOERR, and ncx_get_float_double().

Referenced by getNCvx_float_double(), and ncx_pad_getn_Idouble().

03451 {
03452         const char *xp = (const char *) *xpp;
03453         int status = ENOERR;
03454 
03455         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03456         {
03457                 const int lstatus = ncx_get_float_double(xp, tp);
03458                 if(lstatus != ENOERR)
03459                         status = lstatus;
03460         }
03461 
03462         *xpp = (const void *)xp;
03463         return status;
03464 }

int ncx_getn_float_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 3432 of file ncx.c.

References ENOERR, and ncx_get_float_float().

Referenced by getNCvx_float_float(), and ncx_pad_getn_Ifloat().

03433 {
03434         const char *xp = *xpp;
03435         int status = ENOERR;
03436 
03437         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03438         {
03439                 const int lstatus = ncx_get_float_float(xp, tp);
03440                 if(lstatus != ENOERR)
03441                         status = lstatus;
03442         }
03443 
03444         *xpp = (const void *)xp;
03445         return status;
03446 }

int ncx_getn_float_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 3313 of file ncx.c.

References ENOERR, ncx_get_float_int(), and X_SIZEOF_FLOAT.

Referenced by getNCvx_float_int(), and ncx_pad_getn_Iint().

03314 {
03315         const char *xp = (const char *) *xpp;
03316         int status = ENOERR;
03317 
03318         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03319         {
03320                 const int lstatus = ncx_get_float_int(xp, tp);
03321                 if(lstatus != ENOERR)
03322                         status = lstatus;
03323         }
03324 
03325         *xpp = (const void *)xp;
03326         return status;
03327 }

int ncx_getn_float_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 3330 of file ncx.c.

References ENOERR, ncx_get_float_long(), and X_SIZEOF_FLOAT.

Referenced by getNCvx_float_long(), and ncx_pad_getn_Ilong().

03331 {
03332         const char *xp = (const char *) *xpp;
03333         int status = ENOERR;
03334 
03335         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03336         {
03337                 const int lstatus = ncx_get_float_long(xp, tp);
03338                 if(lstatus != ENOERR)
03339                         status = lstatus;
03340         }
03341 
03342         *xpp = (const void *)xp;
03343         return status;
03344 }

int ncx_getn_float_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 3262 of file ncx.c.

References ENOERR, ncx_get_float_schar(), and X_SIZEOF_FLOAT.

Referenced by getNCvx_float_schar(), and ncx_pad_getn_Ischar().

03263 {
03264         const char *xp = (const char *) *xpp;
03265         int status = ENOERR;
03266 
03267         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03268         {
03269                 const int lstatus = ncx_get_float_schar(xp, tp);
03270                 if(lstatus != ENOERR)
03271                         status = lstatus;
03272         }
03273 
03274         *xpp = (const void *)xp;
03275         return status;
03276 }

int ncx_getn_float_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 3296 of file ncx.c.

References ENOERR, ncx_get_float_short(), and X_SIZEOF_FLOAT.

Referenced by getNCvx_float_short(), and ncx_pad_getn_Ishort().

03297 {
03298         const char *xp = (const char *) *xpp;
03299         int status = ENOERR;
03300 
03301         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03302         {
03303                 const int lstatus = ncx_get_float_short(xp, tp);
03304                 if(lstatus != ENOERR)
03305                         status = lstatus;
03306         }
03307 
03308         *xpp = (const void *)xp;
03309         return status;
03310 }

int ncx_getn_float_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 3279 of file ncx.c.

References ENOERR, ncx_get_float_uchar(), and X_SIZEOF_FLOAT.

Referenced by getNCvx_float_uchar(), and ncx_pad_getn_Iuchar().

03280 {
03281         const char *xp = (const char *) *xpp;
03282         int status = ENOERR;
03283 
03284         for( ; nelems != 0; nelems--, xp += X_SIZEOF_FLOAT, tp++)
03285         {
03286                 const int lstatus = ncx_get_float_uchar(xp, tp);
03287                 if(lstatus != ENOERR)
03288                         status = lstatus;
03289         }
03290 
03291         *xpp = (const void *)xp;
03292         return status;
03293 }

int ncx_getn_int_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 3091 of file ncx.c.

References ENOERR, ncx_get_int_double(), and X_SIZEOF_INT.

Referenced by getNCvx_int_double(), and ncx_pad_getn_Idouble().

03092 {
03093         const char *xp = (const char *) *xpp;
03094         int status = ENOERR;
03095 
03096         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
03097         {
03098                 const int lstatus = ncx_get_int_double(xp, tp);
03099                 if(lstatus != ENOERR)
03100                         status = lstatus;
03101         }
03102 
03103         *xpp = (const void *)xp;
03104         return status;
03105 }

int ncx_getn_int_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 3074 of file ncx.c.

References ENOERR, ncx_get_int_float(), and X_SIZEOF_INT.

Referenced by getNCvx_int_float(), and ncx_pad_getn_Ifloat().

03075 {
03076         const char *xp = (const char *) *xpp;
03077         int status = ENOERR;
03078 
03079         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
03080         {
03081                 const int lstatus = ncx_get_int_float(xp, tp);
03082                 if(lstatus != ENOERR)
03083                         status = lstatus;
03084         }
03085 
03086         *xpp = (const void *)xp;
03087         return status;
03088 }

int ncx_getn_int_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 3024 of file ncx.c.

References ENOERR, ncx_get_int_int(), and X_SIZEOF_INT.

Referenced by getNCvx_int_int(), ncx_pad_getn_Iint(), and v1h_get_NC_var().

03025 {
03026         const char *xp = (const char *) *xpp;
03027         int status = ENOERR;
03028 
03029         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
03030         {
03031                 const int lstatus = ncx_get_int_int(xp, tp);
03032                 if(lstatus != ENOERR)
03033                         status = lstatus;
03034         }
03035 
03036         *xpp = (const void *)xp;
03037         return status;
03038 }

int ncx_getn_int_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 3056 of file ncx.c.

References ENOERR, ncx_get_int_long(), and X_SIZEOF_INT.

Referenced by getNCvx_int_long(), and ncx_pad_getn_Ilong().

03057 {
03058         const char *xp = (const char *) *xpp;
03059         int status = ENOERR;
03060 
03061         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
03062         {
03063                 const int lstatus = ncx_get_int_long(xp, tp);
03064                 if(lstatus != ENOERR)
03065                         status = lstatus;
03066         }
03067 
03068         *xpp = (const void *)xp;
03069         return status;
03070 }

int ncx_getn_int_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 2959 of file ncx.c.

References ENOERR, ncx_get_int_schar(), and X_SIZEOF_INT.

Referenced by getNCvx_int_schar(), and ncx_pad_getn_Ischar().

02960 {
02961         const char *xp = (const char *) *xpp;
02962         int status = ENOERR;
02963 
02964         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
02965         {
02966                 const int lstatus = ncx_get_int_schar(xp, tp);
02967                 if(lstatus != ENOERR)
02968                         status = lstatus;
02969         }
02970 
02971         *xpp = (const void *)xp;
02972         return status;
02973 }

int ncx_getn_int_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 2993 of file ncx.c.

References ENOERR, ncx_get_int_short(), and X_SIZEOF_INT.

Referenced by getNCvx_int_short(), and ncx_pad_getn_Ishort().

02994 {
02995         const char *xp = (const char *) *xpp;
02996         int status = ENOERR;
02997 
02998         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
02999         {
03000                 const int lstatus = ncx_get_int_short(xp, tp);
03001                 if(lstatus != ENOERR)
03002                         status = lstatus;
03003         }
03004 
03005         *xpp = (const void *)xp;
03006         return status;
03007 }

int ncx_getn_int_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 2976 of file ncx.c.

References ENOERR, ncx_get_int_uchar(), and X_SIZEOF_INT.

Referenced by getNCvx_int_uchar(), and ncx_pad_getn_Iuchar().

02977 {
02978         const char *xp = (const char *) *xpp;
02979         int status = ENOERR;
02980 
02981         for( ; nelems != 0; nelems--, xp += X_SIZEOF_INT, tp++)
02982         {
02983                 const int lstatus = ncx_get_int_uchar(xp, tp);
02984                 if(lstatus != ENOERR)
02985                         status = lstatus;
02986         }
02987 
02988         *xpp = (const void *)xp;
02989         return status;
02990 }

int ncx_getn_schar_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 1928 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_double().

01929 {
01930         schar *xp = (schar *)(*xpp);
01931 
01932         while(nelems-- != 0)
01933         {
01934                 *tp++ = *xp++;
01935         }
01936 
01937         *xpp = (const void *)xp;
01938         return ENOERR;
01939 }

int ncx_getn_schar_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 1914 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_float().

01915 {
01916         schar *xp = (schar *)(*xpp);
01917 
01918         while(nelems-- != 0)
01919         {
01920                 *tp++ = *xp++;
01921         }
01922 
01923         *xpp = (const void *)xp;
01924         return ENOERR;
01925 }

int ncx_getn_schar_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 1886 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_int().

01887 {
01888         schar *xp = (schar *)(*xpp);
01889 
01890         while(nelems-- != 0)
01891         {
01892                 *tp++ = *xp++;
01893         }
01894 
01895         *xpp = (const void *)xp;
01896         return ENOERR;
01897 }

int ncx_getn_schar_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 1900 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_long().

01901 {
01902         schar *xp = (schar *)(*xpp);
01903 
01904         while(nelems-- != 0)
01905         {
01906                 *tp++ = *xp++;
01907         }
01908 
01909         *xpp = (const void *)xp;
01910         return ENOERR;
01911 }

int ncx_getn_schar_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 1856 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_schar(), and nc_get_NC().

01857 {
01858                 (void) memcpy(tp, *xpp, nelems);
01859         *xpp = (void *)((char *)(*xpp) + nelems);
01860         return ENOERR;
01861 
01862 }

int ncx_getn_schar_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 1872 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_short().

01873 {
01874         schar *xp = (schar *)(*xpp);
01875 
01876         while(nelems-- != 0)
01877         {
01878                 *tp++ = *xp++;
01879         }
01880 
01881         *xpp = (const void *)xp;
01882         return ENOERR;
01883 }

int ncx_getn_schar_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 1864 of file ncx.c.

References ENOERR.

Referenced by getNCvx_schar_uchar().

01865 {
01866                 (void) memcpy(tp, *xpp, nelems);
01867         *xpp = (void *)((char *)(*xpp) + nelems);
01868         return ENOERR;
01869 
01870 }

int ncx_getn_short_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 2472 of file ncx.c.

References ENOERR, ncx_get_short_double(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_double().

02473 {
02474         const char *xp = (const char *) *xpp;
02475         int status = ENOERR;
02476 
02477         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02478         {
02479                 const int lstatus = ncx_get_short_double(xp, tp);
02480                 if(lstatus != ENOERR)
02481                         status = lstatus;
02482         }
02483 
02484         *xpp = (const void *)xp;
02485         return status;
02486 }

int ncx_getn_short_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 2455 of file ncx.c.

References ENOERR, ncx_get_short_float(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_float().

02456 {
02457         const char *xp = (const char *) *xpp;
02458         int status = ENOERR;
02459 
02460         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02461         {
02462                 const int lstatus = ncx_get_short_float(xp, tp);
02463                 if(lstatus != ENOERR)
02464                         status = lstatus;
02465         }
02466 
02467         *xpp = (const void *)xp;
02468         return status;
02469 }

int ncx_getn_short_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 2421 of file ncx.c.

References ENOERR, ncx_get_short_int(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_int().

02422 {
02423         const char *xp = (const char *) *xpp;
02424         int status = ENOERR;
02425 
02426         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02427         {
02428                 const int lstatus = ncx_get_short_int(xp, tp);
02429                 if(lstatus != ENOERR)
02430                         status = lstatus;
02431         }
02432 
02433         *xpp = (const void *)xp;
02434         return status;
02435 }

int ncx_getn_short_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 2438 of file ncx.c.

References ENOERR, ncx_get_short_long(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_long().

02439 {
02440         const char *xp = (const char *) *xpp;
02441         int status = ENOERR;
02442 
02443         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02444         {
02445                 const int lstatus = ncx_get_short_long(xp, tp);
02446                 if(lstatus != ENOERR)
02447                         status = lstatus;
02448         }
02449 
02450         *xpp = (const void *)xp;
02451         return status;
02452 }

int ncx_getn_short_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 2355 of file ncx.c.

References ENOERR, ncx_get_short_schar(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_schar().

02356 {
02357         const char *xp = (const char *) *xpp;
02358         int status = ENOERR;
02359 
02360         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02361         {
02362                 const int lstatus = ncx_get_short_schar(xp, tp);
02363                 if(lstatus != ENOERR)
02364                         status = lstatus;
02365         }
02366 
02367         *xpp = (const void *)xp;
02368         return status;
02369 }

int ncx_getn_short_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 2403 of file ncx.c.

References ENOERR, ncx_get_short_short(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_short().

02404 {
02405         const char *xp = (const char *) *xpp;
02406         int status = ENOERR;
02407 
02408         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02409         {
02410                 const int lstatus = ncx_get_short_short(xp, tp);
02411                 if(lstatus != ENOERR)
02412                         status = lstatus;
02413         }
02414 
02415         *xpp = (const void *)xp;
02416         return status;
02417 }

int ncx_getn_short_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 2372 of file ncx.c.

References ENOERR, ncx_get_short_uchar(), and X_SIZEOF_SHORT.

Referenced by getNCvx_short_uchar().

02373 {
02374         const char *xp = (const char *) *xpp;
02375         int status = ENOERR;
02376 
02377         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02378         {
02379                 const int lstatus = ncx_get_short_uchar(xp, tp);
02380                 if(lstatus != ENOERR)
02381                         status = lstatus;
02382         }
02383 
02384         *xpp = (const void *)xp;
02385         return status;
02386 }

int ncx_getn_text const void **  xpp,
size_t  nchars,
char *  cp
 

Definition at line 4105 of file ncx.c.

References ENOERR.

04106 {
04107         (void) memcpy(tp, *xpp, nelems);
04108         *xpp = (void *)((char *)(*xpp) + nelems);
04109         return ENOERR;
04110 
04111 }

int ncx_getn_void const void **  xpp,
size_t  nchars,
void *  vp
 

Definition at line 4163 of file ncx.c.

References ENOERR.

04164 {
04165         (void) memcpy(tp, *xpp, nelems);
04166         *xpp = (void *)((char *)(*xpp) + nelems);
04167         return ENOERR;
04168 
04169 }

int ncx_pad_getn_schar_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 2043 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Idouble().

02044 {
02045         size_t rndup = nelems % X_ALIGN;
02046         schar *xp = (schar *) *xpp;
02047 
02048         if(rndup)
02049                 rndup = X_ALIGN - rndup;
02050 
02051         while(nelems-- != 0)
02052         {
02053                 *tp++ = *xp++;
02054         }
02055 
02056         *xpp = (void *)(xp + rndup);
02057         return ENOERR;
02058 }

int ncx_pad_getn_schar_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 2025 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Ifloat().

02026 {
02027         size_t rndup = nelems % X_ALIGN;
02028         schar *xp = (schar *) *xpp;
02029 
02030         if(rndup)
02031                 rndup = X_ALIGN - rndup;
02032 
02033         while(nelems-- != 0)
02034         {
02035                 *tp++ = *xp++;
02036         }
02037 
02038         *xpp = (void *)(xp + rndup);
02039         return ENOERR;
02040 }

int ncx_pad_getn_schar_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 1989 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Iint().

01990 {
01991         size_t rndup = nelems % X_ALIGN;
01992         schar *xp = (schar *) *xpp;
01993 
01994         if(rndup)
01995                 rndup = X_ALIGN - rndup;
01996 
01997         while(nelems-- != 0)
01998         {
01999                 *tp++ = *xp++;
02000         }
02001 
02002         *xpp = (void *)(xp + rndup);
02003         return ENOERR;
02004 }

int ncx_pad_getn_schar_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 2007 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Ilong().

02008 {
02009         size_t rndup = nelems % X_ALIGN;
02010         schar *xp = (schar *) *xpp;
02011 
02012         if(rndup)
02013                 rndup = X_ALIGN - rndup;
02014 
02015         while(nelems-- != 0)
02016         {
02017                 *tp++ = *xp++;
02018         }
02019 
02020         *xpp = (void *)(xp + rndup);
02021         return ENOERR;
02022 }

int ncx_pad_getn_schar_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 1943 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Ischar().

01944 {
01945                 size_t rndup = nelems % X_ALIGN;
01946 
01947         if(rndup)
01948                 rndup = X_ALIGN - rndup;
01949 
01950         (void) memcpy(tp, *xpp, nelems);
01951         *xpp = (void *)((char *)(*xpp) + nelems + rndup);
01952 
01953         return ENOERR;
01954 
01955 }

int ncx_pad_getn_schar_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 1971 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Ishort().

01972 {
01973         size_t rndup = nelems % X_ALIGN;
01974         schar *xp = (schar *) *xpp;
01975 
01976         if(rndup)
01977                 rndup = X_ALIGN - rndup;
01978 
01979         while(nelems-- != 0)
01980         {
01981                 *tp++ = *xp++;
01982         }
01983 
01984         *xpp = (void *)(xp + rndup);
01985         return ENOERR;
01986 }

int ncx_pad_getn_schar_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 1957 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by ncx_pad_getn_Iuchar().

01958 {
01959                 size_t rndup = nelems % X_ALIGN;
01960 
01961         if(rndup)
01962                 rndup = X_ALIGN - rndup;
01963 
01964         (void) memcpy(tp, *xpp, nelems);
01965         *xpp = (void *)((char *)(*xpp) + nelems + rndup);
01966 
01967         return ENOERR;
01968 
01969 }

int ncx_pad_getn_short_double const void **  xpp,
size_t  nelems,
double *  ip
 

Definition at line 2622 of file ncx.c.

References ENOERR, ncx_get_short_double(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Idouble().

02623 {
02624         const size_t rndup = nelems % 2;
02625 
02626         const char *xp = (const char *) *xpp;
02627         int status = ENOERR;
02628 
02629         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02630         {
02631                 const int lstatus = ncx_get_short_double(xp, tp);
02632                 if(lstatus != ENOERR)
02633                         status = lstatus;
02634         }
02635 
02636         if(rndup != 0)
02637                 xp += X_SIZEOF_SHORT;
02638                 
02639         *xpp = (void *)xp;
02640         return status;
02641 }

int ncx_pad_getn_short_float const void **  xpp,
size_t  nelems,
float *  ip
 

Definition at line 2600 of file ncx.c.

References ENOERR, ncx_get_short_float(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Ifloat().

02601 {
02602         const size_t rndup = nelems % 2;
02603 
02604         const char *xp = (const char *) *xpp;
02605         int status = ENOERR;
02606 
02607         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02608         {
02609                 const int lstatus = ncx_get_short_float(xp, tp);
02610                 if(lstatus != ENOERR)
02611                         status = lstatus;
02612         }
02613 
02614         if(rndup != 0)
02615                 xp += X_SIZEOF_SHORT;
02616                 
02617         *xpp = (void *)xp;
02618         return status;
02619 }

int ncx_pad_getn_short_int const void **  xpp,
size_t  nelems,
int *  ip
 

Definition at line 2556 of file ncx.c.

References ENOERR, ncx_get_short_int(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Iint().

02557 {
02558         const size_t rndup = nelems % 2;
02559 
02560         const char *xp = (const char *) *xpp;
02561         int status = ENOERR;
02562 
02563         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02564         {
02565                 const int lstatus = ncx_get_short_int(xp, tp);
02566                 if(lstatus != ENOERR)
02567                         status = lstatus;
02568         }
02569 
02570         if(rndup != 0)
02571                 xp += X_SIZEOF_SHORT;
02572                 
02573         *xpp = (void *)xp;
02574         return status;
02575 }

int ncx_pad_getn_short_long const void **  xpp,
size_t  nelems,
long *  ip
 

Definition at line 2578 of file ncx.c.

References ENOERR, ncx_get_short_long(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Ilong().

02579 {
02580         const size_t rndup = nelems % 2;
02581 
02582         const char *xp = (const char *) *xpp;
02583         int status = ENOERR;
02584 
02585         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02586         {
02587                 const int lstatus = ncx_get_short_long(xp, tp);
02588                 if(lstatus != ENOERR)
02589                         status = lstatus;
02590         }
02591 
02592         if(rndup != 0)
02593                 xp += X_SIZEOF_SHORT;
02594                 
02595         *xpp = (void *)xp;
02596         return status;
02597 }

int ncx_pad_getn_short_schar const void **  xpp,
size_t  nelems,
schar ip
 

Definition at line 2490 of file ncx.c.

References ENOERR, ncx_get_short_schar(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Ischar().

02491 {
02492         const size_t rndup = nelems % 2;
02493 
02494         const char *xp = (const char *) *xpp;
02495         int status = ENOERR;
02496 
02497         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02498         {
02499                 const int lstatus = ncx_get_short_schar(xp, tp);
02500                 if(lstatus != ENOERR)
02501                         status = lstatus;
02502         }
02503 
02504         if(rndup != 0)
02505                 xp += X_SIZEOF_SHORT;
02506                 
02507         *xpp = (void *)xp;
02508         return status;
02509 }

int ncx_pad_getn_short_short const void **  xpp,
size_t  nelems,
short *  ip
 

Definition at line 2534 of file ncx.c.

References ENOERR, ncx_get_short_short(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Ishort().

02535 {
02536         const size_t rndup = nelems % 2;
02537 
02538         const char *xp = (const char *) *xpp;
02539         int status = ENOERR;
02540 
02541         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02542         {
02543                 const int lstatus = ncx_get_short_short(xp, tp);
02544                 if(lstatus != ENOERR)
02545                         status = lstatus;
02546         }
02547 
02548         if(rndup != 0)
02549                 xp += X_SIZEOF_SHORT;
02550                 
02551         *xpp = (void *)xp;
02552         return status;
02553 }

int ncx_pad_getn_short_uchar const void **  xpp,
size_t  nelems,
uchar ip
 

Definition at line 2512 of file ncx.c.

References ENOERR, ncx_get_short_uchar(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_getn_Iuchar().

02513 {
02514         const size_t rndup = nelems % 2;
02515 
02516         const char *xp = (const char *) *xpp;
02517         int status = ENOERR;
02518 
02519         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02520         {
02521                 const int lstatus = ncx_get_short_uchar(xp, tp);
02522                 if(lstatus != ENOERR)
02523                         status = lstatus;
02524         }
02525 
02526         if(rndup != 0)
02527                 xp += X_SIZEOF_SHORT;
02528                 
02529         *xpp = (void *)xp;
02530         return status;
02531 }

int ncx_pad_getn_text const void **  xpp,
size_t  nchars,
char *  cp
 

Definition at line 4114 of file ncx.c.

References ENOERR, and X_ALIGN.

Referenced by nc_get_att_text(), and v1h_get_NC_string().

04115 {
04116         size_t rndup = nelems % X_ALIGN;
04117 
04118         if(rndup)
04119                 rndup = X_ALIGN - rndup;
04120 
04121         (void) memcpy(tp, *xpp, nelems);
04122         *xpp = (void *)((char *)(*xpp) + nelems + rndup);
04123 
04124         return ENOERR;
04125 
04126 }

int ncx_pad_getn_void const void **  xpp,
size_t  nchars,
void *  vp
 

Definition at line 4172 of file ncx.c.

References ENOERR, and X_ALIGN.

04173 {
04174         size_t rndup = nelems % X_ALIGN;
04175 
04176         if(rndup)
04177                 rndup = X_ALIGN - rndup;
04178 
04179         (void) memcpy(tp, *xpp, nelems);
04180         *xpp = (void *)((char *)(*xpp) + nelems + rndup);
04181 
04182         return ENOERR;
04183 
04184 }

int ncx_pad_putn_schar_double void **  xpp,
size_t  nelems,
const double *  ip
 

Definition at line 2322 of file ncx.c.

References ENOERR, nada, NC_ERANGE, X_ALIGN, X_SCHAR_MAX, and X_SCHAR_MIN.

Referenced by ncx_pad_putn_Idouble().

02323 {
02324         int status = ENOERR;
02325         size_t rndup = nelems % X_ALIGN;
02326         schar *xp = (schar *) *xpp;
02327 
02328         if(rndup)
02329                 rndup = X_ALIGN - rndup;
02330 
02331         while(nelems-- != 0)
02332         {
02333                 /* N.B. schar as signed */
02334                 if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
02335                         status = NC_ERANGE;
02336                 *xp++ = (schar) *tp++;
02337         }
02338 
02339 
02340         if(rndup)
02341         {
02342                 (void) memcpy(xp, nada, rndup);
02343                 xp += rndup;
02344         }
02345 
02346         *xpp = (void *)xp;
02347         return status;
02348 }

int ncx_pad_putn_schar_float void **  xpp,
size_t  nelems,
const float *  ip
 

Definition at line 2293 of file ncx.c.

References ENOERR, nada, NC_ERANGE, X_ALIGN, X_SCHAR_MAX, and X_SCHAR_MIN.

Referenced by ncx_pad_putn_Ifloat().

02294 {
02295         int status = ENOERR;
02296         size_t rndup = nelems % X_ALIGN;
02297         schar *xp = (schar *) *xpp;
02298 
02299         if(rndup)
02300                 rndup = X_ALIGN - rndup;
02301 
02302         while(nelems-- != 0)
02303         {
02304                 /* N.B. schar as signed */
02305                 if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
02306                         status = NC_ERANGE;
02307                 *xp++ = (schar) *tp++;
02308         }
02309 
02310 
02311         if(rndup)
02312         {
02313                 (void) memcpy(xp, nada, rndup);
02314                 xp += rndup;
02315         }
02316 
02317         *xpp = (void *)xp;
02318         return status;
02319 }

int ncx_pad_putn_schar_int void **  xpp,
size_t  nelems,
const int *  ip
 

Definition at line 2235 of file ncx.c.

References ENOERR, nada, NC_ERANGE, X_ALIGN, X_SCHAR_MAX, and X_SCHAR_MIN.

Referenced by ncx_pad_putn_Iint().

02236 {
02237         int status = ENOERR;
02238         size_t rndup = nelems % X_ALIGN;
02239         schar *xp = (schar *) *xpp;
02240 
02241         if(rndup)
02242                 rndup = X_ALIGN - rndup;
02243 
02244         while(nelems-- != 0)
02245         {
02246                 /* N.B. schar as signed */
02247                 if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
02248                         status = NC_ERANGE;
02249                 *xp++ = (schar) *tp++;
02250         }
02251 
02252 
02253         if(rndup)
02254         {
02255                 (void) memcpy(xp, nada, rndup);
02256                 xp += rndup;
02257         }
02258 
02259         *xpp = (void *)xp;
02260         return status;
02261 }

int ncx_pad_putn_schar_long void **  xpp,
size_t  nelems,
const long *  ip
 

Definition at line 2264 of file ncx.c.

References ENOERR, nada, NC_ERANGE, X_ALIGN, X_SCHAR_MAX, and X_SCHAR_MIN.

Referenced by ncx_pad_putn_Ilong().

02265 {
02266         int status = ENOERR;
02267         size_t rndup = nelems % X_ALIGN;
02268         schar *xp = (schar *) *xpp;
02269 
02270         if(rndup)
02271                 rndup = X_ALIGN - rndup;
02272 
02273         while(nelems-- != 0)
02274         {
02275                 /* N.B. schar as signed */
02276                 if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
02277                         status = NC_ERANGE;
02278                 *xp++ = (schar) *tp++;
02279         }
02280 
02281 
02282         if(rndup)
02283         {
02284                 (void) memcpy(xp, nada, rndup);
02285                 xp += rndup;
02286         }
02287 
02288         *xpp = (void *)xp;
02289         return status;
02290 }

int ncx_pad_putn_schar_schar void **  xpp,
size_t  nelems,
const schar ip
 

Definition at line 2166 of file ncx.c.

References ENOERR, nada, and X_ALIGN.

Referenced by ncx_pad_putn_Ischar().

02167 {
02168                 size_t rndup = nelems % X_ALIGN;
02169 
02170         if(rndup)
02171                 rndup = X_ALIGN - rndup;
02172 
02173         (void) memcpy(*xpp, tp, nelems);
02174         *xpp = (void *)((char *)(*xpp) + nelems);
02175 
02176         if(rndup)
02177         {
02178                 (void) memcpy(*xpp, nada, rndup);
02179                 *xpp = (void *)((char *)(*xpp) + rndup);
02180         }
02181         
02182         return ENOERR;
02183 
02184 }

int ncx_pad_putn_schar_short void **  xpp,
size_t  nelems,
const short *  ip
 

Definition at line 2206 of file ncx.c.

References ENOERR, nada, NC_ERANGE, X_ALIGN, X_SCHAR_MAX, and X_SCHAR_MIN.

Referenced by ncx_pad_putn_Ishort().

02207 {
02208         int status = ENOERR;
02209         size_t rndup = nelems % X_ALIGN;
02210         schar *xp = (schar *) *xpp;
02211 
02212         if(rndup)
02213                 rndup = X_ALIGN - rndup;
02214 
02215         while(nelems-- != 0)
02216         {
02217                 /* N.B. schar as signed */
02218                 if(*tp > X_SCHAR_MAX || *tp < X_SCHAR_MIN)
02219                         status = NC_ERANGE;
02220                 *xp++ = (schar) *tp++;
02221         }
02222 
02223 
02224         if(rndup)
02225         {
02226                 (void) memcpy(xp, nada, rndup);
02227                 xp += rndup;
02228         }
02229 
02230         *xpp = (void *)xp;
02231         return status;
02232 }

int ncx_pad_putn_schar_uchar void **  xpp,
size_t  nelems,
const uchar ip
 

Definition at line 2186 of file ncx.c.

References ENOERR, nada, and X_ALIGN.

Referenced by ncx_pad_putn_Iuchar().

02187 {
02188                 size_t rndup = nelems % X_ALIGN;
02189 
02190         if(rndup)
02191                 rndup = X_ALIGN - rndup;
02192 
02193         (void) memcpy(*xpp, tp, nelems);
02194         *xpp = (void *)((char *)(*xpp) + nelems);
02195 
02196         if(rndup)
02197         {
02198                 (void) memcpy(*xpp, nada, rndup);
02199                 *xpp = (void *)((char *)(*xpp) + rndup);
02200         }
02201         
02202         return ENOERR;
02203 
02204 }

int ncx_pad_putn_short_double void **  xpp,
size_t  nelems,
const double *  ip
 

Definition at line 2930 of file ncx.c.

References ENOERR, nada, ncx_put_short_double(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Idouble().

02931 {
02932         const size_t rndup = nelems % 2;
02933 
02934         char *xp = (char *) *xpp;
02935         int status = ENOERR;
02936 
02937         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02938         {
02939                 int lstatus = ncx_put_short_double(xp, tp);
02940                 if(lstatus != ENOERR)
02941                         status = lstatus;
02942         }
02943 
02944         if(rndup != 0)
02945         {
02946                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02947                 xp += X_SIZEOF_SHORT;   
02948         }
02949                 
02950         *xpp = (void *)xp;
02951         return status;
02952 }

int ncx_pad_putn_short_float void **  xpp,
size_t  nelems,
const float *  ip
 

Definition at line 2905 of file ncx.c.

References ENOERR, nada, ncx_put_short_float(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Ifloat().

02906 {
02907         const size_t rndup = nelems % 2;
02908 
02909         char *xp = (char *) *xpp;
02910         int status = ENOERR;
02911 
02912         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02913         {
02914                 int lstatus = ncx_put_short_float(xp, tp);
02915                 if(lstatus != ENOERR)
02916                         status = lstatus;
02917         }
02918 
02919         if(rndup != 0)
02920         {
02921                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02922                 xp += X_SIZEOF_SHORT;   
02923         }
02924                 
02925         *xpp = (void *)xp;
02926         return status;
02927 }

int ncx_pad_putn_short_int void **  xpp,
size_t  nelems,
const int *  ip
 

Definition at line 2855 of file ncx.c.

References ENOERR, nada, ncx_put_short_int(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Iint().

02856 {
02857         const size_t rndup = nelems % 2;
02858 
02859         char *xp = (char *) *xpp;
02860         int status = ENOERR;
02861 
02862         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02863         {
02864                 int lstatus = ncx_put_short_int(xp, tp);
02865                 if(lstatus != ENOERR)
02866                         status = lstatus;
02867         }
02868 
02869         if(rndup != 0)
02870         {
02871                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02872                 xp += X_SIZEOF_SHORT;   
02873         }
02874                 
02875         *xpp = (void *)xp;
02876         return status;
02877 }

int ncx_pad_putn_short_long void **  xpp,
size_t  nelems,
const long *  ip
 

Definition at line 2880 of file ncx.c.

References ENOERR, nada, ncx_put_short_long(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Ilong().

02881 {
02882         const size_t rndup = nelems % 2;
02883 
02884         char *xp = (char *) *xpp;
02885         int status = ENOERR;
02886 
02887         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02888         {
02889                 int lstatus = ncx_put_short_long(xp, tp);
02890                 if(lstatus != ENOERR)
02891                         status = lstatus;
02892         }
02893 
02894         if(rndup != 0)
02895         {
02896                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02897                 xp += X_SIZEOF_SHORT;   
02898         }
02899                 
02900         *xpp = (void *)xp;
02901         return status;
02902 }

int ncx_pad_putn_short_schar void **  xpp,
size_t  nelems,
const schar ip
 

Definition at line 2780 of file ncx.c.

References ENOERR, nada, ncx_put_short_schar(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Ischar().

02781 {
02782         const size_t rndup = nelems % 2;
02783 
02784         char *xp = (char *) *xpp;
02785         int status = ENOERR;
02786 
02787         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02788         {
02789                 int lstatus = ncx_put_short_schar(xp, tp);
02790                 if(lstatus != ENOERR)
02791                         status = lstatus;
02792         }
02793 
02794         if(rndup != 0)
02795         {
02796                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02797                 xp += X_SIZEOF_SHORT;   
02798         }
02799                 
02800         *xpp = (void *)xp;
02801         return status;
02802 }

int ncx_pad_putn_short_short void **  xpp,
size_t  nelems,
const short *  ip
 

Definition at line 2830 of file ncx.c.

References ENOERR, nada, ncx_put_short_short(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Ishort().

02831 {
02832         const size_t rndup = nelems % 2;
02833 
02834         char *xp = (char *) *xpp;
02835         int status = ENOERR;
02836 
02837         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02838         {
02839                 int lstatus = ncx_put_short_short(xp, tp);
02840                 if(lstatus != ENOERR)
02841                         status = lstatus;
02842         }
02843 
02844         if(rndup != 0)
02845         {
02846                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02847                 xp += X_SIZEOF_SHORT;   
02848         }
02849                 
02850         *xpp = (void *)xp;
02851         return status;
02852 }

int ncx_pad_putn_short_uchar void **  xpp,
size_t  nelems,
const uchar ip
 

Definition at line 2805 of file ncx.c.

References ENOERR, nada, ncx_put_short_uchar(), and X_SIZEOF_SHORT.

Referenced by ncx_pad_putn_Iuchar().

02806 {
02807         const size_t rndup = nelems % 2;
02808 
02809         char *xp = (char *) *xpp;
02810         int status = ENOERR;
02811 
02812         for( ; nelems != 0; nelems--, xp += X_SIZEOF_SHORT, tp++)
02813         {
02814                 int lstatus = ncx_put_short_uchar(xp, tp);
02815                 if(lstatus != ENOERR)
02816                         status = lstatus;
02817         }
02818 
02819         if(rndup != 0)
02820         {
02821                 (void) memcpy(xp, nada, X_SIZEOF_SHORT);
02822                 xp += X_SIZEOF_SHORT;   
02823         }
02824                 
02825         *xpp = (void *)xp;
02826         return status;
02827 }

int ncx_pad_putn_text void **  xpp,
size_t  nchars,
const char *  cp
 

Definition at line 4139 of file ncx.c.

References ENOERR, nada, and X_ALIGN.

Referenced by nc_put_att_text(), and v1h_put_NC_string().

04140 {
04141         size_t rndup = nelems % X_ALIGN;
04142 
04143         if(rndup)
04144                 rndup = X_ALIGN - rndup;
04145 
04146         (void) memcpy(*xpp, tp, nelems);
04147         *xpp = (void *)((char *)(*xpp) + nelems);
04148 
04149         if(rndup)
04150         {
04151                 (void) memcpy(*xpp, nada, rndup);
04152                 *xpp = (void *)((char *)(*xpp) + rndup);
04153         }
04154         
04155         return ENOERR;
04156 
04157 }

int ncx_pad_putn_void void **  xpp,
size_t  nchars,
const void *  vp
 

Definition at line 4197 of file ncx.c.

References ENOERR, nada, and X_ALIGN.

04198 {
04199         size_t rndup = nelems % X_ALIGN;
04200 
04201         if(rndup)
04202                 rndup = X_ALIGN - rndup;
04203 
04204         (void) memcpy(*xpp, tp, nelems);
04205         *xpp = (void *)((char *)(*xpp) + nelems);
04206 
04207         if(rndup)
04208         {
04209                 (void) memcpy(*xpp, nada, rndup);
04210                 *xpp = (void *)((char *)(*xpp) + rndup);
04211         }
04212         
04213         return ENOERR;
04214 
04215 }

int ncx_put_double_double void *  xp,
const double *  ip
 

Definition at line 1693 of file ncx.c.

References ENOERR, NC_ERANGE, X_DOUBLE_MAX, and X_DOUBLE_MIN.

Referenced by ncx_putn_double_double().

01694 {
01695         put_ix_double(xp, ip);
01696 #ifdef NO_IEEE_FLOAT
01697         if(*ip > X_DOUBLE_MAX || *ip < X_DOUBLE_MIN)
01698                 return NC_ERANGE;
01699 #endif
01700         return ENOERR;
01701 }

int ncx_put_double_float void *  xp,
const float *  ip
 

Definition at line 1681 of file ncx.c.

References ENOERR, NC_ERANGE, X_DOUBLE_MAX, and X_DOUBLE_MIN.

Referenced by ncx_putn_double_float().

01682 {
01683         double xx = (double) *ip;
01684         put_ix_double(xp, &xx);
01685 #if 1   /* TODO: figure this out */
01686         if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
01687                 return NC_ERANGE;
01688 #endif
01689         return ENOERR;
01690 }

int ncx_put_double_int void *  xp,
const int *  ip
 

Definition at line 1657 of file ncx.c.

References ENOERR, NC_ERANGE, X_DOUBLE_MAX, and X_DOUBLE_MIN.

Referenced by ncx_putn_double_int().

01658 {
01659         double xx = (double) *ip;
01660         put_ix_double(xp, &xx);
01661 #if 0   /* TODO: figure this out */
01662         if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
01663                 return NC_ERANGE;
01664 #endif
01665         return ENOERR;
01666 }

int ncx_put_double_long void *  xp,
const long *  ip
 

Definition at line 1669 of file ncx.c.

References ENOERR, NC_ERANGE, X_DOUBLE_MAX, and X_DOUBLE_MIN.

Referenced by ncx_putn_double_long().

01670 {
01671         double xx = (double) *ip;
01672         put_ix_double(xp, &xx);
01673 #if 1   /* TODO: figure this out */
01674         if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
01675                 return NC_ERANGE;
01676 #endif
01677         return ENOERR;
01678 }

int ncx_put_double_schar void *  xp,
const schar ip
 

Definition at line 1629 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_double_schar().

01630 {
01631         double xx = (double) *ip;
01632         put_ix_double(xp, &xx);
01633         return ENOERR;
01634 }

int ncx_put_double_short void *  xp,
const short *  ip
 

Definition at line 1645 of file ncx.c.

References ENOERR, NC_ERANGE, X_DOUBLE_MAX, and X_DOUBLE_MIN.

Referenced by ncx_putn_double_short().

01646 {
01647         double xx = (double) *ip;
01648         put_ix_double(xp, &xx);
01649 #if 0   /* TODO: figure this out */
01650         if((double)(*ip) > X_DOUBLE_MAX || (double)(*ip) < X_DOUBLE_MIN)
01651                 return NC_ERANGE;
01652 #endif
01653         return ENOERR;
01654 }

int ncx_put_double_uchar void *  xp,
const uchar ip
 

Definition at line 1637 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_double_uchar().

01638 {
01639         double xx = (double) *ip;
01640         put_ix_double(xp, &xx);
01641         return ENOERR;
01642 }

int ncx_put_float_double void *  xp,
const double *  ip
 

Definition at line 1261 of file ncx.c.

References ENOERR, NC_ERANGE, X_FLOAT_MAX, and X_FLOAT_MIN.

Referenced by ncx_putn_float_double().

01262 {
01263         float xx = (float) *ip;
01264         put_ix_float(xp, &xx);
01265         if(*ip > X_FLOAT_MAX || *ip < X_FLOAT_MIN)
01266                 return NC_ERANGE;
01267         return ENOERR;
01268 }

int ncx_put_float_float void *  xp,
const float *  ip
 

Definition at line 1250 of file ncx.c.

References ENOERR, NC_ERANGE, X_FLOAT_MAX, and X_FLOAT_MIN.

Referenced by ncx_putn_float_float().

01251 {
01252         put_ix_float(xp, ip);
01253 #ifdef NO_IEEE_FLOAT
01254         if(*ip > X_FLOAT_MAX || *ip < X_FLOAT_MIN)
01255                 return NC_ERANGE;
01256 #endif
01257         return ENOERR;
01258 }

int ncx_put_float_int void *  xp,
const int *  ip
 

Definition at line 1226 of file ncx.c.

References ENOERR, NC_ERANGE, X_FLOAT_MAX, and X_FLOAT_MIN.

Referenced by ncx_putn_float_int().

01227 {
01228         float xx = (float) *ip;
01229         put_ix_float(xp, &xx);
01230 #if 1   /* TODO: figure this out */
01231         if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
01232                 return NC_ERANGE;
01233 #endif
01234         return ENOERR;
01235 }

int ncx_put_float_long void *  xp,
const long *  ip
 

Definition at line 1238 of file ncx.c.

References ENOERR, NC_ERANGE, X_FLOAT_MAX, and X_FLOAT_MIN.

Referenced by ncx_putn_float_long().

01239 {
01240         float xx = (float) *ip;
01241         put_ix_float(xp, &xx);
01242 #if 1   /* TODO: figure this out */
01243         if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
01244                 return NC_ERANGE;
01245 #endif
01246         return ENOERR;
01247 }

int ncx_put_float_schar void *  xp,
const schar ip
 

Definition at line 1198 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_float_schar().

01199 {
01200         float xx = (float) *ip;
01201         put_ix_float(xp, &xx);
01202         return ENOERR;
01203 }

int ncx_put_float_short void *  xp,
const short *  ip
 

Definition at line 1214 of file ncx.c.

References ENOERR, NC_ERANGE, X_FLOAT_MAX, and X_FLOAT_MIN.

Referenced by ncx_putn_float_short().

01215 {
01216         float xx = (float) *ip;
01217         put_ix_float(xp, &xx);
01218 #if 0   /* TODO: figure this out */
01219         if((float)(*ip) > X_FLOAT_MAX || (float)(*ip) < X_FLOAT_MIN)
01220                 return NC_ERANGE;
01221 #endif
01222         return ENOERR;
01223 }

int ncx_put_float_uchar void *  xp,
const uchar ip
 

Definition at line 1206 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_float_uchar().

01207 {
01208         float xx = (float) *ip;
01209         put_ix_float(xp, &xx);
01210         return ENOERR;
01211 }

int ncx_put_int_double void *  xp,
const double *  ip
 

Definition at line 656 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_int(), X_INT_MAX, and X_INT_MIN.

Referenced by ncx_putn_int_double().

00657 {
00658         ix_int xx = (ix_int)(*ip);
00659         put_ix_int(xp, &xx);
00660         if(*ip > X_INT_MAX || *ip < X_INT_MIN)
00661                 return NC_ERANGE;
00662         return ENOERR;
00663 }

int ncx_put_int_float void *  xp,
const float *  ip
 

Definition at line 646 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_int(), X_INT_MAX, and X_INT_MIN.

Referenced by ncx_putn_int_float().

00647 {
00648         ix_int xx = (ix_int)(*ip);
00649         put_ix_int(xp, &xx);
00650         if(*ip > (double)X_INT_MAX || *ip < (double)X_INT_MIN)
00651                 return NC_ERANGE;
00652         return ENOERR;
00653 }

int ncx_put_int_int void *  xp,
const int *  ip
 

Definition at line 612 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_int(), X_INT_MAX, and X_INT_MIN.

Referenced by ncx_putn_int_int(), v1h_put_nc_type(), and v1h_put_NCtype().

00613 {
00614 #if SIZEOF_IX_INT == SIZEOF_INT && IX_INT_MAX == INT_MAX
00615         put_ix_int(xp, (ix_int *)ip);
00616         return ENOERR;
00617 #else
00618         ix_int xx = (ix_int)(*ip);
00619         put_ix_int(xp, &xx);
00620 #   if IX_INT_MAX < INT_MAX
00621         if(*ip > X_INT_MAX || *ip < X_INT_MIN)
00622                 return NC_ERANGE;
00623 #   endif
00624         return ENOERR;
00625 #endif
00626 }

int ncx_put_int_long void *  xp,
const long *  ip
 

Definition at line 629 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_int(), X_INT_MAX, and X_INT_MIN.

Referenced by ncx_putn_int_long().

00630 {
00631 #if SIZEOF_IX_INT == SIZEOF_LONG && IX_INT_MAX == LONG_MAX
00632         put_ix_int(xp, (ix_int *)ip);
00633         return ENOERR;
00634 #else
00635         ix_int xx = (ix_int)(*ip);
00636         put_ix_int(xp, &xx);
00637 #   if IX_INT_MAX < LONG_MAX
00638         if(*ip > X_INT_MAX || *ip < X_INT_MIN)
00639                 return NC_ERANGE;
00640 #   endif
00641         return ENOERR;
00642 #endif
00643 }

int ncx_put_int_schar void *  xp,
const schar ip
 

Definition at line 564 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_int_schar().

00565 {
00566         uchar *cp = (uchar *) xp;
00567         if(*ip & 0x80)
00568         {
00569                 *cp++ = 0xff;
00570                 *cp++ = 0xff;
00571                 *cp++ = 0xff;
00572         }
00573         else
00574         {
00575                 *cp++ = 0x00;
00576                 *cp++ = 0x00;
00577                 *cp++ = 0x00;
00578         }
00579         *cp = (uchar)*ip;
00580         return ENOERR;
00581 }

int ncx_put_int_short void *  xp,
const short *  ip
 

Definition at line 595 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_int(), X_INT_MAX, and X_INT_MIN.

Referenced by ncx_putn_int_short().

00596 {
00597 #if SIZEOF_IX_INT == SIZEOF_SHORT && IX_INT_MAX == SHORT_MAX
00598         put_ix_int(xp, (ix_int *)ip);
00599         return ENOERR;
00600 #else
00601         ix_int xx = (ix_int)(*ip);
00602         put_ix_int(xp, &xx);
00603 #   if IX_INT_MAX < SHORT_MAX
00604         if(*ip > X_INT_MAX || *ip < X_INT_MIN)
00605                 return NC_ERANGE;
00606 #   endif
00607         return ENOERR;
00608 #endif
00609 }

int ncx_put_int_uchar void *  xp,
const uchar ip
 

Definition at line 584 of file ncx.c.

References ENOERR.

Referenced by ncx_putn_int_uchar().

00585 {
00586         uchar *cp = (uchar *) xp;
00587         *cp++ = 0x00;
00588         *cp++ = 0x00;
00589         *cp++ = 0x00;
00590         *cp   = *ip;
00591         return ENOERR;
00592 }

int ncx_put_off_t void **  xpp,
const off_t *  lp,
size_t  sizeof_off_t
 

Definition at line 1745 of file ncx.c.

References ENOERR.

Referenced by v1h_put_NC_var().

01746 {
01747         /* similar to put_ix_int() */
01748         uchar *cp = (uchar *) *xpp;
01749                 /* No negative offsets stored in netcdf */
01750         if (*lp < 0) {
01751           /* Assume this is an overflow of a 32-bit int... */
01752           return ERANGE;
01753         }
01754           
01755         assert(sizeof_off_t == 4 || sizeof_off_t == 8);
01756 
01757         if (sizeof_off_t == 4) {
01758                 *cp++ = (uchar) ((*lp)               >> 24);
01759                 *cp++ = (uchar)(((*lp) & 0x00ff0000) >> 16);
01760                 *cp++ = (uchar)(((*lp) & 0x0000ff00) >>  8);
01761                 *cp   = (uchar)( (*lp) & 0x000000ff);
01762         } else {
01763 #if SIZEOF_OFF_T == 4
01764 /* Write a 64-bit offset on a system with only a 32-bit offset */
01765                 *cp++ = (uchar)0;
01766                 *cp++ = (uchar)0;
01767                 *cp++ = (uchar)0;
01768                 *cp++ = (uchar)0;
01769 
01770                 *cp++ = (uchar)(((*lp) & 0xff000000) >> 24);
01771                 *cp++ = (uchar)(((*lp) & 0x00ff0000) >> 16);
01772                 *cp++ = (uchar)(((*lp) & 0x0000ff00) >>  8);
01773                 *cp   = (uchar)( (*lp) & 0x000000ff);
01774 #else
01775                 *cp++ = (uchar) ((*lp)                          >> 56);
01776                 *cp++ = (uchar)(((*lp) & 0x00ff000000000000ULL) >> 48);
01777                 *cp++ = (uchar)(((*lp) & 0x0000ff0000000000ULL) >> 40);
01778                 *cp++ = (uchar)(((*lp) & 0x000000ff00000000ULL) >> 32);
01779                 *cp++ = (uchar)(((*lp) & 0x00000000ff000000ULL) >> 24);
01780                 *cp++ = (uchar)(((*lp) & 0x0000000000ff0000ULL) >> 16);
01781                 *cp++ = (uchar)(((*lp) & 0x000000000000ff00ULL) >>  8);
01782                 *cp   = (uchar)( (*lp) & 0x00000000000000ffULL);
01783 #endif
01784         }
01785         *xpp = (void *)((char *)(*xpp) + sizeof_off_t);
01786         return ENOERR;
01787 }

int ncx_put_short_double void *  xp,
const double *  ip
 

Definition at line 406 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_short(), X_SHORT_MAX, and X_SHORT_MIN.

Referenced by ncx_pad_putn_short_double(), and ncx_putn_short_double().

00407 {
00408         ix_short xx = *ip;
00409         put_ix_short(xp, &xx);
00410         if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
00411                 return NC_ERANGE;
00412         return ENOERR;
00413 }

int ncx_put_short_float void *  xp,
const float *  ip
 

Definition at line 396 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_short(), X_SHORT_MAX, and X_SHORT_MIN.

Referenced by ncx_pad_putn_short_float(), and ncx_putn_short_float().

00397 {
00398         ix_short xx = *ip;
00399         put_ix_short(xp, &xx);
00400         if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
00401                 return NC_ERANGE;
00402         return ENOERR;
00403 }

int ncx_put_short_int void *  xp,
const int *  ip
 

Definition at line 362 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_short(), X_SHORT_MAX, and X_SHORT_MIN.

Referenced by ncx_pad_putn_short_int(), and ncx_putn_short_int().

00363 {
00364 #if SIZEOF_IX_SHORT == SIZEOF_INT && X_SHORT_MAX == INT_MAX
00365         put_ix_short(xp, (const ix_short *)ip);
00366         return ENOERR;
00367 #else
00368         ix_short xx = (ix_short)*ip;
00369         put_ix_short(xp, &xx);
00370 # if X_SHORT_MAX < INT_MAX
00371         if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
00372                 return NC_ERANGE;
00373 # endif
00374         return ENOERR;
00375 #endif
00376 }

int ncx_put_short_long void *  xp,
const long *  ip
 

Definition at line 379 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_short(), X_SHORT_MAX, and X_SHORT_MIN.

Referenced by ncx_pad_putn_short_long(), and ncx_putn_short_long().

00380 {
00381 #if SIZEOF_IX_SHORT == SIZEOF_LONG && X_SHORT_MAX == LONG_MAX
00382         put_ix_short(xp, (const ix_short *)ip);
00383         return ENOERR;
00384 #else
00385         ix_short xx = (ix_short)*ip;
00386         put_ix_short(xp, &xx);
00387 # if X_SHORT_MAX < LONG_MAX
00388         if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
00389                 return NC_ERANGE;
00390 # endif
00391         return ENOERR;
00392 #endif
00393 }

int ncx_put_short_schar void *  xp,
const schar ip
 

Definition at line 324 of file ncx.c.

References ENOERR.

Referenced by ncx_pad_putn_short_schar(), and ncx_putn_short_schar().

00325 {
00326         uchar *cp = (uchar *) xp;
00327         if(*ip & 0x80)
00328                 *cp++ = 0xff;
00329         else
00330                 *cp++ = 0;
00331         *cp = (uchar)*ip;
00332         return ENOERR;
00333 }

int ncx_put_short_short void *  xp,
const short *  ip
 

Definition at line 345 of file ncx.c.

References ENOERR, NC_ERANGE, put_ix_short(), X_SHORT_MAX, and X_SHORT_MIN.

Referenced by ncx_pad_putn_short_short(), and ncx_putn_short_short().

00346 {
00347 #if SIZEOF_IX_SHORT == SIZEOF_SHORT && X_SHORT_MAX == SHORT_MAX
00348         put_ix_short(xp, (const ix_short *)ip);
00349         return ENOERR;
00350 #else
00351         ix_short xx = (ix_short)*ip;
00352         put_ix_short(xp, &xx);
00353 # if X_SHORT_MAX < SHORT_MAX
00354         if(*ip > X_SHORT_MAX || *ip < X_SHORT_MIN)
00355                 return NC_ERANGE;
00356 # endif
00357         return ENOERR;
00358 #endif
00359 }

int ncx_put_short_uchar void *  xp,
const uchar ip
 

Definition at line 336 of file ncx.c.

References ENOERR.

Referenced by ncx_pad_putn_short_uchar(), and ncx_putn_short_uchar().

00337 {
00338         uchar *cp = (uchar *) xp;
00339         *cp++ = 0;
00340         *cp = *ip;
00341         return ENOERR;
00342 }

int ncx_put_size_t void **  xpp,
const size_t *  ulp
 

Definition at line 1712 of file ncx.c.

References ENOERR, X_SIZE_MAX, and X_SIZEOF_SIZE_T.

Referenced by ncx_put_NC(), v1h_put_size_t(), and write_numrecs().

01713 {
01714         /* similar to put_ix_int() */
01715         uchar *cp = (uchar *) *xpp;
01716         assert(*ulp <= X_SIZE_MAX);
01717 
01718         *cp++ = (uchar)((*ulp) >> 24);
01719         *cp++ = (uchar)(((*ulp) & 0x00ff0000) >> 16);
01720         *cp++ = (uchar)(((*ulp) & 0x0000ff00) >>  8);
01721         *cp   = (uchar)((*ulp) & 0x000000ff);
01722 
01723         *xpp = (void *)((char *)(*xpp) + X_SIZEOF_SIZE_T);
01724         return ENOERR;
01725 }

int ncx_putn_double_double void **  xpp,
size_t  nelems,
const double *  ip
 

Definition at line 4079 of file ncx.c.

References ENOERR, and ncx_put_double_double().

Referenced by NC_fill_double(), ncx_pad_putn_Idouble(), and putNCvx_double_double().

04080 {
04081         char *xp = *xpp;
04082         int status = ENOERR;
04083 
04084         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
04085         {
04086                 int lstatus = ncx_put_double_double(xp, tp);
04087                 if(lstatus != ENOERR)
04088                         status = lstatus;
04089         }
04090 
04091         *xpp = (void *)xp;
04092         return status;
04093 }

int ncx_putn_double_float void **  xpp,
size_t  nelems,
const float *  ip
 

Definition at line 3963 of file ncx.c.

References ENOERR, and ncx_put_double_float().

Referenced by ncx_pad_putn_Ifloat(), and putNCvx_double_float().

03964 {
03965         char *xp = (char *) *xpp;
03966         int status = ENOERR;
03967 
03968         for( ; nelems != 0; nelems--, xp += X_SIZEOF_DOUBLE, tp++)
03969         {
03970                 int lstatus = ncx_put_double_float(xp, tp);
03971                 if(lstatus != ENOERR)
03972                         status = lstatus;
03973         }
03974 
03975         *xpp = (void *)xp;
03976         return status;
03977 }

int ncx_putn_double_int void **  xpp,
size_t  nelems,
const int *  ip