summaryrefslogtreecommitdiffstats
path: root/fortran/src/H5Pf.c
blob: 29ba59368a8e48fa8602ff459dfb00cf38790f92 (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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * 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.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

/* This files contains C stubs for H5P Fortran APIs */

#include "H5f90.h"
#include "H5Eprivate.h"

/*----------------------------------------------------------------------------
 * Name:        h5pcreate_c
 * Purpose:     Call H5Pcreate to create a property list
 * Inputs:      cls - property list class identifier
 * Outputs:     prp_id - identifier of the created property list
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Wednesday, October 9, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pcreate_c ( hid_t_f *cls, hid_t_f *prp_id )
{
    hid_t c_prp_id;
    int_f ret_value = 0;

    c_prp_id = H5Pcreate((hid_t)*cls);
    if(c_prp_id  < 0)
        HGOTO_DONE(FAIL)

    *prp_id = (hid_t_f)c_prp_id;

done:
    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pclose_c
 * Purpose:     Call H5Pclose to close property lis
 * Inputs:      prp_id - identifier of the property list to be closed
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pclose_c ( hid_t_f *prp_id )
{
    int_f ret_value = 0;

    if(H5Pclose((hid_t)*prp_id) < 0)
        ret_value = -1;

    return ret_value;
}


/*----------------------------------------------------------------------------
 * Name:        h5pcopy_c
 * Purpose:     Call H5Pcopy to copy property list
 * Inputs:      prp_id - identifier of the property list to be copied
 * Outputs:     new_prp_id - identifier of the new property list
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pcopy_c ( hid_t_f *prp_id , hid_t_f *new_prp_id)
{
    hid_t c_new_prp_id;
    int_f ret_value = 0;

    c_new_prp_id = H5Pcopy((hid_t)*prp_id);
    if(c_new_prp_id < 0)
        HGOTO_DONE(FAIL)

    *new_prp_id = (hid_t_f)c_new_prp_id;

done:
    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pequal_c
 * Purpose:     Call H5Pequal to check if two property lists are equal
 * Inputs:      plist1_id - property list identifier
 *              plist2_id - property list identifier
 * Outputs:     c_flag    - flag to indicate that lists are eqaul
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, September 30, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pequal_c ( hid_t_f *plist1_id , hid_t_f *plist2_id, int_f * c_flag)
{
    htri_t c_c_flag;
    int_f ret_value = 0;

    c_c_flag = H5Pequal((hid_t)*plist1_id, (hid_t)*plist2_id);
    if(c_c_flag < 0)
        HGOTO_DONE(FAIL)

    *c_flag = (int_f)c_c_flag;

done:
    return ret_value;
}


/*----------------------------------------------------------------------------
 * Name:        h5pget_class_c
 * Purpose:     Call H5Pget_class to determine property list class
 * Inputs:      prp_id - identifier of the dataspace
 * Outputs:     classtype - class type; possible values are:
 *              H5P_ROOT_F       -1
 *              H5P_FILE_CREATE_F     0
 *              H5P_FILE_ACCESS_F     1
 *              H5P_DATASET_CREATE_F  2
 *              H5P_DATASET_XFER_F    3
 *              H5P_FILE_MOUNT_F      4
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_class_c ( hid_t_f *prp_id , int_f *classtype)
{
    hid_t c_classtype;
    int_f ret_value = 0;

    c_classtype = H5Pget_class((hid_t)*prp_id);
    if(c_classtype == H5P_ROOT) {
      *classtype = H5P_ROOT;
       HGOTO_DONE(FAIL)
    }

    *classtype = (int_f)c_classtype;

done:
    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_preserve_c
 * Purpose:     Call H5Pset_preserve to set  transfer property for compound
 *              datatype
 * Inputs:      prp_id - property list identifier
 *              flag - TRUE/FALSE flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, February 17, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_preserve_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = 0;
  hid_t c_prp_id;
  herr_t status;
  hbool_t c_flag = 0;

  if (*flag > 0) c_flag = 1;
  c_prp_id = (hid_t)*prp_id;
  status = H5Pset_preserve(c_prp_id, c_flag);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}


/*----------------------------------------------------------------------------
 * Name:        h5pget_preserve_c
 * Purpose:     Call H5Pget_preserve to set  transfer property for compound
 *              datatype
 * Inputs:      prp_id - property list identifier
 * Outputs:     flag - TRUE/FALSE flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, February 17, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_preserve_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = 0;
  hid_t c_prp_id;
  int c_flag;

  c_prp_id = (hid_t)*prp_id;
  c_flag = H5Pget_preserve(c_prp_id);
  if ( c_flag < 0  ) ret_value = -1;
  *flag = (int_f)c_flag;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_deflate_c
 * Purpose:     Call H5Pset_deflate to set deflate level
 * Inputs:      prp_id - property list identifier
 *              level - level of deflation
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_deflate_c ( hid_t_f *prp_id , int_f *level)
{
  int ret_value = 0;
  hid_t c_prp_id;
  unsigned c_level;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  c_level = (unsigned)*level;
  status = H5Pset_deflate(c_prp_id, c_level);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}



/*----------------------------------------------------------------------------
 * Name:        h5pset_chunk_c
 * Purpose:     Call H5Pset_chunk to set the sizes of chunks for a chunked
 *              layout dataset
 * Inputs:      prp_id - property list identifier
 *              rank - number of dimensions of each chunk
 *              dims - array of the size of each chunk
 * Returns:     0 on success, -1 on failure
 *              Saturday, August 14, 1999
 * Programmer:  Elena Pourmal
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_chunk_c ( hid_t_f *prp_id, int_f *rank, hsize_t_f *dims )
{
  int ret_value = -1;
  hid_t c_prp_id;
  int c_rank;
  hsize_t *c_dims;
  herr_t status;
  int i;

  c_dims =  (hsize_t *)HDmalloc(sizeof(hsize_t) * (*rank ));
  if (!c_dims) return ret_value;

  /*
   * Transpose dimension arrays because of C-FORTRAN storage order
   */
  for (i = 0; i < *rank ; i++) {
       c_dims[i] =  dims[*rank - i - 1];
  }

  c_prp_id = (hid_t)*prp_id;
  c_rank = (int)*rank;
  status = H5Pset_chunk(c_prp_id, c_rank, c_dims);
  if (status < 0) goto DONE;
  ret_value = 0;

DONE:
  HDfree (c_dims);
  return ret_value;
}


/*----------------------------------------------------------------------------
 * Name:        h5pget_chunk_c
 * Purpose:     Call H5Pget_chunk to get the sizes of chunks for a chunked
 *              layout dataset  for at list max_rank number of dimensions
 * Inputs:      prp_id - property list identifier
 *              max rank - maximum number of dimensions to return
 *              dims - array of the size of each chunk
 * Returns:     number of chunk's dimnesion on success, -1 on failure
 *              Saturday, August 14, 1999
 * Programmer:  Elena Pourmal
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_chunk_c ( hid_t_f *prp_id, int_f *max_rank, hsize_t_f *dims )
{
  int ret_value = -1;
  hid_t c_prp_id;
  hsize_t *c_dims;
  int rank;
  int c_max_rank;
  int i;

  c_dims =  (hsize_t *)HDmalloc(sizeof(hsize_t) * (*max_rank ));
  if (!c_dims) return ret_value;

  c_prp_id = (hid_t)*prp_id;
  c_max_rank = (int)*max_rank;
  rank = H5Pget_chunk(c_prp_id, c_max_rank, c_dims);

  /*
   * Transpose dimension arrays because of C-FORTRAN storage order
   */
  for (i = 0; i < *max_rank ; i++) {
       dims[*max_rank - i - 1] = (hsize_t_f)c_dims[i];
  }
  HDfree (c_dims);
  if (rank < 0) return ret_value;
  ret_value = (int_f)rank;
  return ret_value;
}



/*----------------------------------------------------------------------------
 * Name:        h5pset_fill_valuec_c
 * Purpose:     Call h5pset_fill_value_c to a character fill value
 * Inputs:      prp_id - property list identifier
 *              type_id - datatype identifier (fill value is of type type_id)
 *              fillvalue  - character value
 * Returns:     0 on success, -1 on failure
 *              Saturday, August 14, 1999
 * Programmer:  Elena Pourmal
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
{
     int ret_value = -1;

     /*
      * Call h5pset_fill_value_c  function.
      */
     ret_value = nh5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fill_value_c
 * Purpose:     Call H5Pset_fill_value to set a fillvalue for a dataset
 * Inputs:      prp_id - property list identifier
 *              type_id - datatype identifier (fill value is of type type_id)
 *              fillvalue - fillvalue
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     int ret_value = -1;
     hid_t c_prp_id;
     hid_t c_type_id;
     herr_t ret;

     /*
      * Call H5Pset_fill_value function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_type_id = (int)*type_id;
     ret = H5Pset_fill_value(c_prp_id, c_type_id, fillvalue);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

int_f
nh5pset_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pset_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}

int_f
nh5pset_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pset_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}

int_f
nh5pset_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pset_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}


/*----------------------------------------------------------------------------
 * Name:        h5pget_fill_valuec_c
 * Purpose:     Call h5pget_fill_value_c to a character fill value
 * Inputs:      prp_id - property list identifier
 *              type_id - datatype identifier (fill value is of type type_id)
 *              fillvalue  - character value
 * Returns:     0 on success, -1 on failure
 *              Saturday, August 14, 1999
 * Programmer:  Elena Pourmal
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fill_valuec_c (hid_t_f *prp_id, hid_t_f *type_id, _fcd fillvalue)
{
     int ret_value = -1;

     /*
      * Call h5pget_fill_value_c  function.
      */
     ret_value = nh5pset_fill_value_c(prp_id, type_id, _fcdtocp(fillvalue));

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_fill_value_c
 * Purpose:     Call H5Pget_fill_value to set a fillvalue for a dataset
 * Inputs:      prp_id - property list identifier
 *              type_id - datatype identifier (fill value is of type type_id)
 *              fillvalue - fillvalue
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Saturday, August 14, 1999
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fill_value_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     int ret_value = -1;
     hid_t c_prp_id;
     hid_t c_type_id;
     herr_t ret;

     /*
      * Call H5Pget_fill_value function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_type_id = (int)*type_id;
     ret = H5Pget_fill_value(c_prp_id, c_type_id, fillvalue);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

int_f
nh5pget_fill_value_integer_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pget_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}

int_f
nh5pget_fill_value_real_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pget_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}

int_f
nh5pget_fill_value_double_c (hid_t_f *prp_id, hid_t_f *type_id, void *fillvalue)
{
     /*
      * Call h5pget_fill_value_c  function.
      */
     return nh5pset_fill_value_c(prp_id, type_id, fillvalue);
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_version_c
 * Purpose:     Call H5Pget_version to get the version information
 *              of various objects for a file creation property list
 * Inputs:      prp_id - property list identifier
 * Outputs:     boot - array to put boot block version number
 *              freelist - array to put global freelist version number
 *              stab - array to put symbol table version number
 *              shhdr - array to put shared object header version number
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications: Removed extra length parameters EP 7/6/00
 *---------------------------------------------------------------------------*/
