Skip to content

Commit

Permalink
Fix spelling issues
Browse files Browse the repository at this point in the history
  • Loading branch information
byrnHDF committed Jan 21, 2025
1 parent abe633d commit f958b62
Show file tree
Hide file tree
Showing 18 changed files with 24 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Ref: https://github.com/codespell-project/codespell#using-a-config-file
[codespell]
skip = .git,*.svg,.codespellrc,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5import/testfiles/*.conf,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html,./HDF5Examples/depcomp
skip = .git,*.svg,.codespellrc,./bin/trace,./hl/tools/h5watch/h5watch.c,./tools/test/h5jam/tellub.c,./config/sanitizer/LICENSE,./config/sanitizer/sanitizers.cmake,./tools/test/h5import/testfiles/*.conf,./tools/test/h5repack/testfiles/*.dat,./test/API/driver,./configure,./bin/ltmain.sh,./bin/depcomp,./bin/config.guess,./bin/config.sub,./autom4te.cache,./m4/libtool.m4,./c++/src/*.html,./HDF5Examples/depcomp, ./HISTORY-*.txt
check-hidden = true
# ignore-regex =
ignore-words-list = ot,isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,ake,gord,numer,ro,oce,msdos,TEXTIN
ignore-words-list = ot,isnt,inout,nd,parms,parm,ba,offsetP,ser,ois,had,fiter,fo,clude,refere,minnum,offsetp,creat,ans:,eiter,lastr,ans,isn't,ifset,sur,trun,dne,tthe,hda,filname,te,htmp,ake,gord,numer,ro,oce,msdos,TEXTIN,indx
4 changes: 2 additions & 2 deletions doxygen/examples/FileImageOps.html
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ <h3 id="in-memory-hdf5-file-image-construction">4.2. In-memory HDF5 File Image C
<strong>Example 6.</strong> Using H5Pset_file_image_callbacks to improve memory allocation</p>

<p>The above code fragment gives the application full ownership of the buffer used by the Core file driver after the file is closed, and it notifies the application that the HDF5 Library is done with the buffer by setting udata.image_ptr to something other than NULL. If read access to the buffer is sufficient, the H5Fget_vfd_handle() call can be used as an alternate solution to get access to the base address of the Core file driver’s buffer.</p>
<p>The above solution avoids some unnecessary mallocand memcpycalls and should be quite adequate if an image of an HDF5 file is constructed only occasionally. However, if an HDF5 file image must be constructed regularly, and if we can put a strong and tight upper bound on the size of the necessary buffer, then the following pseudo code demonstrates a method of avoiding memory allocation completely. The downside, however, is that buffer is allocated statically. Again, much error checking is omitted for clarity.</p>
<p>The above solution avoids some unnecessary malloc and memcpy calls and should be quite adequate if an image of an HDF5 file is constructed only occasionally. However, if an HDF5 file image must be constructed regularly, and if we can put a strong and tight upper bound on the size of the necessary buffer, then the following pseudo code demonstrates a method of avoiding memory allocation completely. The downside, however, is that buffer is allocated statically. Again, much error checking is omitted for clarity.</p>

<pre><code>
char buf[BIG_ENOUGH];
Expand Down Expand Up @@ -883,7 +883,7 @@ <h3 id="in-memory-hdf5-file-image-construction">4.2. In-memory HDF5 File Image C

<strong>Example 7.</strong> Using H5Pset_file_image_callbacks with a static buffer</p>

<p>If we can further arrange matters so that only the contents of the datasets in the HDF5 file image change, but not the structure of the file itself, we can optimize still further by re-using the image and changing only the contents of the datasets after the initial write to the buffer. The following pseudo code shows how this might be done. Note that the code assumes that buf already contains the image of the HDF5 file whose dataset contents are to be overwritten. Again, much error checking is omitted for clarity. Also, observe that the file image callbacks do not support the H5Pget_file_image() call.</p>
<p>If we can further arrange matters so that only the contents of the datasets in the HDF5 file image change, but not the structure of the file itself, we can optimize still further by reusing the image and changing only the contents of the datasets after the initial write to the buffer. The following pseudo code shows how this might be done. Note that the code assumes that buf already contains the image of the HDF5 file whose dataset contents are to be overwritten. Again, much error checking is omitted for clarity. Also, observe that the file image callbacks do not support the H5Pget_file_image() call.</p>

<pre><code>
&lt;buf already defined and loaded with file image&gt;
Expand Down
2 changes: 1 addition & 1 deletion hl/test/test_ld.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define DSET_SCALAR "DSET_SCALAR"

/* Selected compound field members for testing */
#define VALID_FIELDS1 "field1,field2.a,field3,field4" /* TEMPORORAY */
#define VALID_FIELDS1 "field1,field2.a,field3,field4" /* TEMPORARY */
#define VALID_FIELDS2 "field2.b.a,field2.c,field4.b"

