summaryrefslogtreecommitdiffstats
path: root/src/H5Epkg.h
blob: a85ddc9355055518898ba8b888b61ac75aab0b2f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/*
 * Programmer:	Quincey Koziol <koziol@hdfgroup.org>
 *		Wednesday, April 11, 2007
 *
 * Purpose:	This file contains declarations which are visible only within
 *		the H5E package.  Source files outside the H5E package should
 *		include H5Eprivate.h instead.
 */
#ifndef H5E_PACKAGE
#error "Do not include this file outside the H5E package!"
#endif

#ifndef _H5Epkg_H
#define _H5Epkg_H

/* Get package's private header */
#include "H5Eprivate.h"

/* Other private headers needed by this file */


/**************************/
/* Package Private Macros */
/**************************/

/* Amount to indent each error */
#define H5E_INDENT              2

/* Number of slots in an error stack */
#define H5E_NSLOTS	        32

#ifdef H5_HAVE_THREADSAFE
/*
 * The per-thread error stack. pthread_once() initializes a special
 * key that will be used by all threads to create a stack specific to
 * each thread individually. The association of stacks to threads will
 * be handled by the pthread library.
 *
 * In order for this macro to work, H5E_get_my_stack() must be preceeded
 * by "H5E_t *estack =".
 */
#define H5E_get_my_stack()  H5E_get_stack()
#else /* H5_HAVE_THREADSAFE */
/*
 * The current error stack.
 */
#define H5E_get_my_stack() (H5E_stack_g + 0)
#endif /* H5_HAVE_THREADSAFE */


/****************************/
/* Package Private Typedefs */
/****************************/

/* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */
typedef struct {
    unsigned vers;              /* Which version callback to use */
    union {
#ifndef H5_NO_DEPRECATED_SYMBOLS
        H5E_auto1_t func1;      /* Old-style callback, NO error stack param. */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
        H5E_auto2_t func2;      /* New-style callback, with error stack param. */
    }u;
} H5E_auto_op_t;

/* Some syntactic sugar to make the compiler happy with two different kinds of callbacks */
typedef struct {
    unsigned vers;              /* Which version callback to use */
    union {
#ifndef H5_NO_DEPRECATED_SYMBOLS
        H5E_walk1_t func1;      /* Old-style callback, NO error stack param. */
#endif /* H5_NO_DEPRECATED_SYMBOLS */
        H5E_walk2_t func2;      /* New-style callback, with error stack param. */
    }u;
} H5E_walk_op_t;

/* Error class */
typedef struct H5E_cls_t {
    char *cls_name;             /* Name of error class */
    char *lib_name;             /* Name of library within class */
    char *lib_vers;             /* Version of library */
} H5E_cls_t;

/* Major or minor message */
typedef struct H5E_msg_t {
    char        *msg;           /* Message for error */
    H5E_type_t   type;          /* Type of error (major or minor) */
    H5E_cls_t   *cls;           /* Which error class this message belongs to */
} H5E_msg_t;

/* Error stack */
struct H5E_t {
    size_t nused;		        /* Num slots currently used in stack  */
    H5E_error2_t slot[H5E_NSLOTS];	/* Array of error records	     */
    H5E_auto_op_t auto_op;              /* Operator for 'automatic' error reporting */
    void *auto_data;                    /* Callback data for 'automatic error reporting */
};


/*****************************/
/* Package Private Variables */
/*****************************/

#ifndef H5_HAVE_THREADSAFE
/*
 * The current error stack.
 */
H5_DLLVAR H5E_t	H5E_stack_g[1];
#endif /* H5_HAVE_THREADSAFE */


/******************************/
/* Package Private Prototypes */
/******************************/
#ifdef H5_HAVE_THREADSAFE
H5_DLL H5E_t *H5E_get_stack(void);
#endif /* H5_HAVE_THREADSAFE */
H5_DLL ssize_t H5E_get_msg(const H5E_msg_t *msg_ptr, H5E_type_t *type,
    char *msg, size_t size);
H5_DLL herr_t H5E_print(const H5E_t *estack, FILE *stream, hbool_t bk_compat);
H5_DLL herr_t H5E_walk(const H5E_t *estack, H5E_direction_t direction,
    const H5E_walk_op_t *op, void *client_data);
H5_DLL herr_t H5E_get_auto(const H5E_t *estack, H5E_auto_op_t *op,
    void **client_data);
H5_DLL herr_t H5E_set_auto(H5E_t *estack, const H5E_auto_op_t *op,
    void *client_data);
H5_DLL herr_t H5E_pop(H5E_t *err_stack, size_t count);

#endif /* _H5HFpkg_H */

