Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
H5hut
src
Commits
825322c5
Commit
825322c5
authored
May 10, 2007
by
gsell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
src/H5Part.c
- some type-casts added - internal error variable '_errno' renamed to '_h5part_errno'
parent
58bd753f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
13 deletions
+24
-13
src/H5Part.c
src/H5Part.c
+24
-13
No files found.
src/H5Part.c
View file @
825322c5
...
...
@@ -78,11 +78,18 @@ Last modified on April 19, 2007.
#include <stdlib.h>
#include <stdarg.h>
/* va_arg - System dependent ?! */
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
#include <hdf5.h>
#ifndef WIN32
#include <unistd.h>
#else
/* WIN32 */
#include <io.h>
#define open _open
#define close _close
#endif
/* WIN32 */
#include "H5PartTypes.h"
#include "H5Part.h"
#include "H5PartPrivate.h"
...
...
@@ -91,7 +98,7 @@ Last modified on April 19, 2007.
/********* Private Variable Declarations *************/
static
unsigned
_debug
=
0
;
static
h5part_int64_t
_errno
=
H5PART_SUCCESS
;
static
h5part_int64_t
_
h5part_
errno
=
H5PART_SUCCESS
;
static
h5part_error_handler
_err_handler
=
H5PartReportErrorHandler
;
static
char
*
__funcname
=
"NONE"
;
...
...
@@ -107,6 +114,9 @@ _file_is_valid (
const
H5PartFile
*
f
);
/*
error handler for hdf5
*/
static
herr_t
_h5_error_handler
(
void
*
...
...
@@ -125,7 +135,7 @@ _H5Part_open_file (
HANDLE_H5PART_INIT_ERR
;
return
NULL
;
}
_errno
=
H5PART_SUCCESS
;
_
h5part_
errno
=
H5PART_SUCCESS
;
H5PartFile
*
f
=
NULL
;
f
=
(
H5PartFile
*
)
malloc
(
sizeof
(
H5PartFile
)
);
...
...
@@ -158,7 +168,8 @@ _H5Part_open_file (
goto
error_cleanup
;
}
f
->
pnparticles
=
malloc
(
f
->
nprocs
*
sizeof
(
h5part_int64_t
));
f
->
pnparticles
=
(
h5part_int64_t
*
)
malloc
(
f
->
nprocs
*
sizeof
(
h5part_int64_t
));
if
(
f
->
pnparticles
==
NULL
)
{
HANDLE_H5PART_NOMEM_ERR
;
goto
error_cleanup
;
...
...
@@ -366,7 +377,7 @@ H5PartCloseFile (
SET_FNAME
(
"H5PartCloseFile"
);
herr_t
r
=
0
;
_errno
=
H5PART_SUCCESS
;
_
h5part_
errno
=
H5PART_SUCCESS
;
CHECK_FILEHANDLE
(
f
);
...
...
@@ -419,7 +430,7 @@ H5PartCloseFile (
}
free
(
f
);
return
_errno
;
return
_
h5part_
errno
;
}
/*============== File Writing Functions ==================== */
...
...
@@ -1380,7 +1391,7 @@ _H5Part_iteration_operator (
void
*
operator_data
/*!< [in,out] data passed to the iterator */
)
{
struct
_iter_op_data
*
data
=
operator_data
;
struct
_iter_op_data
*
data
=
(
struct
_iter_op_data
*
)
operator_data
;
herr_t
herr
;
H5G_stat_t
objinfo
;
...
...
@@ -2330,7 +2341,7 @@ h5part_int64_t
H5PartGetErrno
(
void
)
{
return
_errno
;
return
_
h5part_
errno
;
}
/*!
...
...
@@ -2349,14 +2360,14 @@ H5PartReportErrorHandler (
...
)
{
_errno
=
eno
;
_
h5part_
errno
=
eno
;
if
(
_debug
>
0
)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
_H5Part_vprint_error
(
fmt
,
ap
);
va_end
(
ap
);
}
return
_errno
;
return
_
h5part_
errno
;
}
/*!
...
...
@@ -2373,7 +2384,7 @@ H5PartAbortErrorHandler (
...
)
{
_errno
=
eno
;
_
h5part_
errno
=
eno
;
if
(
_debug
>
0
)
{
va_list
ap
;
va_start
(
ap
,
fmt
);
...
...
@@ -2381,7 +2392,7 @@ H5PartAbortErrorHandler (
vfprintf
(
stderr
,
fmt
,
ap
);
fprintf
(
stderr
,
"
\n
"
);
}
exit
(
-
_errno
);
exit
(
-
_
h5part_
errno
);
}
/*!
...
...
@@ -2417,7 +2428,7 @@ _vprint (
const
char
*
fmt
,
va_list
ap
)
{
char
*
fmt2
=
malloc
(
strlen
(
prefix
)
+
strlen
(
fmt
)
+
strlen
(
__funcname
)
+
16
);
char
*
fmt2
=
(
char
*
)
malloc
(
strlen
(
prefix
)
+
strlen
(
fmt
)
+
strlen
(
__funcname
)
+
16
);
if
(
fmt2
==
NULL
)
return
;
sprintf
(
fmt2
,
"%s: %s: %s
\n
"
,
prefix
,
__funcname
,
fmt
);
vfprintf
(
stderr
,
fmt2
,
ap
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment