Skip to content

Commit

Permalink
TRUE/FALSE --> true/false in src
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins committed Sep 3, 2023
1 parent 2dddb4f commit 7a78655
Show file tree
Hide file tree
Showing 281 changed files with 4,978 additions and 4,978 deletions.
4 changes: 2 additions & 2 deletions bin/make_err
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ sub create_init ($) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MAJOR, \"${major{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, false))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}

Expand All @@ -260,7 +260,7 @@ sub create_init ($) {
print HEADER " "x(0*$indent),"assert(${name}_g==(-1));\n";
print HEADER " "x(0*$indent),"if((msg = H5E__create_msg(cls, H5E_MINOR, \"${minor{$name}}\"))==NULL)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTINIT, FAIL, \"error message initialization failed\");\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, FALSE))<0)\n";
print HEADER " "x(0*$indent),"if((${name}_g = H5I_register(H5I_ERROR_MSG, msg, true))<0)\n";
print HEADER " "x(1*$indent),"HGOTO_ERROR(H5E_ERROR, H5E_CANTREGISTER, FAIL, \"can't register error message\");\n";
}
}
Expand Down
38 changes: 19 additions & 19 deletions src/H5.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ static const unsigned VERS_RELEASE_EXCEPTIONS_SIZE = 1;
#ifdef H5_HAVE_THREADSAFE
H5_api_t H5_g;
#else
bool H5_libinit_g = FALSE; /* Library hasn't been initialized */
bool H5_libterm_g = FALSE; /* Library isn't being shutdown */
bool H5_libinit_g = false; /* Library hasn't been initialized */
bool H5_libterm_g = false; /* Library isn't being shutdown */
#endif

char H5_lib_vers_info_g[] = H5_VERS_INFO;
static bool H5_dont_atexit_g = FALSE;
static bool H5_dont_atexit_g = false;
H5_debug_t H5_debug_g; /* debugging info */

/*******************/
Expand Down Expand Up @@ -150,7 +150,7 @@ H5_init_library(void)
/* Set the 'library initialized' flag as early as possible, to avoid
* possible re-entrancy.
*/
H5_INIT_GLOBAL = TRUE;
H5_INIT_GLOBAL = true;

#ifdef H5_HAVE_PARALLEL
{
Expand Down Expand Up @@ -224,7 +224,7 @@ H5_init_library(void)
/* Normal library termination code */
(void)atexit(H5_term_library);

H5_dont_atexit_g = TRUE;
H5_dont_atexit_g = true;
} /* end if */

/*
Expand Down Expand Up @@ -313,7 +313,7 @@ H5_term_library(void)
goto done;

/* Indicate that the library is being shut down */
H5_TERM_GLOBAL = TRUE;
H5_TERM_GLOBAL = true;

/* Push the API context without checking for errors */
H5CX_push_special();
Expand Down Expand Up @@ -498,10 +498,10 @@ H5_term_library(void)
} /* end while */

/* Reset flag indicating that the library is being shut down */
H5_TERM_GLOBAL = FALSE;
H5_TERM_GLOBAL = false;

/* Mark library as closed */
H5_INIT_GLOBAL = FALSE;
H5_INIT_GLOBAL = false;

/* Don't pop the API context (i.e. H5CX_pop), since it's been shut down already */

Expand Down Expand Up @@ -544,7 +544,7 @@ H5dont_atexit(void)
if (H5_dont_atexit_g)
ret_value = FAIL;
else
H5_dont_atexit_g = TRUE;
H5_dont_atexit_g = true;

FUNC_LEAVE_API_NOFS(ret_value)
} /* end H5dont_atexit() */
Expand Down Expand Up @@ -701,15 +701,15 @@ H5__debug_mask(const char *s)

/* Enable or Disable debugging? */
if ('-' == *s) {
clear = TRUE;
clear = true;
s++;
}
else if ('+' == *s) {
clear = FALSE;
clear = false;
s++;
}
else {
clear = FALSE;
clear = false;
} /* end if */

