summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5f90kit.c
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /fortran/src/H5f90kit.c
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'fortran/src/H5f90kit.c')
-rw-r--r--fortran/src/H5f90kit.c25
1 files changed, 12 insertions, 13 deletions
diff --git a/fortran/src/H5f90kit.c b/fortran/src/H5f90kit.c
index 6e8c793..458bcd1 100644
--- a/fortran/src/H5f90kit.c
+++ b/fortran/src/H5f90kit.c
@@ -20,7 +20,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
******
-*/
+ */
#include <ctype.h>
#include <stddef.h>
@@ -45,17 +45,17 @@ char *
HD5f2cstring(_fcd fdesc, size_t len)
/******/
{
- char *cstr; /* C string to return */
- char *str; /* Pointer to FORTRAN string */
- int i; /* Local index variable */
+ char *cstr; /* C string to return */
+ char *str; /* Pointer to FORTRAN string */
+ int i; /* Local index variable */
/* Search for the end of the string */
str = _fcdtocp(fdesc);
- for(i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
+ for (i = (int)len - 1; i >= 0 && HDisspace((int)str[i]) && str[i] == ' '; i--)
/*EMPTY*/;
/* Allocate C string */
- if(NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
+ if (NULL == (cstr = (char *)HDmalloc((size_t)(i + 2))))
return NULL;
/* Copy text from FORTRAN to C string */
@@ -65,7 +65,7 @@ HD5f2cstring(_fcd fdesc, size_t len)
cstr[i + 1] = '\0';
return cstr;
-} /* HD5f2cstring */
+} /* HD5f2cstring */
/****if* H5f90kit/HD5packFstring
* NAME
@@ -91,15 +91,14 @@ void
HD5packFstring(char *src, char *dest, size_t dst_len)
/******/
{
- size_t src_len=HDstrlen(src);
+ size_t src_len = HDstrlen(src);
/* Copy over the string information, up to the length of the src */
/* (Don't copy the NUL terminator from the C string to the FORTRAN string */
- HDmemcpy(dest,src,MIN(src_len,dst_len));
+ HDmemcpy(dest, src, MIN(src_len, dst_len));
/* Pad out any remaining space in the FORTRAN string with ' 's */
- if(src_len<dst_len)
- HDmemset(&dest[src_len],' ',dst_len-src_len);
-
-} /* HD5packFstring */
+ if (src_len < dst_len)
+ HDmemset(&dest[src_len], ' ', dst_len - src_len);
+} /* HD5packFstring */