int_f
nh5pget_version_c (hid_t_f *prp_id, int_f * boot,int_f * freelist, int_f * stab, int_f *shhdr)
{
     int ret_value = -1;
#ifndef H5_NO_DEPRECATED_SYMBOLS
     herr_t ret;
     unsigned c_boot;
     unsigned c_freelist;
     unsigned c_stab;
     unsigned c_shhdr;

     /*
      * Call H5Pget_version function.
      */
     ret = H5Pget_version((hid_t)*prp_id, &c_boot, &c_freelist, &c_stab, &c_shhdr);
     if (ret < 0) return ret_value;

     *boot = (int_f)c_boot;
     *freelist = (int_f)c_freelist;
     *stab = (int_f)c_stab;
     *shhdr = (int_f)c_shhdr;
#else /* H5_NO_DEPRECATED_SYMBOLS */
     /*
      * Fill in fake values [since we need a file ID to call H5Fget_info :-( -QAK ]
      */
     *boot = (int_f)0;
     *freelist = (int_f)0;
     *stab = (int_f)0;
     *shhdr = (int_f)0;
#endif /* H5_NO_DEPRECATED_SYMBOLS */
     ret_value = 0;

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_userblock_c
 * Purpose:     Call H5Pget_userblock to get the size of a user block in
 *              a file creation property list
 * Inputs:      prp_id - property list identifier
 * Outputs      size - Size of the user-block in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     hsize_t c_size;

     /*
      * Call H5Pget_userblock function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_userblock(c_prp_id, &c_size);
     if (ret < 0) return ret_value;

     *size = (hsize_t_f)c_size;
     ret_value = 0;

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_userblock_c
 * Purpose:     Call H5Pset_userblock to set the size of a user block in
 *              a file creation property list
 * Inputs:      prp_id - property list identifier
 *              size - Size of the user-block in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_userblock_c (hid_t_f *prp_id, hsize_t_f * size)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     hsize_t c_size;
     c_size = (hsize_t)*size;

     /*
      * Call H5Pset_userblock function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_userblock(c_prp_id, c_size);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_sizes_c
 * Purpose:     Call H5Pget_sizes to get the size of the offsets
 *              and lengths used in an HDF5 file
 * Inputs:      prp_id - property list identifier
 * Outputs      sizeof_addr - Size of an object offset in bytes
 *              sizeof_size - Size of an object length in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications: Deleted extra length parameters. EP 6/7/00
 *---------------------------------------------------------------------------*/
int_f
nh5pget_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     size_t c_sizeof_addr;
     size_t c_sizeof_size;

     /*
      * Call H5Pget_sizes function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_sizes(c_prp_id, &c_sizeof_addr, &c_sizeof_size);
     if (ret < 0) return ret_value;

     *sizeof_addr = (size_t_f)c_sizeof_addr;
     *sizeof_size = (size_t_f)c_sizeof_size;
     ret_value = 0;

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_sizes_c
 * Purpose:     Call H5Pset_sizes to set the size of the offsets
 * Inputs:      prp_id - property list identifier
 *              sizeof_addr - Size of an object offset in bytes
 *              sizeof_size - Size of an object length in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_sizes_c (hid_t_f *prp_id, size_t_f * sizeof_addr, size_t_f * sizeof_size)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     size_t c_addr, c_size;
     c_addr = (size_t)*sizeof_addr;
     c_size = (size_t)*sizeof_size;

     /*
      * Call H5Pset_sizes function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_sizes(c_prp_id, c_addr, c_size);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_sym_k_c
 * Purpose:     Call H5Pset_sym_k to set the size of parameters used
 *              to control the symbol table node
 * Inputs:      prp_id - property list identifier
 *              ik - Symbol table tree rank
 *              lk - Symbol table node size
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
{
     int ret_value = -1;
     hid_t c_prp_id;
     unsigned c_ik;
     unsigned c_lk;
     herr_t ret;

     /*
      * Call H5Pset_sym_k function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_ik = (unsigned)*ik;
     c_lk = (unsigned)*lk;
     ret = H5Pset_sym_k(c_prp_id, c_ik, c_lk);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_sym_k_c
 * Purpose:     Call H5Pget_sym_k to get the size of parameters used
 *              to control the symbol table node
 * Inputs:      prp_id - property list identifier
 * Outputs:     ik - Symbol table tree rank
 *              lk - Symbol table node size
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_sym_k_c (hid_t_f *prp_id, int_f* ik, int_f* lk)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     unsigned c_ik;
     unsigned c_lk;

     /*
      * Call H5Pget_sym_k function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_sym_k(c_prp_id, &c_ik, &c_lk);
     *ik = (int_f)c_ik;
     *lk = (int_f)c_lk;
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_istore_k_c
 * Purpose:     Call H5Pset_istore_k to set the size of the parameter
 *              used to control the B-trees for indexing chunked datasets
 * Inputs:      prp_id - property list identifier
 *              ik - Symbol table tree rank
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_istore_k_c (hid_t_f *prp_id, int_f* ik)
{
     int ret_value = -1;
     hid_t c_prp_id;
     unsigned c_ik;
     herr_t ret;

     /*
      * Call H5Pset_istore_k function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_ik = (unsigned)*ik;
     ret = H5Pset_istore_k(c_prp_id, c_ik);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_istore_k_c
 * Purpose:     Call H5Pget_istore_k to get the size of parameters used
 *              to control the B-trees for indexing chunked datasets
 * Inputs:      prp_id - property list identifier
 * Outputs:     ik - Symbol table tree rank
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_istore_k_c (hid_t_f *prp_id, int_f* ik)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     unsigned c_ik;

     /*
      * Call H5Pget_istore_k function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_istore_k(c_prp_id, &c_ik);
     *ik = (int_f)c_ik;
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_driver_c
 * Purpose:     Call H5Pget_driver to get low-level file driver identifier
 * Inputs:      prp_id - property list identifier
 * Outputs:     driver - low-level file driver identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_driver_c (hid_t_f *prp_id, hid_t_f* driver)
{
     int ret_value = -1;
     hid_t c_driver;

     /*
      * Call H5Pget_driver function.
      */
     c_driver = H5Pget_driver((hid_t)*prp_id);
     if (c_driver < 0) goto DONE;

     *driver = (hid_t_f) c_driver;
     ret_value = 0;

DONE:
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_stdio_c
 * Purpose:     Call H5Pset_stdio to set the low level file driver to
 *              use the functions declared in the stdio.h
 * Inputs:      prp_id - property list identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 7, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_stdio_c (hid_t_f *prp_id)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     /*
      * Call H5Pset_fapl_stdio function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_fapl_stdio(c_prp_id);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}
#ifdef NO_SUCH_F90_FUNCTION
/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_stdio_c
 * Purpose:     Call H5Pget_fapl_stdio to determine whther the low level file driver
 *              uses the functions declared in the stdio.h
 * Inputs:      prp_id - property list identifier
 * Outputs:     io - value indicates whether the file driver uses
 *                   the functions declared in the stdio.h
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_stdio_c (hid_t_f *prp_id, int_f* io)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     /*
      * Call H5Pget_fapl_stdio function.
      */
     c_prp_id = *prp_id;
     ret = H5Pget_fapl_stdio(c_prp_id);
     if (ret < 0) return ret_value;
     *io = (int_f)ret;
     ret_value = 0;
     return ret_value;
}

#endif /*NO_SUCH_F90_FUNCTION*/

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_sec2_c
 * Purpose:     Call H5Pset_fapl_sec2 to set the low level file driver to
 *              use the functions declared in the  unistd.h
 * Inputs:      prp_id - property list identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_sec2_c (hid_t_f *prp_id)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     /*
      * Call H5Pset_fapl_sec2 function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_fapl_sec2(c_prp_id);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

#ifdef NO_SUCH_F90_FUNCTION
/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_sec2_c
 * Purpose:     Call H5Pget_fapl_stdio to determine whther the low level file driver
 *              uses the functions declared in the  unistd.h
 * Inputs:      prp_id - property list identifier
 * Outputs:     sec2 - value indicates whether the file driver uses
 *                   the functions declared in the  unistd.h
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_sec2_c (hid_t_f *prp_id, int_f* sec2)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     /*
      * Call H5Pget_fapl_sec2 function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_fapl_sec2(c_prp_id);
     if (ret < 0) return ret_value;
     *sec2 = (int_f)ret;
     ret_value = 0;
     return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/

/*----------------------------------------------------------------------------
 * Name:        h5pset_alignment_c
 * Purpose:     Call H5Pset_alignment to set alignment properties of
 *              a file access property list
 * Inputs:      prp_id - property list identifier
 *              threshold - Threshold value
 *              alignment - Alignment value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     hsize_t c_threshold, c_alignment;
     c_threshold = (hsize_t)*threshold;
     c_alignment = (hsize_t)* alignment;
     /*
      * Call H5Pset_alignment function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_alignment(c_prp_id, c_threshold, c_alignment);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_alignment_c
 * Purpose:     Call H5Pget_alignment to get alignment properties of
 *              a file access property list
 * Inputs:      prp_id - property list identifier
 *              threshold - Threshold value
 *              alignment - Alignment value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_alignment_c (hid_t_f *prp_id, hsize_t_f* threshold, hsize_t_f* alignment)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     hsize_t c_threshold, c_alignment;
     /*
      * Call H5Pget_alignment function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_alignment(c_prp_id, &c_threshold, &c_alignment);
     if (ret < 0) return ret_value;
     *threshold = (hsize_t_f)c_threshold;
     *alignment = (hsize_t_f)c_alignment;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_core_c
 * Purpose:     Call H5Pset_fapl_core to set the low-level file driver
 *              to use malloc() and free()
 * Inputs:      prp_id - property list identifier
 *              increment - File block size in bytes
 *              flag - Boolean flag indicating whether to write the
 *              file contents to disk when the file is closed.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     size_t c_increment;
     hbool_t c_backing_store;
     c_increment = (size_t)*increment;
     c_backing_store = (hbool_t)*flag;

     /*
      * Call H5Pset_fapl_core function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_fapl_core(c_prp_id, c_increment, c_backing_store);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_core_c
 * Purpose:     Call H5Pget_fapl_core to determine whether the file access
 *              property list is set to the core drive
 * Inputs:      prp_id - property list identifier
 * Outputs      increment - File block size in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_core_c (hid_t_f *prp_id, size_t_f* increment, int_f *flag)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     size_t c_increment = 0;
     hbool_t c_backing_store;
     *flag = 0;
     /*
      * Call H5Pset_fapl_core function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_fapl_core(c_prp_id, &c_increment, &c_backing_store);
     if (ret < 0) return ret_value;
     *increment = (size_t_f)c_increment;
     if(c_backing_store  > 0) *flag = 1;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_family_c
 * Purpose:     Call H5Pset_fapl_family to set the file access properties list
 *              to the family driver
 * Inputs:      prp_id - property list identifier
 *              memb_size -  Logical size, in bytes, of each family member.
 *              memb_plist - Identifier of the file access property list
 *                           for each member of the family
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist )
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     hsize_t c_memb_size;
     hid_t c_memb_plist;
     c_memb_size =(hsize_t) *memb_size;
     c_memb_plist =(hid_t) *memb_plist;
     /*
      * Call H5Pset_fapl_family function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_fapl_family(c_prp_id, c_memb_size, c_memb_plist);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_family_c
 * Purpose:     Call H5Pget_fapl_family to determine whether the file access
 *              property list is set to the family driver
 * Inputs:      prp_id - property list identifier
 *              memb_size -  Logical size, in bytes, of each family member.
 *              memb_plist - Identifier of the file access property list
 *                           for each member of the family
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_family_c(hid_t_f *prp_id, hsize_t_f* memb_size, hid_t_f* memb_plist)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     hsize_t c_memb_size = 0;
     hid_t c_memb_plist = -1;
     /*
      * Call H5Pget_fapl_family function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_fapl_family(c_prp_id, &c_memb_size, &c_memb_plist);
     if (ret < 0) return ret_value;
     *memb_size = (hsize_t_f)c_memb_size;
     *memb_plist = (hid_t_f)c_memb_plist;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_cache_c
 * Purpose:     Call H5Pset_cache to set he number of elements in
 *              the meta data cache and the total number of bytes in
 *              the raw data chunk cache
 * Inputs:      prp_id - property list identifier
 *              mdc_nelmts - Number of elements (objects) in the
 *                           meta data cache
 *              rdcc_nbytes - Total size of the raw data chunk cache, in bytes
 *              rdcc_w0 - Preemption policy
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications: Changed the type of the rdcc_w0 parameter to be real_f EP 7/7/00
 *                instead of double
 *---------------------------------------------------------------------------*/
int_f
nh5pset_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts,  size_t_f* rdcc_nbytes , real_f* rdcc_w0 )
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     int c_mdc_nelmts;
     size_t c_rdcc_nelmts;
     size_t c_rdcc_nbytes;
     double c_rdcc_w0;
     c_rdcc_nbytes =(size_t) *rdcc_nbytes;
     c_rdcc_w0 = (double)*rdcc_w0;

     /*
      * Call H5Pset_cache function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_mdc_nelmts = (int)*mdc_nelmts;
     c_rdcc_nelmts = (size_t)*rdcc_nelmts;
     ret = H5Pset_cache(c_prp_id, c_mdc_nelmts, c_rdcc_nelmts, c_rdcc_nbytes, c_rdcc_w0  );
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_cache_c
 * Purpose:     Call H5Pget_cache to get he number of elements in
 *              the meta data cache and the total number of bytes in
 *              the raw data chunk cache
 * Inputs:      prp_id - property list identifier
 * Outputs:     mdc_nelmts - Number of elements (objects) in the
 *                           meta data cache
 *              rdcc_nelmts - Number of elements in the raw data chunk
 *              rdcc_nbytes - Total size of the raw data chunk cache, in bytes
 *              rdcc_w0 - Preemption policy
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications: Changed type of the rdcc_w0 parameter to be real_f instead of double
 *                Changed type of the rdcc_nelmts parameter to be int_f.
 *                                                          EIP  October 10, 2003
 *---------------------------------------------------------------------------*/
