mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
fixing windows build problem, plus documentation
This commit is contained in:
parent
aa4032a4f1
commit
dbacd00c9c
@ -267,9 +267,6 @@ NC4_inq_unlimdims(int, int *, int *);
|
||||
EXTERNL int
|
||||
NC4_show_metadata(int);
|
||||
|
||||
EXTERNL int
|
||||
NC4_initialize(void);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
@ -68,40 +68,9 @@ static char HDF5_SIGNATURE[MAGIC_NUMBER_LEN] = "\211HDF\r\n\032\n";
|
||||
/* User-defined formats. */
|
||||
NC_Dispatch* UF0_dispatch_table = NULL;
|
||||
NC_Dispatch* UF1_dispatch_table = NULL;
|
||||
|
||||
/**
|
||||
* Add handling of user-defined format.
|
||||
*
|
||||
* @param mode_flag NC_UF0 or NC_UF1
|
||||
* @param dispatch_table Pointer to dispatch table to use for this user format.
|
||||
* @param magic_numer Magic number used to identify file. Ignored if NULL.
|
||||
*
|
||||
* @return ::NC_NOERR No error.
|
||||
* @return ::NC_EINVAL Invalid input.
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
nc_def_user_format(int mode_flag, NC_Dispatch *dispatch_table, char *magic_number)
|
||||
{
|
||||
if (mode_flag != NC_UF0 && mode_flag != NC_UF1)
|
||||
return NC_EINVAL;
|
||||
if (!dispatch_table)
|
||||
return NC_EINVAL;
|
||||
|
||||
switch(mode_flag)
|
||||
{
|
||||
case NC_UF0:
|
||||
UF0_dispatch_table = dispatch_table;
|
||||
break;
|
||||
case NC_UF1:
|
||||
UF1_dispatch_table = dispatch_table;
|
||||
break;
|
||||
}
|
||||
|
||||
return NC_NOERR;
|
||||
}
|
||||
#endif /* USE_NETCDF4 */
|
||||
|
||||
|
||||
/** \defgroup datasets NetCDF File and Data I/O
|
||||
|
||||
NetCDF opens datasets as files or remote access URLs.
|
||||
@ -138,6 +107,44 @@ interfaces, the rest of this chapter presents a detailed description
|
||||
of the interfaces for these operations.
|
||||
*/
|
||||
|
||||
#ifdef USE_NETCDF4
|
||||
/**
|
||||
* Add handling of user-defined format.
|
||||
*
|
||||
* @param mode_flag NC_UF0 or NC_UF1
|
||||
* @param dispatch_table Pointer to dispatch table to use for this user format.
|
||||
* @param magic_number Magic number used to identify file. Ignored if
|
||||
* NULL.
|
||||
*
|
||||
* @return ::NC_NOERR No error.
|
||||
* @return ::NC_EINVAL Invalid input.
|
||||
* @author Ed Hartnett
|
||||
* @ingroup datasets
|
||||
*/
|
||||
int
|
||||
nc_def_user_format(int mode_flag, NC_Dispatch *dispatch_table, char *magic_number)
|
||||
{
|
||||
/* Check inputs. */
|
||||
if (mode_flag != NC_UF0 && mode_flag != NC_UF1)
|
||||
return NC_EINVAL;
|
||||
if (!dispatch_table)
|
||||
return NC_EINVAL;
|
||||
|
||||
/* Retain a pointer to the dispatch_table. */
|
||||
switch(mode_flag)
|
||||
{
|
||||
case NC_UF0:
|
||||
UF0_dispatch_table = dispatch_table;
|
||||
break;
|
||||
case NC_UF1:
|
||||
UF1_dispatch_table = dispatch_table;
|
||||
break;
|
||||
}
|
||||
|
||||
return NC_NOERR;
|
||||
}
|
||||
#endif /* USE_NETCDF4 */
|
||||
|
||||
/*!
|
||||
Interpret the magic number found in the header of a netCDF file.
|
||||
This function interprets the magic number/string contained in the header of a netCDF file and sets the appropriate NC_FORMATX flags.
|
||||
|
Loading…
Reference in New Issue
Block a user