1515#endif
1616#include <math.h> /* For pow() used below. */
1717
18+ /** @internal Default size for unlimited dim chunksize. */
19+ #define DEFAULT_1D_UNLIM_SIZE (4096)
20+
21+ /** @internal Temp name used when renaming vars to preserve varid
22+ * order. */
23+ #define NC_TEMP_NAME "_netcdf4_temporary_variable_name_for_rename"
24+
1825#ifdef LOGGING
26+ /**
27+ * Report the chunksizes selected for a variable.
28+ *
29+ * @param title A text title for the report.
30+ * @param var Pointer to the var of interest.
31+ *
32+ * @author Dennis Heimbigner
33+ */
1934static void
20- reportchunking (const char * title , NC_VAR_INFO_T * var )
35+ reportchunking (const char * title , NC_VAR_INFO_T * var )
2136{
2237 int i ;
2338 char buf [8192 ];
@@ -33,17 +48,10 @@ reportchunking(const char* title, NC_VAR_INFO_T* var)
3348 snprintf (digits ,sizeof (digits ),"%ld" ,(unsigned long )var -> chunksizes [i ]);
3449 strlcat (buf ,digits ,sizeof (buf ));
3550 }
36- LOG ((1 ,"%s" ,buf ));
37- }
51+ LOG ((3 ,"%s" ,buf ));
52+ }
3853#endif
3954
40- /** @internal Default size for unlimited dim chunksize. */
41- #define DEFAULT_1D_UNLIM_SIZE (4096)
42-
43- /** @internal Temp name used when renaming vars to preserve varid
44- * order. */
45- #define NC_TEMP_NAME "_netcdf4_temporary_variable_name_for_rename"
46-
4755/**
4856 * @internal If the HDF5 dataset for this variable is open, then close
4957 * it and reopen it, with the perhaps new settings for chunk caching.
@@ -247,7 +255,7 @@ nc4_find_default_chunksizes2(NC_GRP_INFO_T *grp, NC_VAR_INFO_T *var)
247255 }
248256
249257#ifdef LOGGING
250- reportchunking ("find_default: " ,var );
258+ reportchunking ("find_default: " ,var );
251259#endif
252260 return NC_NOERR ;
253261}
@@ -753,9 +761,10 @@ nc_def_var_extra(int ncid, int varid, int *shuffle, int *deflate,
753761 }
754762
755763#ifdef LOGGING
756- {int dfalt = (chunksizes == NULL );
757- reportchunking (dfalt ?"extra: default: " :"extra: user: " ,var );
758- }
764+ {
765+ int dfalt = (chunksizes == NULL );
766+ reportchunking (dfalt ? "extra: default: " : "extra: user: " , var );
767+ }
759768#endif
760769
761770 /* Are we setting a fill modes? */
@@ -1653,15 +1662,15 @@ NC4_put_vars(int ncid, int varid, const size_t *startp, const size_t *countp,
16531662#endif
16541663 if (!zero_count && endindex >= fdims [d2 ])
16551664 {
1656- xtend_size [d2 ] = (long long unsigned )(endindex + 1 );
1665+ xtend_size [d2 ] = (long long unsigned )(endindex + 1 );
16571666 need_to_extend ++ ;
16581667 }
16591668 else
16601669 xtend_size [d2 ] = (long long unsigned )fdims [d2 ];
16611670
16621671 if (!zero_count && endindex >= dim -> len )
16631672 {
1664- dim -> len = endindex + 1 ;
1673+ dim -> len = endindex + 1 ;
16651674 dim -> extended = NC_TRUE ;
16661675 }
16671676 }
0 commit comments