int_f
nh5pget_cache_c(hid_t_f *prp_id, int_f* mdc_nelmts, size_t_f* rdcc_nelmts, size_t_f* rdcc_nbytes , real_f* rdcc_w0)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     int c_mdc_nelmts;
     size_t c_rdcc_nelmts;
     size_t c_rdcc_nbytes;
     double c_rdcc_w0;
     /*
      * Call H5Pget_cache function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_cache(c_prp_id, &c_mdc_nelmts, &c_rdcc_nelmts, &c_rdcc_nbytes, &c_rdcc_w0);
     if (ret < 0) return ret_value;
     *mdc_nelmts = (int_f)c_mdc_nelmts;
     *rdcc_nelmts = (size_t_f)c_rdcc_nelmts;
     *rdcc_nbytes = (size_t_f)c_rdcc_nbytes;
     *rdcc_w0 = (real_f)c_rdcc_w0;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_split_c
 * Purpose:     Call H5Pset_fapl_split to set he low-level driver to split meta data
 *              from raw data
 * Inputs:      prp_id - property list identifier
 *              meta_len - Length of meta_ext
 *              meta_ext - Name of the extension for the metafile filename.
 *              meta_plist - Identifier of the meta file access property list
 *              raw_len - Length of raw _ext
 *              raw_ext - Name of the extension for the raw file filename.
 *              raw_plist - Identifier of the raw  file access property list
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9, 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_split_c(hid_t_f *prp_id, int_f* meta_len, _fcd meta_ext, hid_t_f* meta_plist, int_f* raw_len, _fcd raw_ext, hid_t_f * raw_plist)
{
     int ret_value = -1;
     hid_t c_prp_id;
     hid_t c_meta_plist;
     hid_t c_raw_plist;
     herr_t ret = -1;
     char* c_meta_ext;
     char* c_raw_ext;

     c_meta_ext = (char *)HD5f2cstring(meta_ext, (size_t)*meta_len);
     if (c_meta_ext == NULL) return ret_value;
     c_raw_ext = (char *)HD5f2cstring(raw_ext, (size_t)*raw_len);
     if (c_raw_ext == NULL) { HDfree(c_meta_ext);
                              return ret_value;
                            }

     /*
      * Call H5Pset_fapl_split function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_meta_plist = (hid_t)*meta_plist;
     c_raw_plist = (hid_t)*raw_plist;
     ret = H5Pset_fapl_split(c_prp_id, c_meta_ext, c_meta_plist, c_raw_ext, c_raw_plist );

     if (ret < 0) goto DONE;
     ret_value = 0;

DONE:
     HDfree(c_meta_ext);
     HDfree(c_raw_ext);
     return ret_value;
}


#ifdef NO_SUCH_F90_FUNCTION
/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_split_c
 * Purpose:     Call H5Pget_fapl_split to determine whether the file access
 *              property list is set to the split driver
 * Inputs:      prp_id - property list identifier
 *              meta_ext_size - Number of characters of the meta file extension
 *                              to be copied to the meta_ext buffer
 *              raw_ext_size - Number of characters of the raw file extension
 *                              to be copied to the raw_ext buffer
 *Outputs:      meta_ext - Name of the extension for the metafile filename.
 *              meta_plist - Identifier of the meta file access property list
 *              raw_ext - Name of the extension for the raw file filename.
 *              raw_plist - Identifier of the raw  file access property list
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 9 , 2001
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_split_c(hid_t_f *prp_id, size_t_f* meta_ext_size , _fcd meta_ext, hid_t_f* meta_plist, size_t_f* raw_ext_size, _fcd raw_ext, hid_t_f * raw_plist)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret = -1;
     size_t c_meta_ext_size, c_raw_ext_size;
     hid_t c_meta_plist = -1;
     hid_t c_raw_plist = -1;

     char* c_meta_ext = NULL;
     char* c_raw_ext  = NULL;

     c_meta_ext_size = (size_t) *meta_ext_size;
     c_raw_ext_size = (size_t) *raw_ext_size;
     c_meta_ext = (char *)HDmalloc(sizeof(char) * c_meta_ext_size);
     c_raw_ext = (char *)HDmalloc(sizeof(char) * c_raw_ext_size);
     if(c_meta_ext == NULL || c_raw_ext == NULL) return ret_value;

     /*
      * Call H5Pget_fapl_split function.
      */
     c_prp_id = *prp_id;
     ret = H5Pget_fapl_split(c_prp_id, c_meta_ext_size, c_meta_ext,&c_meta_plist, c_raw_ext_size, c_raw_ext, &c_raw_plist );

     if (ret < 0) return ret_value;
     *meta_plist = c_meta_plist;
     *raw_plist = c_raw_plist;
     HD5packFstring(c_meta_ext, _fcdtocp(meta_ext), strlen(c_meta_ext));
     HD5packFstring(c_raw_ext, _fcdtocp(raw_ext), strlen(c_raw_ext));

     ret_value = 0;
     return ret_value;
}
#endif /*NO_SUCH_F90_FUNCTION*/

/*----------------------------------------------------------------------------
 * Name:        h5pset_gc_references_c
 * Purpose:     Call H5Pset_gc_references to set garbage
 *              collecting references flag
 * Inputs:      prp_id - property list identifier
 *              gc_reference - flag for garbage collecting references
 *                             for the file
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     unsigned c_gc_references;
     c_gc_references = (unsigned)*gc_references;

     /*
      * Call H5Pset_gc_references function.
      */
     c_prp_id = *prp_id;
     ret = H5Pset_gc_references(c_prp_id, c_gc_references);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_gc_references_c
 * Purpose:     Call H5Pget_gc_references to set garbage
 *              collecting references flag
 * Inputs:      prp_id - property list identifier
 * Outputs      gc_reference - flag for garbage collecting references
 *                             for the file
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_gc_references_c (hid_t_f *prp_id, int_f* gc_references)
{
     int ret_value = -1;
     hid_t c_prp_id;
     unsigned c_gc_references;
     herr_t ret;
     /*
      * Call H5Pget_gc_references function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_gc_references(c_prp_id, &c_gc_references);
     if (ret < 0) return ret_value;
     *gc_references = (int_f)c_gc_references;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_layout_c
 * Purpose:     Call H5Pset_layout to the type of storage used
 *              store the raw data for a dataset
 * Inputs:      prp_id - property list identifier
 *              layout - Type of storage layout for raw data.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_layout_c (hid_t_f *prp_id, int_f* layout)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     H5D_layout_t c_layout;
     c_layout = (H5D_layout_t)*layout;
     /*
      * Call H5Pset_layout function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_layout(c_prp_id, c_layout);

     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_layout_c
 * Purpose:     Call H5Pget_layout to the type of storage used
 *              store the raw data for a dataset
 * Inputs:      prp_id - property list identifier
 * Outputs:     layout - Type of storage layout for raw data.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_layout_c (hid_t_f *prp_id, int_f* layout)
{
     int ret_value = -1;
     hid_t c_prp_id;
     H5D_layout_t c_layout;
     /*
      * Call H5Pget_layout function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_layout = H5Pget_layout(c_prp_id);
     if (c_layout < 0) return ret_value;
     *layout = (int_f)c_layout;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_filter_c
 * Purpose:     Call H5Pset_filter to add a filter to the filter pipeline.
 * Inputs:      prp_id - property list identifier
 *              filter - Filter to be added to the pipeline.
 *              flags - Bit vector specifying certain general
 *                      properties of the filter.
 *              cd_nelmts - Number of elements in cd_values.
 *              cd_values - Auxiliary data for the filter.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     size_t c_cd_nelmts;
     unsigned int c_flags;
     H5Z_filter_t c_filter;
     unsigned int * c_cd_values;
     unsigned i;

     c_filter = (H5Z_filter_t)*filter;
     c_flags = (unsigned)*flags;
     c_cd_nelmts = (size_t)*cd_nelmts;
     c_cd_values = (unsigned int*)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts));
     if (!c_cd_values) return ret_value;
     for (i = 0; i < c_cd_nelmts; i++)
          c_cd_values[i] = (unsigned int)cd_values[i];

     /*
      * Call H5Pset_filter function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );

     if (ret < 0) goto DONE;
     ret_value = 0;

DONE:
     HDfree(c_cd_values);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_nfilters_c
 * Purpose:     Call H5Pget_nfilters to get the number of filters
 *              in the pipeline
 * Inputs:      prp_id - property list identifier
 * Outputs:     nfilters - number of filters defined in the filter pipline
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_nfilters_c (hid_t_f *prp_id, int_f* nfilters)
{
     int ret_value = -1;
     hid_t c_prp_id;
     int c_nfilters;
     /*
      * Call H5Pget_nfilters function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_nfilters = H5Pget_nfilters(c_prp_id);
     if (c_nfilters < 0) return ret_value;

     *nfilters = (int_f)c_nfilters;
     ret_value = 0;

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_filter_c
 * Purpose:     Call H5Pget_filter2 to get information about a filter
 *              in a pipeline
 * Inputs:      prp_id - property list identifier
 *              filter_number - Sequence number within the filter
 *                              pipeline of the filter for which
 *                              information is sought.
 *              namelen - Anticipated number of characters in name.
 *Outputs:      flags - Bit vector specifying certain general
 *                      properties of the filter.
 *              cd_nelmts - Number of elements in cd_value
 *              cd_values - Auxiliary data for the filter.
 *              name - Name of the filter
 *              filter_id - filter identification number
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *              Since cd_nelmts has IN/OUT attributes, fixed the input and
 *              returned value of cd_nelmnts to satisfy this specification.
 *              MSB January 27, 2009
 *---------------------------------------------------------------------------*/
int_f
nh5pget_filter_c(hid_t_f *prp_id, int_f* filter_number, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name, int_f* filter_id)
{
    unsigned int  c_flags;
    size_t c_cd_nelmts;
    H5Z_filter_t c_filter;
    unsigned int *c_cd_values = NULL;
    char *c_name = NULL;
    unsigned i;
    int ret_value = -1;

    c_cd_nelmts = (size_t)*cd_nelmts;

    if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
        goto DONE;

    if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * c_cd_nelmts)))
        goto DONE;

    /*
     * Call H5Pget_filter2 function.
     */
    if((c_filter = H5Pget_filter2((hid_t)*prp_id, (unsigned)*filter_number, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL)) < 0)
        goto DONE;

    *filter_id = (int_f)c_filter;
    *cd_nelmts = (size_t_f)c_cd_nelmts;
    *flags = (int_f)c_flags;
    HD5packFstring(c_name, _fcdtocp(name), strlen(c_name));

    for(i = 0; i < c_cd_nelmts; i++)
         cd_values[i] = (int_f)c_cd_values[i];

    ret_value = 0;

