mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
more comments
This commit is contained in:
parent
e4ef7b1a65
commit
0e95d4c871
@ -37,7 +37,8 @@ main(int argc, char **argv)
|
||||
* ncdispatch.h. */
|
||||
if(new_NC(NC3_dispatch_table, FILE_NAME, 0, &model, &ncp)) ERR;
|
||||
|
||||
/* Add to list of known open files and define ext_ncid. */
|
||||
/* Add to array of open files nc_filelist and define
|
||||
* ext_ncid by left-shifting the index 16 bits. */
|
||||
add_to_NCList(ncp);
|
||||
|
||||
/* Create the NC_FILE_INFO_T instance associated empty lists
|
||||
@ -48,7 +49,7 @@ main(int argc, char **argv)
|
||||
if (nc4_file_list_del(ncp->ext_ncid)) ERR;
|
||||
|
||||
/* Delete the ncp from the list. (In fact, just null out its
|
||||
* entry in the array of file slots. */
|
||||
* entry in the array of file slots.) */
|
||||
del_from_NCList(ncp); /* Will free empty list. */
|
||||
|
||||
/* Now free the NC struct. */
|
||||
|
@ -46,7 +46,12 @@ main(int argc, char **argv)
|
||||
/* Nothing to find yet. */
|
||||
if (find_in_NCList(TEST_VAL_42)) ERR;
|
||||
|
||||
/* Add to list of known open files and define ext_ncid. */
|
||||
/* Add to list of known open files and define ext_ncid. To get
|
||||
* the ncid, we find the first open index > 1 in the
|
||||
* nc_filelist array, which has a size of 65536. Then we
|
||||
* left-shift that index 16 bits to put it in the first
|
||||
* 2-bytes of the 4-byte ncid. (The other two bytes are
|
||||
* reserved for grpid of netCDF-4 groups.) */
|
||||
add_to_NCList(ncp);
|
||||
|
||||
/* These won't work! */
|
||||
|
Loading…
Reference in New Issue
Block a user