ue='kennykb_tip_22_33_botched'>kennykb_tip_22_33_botched Tcl is a high-level, general-purpose, interpreted, dynamic programming language. It was designed with the goal of being very simple but powerful.
summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Allow cross-compilation by default (backported)nijtmans2010-11-194-96/+176
| | | | | | | | | | | | | | | | Use -pipe for gcc on win32 (backported)
| * | | fix gcc warnings: unused variable 'registration'nijtmans2010-11-194-8/+11
| | | |
| * | | fix gcc warning: dereferencing pointer 'oemId' does break strict-aliasing rulesnijtmans2010-11-192-7/+10
| | | |
| * | | fix gcc warning: passing argument 3 of 'Tcl_GetIndexFromObj' discards ↵nijtmans2010-11-192-2/+7
| | | | | | | | | | | | | | | | qualifiers from pointer target type
| * | | * doc/file.n: [Bug 3111298]: Typofix.dkf2010-11-182-12/+15
| | | |
| * | | [Bug #3110161]: Extensions using TCHAR don't compile on VS2005 SP1nijtmans2010-11-162-1/+10
| | | |
| * | | * doc/interp.n: [3081184] TIP #378.andreas_kupries2010-11-159-53/+377
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/tclvars.n: Performance fix for TIP #280. * generic/tclBasic.c: * generic/tclExecute.c: * generic/tclInt.h: * generic/tclInterp.c: * tests/info.test: * tests/interp.test:
| * | | Backport dgp's fixes to comments and ChangeLog entryKevin B Kenny2010-11-052-3/+3
| | | |
| * | | * generic/tclCompCmds.c (TclCompileCatchCmd):Kevin B Kenny2010-11-033-71/+155
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests/compile.test (compile-3,6): Reworked the compilation of the [catch] command so as to avoid placing any code that might throw an exception (specifically, any initial substitutions or any stores to result or options variables) between the BEGIN_CATCH and END_CATCH but outside the exception range. Added a test case that panics on a stack smash if the change is not made. [Bug #3098302]
| * | | Improved handling of non-standard module path lists, empty path lists in ↵stwo2010-11-023-6/+11
| | | | | | | | | | | | | | | | particular.
| * | | * library/tzdata/Asia/Hong_Kong:Kevin B Kenny2010-11-014-4/+8
| | | | | | | | | | | | | | | | | | | | * library/tzdata/Pacific/Apia: * library/tzdata/Pacific/Fiji: Olson's tzdata2010o.
| * | | Update for VS10nijtmans2010-10-232-3/+6
| | | |
| * | | [Bug 3085863]: tclUniData 9 years oldnijtmans2010-10-237-1063/+1107
| | | | | | | | | | | | | | | | Upgrade everything to Unicode 6.0, except non-BMP characters > 0xFFFF
| * | | * generic/tclExecute.c: fix overallocation of exec stack in TEBCMiguel Sofer2010-10-092-3/+8
| | | | | | | | | | | | | | | | (mixing numwords and numbytes)
| * | | correct evalstats to use %#lx for %p for Tcl_AppendPrintfToObjhobbs2010-10-041-2/+2
| | | |
| * | | * generic/tclExecute.c (EvalStatsCmd): change 'evalstats' tohobbs2010-10-025-119/+159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | return data to interp by default, or if given an arg, use that as filename to output to (accepts 'stdout' and 'stderr'). Fix output to print used inst count data. * generic/tclCkalloc.c: change TclDumpMemoryInfo sig to allow * generic/tclInt.decls: objPtr as well as FILE* as output. * generic/tclIntDecls.h:
| * | | * tclWinsock.c: [Bug 3056775]: Fixed race condition between threadandreas_kupries2010-09-242-1/+54
| | | | | | | | | | | | | | | | | | | | | | | | and internal co-thread access of a socket's structure because of the thread not using the socketListLock in TcpAccept(). Added documentation on how the module works to the top.
| * | | * generic/tclCmdAH.c: Fix cases where value returned bydgp2010-09-234-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | * generic/tclEvent.c: Tcl_GetReturnOptions() was leaked. * generic/tclMain.c: Thanks to Jeff Hobbs for discovery of the anti-pattern to seek and destroy.
| * | | * doc/file.n (file readlink): [Bug 3070580]: Typofix.dkf2010-09-182-2/+6
| | | |
| * | | update file generated by 'make dist'dgp2010-09-151-0/+3
| | | |
| * | | * doc/regsub.n: [Bug 3063568]: Fix for gotcha in example due to Tcl'sdkf2010-09-102-6/+15
| | | | | | | | | | | | | | | | | | | | special handling of backslash-newline. Makes example slightly less pure, but more useful.
| * | | * changes: Update for 8.5.9 release.core_8_5_9dgp2010-09-082-4/+8
| | | |
| * | | * doc/tm.n: Added underscore to the set of characters accepted inandreas_kupries2010-09-082-3/+9
| | | | | | | | | | | | | | | | | | | | module names. This is true for quite some time in the code, this change catches up the documentation.
| * | | * win/tclWin32Dll.c: #ifdef protections to permit builds withdgp2010-09-084-28/+47
| | | | | | | | | | | | | | | | | | | | * win/tclWinChan.c: mingw on amd64 systems. Thanks to "mescalinum" * win/tclWinFCmd.c: for reporting and testing.
| * | | Backport blkcnt_t detection/usage.stwo2010-09-06