DONE:
    if(c_name)
        HDfree(c_name);
    if(c_cd_values)
        HDfree(c_cd_values);
    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_external_c
 * Purpose:     Call H5Pset_external to add an external file to the
 *              list of external files.
 * Inputs:      prp_id - property list identifier
 *              name - Name of an external file
 *              namelen - length of name
 *              offset - Offset, in bytes, from the beginning of the file
 *                       to the location in the file where the data starts.
 *              bytes - Number of bytes reserved in the file for the data.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_external_c (hid_t_f *prp_id, _fcd name, int_f* namelen, int_f* offset, hsize_t_f*bytes)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     hsize_t c_bytes;
     char* c_name;
     size_t c_namelen;
     off_t c_offset;
     c_bytes = (hsize_t) *bytes;
     c_offset = (off_t) *offset;


     c_namelen = (int)*namelen;
     c_name = (char *)HD5f2cstring(name, c_namelen);
     if (c_name == NULL) return ret_value;

     /*
      * Call H5Pset_external function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_external(c_prp_id, c_name, c_offset, c_bytes);

     if (ret < 0) goto DONE;
     ret_value = 0;

DONE:
     HDfree(c_name);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_external_count_c
 * Purpose:     Call H5Pget_external_count to get the number of external
 *              files for the specified dataset.
 * Inputs:      prp_id - property list identifier
 * Outputs:     count - number of external files
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_external_count_c (hid_t_f *prp_id, int_f* count)
{
     int ret_value = -1;
     hid_t c_prp_id;
     int c_count;
     /*
      * Call H5Pget_external_count function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_count = H5Pget_external_count(c_prp_id);
     if (c_count < 0) return ret_value;
     *count = (int_f)c_count;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_external_c
 * Purpose:     Call H5Pget_external to get nformation about an external file.
 * Inputs:      prp_id - property list identifier
 *              name_size - length of name
 *              idx - External file index.
 *Outputs:      name - Name of an external file
 *              offset - Offset, in bytes, from the beginning of the file
 *                       to the location in the file where the data starts.
 *              bytes - Number of bytes reserved in the file for the data.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Wednesday, February 23, 2000
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int_f* offset, hsize_t_f*bytes)
{
     int ret_value = -1;
     hid_t c_prp_id;
     unsigned c_idx;
     herr_t status;
     size_t c_namelen;
     char* c_name = NULL;
     off_t c_offset;
     hsize_t size;

     c_namelen = (size_t)*name_size;
     /*
      * Allocate memory to store the name of the external file.
      */
     if(c_namelen) c_name = (char*)HDmalloc(c_namelen + 1);
     if (c_name == NULL) return ret_value;

     /*
      * Call H5Pget_external function.
      */
     c_prp_id = (hid_t)*prp_id;
     c_idx = (unsigned)*idx;
     status = H5Pget_external(c_prp_id, c_idx, c_namelen+1, c_name, &c_offset, &size );

     if (status < 0) goto DONE;

     *offset = (int_f)c_offset;
     *bytes = (hsize_t_f)size;
     /* Note: if the size of the fortran buffer is larger then the returned string
      *       from the function then we need to give HD5packFstring the fortran buffer size so
      *       that it fills the remaining unused characters with blanks. MSB
      */
     HD5packFstring(c_name, _fcdtocp(name), c_namelen+1);
     ret_value = 0;

DONE:
     HDfree(c_name);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_btree_ratios_c
 * Purpose:     Call H5Pset_btree_ratios to set B-tree split ratios for B-tree split ratios for a dataset transfer property list. a
 *              dataset transfer property list.
 * Inputs:      prp_id - property list identifier
 *              left - The B-tree split ratio for left-most nodes.
 *              middle - The B-tree split ratio for all other nodes
 *              right - The B-tree split ratio for right-most nodes
 *                      and lone nodes.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications: Changed the type of the last three parameters from double to real_f
 *---------------------------------------------------------------------------*/
int_f
nh5pset_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     double c_left;
     double c_middle;
     double c_right;
     c_left = (double)*left;
     c_middle = (double)*middle;
     c_right = (double)*right;

     /*
      * Call H5Pset_btree_ratios function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pset_btree_ratios(c_prp_id, c_left, c_middle, c_right);
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_btree_ratios_c
 * Purpose:     Call H5Pget_btree_ratios to Gets B-tree split ratios
 *              for a dataset transfer property list.
 * Inputs:      prp_id - property list identifier
 *              left - The B-tree split ratio for left-most nodes.
 *              middle - The B-tree split ratio for all other nodes
 *              right - The B-tree split ratio for right-most nodes
 *                      and lone nodes.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Xiangyang Su
 *              Friday, February 25, 2000
 * Modifications: Changed the type of the last three parameters from double to real_f
 *---------------------------------------------------------------------------*/
int_f
nh5pget_btree_ratios_c(hid_t_f *prp_id, real_f* left, real_f* middle, real_f* right)
{
     int ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     double c_left, c_right, c_middle;

     /*
      * Call H5Pget_btree_ratios function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pget_btree_ratios(c_prp_id, &c_left, &c_middle, &c_right);
     *left = (real_f)c_left;
     *middle = (real_f)c_middle;
     *right = (real_f)c_right;
     if (ret < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_fclose_degree_c
 * Purpose:     Call H5Pget_fclose_degree to determine file close behavior
 * Inputs:      fapl_id - file access identifier
 * Outputs:
 *              degree  - possible values are:
 *              		H5F_CLOSE_DEFAULT
 *              		H5F_CLOSE_WEAK
 *              		H5F_CLOSE_SEMI
 *              		H5F_CLOSE_STRONG
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, September 26, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
{
  int ret_value = -1;
  hid_t c_fapl_id;
  H5F_close_degree_t c_degree;

  c_fapl_id = (hid_t)*fapl_id;
  if( H5Pget_fclose_degree(c_fapl_id, &c_degree) < 0) return ret_value;

  *degree = (int_f)c_degree;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fclose_degree_c
 * Purpose:     Call H5Pset_fclose_degree to set file close behavior
 * Inputs:      fapl_id - file access identifier
 *              degree  - possible values are:
 *              		H5F_CLOSE_DEFAULT
 *              		H5F_CLOSE_WEAK
 *              		H5F_CLOSE_SEMI
 *              		H5F_CLOSE_STRONG
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, September 26, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_fclose_degree_c ( hid_t_f *fapl_id , int_f *degree)
{
  int ret_value = -1;
  hid_t c_fapl_id;
  H5F_close_degree_t c_degree;

  c_fapl_id = (hid_t)*fapl_id;
  c_degree = (H5F_close_degree_t)*degree;
  if( H5Pset_fclose_degree(c_fapl_id, c_degree) < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_buffer_c
 * Purpose:     Call H5Pset_buffer to set size of conversion buffer
 * Inputs:      prp_id - t`dataset trasfer property list identifier
 *              size   - size of the buffer
 * Outputs:     NONE
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Wednesday, October 2, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  size_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = (size_t)*size;
  if ( H5Pset_buffer(c_prp_id, c_size, NULL, NULL) < 0  ) ret_value = -1;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_buffer_c
 * Purpose:     Call H5Pget_buffer to get size of conversion buffer
 * Inputs:      prp_id - t`dataset trasfer property list identifier
 * Outputs:     size - size of conversion buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Wednesday, October 2, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_buffer_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = -1;
  hid_t c_prp_id;
  hsize_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = H5Pget_buffer(c_prp_id, NULL, NULL);
  if ( c_size == 0  ) return ret_value;
  *size = (hsize_t_f)c_size;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pfill_value_defined_c
 * Purpose:     Call H5Pfill_value_defined to check if fill value is defined
 * Inputs:      prp_id - dataset creation property list identifier
 * Outputs:     flag - fill value status flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Friday, October 4, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pfill_value_defined_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = -1;
  hid_t c_prp_id;
  H5D_fill_value_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pfill_value_defined(c_prp_id, &c_flag) < 0  ) return ret_value;
  *flag = (int_f)c_flag;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_alloc_time_c
 * Purpose:     Call H5Pget_alloc_time to get space allocation
 *              time for dataset during creation
 * Inputs:      prp_id - dataset creation property list identifier
 * Outputs:     flag - allocation time flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Friday, October 4, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = -1;
  hid_t c_prp_id;
  H5D_alloc_time_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_alloc_time(c_prp_id, &c_flag) < 0  ) return ret_value;
  *flag = (int_f)c_flag;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_alloc_time_c
 * Purpose:     Call H5Pset_alloc_time to get space allocation
 *              time for dataset during creation
 * Inputs:      prp_id - dataset creation property list identifier
 *              flag - allocation time flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Friday, October 4, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_alloc_time_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = -1;
  hid_t c_prp_id;
  H5D_alloc_time_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  c_flag = (H5D_alloc_time_t)*flag;
  if ( H5Pset_alloc_time(c_prp_id, c_flag) < 0  ) return ret_value;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_fill_time_c
 * Purpose:     Call H5Pget_fill_time to get fill value writing
 *              time for dataset during creation
 * Inputs:      prp_id - dataset creation property list identifier
 * Outputs:     flag - fill value writing  time flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Friday, October 4, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_fill_time_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = -1;
  hid_t c_prp_id;
  H5D_fill_time_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_fill_time(c_prp_id, &c_flag) < 0  ) return ret_value;
  *flag = (int_f)c_flag;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_fill_time_c
 * Purpose:     Call H5Pset_fill_time to set fill value writing
 *              time for dataset during creation
 * Inputs:      prp_id - dataset creation property list identifier
 *              flag - fill value writing  time flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Friday, October 4, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_fill_time_c ( hid_t_f *prp_id , int_f *flag)
{
  int ret_value = -1;
  hid_t c_prp_id;
  H5D_fill_time_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  c_flag = (H5D_fill_time_t)*flag;
  if ( H5Pset_fill_time(c_prp_id, c_flag) < 0  ) return ret_value;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_meta_block_size_c
 * Purpose:     Call H5Pset_meta_block_size to set size of  metadata block
 * Inputs:      prp_id - file access  property list identifier
 *              size   - size of the metadata block
 * Outputs:     NONE
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  hsize_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = (hsize_t)*size;
  if ( H5Pset_meta_block_size(c_prp_id, c_size) < 0  ) ret_value = -1;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_meta_block_size_c
 * Purpose:     Call H5Pget_meta_block_size to get size of  metadata block
 * Inputs:      prp_id - file access  property list identifier
 * Outputs:
 *              size   - size of the metadata block
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_meta_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  hsize_t c_size;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_meta_block_size(c_prp_id, &c_size) < 0  ) ret_value = -1;
  *size = (hsize_t_f)c_size;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_sieve_buf_size_c
 * Purpose:     Call H5Pset_sieve_buf_size to set size of datasieve buffer
 * Inputs:      prp_id - file access  property list identifier
 *              size   - size of the buffer
 * Outputs:     NONE
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  size_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = (size_t)*size;
  if ( H5Pset_sieve_buf_size(c_prp_id, c_size) < 0  ) ret_value = -1;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_sieve_buf_size_c
 * Purpose:     Call H5Pget_sieve_buf_size to get size of datasieve buffer
 * Inputs:      prp_id - file access  property list identifier
 * Outputs:
 *              size   - size of the buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_sieve_buf_size_c ( hid_t_f *prp_id , size_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  size_t c_size;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_sieve_buf_size(c_prp_id, &c_size) < 0  ) ret_value = -1;
  *size = (size_t_f)c_size;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_small_data_block_size_c
 * Purpose:     Call H5Pset_small_data_block_size to set size of raw small data block
 * Inputs:      prp_id - file access  property list identifier
 *              size   - size of the block
 * Outputs:     NONE
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  hsize_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = (hsize_t)*size;
  if ( H5Pset_small_data_block_size(c_prp_id, c_size) < 0  ) ret_value = -1;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_small_data_block_size_c
 * Purpose:     Call H5Pget_small_data_block_size to get size of raw small data block
 * Inputs:      prp_id - file access  property list identifier
 * Outputs:
 *              size   - size of the block
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_small_data_block_size_c ( hid_t_f *prp_id , hsize_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  hsize_t c_size;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_small_data_block_size(c_prp_id, &c_size) < 0  ) ret_value = -1;
  *size = (hsize_t_f)c_size;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_hyper_vector_size_c
 * Purpose:     Call H5Pset_hyper_vector_size to set size of the hyper vector
 * Inputs:      prp_id - dataset transfer property list identifier
 *              size   - size of the vector
 * Outputs:     NONE
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  size_t c_size;

  c_prp_id = (hid_t)*prp_id;
  c_size = (size_t)*size;
  if ( H5Pset_hyper_vector_size(c_prp_id, c_size) < 0  ) ret_value = -1;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_hyper_vector_size_c
 * Purpose:     Call H5Pget_hyper_vector_size to get size of the hyper vector
 * Inputs:      prp_id - dataset transfer property list identifier
 * Outputs:
 *              size   - size of the vector
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday, October 7, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_hyper_vector_size_c ( hid_t_f *prp_id , size_t_f *size)
{
  int ret_value = 0;
  hid_t c_prp_id;
  size_t c_size;

  c_prp_id = (hid_t)*prp_id;
  if ( H5Pget_hyper_vector_size(c_prp_id, &c_size) < 0  ) ret_value = -1;
  *size = (size_t_f)c_size;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pcreate_class_c
 * Purpose:     Call H5Pcreate_class ito create a new property class
 * Inputs:      parent - property list class identifier
 *              name   - name of the new class
 *              name_len - lenght of the "name" buffer
 * Outputs:     cls - new class identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pcreate_class_c(hid_t_f *parent, _fcd name, int_f *name_len, hid_t_f *cls)
{
     int ret_value = -1;
     hid_t c_parent;
     hid_t c_class;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;
     c_parent = (hid_t)*parent;

     /*
      * Call H5Pcreate_class function.
      */
     c_class = H5Pcreate_class(c_parent, c_name, NULL, NULL,NULL,NULL,NULL,NULL);
     if (c_class < 0) goto DONE;
     *cls = (hid_t_f)c_class;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pregisterc_c
 * Purpose:     Call h5pregister_c to registers a permanent property
 * Inputs:      cls - property list class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 *              size - property size
 *              value - property value of character type
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pregisterc_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len)
{
     int ret_value = -1;

     /*
      * Call h5pregister_c function
      */
      ret_value = nh5pregister_c(cls, name, name_len, size, _fcdtocp(value));
      return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pregister_c
 * Purpose:     Call H5Pregister2 to registers a permanent property
 * Inputs:      cls - property list class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 *              size - property size
 *              value - property value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pregister_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
{
     char* c_name = NULL;
     int_f ret_value = -1;

     if(NULL == (c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
         goto DONE;

     /*
      * Call H5Pregister2 function.
      */
     if(H5Pregister2((hid_t)*cls, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
         goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL)
         HDfree(c_name);
     return ret_value;
}

int_f
nh5pregister_integer_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pregister_c function
      */
     return nh5pregister_c(cls, name, name_len, size, value);
}

int_f
nh5pregister_real_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pregister_c function
      */
     return nh5pregister_c(cls, name, name_len, size, value);
}

int_f
nh5pregister_double_c(hid_t_f *cls, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pregister_c function
      */
     return nh5pregister_c(cls, name, name_len, size, value);
}

/*----------------------------------------------------------------------------
 * Name:        h5pinsertc_c
 * Purpose:     Call h5pinsert_c to register a temporary property
 * Inputs:      plist - property list identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 *              size - property size
 *              value - property value of character type
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pinsertc_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, _fcd value, int_f UNUSED *value_len)
{
     int_f ret_value = -1;

     /*
      * Call h5pinsert_c function
      */
      ret_value = nh5pinsert_c(plist, name, name_len, size, _fcdtocp(value));
      return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pinsert_c
 * Purpose:     Call H5Pinsert2 to iinsert a temporary property
 * Inputs:      plist - property list class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 *              size - property size
 *              value - property value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pinsert_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void UNUSED *value)
{
     char* c_name = NULL;
     int_f ret_value = -1;

     if(NULL == ( c_name = (char *)HD5f2cstring(name, (size_t)*name_len)))
         goto DONE;

     /*
      * Call H5Pinsert2 function.
      */
     if(H5Pinsert2((hid_t)*plist, c_name, (size_t)*size, value, NULL, NULL, NULL, NULL, NULL, NULL) < 0)
         goto DONE;
     ret_value = 0;

DONE:
     if(c_name)
         HDfree(c_name);
     return ret_value;
}

int_f
nh5pinsert_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pinsert_c function
      */
     return nh5pinsert_c(plist, name, name_len, size, value);
}

