summaryrefslogtreecommitdiffstats
path: root/test/titerate.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-09-25 17:46:32 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-09-25 17:46:32 (GMT)
commited663577a5394d34a0cfbe5cd5443af1f7957dc5 (patch)
treef334d37a08de1f77ce046907bce49c9ff56c6597 /test/titerate.c
parenta6036953db9be2210acbed0882cf62c594b3a168 (diff)
downloadhdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.zip
hdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.tar.gz
hdf5-ed663577a5394d34a0cfbe5cd5443af1f7957dc5.tar.bz2
[svn-r4473] Purpose:
Code cleanup for better compatibility with C++ compilers Description: C++ compilers are choking on our C code, for various reasons: we used our UNUSED macro incorrectly when referring to pointer types we used various C++ keywords as variables, etc. we incremented enum's with the ++ operator. Solution: Changed variables, etc.to avoid C++ keywords (new, class, typename, typeid, template) Fixed usage of UNUSED macro from this: char UNUSED *c to this: char * UNUSED c Switched the enums from x++ to x=x+1 Platforms tested: FreeBSD 4.4 (hawkwind)
Diffstat (limited to 'test/titerate.c')
-rw-r--r--test/titerate.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/titerate.c b/test/titerate.c
index c4370f8..b50913d 100644
--- a/test/titerate.c
+++ b/test/titerate.c
@@ -43,11 +43,17 @@
#define SPACE1_RANK 1
#define SPACE1_DIM1 4
+typedef enum {
+ RET_ZERO,
+ RET_ONE,
+ RET_CHANGE
+} iter_enum;
+
/* Custom group iteration callback data */
typedef struct {
char name[NAMELEN]; /* The name of the object */
int type; /* The type of the object */
- enum {RET_ZERO, RET_ONE, RET_CHANGE} command; /* The type of return value */
+ iter_enum command; /* The type of return value */
} iter_info;
/* Local functions */