summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_main.c
diff options
context:
space:
mode:
authorJonathan Kim <jkm@hdfgroup.org>2011-02-14 22:47:19 (GMT)
committerJonathan Kim <jkm@hdfgroup.org>2011-02-14 22:47:19 (GMT)
commit5f9f168845f8f34284702031f08aedfdaf07ab45 (patch)
tree78398bb859c70bb87f9c3ce295c573c0e1fdfb4a /tools/h5repack/h5repack_main.c
parentbe3b1ea374a1b66459339904fe59ef6da37c9c4c (diff)
downloadhdf5-5f9f168845f8f34284702031f08aedfdaf07ab45.zip
hdf5-5f9f168845f8f34284702031f08aedfdaf07ab45.tar.gz
hdf5-5f9f168845f8f34284702031f08aedfdaf07ab45.tar.bz2
[svn-r20104] Purpose:
Change to use HDxxx macros. Description: Merged from hdf5 trunk r20103. Originally this started for fixing incorrect pointer usage. But that got fixed through coverity merge. So this is mainly changing to use HDxxx macros and clean up some related code. Tested: jam (linux32-LE), amani (linux64-LE), heiwa (linuxppc64-BE)
Diffstat (limited to 'tools/h5repack/h5repack_main.c')
-rw-r--r--tools/h5repack/h5repack_main.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/tools/h5repack/h5repack_main.c b/tools/h5repack/h5repack_main.c
index 3cc65d0..2e73721 100644
--- a/tools/h5repack/h5repack_main.c
+++ b/tools/h5repack/h5repack_main.c
@@ -13,10 +13,6 @@
* access to either file, you may request a copy from help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-
#include "h5tools_utils.h"
#include "h5repack.h"
@@ -122,7 +118,7 @@ int main(int argc, const char **argv)
infile = argv[ opt_ind ];
outfile = argv[ opt_ind + 1 ];
- if ( strcmp( infile, outfile ) == 0 )
+ if ( HDstrcmp( infile, outfile ) == 0 )
{
error_msg("file names cannot be the same\n");
usage(h5tools_getprogname());
@@ -378,7 +374,7 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
int idx = 0;
int ssize = 0;
- char *msgPtr = strchr( opt_arg, ':');
+ char *msgPtr = HDstrchr( opt_arg, ':');
options->latest = 1; /* must use latest format */
if (msgPtr == NULL)
{
@@ -389,22 +385,22 @@ void parse_command_line(int argc, const char **argv, pack_opt_t* options)
else
{
char msgType[10];
- strcpy(msgType, msgPtr+1);
+ HDstrcpy(msgType, msgPtr+1);
msgPtr[0] = '\0';
ssize = atoi( opt_arg );
- if (strncmp(msgType, "dspace",6) == 0) {
+ if (HDstrncmp(msgType, "dspace",6) == 0) {
options->msg_size[0] = ssize;
}
- else if (strncmp(msgType, "dtype", 5) == 0) {
+ else if (HDstrncmp(msgType, "dtype", 5) == 0) {
options->msg_size[1] = ssize;
}
- else if (strncmp(msgType, "fill", 4) == 0) {
+ else if (HDstrncmp(msgType, "fill", 4) == 0) {
options->msg_size[2] = ssize;
}
- else if (strncmp(msgType, "pline", 5) == 0) {
+ else if (HDstrncmp(msgType, "pline", 5) == 0) {
options->msg_size[3] = ssize;
}
- else if (strncmp(msgType, "attr", 4) == 0) {
+ else if (HDstrncmp(msgType, "attr", 4) == 0) {
options->msg_size[4] = ssize;
}
}
@@ -507,7 +503,7 @@ void read_info(const char *filename,
* filter
*-------------------------------------------------------------------------
*/
- if (strcmp(stype,"-f") == 0) {
+ if (HDstrcmp(stype,"-f") == 0) {
/* find begining of info */
i=0; c='0';
@@ -537,7 +533,7 @@ void read_info(const char *filename,
* layout
*-------------------------------------------------------------------------
*/
- else if (strcmp(stype,"-l") == 0) {
+ else if (HDstrcmp(stype,"-l") == 0) {
/* find begining of info */
i=0; c='0';