diff --git a/src/ncint/ncintdispatch.c b/src/ncint/ncintdispatch.c index 81fb3a58fc7..446db789932 100644 --- a/src/ncint/ncintdispatch.c +++ b/src/ncint/ncintdispatch.c @@ -344,6 +344,26 @@ PIO_NCINT_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp) return PIOc_inq(ncid, ndimsp, nvarsp, nattsp, unlimdimidp); } +/** + * @internal Get the name and size of a type. For strings, 1 is + * returned. For VLEN the base type len is returned. + * + * @param ncid File and group ID. + * @param typeid1 Type ID. + * @param name Gets the name of the type. + * @param size Gets the size of one element of the type in bytes. + * + * @return ::NC_NOERR No error. + * @return ::NC_EBADID Bad ncid. + * @return ::NC_EBADTYPE Type not found. + * @author Ed Hartnett + */ +int +PIO_NCINT_inq_type(int ncid, nc_type typeid1, char *name, size_t *size) +{ + return PIOc_inq_type(ncid, typeid1, name, (PIO_Offset *)size); +} + int PIO_NCINT_get_vara(int ncid, int varid, const size_t *start, const size_t *count, void *value, nc_type t) diff --git a/src/ncint/ncintdispatch.h b/src/ncint/ncintdispatch.h index 3bd012204cc..944ec9bfa80 100644 --- a/src/ncint/ncintdispatch.h +++ b/src/ncint/ncintdispatch.h @@ -83,6 +83,9 @@ extern "C" { extern int PIO_NCINT_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp); + extern int + PIO_NCINT_inq_type(int ncid, nc_type typeid1, char *name, size_t *size); + extern int PIO_NCINT_get_vara(int ncid, int varid, const size_t *start, const size_t *count, void *value, nc_type);