83
83
 
    }
84
84
 
85
85
 
    /*
86
86
 
     * Write the objects, monotonically increasing in length.  Since this is
87
87
 
     * a clean file, the addresses allocated for the collections should also
88
88
 
     * be monotonically increasing.
89
89
 
     */
90
90
 
    for (i=0; i<1024; i++) {
91
91
 
    size = i+1;
92
92
 
    memset (out, 'A'+i%26, size);
93
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
93
+
    H5Eclear2(H5E_DEFAULT);
94
94
 
    status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
95
95
 
    if (status<0) {
96
96
 
        H5_FAILED();
97
97
 
        puts("    Unable to insert object into global heap");
98
98
 
        nerrors++;
99
99
 
    } else if (i && H5F_addr_gt (obj[i-1].addr, obj[i].addr)) {
100
100
 
        H5_FAILED();
101
101
 
        puts("    Collection addresses are not monotonically increasing");
102
102
 
        nerrors++;
103
103
 
    }
104
104
 
    }
105
105
 
106
106
 
    /*
107
107
 
     * Now try to read each object back.
108
108
 
     */
109
109
 
    for (i=0; i<1024; i++) {
110
110
 
    size = i+1;
111
111
 
    memset (out, 'A'+i%26, size);
112
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
112
+
    H5Eclear2(H5E_DEFAULT);
113
113
 
    if (NULL==H5HG_read (f, H5P_DATASET_XFER_DEFAULT, obj+i, in, NULL)) {
114
114
 
        H5_FAILED();
115
115
 
        puts("    Unable to read object");
116
116
 
        nerrors++;
117
117
 
    } else if (memcmp (in, out, size)) {
118
118
 
        H5_FAILED();
119
119
 
        puts("    Value read doesn't match value written");
120
120
 
        nerrors++;
121
121
 
    }
122
122
 
    }
Show more
175
175
 
    puts("    Unable to create file");
176
176
 
    goto error;
177
177
 
    }
178
178
 
179
179
 
    /*
180
180
 
     * Write the objects, monotonically decreasing in length.
181
181
 
     */
182
182
 
    for (i=0; i<1024; i++) {
183
183
 
    size = 1024-i;
184
184
 
    memset (out, 'A'+i%26, size);
185
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
185
+
    H5Eclear2(H5E_DEFAULT);
186
186
 
    if (H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i)<0) {
187
187
 
        H5_FAILED();
188
188
 
        puts("    Unable to insert object into global heap");
189
189
 
        nerrors++;
190
190
 
    }
191
191
 
    }
192
192
 
193
193
 
    /*
194
194
 
     * Now try to read each object back.
195
195
 
     */
196
196
 
    for (i=0; i<1024; i++) {
197
197
 
    size = 1024-i;
198
198
 
    memset (out, 'A'+i%26, size);
199
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
199
+
    H5Eclear2(H5E_DEFAULT);
200
200
 
    if (NULL==H5HG_read (f, H5P_DATASET_XFER_DEFAULT, obj+i, in, NULL)) {
201
201
 
        H5_FAILED();
202
202
 
        puts("    Unable to read object");
203
203
 
        nerrors++;
204
204
 
    } else if (memcmp (in, out, size)) {
205
205
 
        H5_FAILED();
206
206
 
        puts("    Value read doesn't match value written");
207
207
 
        nerrors++;
208
208
 
    }
209
209
 
    }
Show more
260
260
 
    if (NULL==(f=H5I_object(file))) {
261
261
 
    H5_FAILED();
262
262
 
    puts("    Unable to create file");
263
263
 
    goto error;
264
264
 
    }
265
265
 
266
266
 
    /* Create some stuff */
267
267
 
    for (i=0; i<1024; i++) {
268
268
 
    size = i%30+100;
269
269
 
    memset (out, 'A'+i%26, size);
270
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
270
+
    H5Eclear2(H5E_DEFAULT);
271
271
 
    status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
272
272
 
    if (status<0) {
273
273
 
        H5_FAILED();
274
274
 
        puts("    Unable to insert object into global heap");
275
275
 
        nerrors++;
276
276
 
    }
277
277
 
    }
278
278
 
279
279
 
    /* Remove everything */
280
280
 
    for (i=0; i<1024; i++) {
Show more
339
339
 
    if (NULL==(f=H5I_object(file))) {
340
340
 
    H5_FAILED();
341
341
 
    puts("    Unable to create file");
342
342
 
    goto error;
343
343
 
    }
344
344
 
345
345
 
    for (i=0; i<1024; i++) {
346
346
 
    /* Insert */
347
347
 
    size = i%30+100;
348
348
 
    memset (out, 'A'+i%26, size);
349
 
-
    H5Eclear_stack(H5E_DEFAULT);
 
349
+
    H5Eclear2(H5E_DEFAULT);
350
350
 
    status = H5HG_insert (f, H5P_DATASET_XFER_DEFAULT, size, out, obj+i);
351
351
 
    if (status<0) {
352
352
 
        H5_FAILED();
353
353
 
        puts("    Unable to insert object into global heap");
354
354
 
        nerrors++;
355
355
 
    }
356
356
 
357
357
 
    /*
358
358
 
     * Remove every third one beginning with the second, but after the
359
359
 
     * next one has already been inserted.  That is, insert A, B, C;
360
360
 
     * remove B, insert D, E, F; remove E; etc.
361
361
 
     */
362
362
 
    if (1==i%3) {
363
 
-
        H5Eclear_stack(H5E_DEFAULT);
 
363
+
        H5Eclear2(H5E_DEFAULT);
364
364
 
        status = H5HG_remove (f, H5P_DATASET_XFER_DEFAULT, obj+i-1);
365
365
 
        if (status<0) {
366
366
 
        H5_FAILED();
367
367
 
        puts("    Unable to remove object");
368
368
 
        nerrors++;
369
369
 
        }
370
370
 
        memset (obj+i-1, 0, sizeof *obj);
371
371
 
    }
372
372
 
    }
373
373