mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Merge branch 'master' into fix_warnings
This commit is contained in:
commit
907ed8d95f
@ -46,17 +46,17 @@ main(int argc, char **argv)
|
||||
if (nc_inq_dim(ncid, 0, name_in, &len_in)) ERR;
|
||||
if (strcmp(name_in, DIM_NAME) || len_in != DIM_LEN) ERR;
|
||||
if (nc_inq_var(ncid, 0, name_in, &xtype_in, &ndims_in,
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
if (strcmp(name_in, VAR_NAME1) || xtype_in != NC_FLOAT ||
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
if (nc_inq_var(ncid, 1, name_in, &xtype_in, &ndims_in,
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
if (strcmp(name_in, VAR_NAME2) || xtype_in != NC_FLOAT ||
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
if (nc_inq_var(ncid, 2, name_in, &xtype_in, &ndims_in,
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
&dimid_in, &natts_in)) ERR;
|
||||
if (strcmp(name_in, DIM_NAME) || xtype_in != NC_FLOAT ||
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
ndims_in != 1 || dimid_in != 0 || natts_in != 0) ERR;
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
@ -72,12 +72,15 @@ main(int argc, char **argv)
|
||||
if ((grpid = H5Gcreate2(hdfid, GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid2 = H5Gcreate2(grpid, GROUP_NAME_2, H5P_DEFAULT, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5Lcreate_soft(GROUP_NAME, grpid2, TRUE_FANS, H5P_DEFAULT,
|
||||
H5P_DEFAULT) < 0) ERR;
|
||||
if (H5Fclose(hdfid) < 0) ERR;
|
||||
|
||||
H5close(); /* Force HDF5 to forget about this file. */
|
||||
/* Force HDF5 to forget about this file. This resets the error
|
||||
* stack, so turn off HDF5 error messages again. */
|
||||
H5close();
|
||||
H5Eset_auto2(H5E_DEFAULT, NULL, NULL);
|
||||
|
||||
/* Now try and open it with netCDF. It will not work. */
|
||||
if (nc_open(HDF5_FILE_NAME, NC_NOWRITE, &ncid) != NC_EHDFERR) ERR;
|
||||
|
@ -130,7 +130,7 @@ main(int argc, char **argv)
|
||||
char *file_names[] = {FILE_NAME3, FILE_NAME4};
|
||||
int format;
|
||||
|
||||
fprintf(stderr,"*** Testing netcdf rename bugs and fixes.\n");
|
||||
printf("*** Testing netcdf rename bugs and fixes.\n");
|
||||
/* nc_set_log_level(5); */
|
||||
|
||||
for (format = 0; format < NUM_FORMATS; format++)
|
||||
@ -142,7 +142,7 @@ main(int argc, char **argv)
|
||||
float rh_in[DIM_LEN];
|
||||
int ii;
|
||||
|
||||
fprintf(stderr,"*** Test Charlie's test for renaming without enddef...");
|
||||
printf("*** Test Charlie's test for renaming without enddef...");
|
||||
{
|
||||
int ncid, dimid, varid;
|
||||
|
||||
@ -175,7 +175,7 @@ main(int argc, char **argv)
|
||||
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
fprintf(stderr,"*** Test Charlie's test for renaming with one enddef...");
|
||||
printf("*** Test Charlie's test for renaming with one enddef...");
|
||||
{
|
||||
int ncid, dimid, varid;
|
||||
|
||||
@ -217,7 +217,7 @@ main(int argc, char **argv)
|
||||
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
fprintf(stderr,"*** Test Charlie's test for renaming with enddef...");
|
||||
printf("*** Test Charlie's test for renaming with enddef...");
|
||||
{
|
||||
int ncid, dimid, varid;
|
||||
float data[DIM1_LEN] = {0, 90.0, 180.0, 270.0};
|
||||
@ -427,8 +427,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
fprintf(stderr,"*** Test renaming just coordinate variable for %s...",
|
||||
fmt_names[format]);
|
||||
printf("*** Test renaming just coordinate variable for %s...",
|
||||
fmt_names[format]);
|
||||
{
|
||||
if (create_test_file(file_names[format], formats[format])) ERR;
|
||||
if (nc_open(file_names[format], NC_WRITE, &ncid)) ERR;
|
||||
@ -452,8 +452,8 @@ main(int argc, char **argv)
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
fprintf(stderr,"*** Test renaming just coordinate dimension for %s...",
|
||||
fmt_names[format]);
|
||||
printf("*** Test renaming just coordinate dimension for %s...",
|
||||
fmt_names[format]);
|
||||
{
|
||||
if (create_test_file(file_names[format], formats[format])) ERR;
|
||||
if (nc_open(file_names[format], NC_WRITE, &ncid)) ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user