int_f
nh5pinsert_real_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pinsert_c function
      */
     return nh5pinsert_c(plist, name, name_len, size, value);
}

int_f
nh5pinsert_double_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size, void *value)
{
     /*
      * Call h5pinsert_c function
      */
     return nh5pinsert_c(plist, name, name_len, size, value);
}

/*----------------------------------------------------------------------------
 * Name:        h5pexist_c
 * Purpose:     Call H5Pexist to querie whether a property name exists
 *              in a property list or class
 * Inputs:      plist - property list or property class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 * Returns:     nonnegative on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pexist_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
     int_f ret_value = -1;
     hid_t c_class;
     char* c_name;
     htri_t status;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;

     c_class = (hid_t)*cls;
     /*
      * Call H5Pexist function.
      */
     status = H5Pexist(c_class, c_name);
     ret_value = status;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return  ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pisa_class_c
 * Purpose:     Call H5Pisa_class to querie whether a property is a
 *              member of a class
 * Inputs:      plist - property list identifier
 *              cls - property class identifier
 * Returns:     nonnegative on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pisa_class_c(hid_t_f *plist, hid_t_f *cls)
{
     int_f ret_value = -1;
     hid_t c_class;
     hid_t c_plist;
     htri_t status;

     c_class = (hid_t)*cls;
     c_plist = (hid_t)*plist;

     /*
      * Call H5Pisa_class function.
      */
     status = H5Pisa_class(c_plist, c_class);
     ret_value = status;
     return  ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_size_c
 * Purpose:     Call H5Pget_size to querie the size of the property
 * Inputs:      plist - property list to query
 *              name   - name of the property
 *              name_len - length of the "name" buffer
 * Outputs:     size - size of the property in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_size_c(hid_t_f *plist, _fcd name, int_f *name_len, size_t_f *size)
{
     int_f ret_value = -1;
     hid_t c_plist;
     char* c_name;
     size_t c_size;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;

     c_plist = (hid_t)*plist;
     /*
      * Call H5Pget_size function.
      */
     if( H5Pget_size(c_plist, c_name, &c_size) < 0) goto DONE;
     *size = (size_t_f)c_size;
      ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_nprops_c
 * Purpose:     Call H5Pget_nporps to get number of the properties in the list
 * Inputs:      plist - property list to query
 * Outputs:     nprops - number of properties in the list
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_nprops_c(hid_t_f *plist, size_t_f *nprops)
{
     int_f ret_value = -1;
     hid_t c_plist;
     size_t c_nprops;

     c_plist = (hid_t)*plist;

     /*
      * Call H5Pget_nprops function.
      */
     if( H5Pget_nprops(c_plist, &c_nprops) < 0) return ret_value;

     *nprops = (size_t_f)c_nprops;
     ret_value = 0;
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_class_parent_c
 * Purpose:     Call H5Pget_class_parent to get the parent class of
 *              a genereic property class
 * Inputs:      prp_id - property list to query
 * Outputs:     parent_id - parent classs identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_class_parent_c(hid_t_f *prp_id, hid_t_f *parent_id)
{
     int_f ret_value = -1;
     hid_t c_prp_id;
     hid_t c_parent_id;

     c_prp_id = (hid_t)*prp_id;

     /*
      * Call H5Pget_class_parent function.
      */
     c_parent_id = H5Pget_class_parent(c_prp_id);
     if( c_parent_id < 0) return ret_value;

     *parent_id =(hid_t_f)c_parent_id;
     ret_value = 0;
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pcopy_prop_c
 * Purpose:     Call H5Pcopy_prop to copy a property from one list or
 *              class to another
 * Inputs:      dst_id - identifier of destination property list
 *              src_id - identifier of source property list
 *              name   - name of the property
 *              name_len - length of the "name" buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pcopy_prop_c(hid_t_f *dst_id, hid_t_f *src_id, _fcd name, int_f *name_len)
{
     int_f ret_value = -1;
     hid_t c_dst_id, c_src_id;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;

     c_dst_id = (hid_t)*dst_id;
     c_src_id = (hid_t)*src_id;
     /*
      * Call H5Pcopy_prop function.
      */
     if( H5Pcopy_prop(c_dst_id, c_src_id, c_name) < 0) goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5premove_c
 * Purpose:     Call H5Premove to remove a property from a list
 * Inputs:      plid - identifier of property list
 *              name   - name of the property to remove
 *              name_len - length of the "name" buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5premove_c(hid_t_f *plid, _fcd name, int_f *name_len)
{
     int_f ret_value = -1;
     hid_t c_plid;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;

     c_plid = (hid_t)*plid;
     /*
      * Call H5Premove function.
      */
     if( H5Premove(c_plid, c_name) < 0) goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5punregister_c
 * Purpose:     Call H5Punregister to remove a property from a property class
 * Inputs:      cls - identifier of property class
 *              name   - name of the property to unregister
 *              name_len - length of the "name" buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5punregister_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
     int_f ret_value = -1;
     hid_t c_class;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;

     c_class = (hid_t)*cls;
     /*
      * Call H5Punregister function.
      */
     if( H5Punregister(c_class, c_name) < 0) goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pclose_class_c
 * Purpose:     Call H5Pclose_class to close property class
 * Inputs:      cls - identifier of property class to close
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pclose_class_c(hid_t_f *cls)
{
     int_f ret_value = -1;
     hid_t c_class;

     c_class = (hid_t)*cls;
     /*
      * Call H5Pclose_class function.
      */
     if( H5Pclose_class(c_class) < 0) return ret_value;
     ret_value = 0;
     return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_class_name_c
 * Purpose:     Call H5Pget_class_name to get property class name
 * Inputs:      cls - identifier of property class
 *              name   - ibuffer to retrieve name in
 *              name_len - length of the "name" buffer
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_class_name_c(hid_t_f *cls, _fcd name, int_f *name_len)
{
     int_f ret_value = -1;
     char *c_name = NULL;          /* Buffer to hold C string */
     size_t c_size;

     c_size = (size_t)*name_len + 1;

     /*
      * Allocate buffer to hold name
      */
     if(NULL == (c_name = (char *)HDmalloc(c_size)))
       goto DONE;

     /*
      * Call H5Pget_class_name function.
      */
     c_name = H5Pget_class_name((hid_t)*cls);
     if(c_name == NULL) goto DONE;

     HD5packFstring(c_name, _fcdtocp(name), (size_t)*name_len);
     ret_value = (int_f)HDstrlen(c_name);

DONE:
     HDfree(c_name);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_c
 * Purpose:     Call h5setc_c to set property with the character string value
 * Inputs:      plist - property list identifier
 *              name   - name of property
 *              name_len - length of the "name" buffer
 *              value - property value of character type
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5psetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len)
{
     int_f ret_value = -1;

     /*
      * Call h5pset_c function
      */
      ret_value = nh5pset_c(plist, name, name_len, _fcdtocp(value));
      return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_c
 * Purpose:     Call H5Pset to set property value
 * Inputs:      plist - property list class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 *              value - property value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_c(hid_t_f *plist, _fcd name, int_f *name_len, void UNUSED *value)
{
     int_f ret_value = -1;
     hid_t c_plist;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;
     c_plist = (hid_t)*plist;

     /*
      * Call H5Pset function.
      */
     if( H5Pset(c_plist, c_name, value) <0) goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}

int_f
nh5pset_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pset_c function
      */
     return nh5pset_c(plist, name, name_len, value);
}

int_f
nh5pset_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pset_c function
      */
     return nh5pset_c(plist, name, name_len, value);
}

int_f
nh5pset_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pset_c function
      */
     return nh5pset_c(plist, name, name_len, value);
}
/*----------------------------------------------------------------------------
 * Name:        h5pgetc_c
 * Purpose:     Call h5set_c to set property with the character string value
 * Inputs:      plist - property list identifier
 *              name   - name of property
 *              name_len - length of the "name" buffer
 * Output:      value - property value of character type
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pgetc_c(hid_t_f *plist, _fcd name, int_f *name_len, _fcd value, int_f UNUSED *value_len)
{
     int_f ret_value = -1;

     /*
      * Call h5pget_c function
      */
      ret_value = nh5pget_c(plist, name, name_len, _fcdtocp(value));
      return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_c
 * Purpose:     Call H5Pget to set property value
 * Inputs:      plist - property list class identifier
 *              name   - name of the new property
 *              name_len - length of the "name" buffer
 * Output:      value - property value
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              October 11, 2002
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_c(hid_t_f *plist, _fcd name, int_f *name_len, void UNUSED *value)
{
     int_f ret_value = -1;
     hid_t c_plist;
     char* c_name;

     c_name = (char *)HD5f2cstring(name, (size_t)*name_len);
     if (c_name == NULL) goto DONE;
     c_plist = (hid_t)*plist;

     /*
      * Call H5Pset function.
      */
     if( H5Pget(c_plist, c_name, value) <0) goto DONE;
     ret_value = 0;

DONE:
     if(c_name != NULL) HDfree(c_name);
     return ret_value;
}

int_f
nh5pget_integer_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pget_c function
      */
     return nh5pget_c(plist, name, name_len, value);
}

int_f
nh5pget_real_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pget_c function
      */
     return nh5pget_c(plist, name, name_len, value);
}

int_f
nh5pget_double_c(hid_t_f *plist, _fcd name, int_f *name_len, void *value)
{
     /*
      * Call h5pget_c function
      */
     return nh5pget_c(plist, name, name_len, value);
}


/*----------------------------------------------------------------------------
 * Name:        h5pset_shuffle_c
 * Purpose:     Call H5Pset_shuffle
 * Inputs:      prp_id - property list identifier
 *              type_size - size of the datatype in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Wednesday, March 12, 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_shuffle_c ( hid_t_f *prp_id )
{
  int_f ret_value = 0;
  hid_t c_prp_id;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  status = H5Pset_shuffle(c_prp_id);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_fletcher32_c
 * Purpose:     Call H5Pset_fletcher32 to enable EDC
 * Inputs:      prp_id - dataset creation property list identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, March 13, 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_fletcher32_c ( hid_t_f *prp_id )
{
  int_f ret_value = 0;
  hid_t c_prp_id;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  status = H5Pset_fletcher32(c_prp_id);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_edc_check_c
 * Purpose:     Call H5Pset_edc_check to enable EDC
 * Inputs:      prp_id - dataset transfer property list identifier
 *              flag   - EDC flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, March 13, 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_edc_check_c ( hid_t_f *prp_id, int_f *flag )
{
  int_f ret_value = 0;
  hid_t c_prp_id;
  H5Z_EDC_t c_flag;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  c_flag = (H5Z_EDC_t)*flag;
  status = H5Pset_edc_check(c_prp_id, c_flag);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_edc_check_c
 * Purpose:     Call H5Pget_edc_check to query EDC
 * Inputs:      prp_id - dataset transfer property list identifier
 * Outouts:     flag   - EDC flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Thursday, March 13, 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_edc_check_c ( hid_t_f *prp_id, int_f *flag )
{
  int_f ret_value = 0;
  hid_t c_prp_id;
  H5Z_EDC_t c_flag;

  c_prp_id = (hid_t)*prp_id;
  c_flag = H5Pget_edc_check(c_prp_id);
  if ( c_flag  < 0  ) ret_value = -1;
  *flag = (int_f)c_flag;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_family_offset_c
 * Purpose:     Call H5Pset_family_offset to set and offset for family driver
 * Inputs:      prp_id - property list identifier
 *              offset - offset in bytes
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Wednesday, 19 March 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_family_offset_c ( hid_t_f *prp_id , hsize_t_f *offset)
{
  int_f ret_value = 0;
  hid_t c_prp_id;
  hsize_t c_offset;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  c_offset = (hsize_t)*offset;
  status = H5Pset_family_offset(c_prp_id, c_offset);
  if ( status < 0  ) ret_value = -1;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_multi_c
 * Purpose:     Call H5Pset_fapl_multi to set multi file dirver
 * Inputs:      prp_id - file_creation property list identifier
 *              mem_map - memory mapping array
 *              memb_fapl - property list for each memory usage type
 *              memb_name - array with members names
 *              len - array with the lenght of each name
 *              lenmax - lenght of the name a sdeclared in Fortran
 *              flag - flag allowing partila access when one of the files is missing
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday 24, March 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
/*nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, haddr_t_f *memb_addr, int_f *flag) */
nh5pset_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag)
{
  int_f ret_value = -1;
  hid_t c_prp_id;
  H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
  hid_t c_memb_fapl[H5FD_MEM_NTYPES];
  char *c_memb_name[H5FD_MEM_NTYPES];
  haddr_t c_memb_addr[H5FD_MEM_NTYPES];
  hbool_t relax;
  herr_t status;
  char *tmp, *tmp_p, *tmp_pp;
  int i;
  int c_lenmax;
  long double  tmp_max_addr;
  c_lenmax = (int)*lenmax;
  relax = (hbool_t)*flag;
/*
 * Check that we got correct values from Fortran for memb_addr array
 */
  for (i=0; i < H5FD_MEM_NTYPES; i++) {
       if(memb_addr[i] >= 1.) return ret_value;
  }
/*
 * Take care of names array
 */

  tmp = (char *)HD5f2cstring(memb_name, (size_t)c_lenmax*(H5FD_MEM_NTYPES));
  if (tmp ==NULL) return ret_value;
  tmp_p = tmp;
  for (i=0; i < H5FD_MEM_NTYPES; i++) {
       c_memb_name[i] = (char *)HDmalloc((size_t)len[i] + 1);
       HDmemcpy(c_memb_name[i], tmp_p, (size_t)len[i]);
       tmp_pp = c_memb_name[i];
       tmp_pp[len[i]] = '\0';
       tmp_p = tmp_p + c_lenmax;
 }
/*
 * Take care of othe arguments
 */
  tmp_max_addr =  (long double)(HADDR_MAX);
  c_prp_id = (hid_t)*prp_id;
  for (i=0; i < H5FD_MEM_NTYPES; i++) {
       c_memb_map[i] = (H5FD_mem_t)memb_map[i];
       c_memb_fapl[i] = (hid_t)memb_fapl[i];
       if(memb_addr[i] < 0) c_memb_addr[i] = HADDR_UNDEF;
       else c_memb_addr[i] = (haddr_t)(((float)memb_addr[i])*(tmp_max_addr));
  }
/*
 * Call  H5Pset_fapl_multi function
 */

  status = H5Pset_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, (const char * const *)c_memb_name, c_memb_addr, relax);
  if ( status < 0  ) goto DONE;
  ret_value = 0;

DONE:
  HDfree(tmp);
  for (i=0; i < H5FD_MEM_NTYPES; i++)
      HDfree(c_memb_name[i]);
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_multi_sc
 * Purpose:     Call H5Pset_fapl_multi to set multi file dirver
 * Inputs:      prp_id - file_creation property list identifier
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              March 31 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_fapl_multi_sc ( hid_t_f *prp_id , int_f *flag)
{
  int_f ret_value = -1;
  hid_t c_prp_id;
  hbool_t relax;
  herr_t status;

  relax = (hbool_t)*flag;
  c_prp_id = (hid_t)*prp_id;
/*
 * Call  H5Pset_fapl_multi function
 */

  status = H5Pset_fapl_multi(c_prp_id, NULL, NULL, NULL, NULL, relax);
  if ( status < 0  ) return ret_value; /* error occurred */
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_multi_c
 * Purpose:     Call H5Pget_fapl_multi to set multi file dirver
 * Inputs:      prp_id - file_creation property list identifier
 *              lenmax - lenght of the name a sdeclared in Fortran
 * Outputs:     memb_map - memory mapping array
 *              memb_fapl - property list for each memory usage type
 *              memb_name - array with members names
 *              len - array with the lenght of each name
 *              flag - flag allowing partila access when one of the files is missing
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              Monday 24, March 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_fapl_multi_c ( hid_t_f *prp_id , int_f *memb_map, hid_t_f *memb_fapl, _fcd memb_name, int_f *len, int_f *lenmax, real_f *memb_addr, int_f *flag, int_f *maxlen_out)
{
  int_f ret_value = -1;
  hid_t c_prp_id;
  H5FD_mem_t c_memb_map[H5FD_MEM_NTYPES];
  hid_t c_memb_fapl[H5FD_MEM_NTYPES];
  char *c_memb_name[H5FD_MEM_NTYPES];
  haddr_t c_memb_addr[H5FD_MEM_NTYPES];
  hbool_t relax;
  herr_t status;
  char *tmp, *tmp_p;
  int i;
  size_t c_lenmax;
  size_t length = 0;
  c_lenmax = (size_t)*lenmax;

  c_prp_id = (hid_t)*prp_id;
/*
 * Call  H5Pget_fapl_multi function
 */

  status = H5Pget_fapl_multi(c_prp_id, c_memb_map, c_memb_fapl, c_memb_name, c_memb_addr, &relax);
  if ( status < 0  ) return ret_value;

/*
 * Take care of names array
 */
  tmp = (char *)HDmalloc(c_lenmax*H5FD_MEM_NTYPES + 1);
  tmp_p = tmp;
  HDmemset(tmp,' ', c_lenmax*H5FD_MEM_NTYPES);
  tmp[c_lenmax*H5FD_MEM_NTYPES] = '\0';
  for (i=0; i < H5FD_MEM_NTYPES; i++) {
       memcpy(tmp_p, c_memb_name[i], strlen(c_memb_name[i]));
       len[i] = (int_f)strlen(c_memb_name[i]);
       length = H5_MAX(length, strlen(c_memb_name[i]));
       tmp_p = tmp_p + c_lenmax;
 }
HD5packFstring(tmp, _fcdtocp(memb_name), (size_t)(c_lenmax*H5FD_MEM_NTYPES));

/*
 * Take care of other arguments
 */

  for (i=0; i < H5FD_MEM_NTYPES; i++) {
       memb_map[i] = (int_f)c_memb_map[i];
       memb_fapl[i] = (hid_t_f)c_memb_fapl[i];
       if(c_memb_addr[i] == HADDR_UNDEF) memb_addr[i] = -1;
       else memb_addr[i] = (real_f) ((long)c_memb_addr[i]/HADDR_MAX);
  }
  *flag = (int_f)relax;
  *maxlen_out = (int_f)length;
  ret_value = 0;
  HDfree(tmp);
  for (i=0; i < H5FD_MEM_NTYPES; i++)
      HDfree(c_memb_name[i]);
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_szip_c
 * Purpose:     Call H5Pset_szip to set szip compression
 * Inputs:      prp_id - dataset creation property list identifier
 *              options_mask
 *              pixels_per_block -szip compression parameters
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              April 8 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_szip_c ( hid_t_f *prp_id , int_f *options_mask, int_f *pixels_per_block)
{
  int_f ret_value = -1;
  hid_t c_prp_id;
  unsigned   c_options_mask;
  unsigned  c_pixels_per_block;
  herr_t status;

  c_prp_id = (hid_t)*prp_id;
  c_options_mask = (unsigned)*options_mask;
  c_pixels_per_block = (unsigned)*pixels_per_block;
/*
 * Call  H5Pset_szip function
 */

  status = H5Pset_szip(c_prp_id, c_options_mask, c_pixels_per_block);
  if ( status < 0  ) return ret_value;
  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pall_filters_avail_c
 * Purpose:     Call H5Pall_filters_avail
 * Inputs:      prp_id - dataset creation property list identifier
 * Outputs:     status - logical flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              April 10 2003
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pall_filters_avail_c ( hid_t_f *prp_id , int_f *status)
{
  int_f ret_value = -1;
  hid_t c_prp_id;
  htri_t c_status;


  c_prp_id = (hid_t)*prp_id;
/*
 * Call  H5Pall_filters_avail function
 */

  c_status = H5Pall_filters_avail(c_prp_id);
  if ( c_status < 0  ) return ret_value;
  *status = 0;
  if (c_status == 1) *status = 1;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_filter_by_id_c
 * Purpose:     Call H5Pget_filter_by_id2 to get information about a filter
 *              in a pipeline
 * Inputs:      prp_id - property list identifier
 *              filter_id - filter id
 *              namelen - Anticipated number of characters in name.
 *Outputs:      flags - Bit vector specifying certain general
 *                      properties of the filter.
 *              cd_nelmts - Number of elements in cd_value
 *              cd_values - Auxiliary data for the filter.
 *              name - Name of the filter
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena POurmal
 *              April 10, 2003
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_filter_by_id_c(hid_t_f *prp_id, int_f* filter_id, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values, size_t_f *namelen, _fcd name)
{
     unsigned int c_flags;
     size_t c_cd_nelmts = (size_t)*cd_nelmts;
     size_t c_cd_nelmts_in = (size_t)*cd_nelmts;
     unsigned int *c_cd_values = NULL;
     char *c_name = NULL;
     unsigned i;
     int_f ret_value = -1;

     if(NULL == (c_name = (char *)HDmalloc((size_t)*namelen + 1)))
         goto DONE;

     if(NULL == (c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts_in))))
         goto DONE;

     /*
      * Call H5Pget_filter_by_id2 function.
      */
     if(H5Pget_filter_by_id2((hid_t)*prp_id, (H5Z_filter_t)*filter_id, &c_flags, &c_cd_nelmts, c_cd_values, (size_t)*namelen, c_name, NULL) < 0)
         goto DONE;

     *cd_nelmts = (size_t_f)c_cd_nelmts;
     *flags = (int_f)c_flags;
     HD5packFstring(c_name, _fcdtocp(name), HDstrlen(c_name));

     for(i = 0; i < c_cd_nelmts_in; i++)
          cd_values[i] = (int_f)c_cd_values[i];

     ret_value = 0;

DONE:
    if(c_name)
        HDfree(c_name);
    if(c_cd_values)
        HDfree(c_cd_values);

    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pmodify_filter_c
 * Purpose:     Call H5Pmodify_filter to modify a filter
 * Inputs:      prp_id - property list identifier
 *              filter - Filter to be modified
 *              flags - Bit vector specifying certain general
 *                      properties of the filter.
 *              cd_nelmts - Number of elements in cd_values.
 *              cd_values - Auxiliary data for the filter.
 * Returns:     0 on success, -1 on failure
 * Programmer:  Elena Pourmal
 *              April 10 2003
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pmodify_filter_c (hid_t_f *prp_id, int_f* filter, int_f* flags, size_t_f* cd_nelmts, int_f* cd_values )
{
     int_f ret_value = -1;
     hid_t c_prp_id;
     herr_t ret;
     size_t c_cd_nelmts;
     unsigned int c_flags;
     H5Z_filter_t c_filter;
     unsigned int * c_cd_values;
     unsigned i;

     c_filter = (H5Z_filter_t)*filter;
     c_flags = (unsigned)*flags;
     c_cd_nelmts = (size_t)*cd_nelmts;
     c_cd_values = (unsigned int *)HDmalloc(sizeof(unsigned int) * ((int)c_cd_nelmts));
     if (!c_cd_values) return ret_value;
     for (i = 0; i < c_cd_nelmts; i++)
          c_cd_values[i] = (unsigned int)cd_values[i];

     /*
      * Call H5Pmodify_filter function.
      */
     c_prp_id = (hid_t)*prp_id;
     ret = H5Pmodify_filter(c_prp_id, c_filter, c_flags, c_cd_nelmts,c_cd_values );

     if (ret < 0) goto DONE;
     ret_value = 0;

DONE:
     HDfree(c_cd_values);
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5premove_filter_c
 * Purpose:     Call H5Premove_filter to delete one or more filters
 * Inputs:      prp_id - property list identifier
 *              filter - Filter to be deleted
 * Returns:     0 on success, -1 on failure
 * Programmer:  Quincey Koziol
 *              January 27 2004
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5premove_filter_c (hid_t_f *prp_id, int_f* filter)
{
     int_f ret_value = -1;
     hid_t c_prp_id;
     H5Z_filter_t c_filter;

     c_filter = (H5Z_filter_t)*filter;
     c_prp_id = (hid_t)*prp_id;

     /*
      * Call H5Premove_filter function.
      */
     if(H5Premove_filter(c_prp_id, c_filter) < 0) goto DONE;
     ret_value = 0;

DONE:
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_attr_phase_change_c
 * Purpose:     Calls H5Pget_attr_phase_change
 *
 * Inputs:      ocpl_id		- Object (dataset or group) creation property list identifier
 * Outputs      max_compact     - Maximum number of attributes to be stored in compact storage
 *              min_dense       - Minimum number of attributes to be stored in dense storage
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              January, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
{
  int ret_value = -1;
  hid_t c_ocpl_id;
  unsigned c_max_compact;
  unsigned c_min_dense;
  herr_t ret;
  /*
   * Call H5Pget_attr_phase_change function.
   */
  c_ocpl_id = (hid_t)*ocpl_id;
  ret = H5Pget_attr_phase_change(c_ocpl_id, &c_max_compact,&c_min_dense);
  if (ret < 0) return ret_value;

  *max_compact = (int_f)c_max_compact;
  *min_dense = (int_f)c_min_dense;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_attr_creation_order_c
 * Purpose:     Calls H5Ppset_attr_creation_order
 *
 * Inputs:      ocpl_id		- Object (dataset or group) creation property list identifier
 * Outputs      crt_order_flags - Flags specifying whether to track and index attribute creation order
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              January, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags )
{
  int ret_value = -1;
  unsigned c_crt_order_flags;
  herr_t ret;
  /*
   * Call h5pset_attr_creation_order function.
   */
  c_crt_order_flags = (unsigned)*crt_order_flags;
  ret = H5Pset_attr_creation_order((hid_t)*ocpl_id, c_crt_order_flags);
  if (ret < 0) return ret_value;

  *crt_order_flags = (int_f)c_crt_order_flags;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_shared_mesg_nindexes_c
 * Purpose:     Calls h5pset_shared_mesg_nindexes
 *
 * Inputs:
 *       plist_id - file creation property list
 *       nindexes - Number of shared object header message indexes
 *                   available in files created WITH this property list
 *
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              January, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes )
{
  int ret_value = -1;
  hid_t c_plist_id;
  unsigned c_nindexes;
  herr_t ret;
  /*
   * Call h5pset_shared_mesg_nindexes function.
   */
  c_plist_id = (hid_t)*plist_id;
  c_nindexes = (unsigned)*nindexes;
  ret = H5Pset_shared_mesg_nindexes(c_plist_id, c_nindexes );
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_shared_mesg_index_c
 * Purpose:     Calls H5Pset_shared_mesg_index
 *
 * Inputs:
 *            fcpl_id - File creation property list identifier.
 *          index_num - Index being configured.
 *    mesg_type_flags - Types of messages that should be stored in this index.
 *      min_mesg_size - Minimum message size.
 *
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              January, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size)
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call h5pset_shared_mesg_index function.
   */
  ret = H5Pset_shared_mesg_index((hid_t)*fcpl_id,(unsigned)*index_num, (unsigned)*mesg_type_flags, (unsigned)*min_mesg_size);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_attr_creation_order_c
 * Purpose:     Calls H5Pget_attr_creation_order
 *
 * Inputs:
 *           ocpl_id - Object (group or dataset) creation property list identifier
 * Outputs:
 *           crt_order_flags - Flags specifying whether to track and index attribute creation order
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags)
{
  int ret_value = -1;
  herr_t ret;

  unsigned c_crt_order_flags;
  /*
   * Call h5pget_attr_creation_order function.
   */

  ret = H5Pget_attr_creation_order((hid_t)*ocpl_id, &c_crt_order_flags);
  if (ret < 0) return ret_value;

  *crt_order_flags = (int_f)c_crt_order_flags;

  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_libver_bounds_c
 * Purpose:     Calls H5Pset_libver_bounds
 *
 * Inputs:
 *             fapl_id - File access property list identifier
 *                 low - The earliest version of the library that will be used for writing objects.
 *                high - The latest version of the library that will be used for writing objects.
 * Outputs:
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 18, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high )
{
  int ret_value = -1;
  herr_t ret;

  /*
   * Call H5Pset_libver_bounds function.
   */
  ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high );
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_link_creation_order_c
 * Purpose:     Calls H5Pset_link_creation_order
 *
 * Inputs:      gcpl_id		- Group creation property list identifier
 *              crt_order_flags - Creation order flag(s)
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 18, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags )
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call H5Pset_link_creation_order function.
   */
  ret = H5Pset_link_creation_order((hid_t)*gcpl_id, (unsigned)*crt_order_flags);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_link_phase_change_c
 * Purpose:     Calls H5Pget_link_phase_change
 *
 * Inputs:      gcpl_id  	- Group creation property list identifier
 * Outputs      max_compact     - Maximum number of attributes to be stored in compact storage
 *              min_dense       - Minimum number of attributes to be stored in dense storage
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 20, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
{
  int ret_value = -1;
  unsigned c_max_compact;
  unsigned c_min_dense;
  herr_t ret;

  /*
   * Call H5Pget_link_phase_change function.
   */
  ret = H5Pget_link_phase_change((hid_t)*gcpl_id, &c_max_compact,&c_min_dense);
  if (ret < 0) return ret_value;

  *max_compact = (int_f)c_max_compact;
  *min_dense = (int_f)c_min_dense;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_obj_track_times_c
 * Purpose:     Call H5Pget_obj_track_times
 *
 * Inputs:      plist_id - property list id
 * Outputs:
 *              flag     - TRUE/FALSE flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 22, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
{
  int ret_value = -1;
  hbool_t c_track_times=0;
  herr_t ret;

  /*
   * Call H5Pget_obj_track_times function.
   */
  ret = H5Pget_obj_track_times((hid_t)*plist_id, &c_track_times);

  if (ret < 0) return ret_value; /* error occurred */

  *flag = 0;
  if(c_track_times > 0) *flag = 1;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_obj_track_times_c
 * Purpose:     Call H5Pset_obj_track_times
 *
 * Inputs:      plist_id - property list id
 *              flag     - TRUE/FALSE flag
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 22, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_obj_track_times_c(hid_t_f *plist_id, int_f *flag)
{
  int ret_value = -1;
  hbool_t c_track_times;
  herr_t ret;


  c_track_times = (hbool_t)*flag;

  /*
   * Call H5Pset_obj_track_times function.
   */
  ret = H5Pset_obj_track_times((hid_t)*plist_id, c_track_times);

  if (ret < 0) return ret_value; /* error occurred */
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_create_inter_group_c
 * Purpose:     Calls H5Pset_create_intermediate_group
 *
 * Inputs:
 *		lcpl_id - Link creation property list identifier
 *   crt_intermed_group - crt_intermed_group specifying whether
 *                        to create intermediate groups upon the
 *                        creation of an object
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              February 22, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
{
  int ret_value = -1;
  herr_t ret;

  /*
   * Call H5Pset_create_intermediate_group function.
   */
  ret = H5Pset_create_intermediate_group((hid_t)*lcpl_id, (unsigned)*crt_intermed_group);

  if (ret < 0) return ret_value; /* error occurred */
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_link_creation_order_c
 * Purpose:     Calls H5Pget_link_creation_order
 *
 * Inputs:
 *           gcpl_id - Group creation property list identifier
 * Outputs:
 *           crt_order_flags - Creation order flag(s)
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 3, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags)
{
  int ret_value = -1;
  herr_t ret;

  unsigned c_crt_order_flags;
  /*
   * Call h5pget_link_creation_order function.
   */

  ret = H5Pget_link_creation_order((hid_t)*gcpl_id, &c_crt_order_flags);
  if (ret < 0) return ret_value;

  *crt_order_flags = (int_f)c_crt_order_flags;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:     h5pset_char_encoding_c
 * Purpose:  Calls H5Pset_char_encoding
 *
 * Inputs:
 *           plist_id - Property list identifier
 *           encoding - String encoding character set:
 *     	                     H5T_CSET_ASCII_F -> US ASCII
 *     	                     H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
 * Outputs:  NONE
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 3, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
{
  int ret_value = -1;
  herr_t ret;

  /*
   * Call H5Pset_char_encoding function.
   */
  ret = H5Pset_char_encoding((hid_t)*plist_id, (H5T_cset_t)*encoding);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}


/*----------------------------------------------------------------------------
 * Name:     h5pget_char_encoding_c
 * Purpose:  Calls H5Pget_char_encoding
 *
 * Inputs:
 *           plist_id - Property list identifier
 * Outputs:
 *           encoding - Encoding character set:
 *     	                  H5T_CSET_ASCII_F -> US ASCII
 *     	                  H5T_CSET_UTF8_F -> UTF-8 Unicode encoding
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 3, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_char_encoding_c(hid_t_f *plist_id, int_f *encoding)
{
  int ret_value = -1;
  H5T_cset_t c_encoding;
  herr_t ret;
  /*
   * Call H5Pget_char_encoding function.
   */
  ret = H5Pget_char_encoding((hid_t)*plist_id, &c_encoding);
  if (ret < 0) return ret_value;

  *encoding = (int_f)c_encoding;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:     h5pset_copy_object_c
 * Purpose:  Calls H5Pset_copy_object
 *
 * Inputs:
 *    ocp_plist_id - Object copy property list identifier
 *    copy_options - Copy option(s) to be set
 *
 * Outputs:
 *            NONE
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 3, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call H5Pset_copy_object function.
   */
  ret = H5Pset_copy_object((hid_t)*ocp_plist_id, (unsigned)*copy_options);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:     h5pget_copy_object_c
 * Purpose:  Calls H5Pget_copy_object
 *
 * Inputs:
 *    ocp_plist_id - Object copy property list identifier
 *
 * Outputs:
 *    copy_options - Copy option(s) to be get
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 3, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_copy_object_c(hid_t_f *ocp_plist_id, int_f *copy_options)
{
  int ret_value = -1;
  unsigned c_copy_options;
  herr_t ret;
  /*
   * Call H5Pget_copy_object function.
   */
  ret = H5Pget_copy_object((hid_t)*ocp_plist_id, &c_copy_options);
  if (ret < 0) return ret_value;

  *copy_options = (int_f)c_copy_options;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_data_transform_c
 * Purpose:     Calls H5Pget_data_transform
 * Inputs:
 *              prp_id - property list identifier to query
 *      expression_len - buffer size transorm expression
 *
 * Output:
 *          expression - buffer to hold transform expression
 *
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 19, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len, size_t_f *size)
{
    char *c_expression = NULL;          /* Buffer to hold C string */
    size_t c_expression_len;
    ssize_t ret;
    int_f ret_value = 0;

    c_expression_len = (size_t)*expression_len + 1;

    /*
     * Allocate memory to store the expression.
     */
    if(c_expression_len) {
        c_expression = (char *)HDmalloc(c_expression_len);
        if(NULL == c_expression)
           HGOTO_DONE(FAIL)
    } /* end if */

    /*
     * Call H5Pget_data_transform function.
     */
    ret = H5Pget_data_transform((hid_t)*plist_id, c_expression, c_expression_len);
    if(ret < 0)
       HGOTO_DONE(FAIL)

    /* or strlen ? */
    HD5packFstring(c_expression, _fcdtocp(expression), c_expression_len - 1);

    *size = (size_t_f)ret;

done:
    if(c_expression)
        HDfree(c_expression);

    return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_data_transform_c
 * Purpose:     Calls H5Pset_data_transform
 * Inputs:
 *              prp_id - property list identifier to query
 *          expression - buffer to hold transform expression
 *      expression_len - buffer size transorm expression
 *
 * Output:
 *
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 19, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_data_transform_c(hid_t_f *plist_id, _fcd expression, int_f *expression_len)
{
     char* c_expression = NULL; /* Buffer to hold C string */
     int_f ret_value = 0; /* Return value */

     /*
      * Convert FORTRAN name to C name
      */
     if(NULL == (c_expression = HD5f2cstring(expression, (size_t)*expression_len)))
        HGOTO_DONE(FAIL)

     /*
      * Call H5Pset_data_transform function.
      */
     if(H5Pset_data_transform((hid_t)*plist_id, c_expression) < 0)
        HGOTO_DONE(FAIL)

done:
    if(c_expression)
        HDfree(c_expression);

     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_local_heap_size_hint_c
 * Purpose:     Calls H5Pget_local_heap_size_hint
 * Inputs:
 *         gcpl_id - Group creation property list identifier
 *
 * Output:
 *       size_hint - Hint for size of local heap
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
{
     int_f ret_value = -1; /* Return value */
     size_t c_size_hint;
     herr_t ret;
     /*
      * Call H5Pget_local_heap_size_hint function.
      */
     ret = H5Pget_local_heap_size_hint((hid_t)*gcpl_id, &c_size_hint);
     if(ret<0) return ret_value;

     *size_hint = (size_t_f)c_size_hint;
     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_est_link_info_c
 * Purpose:     Calls H5Pget_est_link_info
 * Inputs:
 *              gcpl_id - Group creation property list identifier
 *
 * Output:
 *      est_num_entries - Estimated number of links to be inserted into group
 *         est_name_len - Estimated average length of link names
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
{
     int_f ret_value = -1; /* Return value */
     unsigned c_est_num_entries;
     unsigned c_est_name_len;
     herr_t ret;
     /*
      * Call h5pget_est_link_info function.
      */
     ret = H5Pget_est_link_info((hid_t)*gcpl_id, &c_est_num_entries, &c_est_name_len);
     if(ret<0) return ret_value;

     *est_num_entries = (int_f)c_est_num_entries;
     *est_name_len = (int_f)c_est_name_len;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_local_heap_size_hint_c
 * Purpose:     Calls H5Pset_local_heap_size_hint
 * Inputs:
 *         gcpl_id - Group creation property list identifier
 *       size_hint - Hint for size of local heap
 *
 * Output:
 *
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_local_heap_size_hint_c(hid_t_f *gcpl_id, size_t_f *size_hint)
{
     int_f ret_value = -1; /* Return value */
     herr_t ret;
     /*
      * Call H5Pget_local_heap_size_hint function.
      */
     ret = H5Pset_local_heap_size_hint((hid_t)*gcpl_id, (size_t)*size_hint);
     if(ret<0) return ret_value;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_est_link_info_c
 * Purpose:     Calls H5Pset_est_link_info
 * Inputs:
 *              gcpl_id - Group creation property list identifier
 *      est_num_entries - Estimated number of links to be inserted into group
 *         est_name_len - Estimated average length of link names
 *
 * Output:
 * Returns:
 *          Success:  0
 *	    Failure: -1
 *
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_est_link_info_c(hid_t_f *gcpl_id, int_f *est_num_entries, int_f *est_name_len)
{
     int_f ret_value = -1; /* Return value */
     herr_t ret;
     /*
      * Call h5pset_est_link_info function.
      */
     ret = H5Pset_est_link_info((hid_t)*gcpl_id, (unsigned)*est_num_entries, (unsigned)*est_name_len);
     if(ret<0) return ret_value;

     ret_value = 0;
     return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_link_phase_change_c
 * Purpose:     Calls H5Pset_link_phase_change
 *
 * Inputs:      gcpl_id     - Group creation property list identifier
 *              max_compact - Maximum number of attributes to be stored in compact storage
 *              min_dense   - Minimum number of attributes to be stored in dense storage
 * Outputs
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense )
{
  int ret_value = -1;
  herr_t ret;

  /*
   * Call H5Pset_link_phase_change function.
   */
  ret = H5Pset_link_phase_change((hid_t)*gcpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_fapl_direct_c
 * Purpose:     Calls H5Pset_fapl_direct
 *
 * Inputs:
 *    fapl_id 	 - File access property list identifier
 *    alignment  - Required memory alignment boundary
 *    block_size - File system block size
 *    cbuf_size  - Copy buffer size
 * Outputs
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size)
{
  int ret_value = -1;
#ifdef H5_HAVE_DIRECT
  herr_t ret;

  /*
   * Call H5Pset_link_phase_change function.
   */
  ret = H5Pset_fapl_direct((hid_t)*fapl_id, (size_t)*alignment, (size_t)*block_size, (size_t)*cbuf_size );
    if (ret < 0) return ret_value;

  ret_value = 0;

#endif
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_fapl_direct_c
 * Purpose:     Calls H5Pget_fapl_direct
 *
 * Inputs:
 *    fapl_id 	 - File access property list identifier
 * Outputs:
 *    alignment  - Required memory alignment boundary
 *    block_size - File system block size
 *    cbuf_size  - Copy buffer size
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_fapl_direct_c(hid_t_f UNUSED *fapl_id, size_t_f UNUSED *alignment, size_t_f UNUSED *block_size, size_t_f UNUSED *cbuf_size)
{
  int ret_value = -1;
#ifdef H5_HAVE_DIRECT
  herr_t ret;
  size_t c_alignment;
  size_t c_block_size;
  size_t c_cbuf_size;

  /*
   * Call H5Pget_link_phase_change function.
   */
  ret = H5Pget_fapl_direct((hid_t)*fapl_id, &c_alignment, &c_block_size, &c_cbuf_size );
  if (ret < 0) return ret_value;

  *alignment  = (size_t_f)c_alignment;
  *block_size = (size_t_f)c_block_size;
  *cbuf_size  = (size_t_f)c_cbuf_size;

  ret_value = 0;
#endif
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_attr_phase_change_c
 * Purpose:     Calls H5Pset_attr_phase_change
 *
 * Inputs:      ocpl_id		- Object (dataset or group) creation property list identifier
 *              max_compact     - Maximum number of attributes to be stored in compact storage
 *              min_dense       - Minimum number of attributes to be stored in dense storage
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_attr_phase_change_c(hid_t_f *ocpl_id, int_f *max_compact, int_f *min_dense )
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call H5Pset_attr_phase_change function.
   */
  ret = H5Pset_attr_phase_change((hid_t)*ocpl_id, (unsigned)*max_compact,(unsigned)*min_dense);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_nbit_c
 * Purpose:     Calls H5Pset_nbit
 *
 * Inputs:      plist_id - Dataset creation property list identifier
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_nbit_c(hid_t_f *plist_id )
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call H5Pset_nbit_change function.
   */
  ret = H5Pset_nbit((hid_t)*plist_id);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}
/*----------------------------------------------------------------------------
 * Name:        h5pset_scaleoffset_c
 * Purpose:     Calls H5Pset_scaleoffset
 *
 * Inputs:
 *      plist_id - Dataset creation property list identifier
 *    scale_type - Flag indicating compression method.
 *  scale_factor - Parameter related to scale.
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 21, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_scaleoffset_c(hid_t_f *plist_id, int_f *scale_type, int_f *scale_factor )
{
  int ret_value = -1;
  H5Z_SO_scale_type_t c_scale_type;
  herr_t ret;
  /*
   * Call H5Pset_scaleoffset_change function.
   */
  c_scale_type = (H5Z_SO_scale_type_t)*scale_type;

  ret = H5Pset_scaleoffset((hid_t)*plist_id, c_scale_type, (int)*scale_factor);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_nlinks
 * Purpose:     Calls H5Pset_nlinks
 *
 * Inputs:
 *            lapl_id - File access property list identifier
 *             nlinks - Maximum number of links to traverse
 * Outputs:
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 24, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pset_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
{
  int ret_value = -1;
  herr_t ret;
  /*
   * Call H5Pset_nlinks function.
   */
  ret = H5Pset_nlinks((hid_t)*lapl_id, (size_t)*nlinks);
  if (ret < 0) return ret_value;

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_nlinks
 * Purpose:     Calls H5Pget_nlinks
 *
 * Inputs:
 *            lapl_id - File access property list identifier
 *
 * Outputs:
 *             nlinks - Maximum number of links to traverse
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              March 24, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/
int_f
nh5pget_nlinks_c(hid_t_f *lapl_id, size_t_f *nlinks)
{
  int ret_value = -1;
  herr_t ret;
  size_t c_nlinks;
  /*
   * Call H5Pget_nlinks function.
   */
  ret = H5Pget_nlinks((hid_t)*lapl_id, &c_nlinks);
  if (ret < 0) return ret_value;

  *nlinks = (size_t_f)c_nlinks;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_create_inter_group_c
 * Purpose:     Calls H5Pget_create_intermediate_group
 *
 * Inputs:
 *		lcpl_id - Link creation property list identifier
 *   crt_intermed_group - Specifying whether to create intermediate groups upon
 *                        the creation of an object
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              April 4, 2008
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_create_inter_group_c(hid_t_f *lcpl_id, int_f *crt_intermed_group)
{
  int ret_value = -1;
  herr_t ret;
  unsigned c_crt_intermed_group;

  /*
   * Call H5Pget_create_intermediate_group function.
   */
  ret = H5Pget_create_intermediate_group((hid_t)*lcpl_id, &c_crt_intermed_group);

  if (ret < 0) return ret_value; /* error occurred */

  *crt_intermed_group = (int_f)c_crt_intermed_group;
  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pset_chunk_cache_c
 * Purpose:     Calls H5Pset_chunk_cache
 *
 * Inputs:	dapl_id            - Link creation property list identifier
 *              rdcc_nslots        -
 *              rdcc_nbytes        -
 *              rdcc_w0            -
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              April 13, 2009
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pset_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
  int ret_value = -1;

  /*
   * Call H5Pset_chunk_cache function.
   */
  if( (H5Pset_chunk_cache((hid_t)*dapl_id, (size_t)*rdcc_nslots, (size_t)*rdcc_nbytes, (double)*rdcc_w0)) <0 )
    return ret_value; /* error occurred */

  ret_value = 0;
  return ret_value;
}

/*----------------------------------------------------------------------------
 * Name:        h5pget_chunk_cache_c
 * Purpose:     Calls H5Pget_chunk_cache
 *
 * Inputs:	dapl_id            - Link creation property list identifier
 * Outputs:
 *              rdcc_nslots        -
 *              rdcc_nbytes        -
 *              rdcc_w0            -
 *
 * Returns:     0 on success, -1 on failure
 * Programmer:  M.S. Breitenfeld
 *              April 13, 2009
 * Modifications:
 *---------------------------------------------------------------------------*/

int_f
nh5pget_chunk_cache_c(hid_t_f *dapl_id, size_t_f *rdcc_nslots, size_t_f *rdcc_nbytes, real_f *rdcc_w0)
{
  int ret_value = -1;
  size_t c_rdcc_nslots;
  size_t c_rdcc_nbytes;
  double c_rdcc_w0;
  /*
   * Call H5Pget_chunk_cache function.
   */
  if( (H5Pget_chunk_cache((hid_t)*dapl_id, &c_rdcc_nslots, &c_rdcc_nbytes, &c_rdcc_w0)) <0 )
    return ret_value; /* error occurred */

  *rdcc_nslots=(size_t_f)c_rdcc_nslots;
  *rdcc_nbytes=(size_t_f)c_rdcc_nbytes;
  *rdcc_w0=(real_f)c_rdcc_w0;

  ret_value = 0;
  return ret_value;
}