/* Get the name */
Expand Down Expand Up @@ -1220,9 +1220,9 @@ H5is_library_threadsafe(bool *is_ts /*out*/)

if (is_ts) {
#ifdef H5_HAVE_THREADSAFE
*is_ts = TRUE;
*is_ts = true;
#else /* H5_HAVE_THREADSAFE */
*is_ts = FALSE;
*is_ts = false;
#endif /* H5_HAVE_THREADSAFE */
}
else
Expand Down Expand Up @@ -1276,7 +1276,7 @@ H5is_library_terminating(bool *is_terminating /*out*/)
* Only enabled when the shared Windows library is built with
* thread safety enabled.
*
* Return: TRUE on success, FALSE on failure
* Return: true on success, false on failure
*
*-------------------------------------------------------------------------
*/
Expand All @@ -1290,7 +1290,7 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
* This includes any functions that are called by from here!
*/

BOOL fOkay = TRUE;
BOOL fOkay = true;

switch (fdwReason) {
case DLL_PROCESS_ATTACH:
Expand All @@ -1302,20 +1302,20 @@ DllMain(_In_ HINSTANCE hinstDLL, _In_ DWORD fdwReason, _In_ LPVOID lpvReserved)
case DLL_THREAD_ATTACH:
#ifdef H5_HAVE_WIN_THREADS
if (H5TS_win32_thread_enter() < 0)
fOkay = FALSE;
fOkay = false;
#endif /* H5_HAVE_WIN_THREADS */
break;

case DLL_THREAD_DETACH:
#ifdef H5_HAVE_WIN_THREADS
if (H5TS_win32_thread_exit() < 0)
fOkay = FALSE;
fOkay = false;
#endif /* H5_HAVE_WIN_THREADS */
break;

default:
/* Shouldn't get here */
fOkay = FALSE;
fOkay = false;
break;
}

Expand Down
44 changes: 22 additions & 22 deletions src/H5A.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ H5A__create_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const
HGOTO_ERROR(H5E_ATTR, H5E_CANTINIT, H5I_INVALID_HID, "unable to create attribute");

/* Register the new attribute and get an ID for it */
if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID");

done:
Expand Down Expand Up @@ -172,7 +172,7 @@ H5A__create_api_common(hid_t loc_id, const char *attr_name, hid_t type_id, hid_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "attr_name parameter cannot be an empty string");

/* Set up object access arguments */
if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, TRUE, &aapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, true, &aapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");

/* Get correct property list */
Expand Down Expand Up @@ -319,11 +319,11 @@ H5A__create_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a

/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_name_args(loc_id, obj_name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, TRUE) < 0)
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");