#define INVALID_FIELDS1 "field2.k.a,field2.c,field4.k"
Expand Down
2 changes: 1 addition & 1 deletion hl/tools/gif2h5/gif2mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
** **
** GIFHEAD displays all real information contained within a GIF image **
** file, including all color tables and extension block information. **
** GIFHEAD reads both GIF 87a abd 89a-format files. **
** GIFHEAD reads both GIF 87a and 89a-format files. **
** **
** Copyright (C) 1991-92 by Graphics Software Labs. All rights reserved. **
\****************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion src/H5B2test.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ H5B2__get_node_depth_test(H5B2_t *bt2, void *udata)
/* Check arguments. */
assert(bt2);

/* Get information abou the node */
/* Get information about the node */
if (H5B2__get_node_info_test(bt2, udata, &ninfo) < 0)
HGOTO_ERROR(H5E_BTREE, H5E_NOTFOUND, (-1), "error looking up node info");

Expand Down
2 changes: 1 addition & 1 deletion src/H5Dbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ H5D__chunk_disjoint(unsigned n, const hsize_t *scaled1, const hsize_t *scaled2)
assert(scaled1);
assert(scaled2);

/* Loop over two chunks, detecting disjointness and getting out quickly */
/* Loop over two chunks, detecting disjointedness and getting out quickly */
for (u = 0; u < n; u++)
if ((scaled1[u] + 1) <= scaled2[u] || (scaled2[u] + 1) <= scaled1[u])
HGOTO_DONE(true);
Expand Down
2 changes: 1 addition & 1 deletion src/H5Dchunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -5025,7 +5025,7 @@ H5D__chunk_allocate(const H5D_t *dset, bool full_overwrite, const hsize_t old_di
fill_buf = &fb_info.fill_buf;

/* Check if there are filters which need to be applied to the chunk */
/* (only do this in advance when the chunk info can be re-used (i.e.
/* (only do this in advance when the chunk info can be reused (i.e.
* it doesn't contain any non-default VL datatype fill values)
*/
if (!fb_info.has_vlen_fill_type && pline->nused > 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDonion_index.c
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ H5FD__onion_revision_index_resize(H5FD_onion_revision_index_t *rix)
* checksum value will change.
*
* Entry data is copied into separate memory region; user pointer
* can be safley re-used or discarded after operation.
* can be safley reused or discarded after operation.
*
* Return: SUCCEED/FAIL
*-----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDros3.c
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ H5FD__ros3_open(const char *url, unsigned flags, hid_t fapl_id, haddr_t maxaddr)
* authenticate requests or not.
*/
if (fa->authenticate == true) {
/* Compute signing key (part of AWS/S3 REST API). Can be re-used by
/* Compute signing key (part of AWS/S3 REST API). Can be reused by
* user/key for 7 days after creation.
*
* TODO: Find way to reuse/share?
Expand Down
4 changes: 2 additions & 2 deletions src/H5FDs3comms.h
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ typedef struct {
*
* Instantiated through `H5FD_s3comms_s3r_open()`, copies data into self.
*
* Intended to be re-used for operations on a remote object.
* Intended to be reused for operations on a remote object.
*
* Cleaned up through `H5FD_s3comms_s3r_close()`.
*
Expand Down Expand Up @@ -430,7 +430,7 @@ typedef struct {
* key, generated via
* `HMAC-SHA256(HMAC-SHA256(HMAC-SHA256(HMAC-SHA256("AWS4<secret_key>",
* "<yyyyMMDD"), "<aws-region>"), "<aws-service>"), "aws4_request")`
* which may be re-used for several (up to seven (7)) days from creation?
* which may be reused for several (up to seven (7)) days from creation?
* Computed once upon file open.
*
* Required to authenticate.
Expand Down
2 changes: 1 addition & 1 deletion src/H5FDsubfiling/H5FDioc_int.c
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ H5FD__ioc_async_completion(MPI_Request *mpi_reqs, size_t num_reqs)

H5_CHECK_OVERFLOW(num_reqs, size_t, int);

/* Have to supppress gcc warnings regarding MPI_STATUSES_IGNORE
/* Have to suppress gcc warnings regarding MPI_STATUSES_IGNORE
* with MPICH (https://github.com/pmodels/mpich/issues/5687)
*/
H5_GCC_DIAG_OFF("stringop-overflow")
Expand Down
2 changes: 1 addition & 1 deletion src/H5Pfapl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2388,7 +2388,7 @@ H5Pget_mdc_config(hid_t plist_id, H5AC_cache_config_t *config /*out*/)
* probably) use space in the file heap. If garbage collection
* is on and the user passes in an uninitialized value in a
* reference structure, the heap might get corrupted. When
* garbage collection is off however and the user re-uses a
* garbage collection is off however and the user reuses a
* reference, the previous heap block will be orphaned and not
* returned to the free heap space. When garbage collection is
* on, the user must initialize the reference structures to 0 or
Expand Down
2 changes: 1 addition & 1 deletion src/H5Ppublic.h
Original file line number Diff line number Diff line change
Expand Up @@ -4928,7 +4928,7 @@ H5_DLL herr_t H5Pset_file_locking(hid_t fapl_id, hbool_t use_file_locking, hbool
* HDF5 file's global heap. If garbage collection is on and the user
* passes in an uninitialized value in a reference structure, the heap
* might get corrupted. When garbage collection is off, however, and
* the user re-uses a reference, the previous heap block will be
* the user reuses a reference, the previous heap block will be
* orphaned and not returned to the free heap space.
*
* When garbage collection is on, the user must initialize the
Expand Down
2 changes: 1 addition & 1 deletion src/H5Rdeprec.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ H5R__encode_token_region_compat(H5F_t *f, const H5O_token_t *obj_token, size_t t
* file libver bounds, this is later retrieved in H5S hyper encode */
H5CX_set_libver_bounds(f);

/* Zero the heap ID out, may leak heap space if user is re-using
/* Zero the heap ID out, may leak heap space if user is reusing
* reference and doesn't have garbage collection turned on
*/
memset(buf, 0, buf_size);
Expand Down
4 changes: 2 additions & 2 deletions src/H5Sselect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2569,11 +2569,11 @@ H5S_select_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Advance iterators */
if (H5S_SELECT_ITER_NEXT(ss_iter, 1) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL,
"can't advacne source selection iterator");
"can't advance source selection iterator");
ss_iter->elmt_left--;
if (H5S_SELECT_ITER_NEXT(ds_iter, 1) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTNEXT, FAIL,
"can't advacne destination selection iterator");
"can't advance destination selection iterator");
ds_iter->elmt_left--;
} while (ss_iter->elmt_left > 0);
assert(H5S_SELECT_ITER_NELMTS(ds_iter) == 0);
Expand Down
2 changes: 1 addition & 1 deletion test/mirror_vfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -2445,7 +2445,7 @@ main(int argc, char **argv)
/* TESTS */

if (nerrors == 0) {
H5FD_mirror_xmit_t xmit_mock; /* Re-used header in various xmit tests */
H5FD_mirror_xmit_t xmit_mock; /* Reused header in various xmit tests */

/* Set bogus values matching expected; encoding doesn't care
* Use sequential values to easily generate the expected buffer with a
Expand Down
4 changes: 2 additions & 2 deletions test/swmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -5579,7 +5579,7 @@ static int
test_file_lock_swmr_concur(hid_t H5_ATTR_UNUSED in_fapl)
{
/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
TESTING("File open with different combinations of flags + SWMR flags--concurrent access");
SKIPPED();
puts(" Test skipped due to fork or waitpid not defined.");
return 0;
Expand All @@ -5601,7 +5601,7 @@ test_file_lock_swmr_concur(hid_t in_fapl)
int notify = 0;

/* Output message about test being performed */
TESTING("File open with different combintations of flags + SWMR flags--concurrent access");
TESTING("File open with different combinations of flags + SWMR flags--concurrent access");

/* Set locking in the fapl */
if ((fapl = H5Pcopy(in_fapl)) < 0)
Expand Down
4 changes: 2 additions & 2 deletions test/tmisc.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ typedef struct {
/****************************************************************
**
** test_misc1(): test unlinking a dataset from a group and immediately
** re-using the dataset name
** reusing the dataset name
**
****************************************************************/
static void
Expand Down Expand Up @@ -7112,7 +7112,7 @@ test_misc(void)
/* Output message about test being performed */
MESSAGE(5, ("Testing Miscellaneous Routines\n"));

test_misc1(); /* Test unlinking a dataset & immediately re-using name */
test_misc1(); /* Test unlinking a dataset & immediately reusing name */
test_misc2(); /* Test storing a VL-derived datatype in two different files */
test_misc3(); /* Test reading from chunked dataset with non-zero fill value */
test_misc4(); /* Test retrieving the fileno for various objects with H5Oget_info() */
Expand Down

0 comments on commit f958b62

Please sign in to comment.