/* Get correct property list */
Expand Down Expand Up @@ -464,7 +464,7 @@ H5A__open_common(H5VL_object_t *vol_obj, H5VL_loc_params_t *loc_params, const ch
HGOTO_ERROR(H5E_ATTR, H5E_CANTOPENOBJ, H5I_INVALID_HID, "unable to open attribute: '%s'", attr_name);

/* Register the attribute and get an ID for it */
if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, TRUE)) < 0)
if ((ret_value = H5VL_register(H5I_ATTR, attr, vol_obj->connector, true)) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register attribute for ID");

done:
Expand Down Expand Up @@ -507,7 +507,7 @@ H5A__open_api_common(hid_t loc_id, const char *attr_name, hid_t aapl_id, void **
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "name parameter cannot be an empty string");

/* Set up object access arguments */
if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, FALSE, &aapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_acc_args(loc_id, H5P_CLS_AACC, false, &aapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");

/* Open the attribute */
Expand Down Expand Up @@ -629,11 +629,11 @@ H5A__open_by_name_api_common(hid_t loc_id, const char *obj_name, const char *att

/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_name_args(loc_id, obj_name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");

/* Open the attribute */
Expand Down Expand Up @@ -763,12 +763,12 @@ H5A__open_by_idx_api_common(hid_t loc_id, const char *obj_name, H5_index_t idx_t
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, H5I_INVALID_HID, "invalid iteration order specified");

/* Set up object access arguments */
if (H5VL_setup_idx_args(loc_id, obj_name, idx_type, order, n, FALSE, lapl_id, vol_obj_ptr, &loc_params) <
if (H5VL_setup_idx_args(loc_id, obj_name, idx_type, order, n, false, lapl_id, vol_obj_ptr, &loc_params) <
0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set object access arguments");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&aapl_id, H5P_CLS_AACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, H5I_INVALID_HID, "can't set attribute access property list info");

/* Open the attribute */
Expand Down Expand Up @@ -1323,7 +1323,7 @@ H5Aget_name_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* Get the object */
Expand Down Expand Up @@ -1471,7 +1471,7 @@ H5Aget_info_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, H
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* Get the object */
Expand Down Expand Up @@ -1530,7 +1530,7 @@ H5Aget_info_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid info pointer");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* Get the object */
Expand Down Expand Up @@ -1743,7 +1743,7 @@ H5A__rename_by_name_api_common(hid_t loc_id, const char *obj_name, const char *o

/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
if (H5VL_setup_name_args(loc_id, obj_name, TRUE, lapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_name_args(loc_id, obj_name, true, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments");

/* Rename the attribute */
Expand Down Expand Up @@ -1977,7 +1977,7 @@ H5Aiterate_by_name(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_i
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, FALSE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, false) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* get the loc object */
Expand Down Expand Up @@ -2100,7 +2100,7 @@ H5Adelete_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "no attribute name");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* Get the object */
Expand Down Expand Up @@ -2172,7 +2172,7 @@ H5Adelete_by_idx(hid_t loc_id, const char *obj_name, H5_index_t idx_type, H5_ite
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "invalid iteration order specified");

/* Verify access property list and set up collective metadata if appropriate */
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, TRUE) < 0)
if (H5CX_set_apl(&lapl_id, H5P_CLS_LACC, loc_id, true) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set access property list info");

/* get the object */
Expand Down Expand Up @@ -2377,7 +2377,7 @@ H5A__exists_api_common(hid_t obj_id, const char *attr_name, bool *attr_exists, v
* Purpose: Checks if an attribute with a given name exists on an opened
* object.
*
* Return: Success: TRUE/FALSE
* Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
Expand All @@ -2392,7 +2392,7 @@ H5Aexists(hid_t obj_id, const char *attr_name)
H5TRACE2("t", "i*s", obj_id, attr_name);

/* Synchronously check if an attribute exists */
exists = FALSE;
exists = false;
if (H5A__exists_api_common(obj_id, attr_name, &exists, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously check if attribute exists");

Expand Down Expand Up @@ -2473,7 +2473,7 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a

/* obj_name is verified in H5VL_setup_name_args() */
/* Set up object access arguments */
if (H5VL_setup_name_args(loc_id, obj_name, FALSE, lapl_id, vol_obj_ptr, &loc_params) < 0)
if (H5VL_setup_name_args(loc_id, obj_name, false, lapl_id, vol_obj_ptr, &loc_params) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTSET, FAIL, "can't set object access arguments");

/* Check if the attribute exists */
Expand All @@ -2489,7 +2489,7 @@ H5A__exists_by_name_api_common(hid_t loc_id, const char *obj_name, const char *a
*
* Purpose: Checks if an attribute with a given name exists on an object.
*
* Return: Success: TRUE/FALSE
* Return: Success: true/false
* Failure: Negative
*
*-------------------------------------------------------------------------
Expand All @@ -2504,7 +2504,7 @@ H5Aexists_by_name(hid_t loc_id, const char *obj_name, const char *attr_name, hid
H5TRACE4("t", "i*s*si", loc_id, obj_name, attr_name, lapl_id);

/* Synchronously check if an attribute exists */
exists = FALSE;
exists = false;
if (H5A__exists_by_name_api_common(loc_id, obj_name, attr_name, &exists, lapl_id, NULL, NULL) < 0)
HGOTO_ERROR(H5E_ATTR, H5E_CANTGET, FAIL, "can't synchronously determine if attribute exists by name");

Expand Down
Loading

0 comments on commit 7a78655

Please sign in to comment.