summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-07-27 17:29:44 (GMT)
committerrjohnson <rjohnson>1998-07-27 17:29:44 (GMT)
commit34245744f76e6b5a1cc0317fa577a9ad43f22b55 (patch)
tree7e5ade73876702bd88bcbdefcd89fbc18b2307d8 /generic
parent2777f8b526f0019372874c38eb127e1d27371c87 (diff)
downloadtk-34245744f76e6b5a1cc0317fa577a9ad43f22b55.zip
tk-34245744f76e6b5a1cc0317fa577a9ad43f22b55.tar.gz
tk-34245744f76e6b5a1cc0317fa577a9ad43f22b55.tar.bz2
changed to use CONST
Diffstat (limited to 'generic')
-rw-r--r--generic/tkInt.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkInt.h b/generic/tkInt.h
index a00e364..86251df 100644
--- a/generic/tkInt.h
+++ b/generic/tkInt.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * SCCS: %Z% $Id: tkInt.h,v 1.2 1998/07/24 16:44:01 rjohnson Exp $
+ * SCCS: %Z% $Id: tkInt.h,v 1.3 1998/07/27 17:29:44 rjohnson Exp $
*/
#ifndef _TKINT
@@ -738,7 +738,7 @@ EXTERN unsigned long TkCreateBindingProcedure _ANSI_ARGS_((
TkBindEvalProc *evalProc, TkBindFreeProc *freeProc,
ClientData clientData));
EXTERN Pixmap TkCreateBitmapFromData _ANSI_ARGS_((Display* display,
- Drawable d, _Xconst char* data,
+ Drawable d, CONST char* data,
unsigned int width, unsigned int height));
EXTERN TkCursor * TkCreateCursorFromData _ANSI_ARGS_((Tk_Window tkwin,
char *source, char *mask, int width, int height,
@@ -936,7 +936,7 @@ EXTERN void TkQueueEventForAllChildren _ANSI_ARGS_((
TkWindow *winPtr, XEvent *eventPtr));
#ifndef TkRectInRegion
EXTERN int TkReadBitmapFile _ANSI_ARGS_((Display* display,
- Drawable d, _Xconst char* filename,
+ Drawable d, CONST char* filename,
unsigned int* width_return,
unsigned int* height_return,
Pixmap* bitmap_return,
5'>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
!****h* ROBODoc/H5T
!
! NAME
!  MODULE H5T
!
! PURPOSE
!  This file contains Fortran interfaces for H5T functions. It includes
!  all the functions that are independent on whether the Fortran 2003 functions
!  are enabled or disabled.
!
!
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!   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.     *
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
!
! NOTES
!                         *** IMPORTANT ***
!  If you add a new H5T function you must add the function name to the
!  Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
!  This is needed for Windows based operating systems.
!
!*****

MODULE H5T

  USE H5GLOBAL

CONTAINS

!
!****s* H5T/h5topen_f
!
! NAME
!  h5topen_f
!
! PURPOSE
!  Opens named datatype.
!
! INPUTS
!  loc_id 	 - location identifier
!  name 	 - a datatype name
! OUTPUTS
!  type_id 	 - datatype identifier
!  hdferr 	 - Returns 0 if successful and -1 if fails
! OPTIONAL PARAMETERS
!  tapl_id 	 - datatype access property list identifier.
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
!  Added optional parameter 'tapl_id' for compatability
!  with H5Topen2. April 9, 2009.
!
! SOURCE
  SUBROUTINE h5topen_f(loc_id, name, type_id, hdferr, tapl_id)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
    CHARACTER(LEN=*), INTENT(IN) :: name ! Datatype name within file or group
    INTEGER(HID_T), INTENT(OUT) :: type_id  ! Datatype identifier
    INTEGER, INTENT(OUT) :: hdferr ! Error code
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! datatype access property list identifier
!*****
    INTEGER :: namelen                  ! Name length
    INTEGER(HID_T) :: tapl_id_default

    INTERFACE
       INTEGER FUNCTION h5topen_c(loc_id, name, namelen, type_id, tapl_id_default)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TOPEN_C'::h5topen_c
         !DEC$ENDIF
         !DEC$ATTRIBUTES reference ::name
         INTEGER(HID_T), INTENT(IN) :: loc_id
         CHARACTER(LEN=*), INTENT(IN) :: name
         INTEGER :: namelen
         INTEGER(HID_T), INTENT(OUT) :: type_id
         INTEGER(HID_T) :: tapl_id_default
       END FUNCTION h5topen_c
    END INTERFACE

    namelen = LEN(name)

    tapl_id_default = H5P_DEFAULT_F
    IF(PRESENT(tapl_id)) tapl_id_default = tapl_id

    hdferr = h5topen_c(loc_id, name, namelen, type_id, tapl_id_default)
  END SUBROUTINE h5topen_f
!
!****s* H5T/h5tcommit_f
!
! NAME
!  h5tcommit_f
!
! PURPOSE
!  Commits a transient datatype to a file, creating a
!  new named datatype.
!
! INPUTS
!  loc_id 	 - location identifier
!  name 	 - name of the datatype to be stored
!                  at the specified location
!  type_id 	 - identifier of a datatype to be stored
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
! OPTIONAL PARAMETERS
!  lcpl_id 	 - Link creation property list
!  tcpl_id 	 - Datatype creation property list
!  tapl_id 	 - Datatype access property list
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!   	 - Explicit Fortran interfaces were added for
!          called C functions (it is needed for Windows
!          port).  March 7, 2001
!
!   	 - Added optional parameters introduced in version 1.8
!          M. Scot Breitenfeld
!
! SOURCE
  SUBROUTINE h5tcommit_f(loc_id, name, type_id, hdferr, &
       lcpl_id, tcpl_id, tapl_id  )
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: loc_id  ! File or group identifier
    CHARACTER(LEN=*), INTENT(IN) :: name
                                  ! Datatype name within file or group
    INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
    INTEGER, INTENT(OUT) :: hdferr          ! Error code
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: lcpl_id ! Link creation property list
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! Datatype creation property list
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! Datatype access property list
!*****

    INTEGER :: namelen          ! Name length

    INTEGER(HID_T) :: lcpl_id_default
    INTEGER(HID_T) :: tcpl_id_default
    INTEGER(HID_T) :: tapl_id_default

    INTERFACE
       INTEGER FUNCTION h5tcommit_c(loc_id, name, namelen, type_id, &
            lcpl_id_default, tcpl_id_default, tapl_id_default )
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_C'::h5tcommit_c
         !DEC$ENDIF
         !DEC$ATTRIBUTES reference ::name
         INTEGER(HID_T), INTENT(IN) :: loc_id
         CHARACTER(LEN=*), INTENT(IN) :: name
         INTEGER :: namelen
         INTEGER(HID_T), INTENT(IN) :: type_id
         INTEGER(HID_T) :: lcpl_id_default
         INTEGER(HID_T) :: tcpl_id_default
         INTEGER(HID_T) :: tapl_id_default
       END FUNCTION h5tcommit_c
    END INTERFACE

    lcpl_id_default = H5P_DEFAULT_F
    tcpl_id_default = H5P_DEFAULT_F
    tapl_id_default = H5P_DEFAULT_F

    IF (PRESENT(lcpl_id)) lcpl_id_default = lcpl_id
    IF (PRESENT(tcpl_id)) tcpl_id_default = tcpl_id
    IF (PRESENT(tapl_id)) tapl_id_default = tapl_id

    namelen = LEN(name)

    hdferr = h5tcommit_c(loc_id, name, namelen, type_id, &
         lcpl_id_default, tcpl_id_default, tapl_id_default )

  END SUBROUTINE h5tcommit_f
!
!****s* H5T/h5tcopy_f
!
! NAME
!  h5tcopy_f
!
! PURPOSE
!  Creates a copy of exisiting datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  new_type_id 	 - identifier of datatype's copy
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tcopy_f(type_id, new_type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(HID_T), INTENT(OUT) :: new_type_id
                                 ! Identifier of datatype's copy
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION  h5tcopy_c(type_id, new_type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOPY_C'::h5tcopy_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(HID_T), INTENT(OUT) :: new_type_id
              END FUNCTION h5tcopy_c
            END INTERFACE

            hdferr = h5tcopy_c(type_id, new_type_id)
          END SUBROUTINE h5tcopy_f
!
!****s* H5T/h5tequal_f
!
! NAME
!  h5tequal_f
!
! PURPOSE
!  Determines whether two datatype identifiers refer
!  to the same datatype.
!
! INPUTS
!  type1_id 	 - datatype identifier
!  type2_id 	 - datatype identifier
! OUTPUTS
!  flag 	 - TRUE/FALSE flag to indicate
!                  if two datatypes are equal
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tequal_f(type1_id, type2_id, flag, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type1_id ! Datatype identifier
            INTEGER(HID_T), INTENT(IN) :: type2_id ! Datatype identifier
            LOGICAL, INTENT(OUT) :: flag ! TRUE/FALSE flag to indicate if two
                                         ! datatypes are equal
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTEGER :: c_flag
            INTERFACE
              INTEGER FUNCTION h5tequal_c(type1_id, type2_id, c_flag)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TEQUAL_C'::h5tequal_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type1_id
              INTEGER(HID_T), INTENT(IN) :: type2_id
              INTEGER :: c_flag
              END FUNCTION h5tequal_c
            END INTERFACE

            flag = .FALSE.
            hdferr = h5tequal_c(type1_id, type2_id, c_flag)
            if(c_flag .gt. 0) flag = .TRUE.
          END SUBROUTINE h5tequal_f
!
!****s* H5T/h5tclose_f
!
! NAME
!  h5tclose_f
!
! PURPOSE
!  Releases a datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tclose_f(type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tclose_c(type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCLOSE_C'::h5tclose_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              END FUNCTION h5tclose_c
            END INTERFACE

            hdferr = h5tclose_c(type_id)
          END SUBROUTINE h5tclose_f
!
!****s* H5T/h5tget_class_f
!
! NAME
!  h5tget_class_f
!
! PURPOSE
!  Returns the datatype class identifier.
!
! INPUTS
!  type_id - Datatype identifier
! OUTPUTS
!  class   - Class, possible values are:
!            H5T_NO_CLASS_F (-1)
!            H5T_INTEGER_F  (0)
!            H5T_FLOAT_F (1)
!            H5T_TIME_F  (2)
!            H5T_STRING_F (3)
!            H5T_BITFIELD_F (4)
!            H5T_OPAQUE_F (5)
!            H5T_COMPOUND_F (6)
!            H5T_REFERENCE_F (7)
!            H5T_ENUM_F (8)
!            H5T_VLEN_F (9)
!            H5T_ARRAY_F (10)  
!  hdferr  - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_class_f(type_id, class, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: type_id
    INTEGER, INTENT(OUT) :: class         
    INTEGER, INTENT(OUT) :: hdferr
!*****
    INTERFACE
       INTEGER FUNCTION h5tget_class_c(type_id, class)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CLASS_C'::h5tget_class_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: type_id
         INTEGER, INTENT(OUT) :: class
       END FUNCTION h5tget_class_c
    END INTERFACE

    hdferr = h5tget_class_c(type_id, class)
  END SUBROUTINE h5tget_class_f
!
!****s* H5T/h5tget_size_f
!
! NAME
!  h5tget_size_f
!
! PURPOSE
!  Returns the size of a datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  size 	 - datatype size
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_size_f(type_id, size, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(OUT) :: size ! Datatype size
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_size_c(type_id, size)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIZE_C'::h5tget_size_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(OUT) :: size
              END FUNCTION h5tget_size_c
            END INTERFACE

            hdferr = h5tget_size_c(type_id, size)
          END SUBROUTINE h5tget_size_f

!
!****s* H5T/h5tset_size_f
!
! NAME
!  h5tset_size_f
!
! PURPOSE
!  Sets the total size for an atomic datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  size 	 - size of the datatype
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
!
! SOURCE
  SUBROUTINE h5tset_size_f(type_id, size, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(IN) :: size ! Datatype size
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_size_c(type_id, size)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIZE_C'::h5tset_size_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(IN) :: size
              END FUNCTION h5tset_size_c
            END INTERFACE

            hdferr = h5tset_size_c(type_id, size)
          END SUBROUTINE h5tset_size_f

!
!****s* H5T/h5tget_order_f
!
! NAME
!  h5tget_order_f
!
! PURPOSE
!  Returns the byte order of an atomic datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  order 	 - byte order for the datatype, possible
!                  values are:
!                    H5T_ORDER_LE_F
!                    H5T_ORDER_BE_F
!                    H5T_ORDER_VAX_F (not implemented yet)
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_order_f(type_id, order, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
    INTEGER, INTENT(OUT) :: order
                                    ! Datatype byte order, possible values are:
                                    ! H5T_ORDER_LE_F
                                    ! H5T_ORDER_BE_F
                                    ! H5T_ORDER_VAX_F
    INTEGER, INTENT(OUT) :: hdferr  ! Error code
!*****
    INTERFACE
       INTEGER FUNCTION h5tget_order_c(type_id, order)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ORDER_C'::h5tget_order_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: type_id
         INTEGER, INTENT(OUT) :: order
       END FUNCTION h5tget_order_c
    END INTERFACE
    
    hdferr = h5tget_order_c(type_id, order)
  END SUBROUTINE h5tget_order_f
!
!****s* H5T/h5tset_order_f
!
! NAME
!  h5tset_order_f
!
! PURPOSE
!  Sets the byte ordering of an atomic datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  order 	 - datatype byte order Possible values are:
!                    H5T_ORDER_LE_F
!                    H5T_ORDER_BE_F
!                    H5T_ORDER_VAX_F (not implemented yet)
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tset_order_f(type_id, order, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
    INTEGER, INTENT(IN) :: order   ! Datatype byte order, possible values
                                   ! are:
                                   ! H5T_ORDER_LE_F
                                   ! H5T_ORDER_BE_F
                                   ! H5T_ORDER_VAX_F
    INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
    INTERFACE
       INTEGER FUNCTION h5tset_order_c(type_id, order)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_ORDER_C'::h5tset_order_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: type_id
         INTEGER, INTENT(IN) :: order
       END FUNCTION h5tset_order_c
    END INTERFACE
    
    hdferr = h5tset_order_c(type_id, order)
  END SUBROUTINE h5tset_order_f

!
!****s* H5T/h5tget_precision_f
!
! NAME
!  h5tget_precision_f
!
! PURPOSE
!  Returns the precision of an atomic datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  precision 	 - precision of the datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_precision_f(type_id, precision, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(OUT) :: precision ! Datatype precision
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_precision_c (type_id, precision)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PRECISION_C'::h5tget_precision_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(OUT) :: precision
              END FUNCTION h5tget_precision_c
            END INTERFACE

            hdferr = h5tget_precision_c(type_id, precision)
          END SUBROUTINE h5tget_precision_f

!
!****s* H5T/h5tset_precision_f
!
! NAME
!  h5tset_precision_f
!
! PURPOSE
!  Sets the precision of an atomic datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  precision 	 - datatype precision
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tset_precision_f(type_id, precision, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(IN) :: precision ! Datatype precision
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_precision_c (type_id, precision)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PRECISION_C'::h5tset_precision_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(IN) :: precision
              END FUNCTION h5tset_precision_c
            END INTERFACE

            hdferr = h5tset_precision_c(type_id, precision)
          END SUBROUTINE h5tset_precision_f

!
!****s* H5T/h5tget_offset_f
!
! NAME
!  h5tget_offset_f
!
! PURPOSE
!  Retrieves the bit offset of the first significant bit.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  offset 	 - offset value
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_offset_f(type_id, offset, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(OUT) :: offset ! Datatype bit offset of the
                                           ! first significant bit
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_offset_c(type_id, offset)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_OFFSET_C'::h5tget_offset_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(OUT) :: offset
              END FUNCTION h5tget_offset_c
            END INTERFACE

            hdferr = h5tget_offset_c(type_id, offset)
          END SUBROUTINE h5tget_offset_f

!
!****s* H5T/h5tset_offset_f
!
! NAME
!  h5tset_offset_f
!
! PURPOSE
!  Sets the bit offset of the first significant bit.
!
! INPUTS
!  type_id 	 - datatype identifier
!  offset 	 - offset value
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tset_offset_f(type_id, offset, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(IN) :: offset ! Datatype bit offset of the
                                           ! first significant bit
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_offset_c(type_id, offset)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_OFFSET_C'::h5tset_offset_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(IN) :: offset
              END FUNCTION h5tset_offset_c
            END INTERFACE

            hdferr = h5tset_offset_c(type_id, offset)
          END SUBROUTINE h5tset_offset_f

!
!****s* H5T/h5tget_pad_f
!
! NAME
!  h5tget_pad_f
!
! PURPOSE
!  Retrieves the padding type of the least and
!  most 	 -significant bit padding.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  lsbpad 	 - least-significant bit padding type
!  msbpad 	 - most-significant bit padding type
!                  Possible values of padding type are:
!                    H5T_PAD_ERROR_F      = -1
!                    H5T_PAD_ZERO_F = 0
!                    H5T_PAD_ONE_F = 1
!                    H5T_PAD_BACKGROUND_F = 2
!                    H5T_PAD_NPAD_F      = 3
!  hdferr 	 - Returns 0 if successful and -1 if fails

!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_pad_f(type_id, lsbpad, msbpad, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: lsbpad ! padding type of the
                                           ! least significant bit
            INTEGER, INTENT(OUT) :: msbpad ! padding type of the
                                           ! most significant bit
                                           ! Possible values of padding type are:
                                           ! H5T__PAD_ZERO_F = 0
                                           ! H5T__PAD_ONE_F = 1
                                           ! H5T__PAD_BACKGROUND_F = 2
                                           ! H5T_PAD_ERROR_F      = -1
                                           ! H5T_PAD_NPAD_F      = 3

            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_pad_c(type_id, lsbpad, msbpad)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_PAD_C'::h5tget_pad_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: lsbpad
              INTEGER, INTENT(OUT) :: msbpad
              END FUNCTION h5tget_pad_c
            END INTERFACE

            hdferr = h5tget_pad_c(type_id, lsbpad, msbpad)
          END SUBROUTINE h5tget_pad_f

!
!****s* H5T/h5tset_pad_f
!
! NAME
!  h5tset_pad_f
!
! PURPOSE
!  Sets the least and most-significant bits padding types.
!
! INPUTS
!  type_id 	 - datatype identifier
!  lsbpad 	 - least-significant bit padding type
!  msbpad 	 - most-significant bit padding type
!                  Possible values of padding type are:
!                    H5T_PAD_ERROR_F      = -1
!                    H5T_PAD_ZERO_F = 0
!                    H5T_PAD_ONE_F = 1
!                    H5T_PAD_BACKGROUND_F = 2
!                    H5T_PAD_NPAD_F      = 3
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_pad_f(type_id, lsbpad, msbpad, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: lsbpad ! padding type of the
                                           ! least significant bit
            INTEGER, INTENT(IN) :: msbpad ! padding type of the
                                           ! most significant bit
                                           ! Possible values of padding type are:
                                           ! H5T_PAD_ZERO_F = 0
                                           ! H5T_PAD_ONE_F = 1
                                           ! H5T_PAD_BACKGROUND_F = 2
                                           ! H5T_PAD_ERROR_F      = -1
                                           ! H5T_PAD_NPAD_F      = 3
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_pad_c(type_id, lsbpad, msbpad)
              USE H5GLOBAL
              INTEGER(HID_T), INTENT(IN) :: type_id
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_PAD_C'::h5tset_pad_c
              !DEC$ENDIF
              INTEGER, INTENT(IN) :: lsbpad
              INTEGER, INTENT(IN) :: msbpad
              END FUNCTION h5tset_pad_c
            END INTERFACE

            hdferr = h5tset_pad_c(type_id, lsbpad, msbpad)
          END SUBROUTINE h5tset_pad_f

!
!****s* H5T/h5tget_sign_f
!
! NAME
!  h5tget_sign_f
!
! PURPOSE
!  Retrieves the sign type for an integer type.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  sign 	 - sign type
!                  Possible values are:
!                    - Unsigned integer type 
!                        H5T_SGN_NONE_F = 0
!                    - Two's complement signed integer type
!                        H5T_SGN_2_F = 1
!                    - error value: H5T_SGN_ERROR_F=-1
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_sign_f(type_id, sign, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: sign ! sign type for an integer type
                                         !possible values are:
                                         !Unsigned integer type H5T_SGN_NONE_F = 0
                                         !Two's complement signed integer type
                                         !H5T_SGN_2_F = 1
                                         !or error value: H5T_SGN_ERROR_F=-1
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_sign_c(type_id, sign)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SIGN_C'::h5tget_sign_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: sign
              END FUNCTION h5tget_sign_c
            END INTERFACE

            hdferr = h5tget_sign_c(type_id, sign)
          END SUBROUTINE h5tget_sign_f

!
!****s* H5T/h5tset_sign_f
!
! NAME
!  h5tset_sign_f
!
! PURPOSE
!  Sets the sign proprety for an integer type.
!
! INPUTS
!  type_id 	 - datatype identifier
!  sign 	 - sign type
!                  Possible values are:
!                    - Unsigned integer type 
!                        H5T_SGN_NONE_F = 0
!                    - Two's complement signed integer type
!                        H5T_SGN_2_F = 1
!                    - error value: H5T_SGN_ERROR_F=-1
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_sign_f(type_id, sign, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: sign !sign type for an integer type
                                         !possible values are:
                                         !Unsigned integer type H5T_SGN_NONE_F = 0
                                         !Two's complement signed integer type
                                         !H5T_SGN_2_F = 1
                                         !or error value: H5T_SGN_ERROR_F=-1
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tset_sign_c(type_id, sign)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_SIGN_C'::h5tset_sign_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: sign
              END FUNCTION h5tset_sign_c
            END INTERFACE

            hdferr = h5tset_sign_c(type_id, sign)
          END SUBROUTINE h5tset_sign_f

!
!****s* H5T/h5tget_fields_f
!
! NAME
!  h5tget_fields_f
!
! PURPOSE
!  Retrieves floating point datatype bit field information.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  spos 	 - sign bit-position
!  epos 	 - exponent bit-position
!  esize 	 - size of exponent in bits
!  mpos 	 - mantissa position
!  msize 	 - size of mantissa in bits
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(OUT) :: spos   ! sign bit-position
            INTEGER(SIZE_T), INTENT(OUT) :: epos   ! exponent bit-position
            INTEGER(SIZE_T), INTENT(OUT) :: esize  ! size of exponent in bits
            INTEGER(SIZE_T), INTENT(OUT) :: mpos   ! mantissa bit-position
            INTEGER(SIZE_T), INTENT(OUT) :: msize  ! size of mantissa in bits
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_fields_c(type_id, spos, epos, esize, mpos, msize)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_FIELDS_C'::h5tget_fields_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(OUT) :: spos
              INTEGER(SIZE_T), INTENT(OUT) :: epos
              INTEGER(SIZE_T), INTENT(OUT) :: esize
              INTEGER(SIZE_T), INTENT(OUT) :: mpos
              INTEGER(SIZE_T), INTENT(OUT) :: msize
              END FUNCTION h5tget_fields_c
            END INTERFACE

            hdferr = h5tget_fields_c(type_id, spos, epos, esize, mpos, msize)
          END SUBROUTINE h5tget_fields_f

!
!****s* H5T/h5tset_fields_f
!
! NAME
!  h5tset_fields_f
!
! PURPOSE
!  Sets locations and sizes of floating point bit fields.
!
! INPUTS
!  type_id 	 - datatype identifier
!  spos 	 - sign bit-position
!  epos 	 - exponent bit-position
!  esize 	 - size of exponent in bits
!  mpos 	 - mantissa position
!  msize 	 - size of mantissa in bits
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_fields_f(type_id, spos, epos, esize, mpos, msize, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(IN) :: spos   ! sign bit-position
            INTEGER(SIZE_T), INTENT(IN) :: epos   ! exponent bit-position
            INTEGER(SIZE_T), INTENT(IN) :: esize  ! size of exponent in bits
            INTEGER(SIZE_T), INTENT(IN) :: mpos   ! mantissa bit-position
            INTEGER(SIZE_T), INTENT(IN) :: msize  ! size of mantissa in bits
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tset_fields_c(type_id, spos, epos, esize, mpos, msize)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_FIELDS_C'::h5tset_fields_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(IN) :: spos
              INTEGER(SIZE_T), INTENT(IN) :: epos
              INTEGER(SIZE_T), INTENT(IN) :: esize
              INTEGER(SIZE_T), INTENT(IN) :: mpos
              INTEGER(SIZE_T), INTENT(IN) :: msize
              END FUNCTION h5tset_fields_c
            END INTERFACE

            hdferr = h5tset_fields_c(type_id, spos, epos, esize, mpos, msize)
          END SUBROUTINE h5tset_fields_f

!
!****s* H5T/h5tget_ebias_f
!
! NAME
!  h5tget_ebias_f
!
! PURPOSE
!  Retrieves the exponent bias of a floating-point type.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  ebias 	 - datatype exponent bias
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_ebias_f(type_id, ebias, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(OUT) :: ebias ! Datatype exponent bias of a floating-point type
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_ebias_c(type_id, ebias)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_EBIAS_C'::h5tget_ebias_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(OUT) :: ebias
              END FUNCTION h5tget_ebias_c
            END INTERFACE

            hdferr = h5tget_ebias_c(type_id, ebias)
          END SUBROUTINE h5tget_ebias_f

!
!****s* H5T/h5tset_ebias_f
!
! NAME
!  h5tset_ebias_f
!
! PURPOSE
!  Sets the exponent bias of a floating-point type.
!
! INPUTS
!  type_id 	 - datatype identifier
!  ebias 	 - datatype exponent bias
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_ebias_f(type_id, ebias, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER(SIZE_T), INTENT(IN) :: ebias !Datatype exponent bias of a floating-point type
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tset_ebias_c(type_id, ebias)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_EBIAS_C'::h5tset_ebias_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(SIZE_T), INTENT(IN) :: ebias
              END FUNCTION h5tset_ebias_c
            END INTERFACE

            hdferr = h5tset_ebias_c(type_id, ebias)
          END SUBROUTINE h5tset_ebias_f

!
!****s* H5T/h5tget_norm_f
!
! NAME
!  h5tget_norm_f
!
! PURPOSE
!  Retrieves mantissa normalization of a floating-point
!  datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  norm 	 - normalization types, valid values are:
!                    H5T_NORM_IMPLIED_F(0)
!                    H5T_NORM_MSBSET_F(1)
!                    H5T_NORM_NONE_F(2)
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_norm_f(type_id, norm, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: norm !mantissa normalization of a floating-point datatype
                                         !Valid normalization types are:
                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
                                         !Mantissa is not normalize
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_norm_c(type_id, norm)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NORM_C'::h5tget_norm_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: norm
              END FUNCTION h5tget_norm_c
            END INTERFACE

            hdferr = h5tget_norm_c(type_id, norm)
          END SUBROUTINE h5tget_norm_f

!
!****s* H5T/h5tset_norm_f
!
! NAME
!  h5tset_norm_f
!
! PURPOSE
!  Sets the mantissa normalization of a floating-point datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  norm 	 - normalization types, valid values are:
!                    H5T_NORM_IMPLIED_F(0)
!                    H5T_NORM_MSBSET_F(1)
!                    H5T_NORM_NONE_F(2)
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tset_norm_f(type_id, norm, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: norm !mantissa normalization of a floating-point datatype
                                         !Valid normalization types are:
                                         !H5T_NORM_IMPLIED_F(0),MSB of mantissa is not
                                         !stored, always 1,  H5T_NORM_MSBSET_F(1), MSB of
                                         !mantissa is always 1, H5T_NORM_NONE_F(2)
                                         !Mantissa is not normalize
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_norm_c(type_id, norm)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_NORM_C'::h5tset_norm_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: norm
              END FUNCTION h5tset_norm_c
            END INTERFACE

            hdferr = h5tset_norm_c(type_id, norm)
          END SUBROUTINE h5tset_norm_f

!
!****s* H5T/h5tget_inpad_f
!
! NAME
!  h5tget_inpad_f
!
! PURPOSE
!  Retrieves the internal padding type for unused bits
!  in floating-point datatypes.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  padtype 	 - padding type for unused bits
!                  Possible values of padding type are:
!                    H5T_PAD_ZERO_F = 0
!                    H5T_PAD_ONE_F = 1
!                    H5T_PAD_BACKGROUND_F = 2
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_inpad_f(type_id, padtype, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: padtype ! padding type for unused bits
                                            ! in floating-point datatypes.
                                            ! Possible values of padding type are:
                                            ! H5T__PAD_ZERO_F = 0
                                            ! H5T__PAD_ONE_F = 1
                                            ! H5T__PAD_BACKGROUND_F = 2

            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_inpad_c(type_id, padtype)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_INPAD_C'::h5tget_inpad_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: padtype
              END FUNCTION h5tget_inpad_c
            END INTERFACE

            hdferr = h5tget_inpad_c(type_id, padtype)
          END SUBROUTINE h5tget_inpad_f

!
!****s* H5T/h5tset_inpad_f
!
! NAME
!  h5tset_inpad_f
!
! PURPOSE
!  Fills unused internal floating point bits.
!
! INPUTS
!  type_id 	 - datatype identifier
!  padtype 	 - padding type for unused bits
!                  Possible values of padding type are:
!                    H5T_PAD_ZERO_F = 0
!                    H5T_PAD_ONE_F = 1
!                    H5T_PAD_BACKGROUND_F = 2
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_inpad_f(type_id, padtype, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: padtype ! padding type for unused bits
                                           ! in floating-point datatypes.
                                           ! Possible values of padding type are:
                                           ! H5T__PAD_ZERO_F = 0
                                           ! H5T__PAD_ONE_F = 1
                                           ! H5T__PAD_BACKGROUND_F = 2
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_inpad_c(type_id, padtype)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_INPAD_C'::h5tset_inpad_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: padtype
              END FUNCTION h5tset_inpad_c
            END INTERFACE

            hdferr = h5tset_inpad_c(type_id, padtype)
          END SUBROUTINE h5tset_inpad_f

!
!****s* H5T/h5tget_cset_f
!
! NAME
!  h5tget_cset_f
!
! PURPOSE
!  Retrieves the character set type of a string datatype.
!
! INPUTS
!  type_id  - Datatype identifier
! OUTPUTS
!  cset     - Character set type of a string datatype
!              Possible values are:
!              H5T_CSET_ASCII_F = 0
!              H5T_CSET_UTF8_F
!  hdferr   - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_cset_f(type_id, cset, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: cset   ! character set type of a string datatype
                                           !  Possible values are:
                                           !  H5T_CSET_ASCII_F = 0
                                           !  H5T_CSET_UTF8_F
            INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_cset_c(type_id, cset)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CSET_C'::h5tget_cset_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: cset
              END FUNCTION h5tget_cset_c
            END INTERFACE

            hdferr = h5tget_cset_c(type_id, cset)
          END SUBROUTINE h5tget_cset_f

!
!****s* H5T/h5tset_cset_f
!
! NAME
!  h5tset_cset_f
!
! PURPOSE
!  Sets character set to be used.
!
! INPUTS
!  type_id 	 - datatype identifier
!  cset 	 - character set type of a string datatype
!                    Possible values are:
!                     H5T_CSET_ASCII_F = 0
!                     H5T_CSET_UTF8_F
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_cset_f(type_id, cset, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: cset !character set type of a string datatype
                                           ! Possible values of padding type are:
                                           ! H5T_CSET_ASCII_F = 0
                                           ! H5T_CSET_UTF8_F
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_cset_c(type_id, cset)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_CSET_C'::h5tset_cset_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: cset
              END FUNCTION h5tset_cset_c
            END INTERFACE

            hdferr = h5tset_cset_c(type_id, cset)
          END SUBROUTINE h5tset_cset_f

!
!****s* H5T/h5tget_strpad_f
!
! NAME
!  h5tget_strpad_f
!
! PURPOSE
!  Retrieves the storage mechanism for a string datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  strpad 	 - storage method for a string datatype
!                  Possible values are:
!                    H5T_STR_NULLTERM_F,
!                    H5T_STR_NULLPAD_F,
!                    H5T_STR_SPACEPAD_F
!                    H5T_STR_ERROR_F
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_strpad_f(type_id, strpad, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: strpad
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_strpad_c(type_id, strpad)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_STRPAD_C'::h5tget_strpad_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: strpad
              END FUNCTION h5tget_strpad_c
            END INTERFACE

            hdferr = h5tget_strpad_c(type_id, strpad)
          END SUBROUTINE h5tget_strpad_f

!
!****s* H5T/h5tset_strpad_f
!
! NAME
!  h5tset_strpad_f
!
! PURPOSE
!  Defines the storage mechanism for character strings.
!
! INPUTS
!  type_id 	 - datatype identifier
!  strpad 	 - storage method for a string datatype
!                  Possible values are:
!                    H5T_STR_NULLTERM_F,
!                    H5T_STR_NULLPAD_F,
!                    H5T_STR_SPACEPAD_F
!                    H5T_STR_ERROR_F
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_strpad_f(type_id, strpad, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: strpad ! string padding method for a string datatype
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tset_strpad_c(type_id, strpad)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_STRPAD_C'::h5tset_strpad_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: strpad
              END FUNCTION h5tset_strpad_c
            END INTERFACE

            hdferr = h5tset_strpad_c(type_id, strpad)
          END SUBROUTINE h5tset_strpad_f

!
!****s* H5T/h5tget_nmembers_f
!
! NAME
!  h5tget_nmembers_f
!
! PURPOSE
!  Retrieves the number of fields in a compound datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  num_members 	 - number of members
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tget_nmembers_f(type_id, num_members, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: num_members !number of fields in a compound datatype
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_nmembers_c(type_id, num_members)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NMEMBERS_C'::h5tget_nmembers_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) :: num_members
              END FUNCTION h5tget_nmembers_c
            END INTERFACE

            hdferr = h5tget_nmembers_c(type_id, num_members)
          END SUBROUTINE h5tget_nmembers_f

!
!****s* H5T/h5tget_member_name_f
!
! NAME
!  h5tget_member_name_f
!
! PURPOSE
!  Retrieves the name of a field of a compound datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  index 	 - filed index (0-based)
! OUTPUTS
!  member_name 	 - buffer to hold member's name
!  namelen 	 - name length
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_member_name_f(type_id, index, member_name,  namelen, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: index !Field index (0-based) of the field name to retrieve
            CHARACTER(LEN=*), INTENT(OUT) :: member_name !name of a field of
                                                         !a compound datatype
            INTEGER, INTENT(OUT) :: namelen ! Length of the name
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_member_name_c(type_id, index, member_name, namelen)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_NAME_C'::h5tget_member_name_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: member_name
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: index
              CHARACTER(LEN=*), INTENT(OUT) :: member_name
              INTEGER, INTENT(OUT) :: namelen
              END FUNCTION
            END INTERFACE

            hdferr = h5tget_member_name_c(type_id, index, member_name, namelen)
          END SUBROUTINE h5tget_member_name_f

!
!****s* H5T/h5tget_member_offset_f
!
! NAME
!  h5tget_member_offset_f
!
! PURPOSE
!  Retrieves the offset of a field of a compound datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  member_no 	 - number of the field
! OUTPUTS
!  offset 	 - byte offset of the requested field
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_member_offset_f(type_id, member_no, offset, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: member_no !Number of the field
                                                       !whose offset is requested
            INTEGER(SIZE_T), INTENT(OUT) :: offset !byte offset of the beginning of the field
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_member_offset_c(type_id, member_no, offset )
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_OFFSET_C'::h5tget_member_offset_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: member_no
              INTEGER(SIZE_T), INTENT(OUT) :: offset
              END FUNCTION h5tget_member_offset_c
            END INTERFACE

            hdferr = h5tget_member_offset_c(type_id, member_no, offset )
          END SUBROUTINE h5tget_member_offset_f
!
!****s* H5T/h5tget_member_index_f
!
! NAME
!  h5tget_member_index_f
!
! PURPOSE
!  Retrieves the index of a compound or enumeration datatype member.
!
! INPUTS
!  type_id 	 - datatype identifier
!  name 	 - name of the field or member whose index to
!  to be retrieved from the datatype.
! OUTPUTS
!  index 	 - 0-based index of the filed or member (0 to N-1)
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  September 26, 2002
!
! SOURCE
  SUBROUTINE h5tget_member_index_f(type_id, name, index, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
            CHARACTER(LEN=*), INTENT(IN) :: name   ! Field or member name
            INTEGER, INTENT(OUT) :: index          ! Field or member index
            INTEGER, INTENT(OUT) :: hdferr          ! Error code
!*****
            INTEGER :: namelen          ! Name length

            INTERFACE
              INTEGER FUNCTION h5tget_member_index_c(type_id, name, namelen, index)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_INDEX_C'::h5tget_member_index_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference ::name
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(IN) :: name
              INTEGER, INTENT(IN)  :: namelen
              INTEGER, INTENT(OUT) :: index
              END FUNCTION h5tget_member_index_c
            END INTERFACE

            namelen = LEN(name)
            hdferr = h5tget_member_index_c(type_id, name, namelen, index)
          END SUBROUTINE h5tget_member_index_f


!  !$!
!  !$!****s* H5T/h5tget_member_dim_f
!  !$!
!  !$! NAME
!  !$!		h5tget_member_dim_f
!  !$!
!  !$! PURPOSE
!  !$! 	This function is not supported in hdf5-1.4.*
!  !$!
!  !$! INPUTS
!  !$! OUTPUTS
!  !$!		hdferr:		- error code
!  !$!				 	Success:  0
!  !$!				 	Failure: -1
!  !$!
!  !$! AUTHOR
!  !$!	Elena Pourmal
!  !$!		August 12, 1999
!  !$!
!  !$! HISTORY
!  !$! 	Explicit Fortran interfaces were added for
!  !$!			called C functions (it is needed for Windows
!  !$!			port).  March 7, 2001
!  !$!
!  !$! SOURCE
!  !$!  SUBROUTINE h5tget_member_dims_f(type_id, field_idx,dims, field_dims, perm, hdferr)
!  !$!
!  !$!            IMPLICIT NONE
!  !$!            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
!  !$!            INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of
!  !$!                                             !field_dims, perm)
!  !$!            INTEGER, INTENT(OUT) :: dims     !number of dimensions of the field
!  !$!
!  !$!            INTEGER(SIZE_T),DIMENSION(*), INTENT(OUT) ::  field_dims !buffer to store the
!  !$!                                                                      !dimensions of the field
!  !$!            INTEGER, DIMENSION(*), INTENT(OUT)  ::  perm  !buffer to store the
!  !$!                                                                   !permutation vector of the field
!  !$!            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!  !$!*****!
!  !$! INTEGER, EXTERNAL :: h5tget_member_dims_c
!  !$!            hdferr = h5tget_member_dims_c(type_id, field_idx, dims, field_dims, perm)
!  !$!
!  !$!          END SUBROUTINE h5tget_member_dims_f


!****s* H5T/h5tget_array_dims_f
!
! NAME
!  h5tget_array_dims_f
!
! PURPOSE
!  Returns sizes of array dimensions.
!
! INPUTS
!  type_id 	 - array datatype identifier
! OUTPUTS
!  dims 	 - buffer to store array datatype dimensions
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_array_dims_f(type_id, dims, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
            INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) ::  dims !buffer to store array datatype
                                                                ! dimensions
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_array_dims_c(type_id, dims)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_DIMS_C'::h5tget_array_dims_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(HSIZE_T),DIMENSION(*), INTENT(OUT) ::  dims
              END FUNCTION h5tget_array_dims_c
            END INTERFACE

            hdferr = h5tget_array_dims_c(type_id, dims)

          END SUBROUTINE h5tget_array_dims_f

!
!****s* H5T/h5tget_array_ndims_f
!
! NAME
!  h5tget_array_ndims_f
!
! PURPOSE
!  Returns the rank of an array datatype.
!
! INPUTS
!  type_id 	 - array datatype identifier
! OUTPUTS
!  ndims 	 - number of array dimensions
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_array_ndims_f(type_id, ndims, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Array datatype identifier
            INTEGER, INTENT(OUT) ::  ndims ! number of array dimensions
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_array_ndims_c(type_id, ndims)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_ARRAY_NDIMS_C'::h5tget_array_ndims_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(OUT) ::  ndims
              END FUNCTION h5tget_array_ndims_c
            END INTERFACE

            hdferr = h5tget_array_ndims_c(type_id, ndims)

          END SUBROUTINE h5tget_array_ndims_f

!
!****s* H5T/h5tget_super_f
!
! NAME
!  h5tget_super_f
!
! PURPOSE
!  Returns the base datatype from which a datatype is derived.
!
! INPUTS
!  type_id 	 - datatype identifier
! OUTPUTS
!  base_type_id 	 - identifier of the base type
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_super_f(type_id, base_type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! datatype identifier
            INTEGER(HID_T), INTENT(OUT) :: base_type_id ! identifier of the datatype
                                           ! from which datatype (type_id) was derived
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_super_c(type_id, base_type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_SUPER_C'::h5tget_super_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER(HID_T), INTENT(OUT) :: base_type_id
              END FUNCTION h5tget_super_c
            END INTERFACE

            hdferr = h5tget_super_c(type_id, base_type_id)

          END SUBROUTINE h5tget_super_f

!
!****s* H5T/h5tget_member_type_f
!
! NAME
!  h5tget_member_type_f
!
! PURPOSE
!  Returns the datatype of the specified member.
!
! INPUTS
!  type_id 	 - compound datatype identifier
!  field_idx 	 - field index (0-based)
!
! OUTPUTS
!  datatype 	 - idnetifier of the member's datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_member_type_f(type_id,  field_idx, datatype, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: field_idx !Field index (0-based) of the field type to retrieve
            INTEGER(HID_T), INTENT(OUT) :: datatype !identifier of a copy of
                                                    !the datatype of the field
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_member_type_c(type_id, field_idx , datatype)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_TYPE_C'::h5tget_member_type_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: field_idx
              INTEGER(HID_T), INTENT(OUT) :: datatype
              END FUNCTION h5tget_member_type_c
            END INTERFACE

            hdferr = h5tget_member_type_c(type_id, field_idx , datatype)
          END SUBROUTINE h5tget_member_type_f

!
!****s* H5T/h5tcreate_f
!
! NAME
!  h5tcreate_f
!
! PURPOSE
!  Creates a new datatype.
!
! INPUTS
!  class   - Datatype class can be one of:
!             H5T_COMPOUND_F
!             H5T_ENUM_F
!             H5T_OPAQUE_F
!             H5T_STRING_F
!
!  size    - Size of the datatype.
! OUTPUTS
!  type_id - Datatype identifier.
!  hdferr  - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tcreate_f(class, size, type_id, hdferr)
    IMPLICIT NONE
    INTEGER        , INTENT(IN)  :: class
    INTEGER(SIZE_T), INTENT(IN)  :: size
    INTEGER(HID_T) , INTENT(OUT) :: type_id
    INTEGER        , INTENT(OUT) :: hdferr
!*****
    INTERFACE
       INTEGER FUNCTION h5tcreate_c(class, size, type_id)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCREATE_C'::h5tcreate_c
         !DEC$ENDIF
         INTEGER, INTENT(IN) :: class
         INTEGER(SIZE_T), INTENT(IN) :: size
         INTEGER(HID_T), INTENT(OUT) :: type_id
       END FUNCTION h5tcreate_c
    END INTERFACE

    hdferr = h5tcreate_c(class, size, type_id)
  END SUBROUTINE h5tcreate_f

!
!****s* H5T/h5tinsert_f
!
! NAME
!  h5tinsert_f
!
! PURPOSE
!  Adds a new member to a compound datatype.
!
! INPUTS
!  type_id 	 - compound dattype identifier
!  name 	 - name of the field to insert
!  offset 	 - start of the member in an instance of
!                  the compound datatype
!  field_id 	 - datatype identifier of the field to insert
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tinsert_f(type_id,  name, offset, field_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            CHARACTER(LEN=*), INTENT(IN) :: name !Name of the field to insert
            INTEGER(SIZE_T), INTENT(IN) :: offset !start of the member in an instance of
                                                   !the compound datatype
            INTEGER(HID_T), INTENT(IN) :: field_id !datatype identifier of the new member

            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTEGER :: namelen

            INTERFACE
              INTEGER FUNCTION h5tinsert_c(type_id, name, namelen, offset, field_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TINSERT_C'::h5tinsert_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: name
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(IN) :: name
              INTEGER(SIZE_T), INTENT(IN) :: offset
              INTEGER(HID_T), INTENT(IN) :: field_id
              INTEGER :: namelen
              END FUNCTION h5tinsert_c
            END INTERFACE

            namelen = LEN(name)
            hdferr = h5tinsert_c(type_id, name, namelen, offset, field_id )
          END SUBROUTINE h5tinsert_f

!
!****s* H5T/h5tpack_f
!
! NAME
!  h5tpack_f
!
! PURPOSE
!  Recursively removes padding from within a compound datatype.
!
! INPUTS
!  type_id 	 - compound datatype identifier
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tpack_f(type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tpack_c(type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TPACK_C'::h5tpack_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              END FUNCTION h5tpack_c
            END INTERFACE

            hdferr = h5tpack_c(type_id)
          END SUBROUTINE h5tpack_f

!  !$!
!  !$!****s* H5T/h5tinsert_array_f
!  !$!
!  !$! NAME
!  !$!		h5tinsert_array_f
!  !$!
!  !$! PURPOSE
!  !$! 	This function is not available on hdf5-1.4.*
!  !$!
!  !$! INPUTS
!  !$! OUTPUTS
!  !$!		hdferr:		- error code
!  !$!				 	Success:  0
!  !$!				 	Failure: -1
!  !$!
!  !$! AUTHOR
!  !$!	Elena Pourmal
!  !$!		August 12, 1999
!  !$!
!  !$! HISTORY
!  !$! 	Explicit Fortran interfaces were added for
!  !$!			called C functions (it is needed for Windows
!  !$!			port).  March 7, 2001
!  !$! SOURCE
!  SUBROUTINE h5tinsert_array_f(parent_id,name,offset, ndims, dims, member_id, hdferr, perm)
!  IMPLICIT NONE
!  INTEGER(HID_T), INTENT(IN) :: parent_id ! identifier of the parent compound datatype
!  CHARACTER(LEN=*), INTENT(IN) :: name !Name of the new member
!  INTEGER(SIZE_T), INTENT(IN) :: offset !Offset to start of new member
!  !within compound datatype
!  INTEGER, INTENT(IN) ::  ndims !Dimensionality of new member.
!  !Valid values are 0 (zero) through 4 (four)
!  INTEGER(SIZE_T), DIMENSION(*), INTENT(IN) :: dims !Size of new member array
!  INTEGER(HID_T), INTENT(IN) :: member_id ! identifier of the datatype of the new member
!  INTEGER, INTENT(OUT) :: hdferr        ! Error code
!  !*****!
!  INTEGER, DIMENSION(*), OPTIONAL, INTENT(IN) :: perm
!  !Pointer to buffer to store
!  !the permutation vector of the field
!  INTEGER :: namelen, sizeofperm
!  INTEGER, EXTERNAL :: h5tinsert_array_c,  h5tinsert_array_c2
!  namelen = LEN(name)
!  if (present(perm)) then
!  hdferr = h5tinsert_array_c(parent_id, name, namelen, offset, ndims,dims, member_id, perm)
!  else
!  hdferr = h5tinsert_array_c2(parent_id, name, namelen, offset, ndims,dims, member_id)
!  end if
!
!  END SUBROUTINE h5tinsert_array_f

!
!****s* H5T/h5tarray_create_f
!
! NAME
!  h5tarray_create_f
!
! PURPOSE
!  Creates an array datatype object.
!
! INPUTS
!  base_id 	 - datatype identifier for the array
!                  base datatype
!  rank 	 - rank of the array
!  dims 	 - array dimension sizes
! OUTPUTS
!  type_id 	 - array datatype identifier
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tarray_create_f(base_id, rank, dims, type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: base_id ! identifier of array base datatype
            INTEGER, INTENT(IN) ::  rank ! Rank of the array
            INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims !Sizes of each array dimension
            INTEGER(HID_T), INTENT(OUT) :: type_id ! identifier of the array datatype
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tarray_create_c(base_id, rank, dims, type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TARRAY_CREATE_C'::h5tarray_create_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: base_id
              INTEGER, INTENT(IN) ::  rank
              INTEGER(HSIZE_T), DIMENSION(*), INTENT(IN) :: dims
              INTEGER(HID_T), INTENT(OUT) :: type_id
              END FUNCTION h5tarray_create_c
            END INTERFACE

            hdferr = h5tarray_create_c(base_id, rank, dims, type_id)

         END SUBROUTINE h5tarray_create_f

!
!****s* H5T/h5tenum_create_f
!
! NAME
!  h5tenum_create_f
!
! PURPOSE
!  Creates a new enumeration datatype.
!
! INPUTS
!  parent_id 	 - datatype identifier for base datatype
! OUTPUTS
!  new_type_id 	 - datatype identifier for the enumeration datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tenum_create_f(parent_id, new_type_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: parent_id  ! Datatype identifier for
                                                     ! the  base datatype
            INTEGER(HID_T), INTENT(OUT) :: new_type_id
                                                     !datatype identifier for the
                                                     ! new enumeration datatype
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tenum_create_c(parent_id, new_type_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_CREATE_C'::h5tenum_create_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: parent_id
              INTEGER(HID_T), INTENT(OUT) :: new_type_id
              END FUNCTION h5tenum_create_c
            END INTERFACE

            hdferr = h5tenum_create_c(parent_id, new_type_id)
          END SUBROUTINE h5tenum_create_f
!
!****s* H5T/h5tenum_nameof_f
!
! NAME
!  h5tenum_nameof_f
!
! PURPOSE
!  Returns the symbol name corresponding to a specified
!  member of an enumeration datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  value 	 - value of the enumeration datatype
!  namelen 	 - name buffer size
! OUTPUTS
!  name 	 - buffer to hold symbol name
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! NOTE
!   According to the standard: Because an INTENT(OUT) variable is considered undefined 
!   on entry to the procedure, any default initialization specified for its type will 
!   be applied. So we need to blank out the "name" to be portable and eliminate any 
!   characters the "name' may contain upon entry, depending on compiler implementation.
! SOURCE
  SUBROUTINE h5tenum_nameof_f(type_id,  value, namelen, name, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            CHARACTER(LEN=*), INTENT(OUT) :: name  !Name of the  enumeration datatype.
            INTEGER(SIZE_T), INTENT(IN) :: namelen !length of the name
            INTEGER, INTENT(IN) :: value !value of the  enumeration datatype.
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tenum_nameof_c(type_id, value, name, namelen)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_NAMEOF_C'::h5tenum_nameof_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: name
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(OUT) :: name
              INTEGER(SIZE_T), INTENT(IN) :: namelen
              INTEGER, INTENT(IN) :: value
              END FUNCTION h5tenum_nameof_c
            END INTERFACE

            name(1:LEN(name)) = ' '

            hdferr = h5tenum_nameof_c(type_id, value, name, namelen)
          END SUBROUTINE h5tenum_nameof_f

!
!****s* H5T/h5tenum_valuof_f
!
! NAME
!  h5tenum_valuof_f
!
! PURPOSE
!  Returns the value corresponding to a specified
!  member of an enumeration datatype.
!
! INPUTS
!  type_id 	 - datatype identifier
!  name 	 - symbol name
! OUTPUTS
!  value 	 - value of the enumeration datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
!
! SOURCE
  SUBROUTINE h5tenum_valueof_f(type_id,  name, value, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            CHARACTER(LEN=*), INTENT(IN) :: name  !Name of the  enumeration datatype.
            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTEGER :: namelen

            INTERFACE
              INTEGER FUNCTION h5tenum_valueof_c(type_id, name, namelen,  value)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENUM_VALUEOF_C'::h5tenum_valueof_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: name
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(IN) :: name
              INTEGER, INTENT(IN) :: namelen
              INTEGER, INTENT(OUT) :: value
              END FUNCTION h5tenum_valueof_c
            END INTERFACE

            namelen = LEN(name)
            hdferr = h5tenum_valueof_c(type_id, name, namelen,  value)
          END SUBROUTINE h5tenum_valueof_f

!
!****s* H5T/h5tget_member_value_f
!
! NAME
!  h5tget_member_value_f
!
! PURPOSE
!  Returns the value of an enumeration datatype member.
!
! INPUTS
!  type_id 	 - datatype identifier
!  member_no 	 - number of the enumeration datatype member
! OUTPUTS
!  value 	 - value of the enumeration datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_member_value_f(type_id,  member_no, value, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            INTEGER, INTENT(IN) :: member_no !Number of the enumeration datatype member
            INTEGER, INTENT(OUT) :: value !value of the  enumeration datatype.
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****

            INTERFACE
              INTEGER FUNCTION h5tget_member_value_c(type_id, member_no, value)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_VALUE_C'::h5tget_member_value_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN) :: member_no
              INTEGER, INTENT(OUT) :: value
              END FUNCTION
            END INTERFACE

            hdferr = h5tget_member_value_c(type_id, member_no, value)
          END SUBROUTINE h5tget_member_value_f

!
!****s* H5T/h5tset_tag_f
!
! NAME
!  h5tset_tag_f
!
! PURPOSE
!  Tags an opaque datatype.
!
! INPUTS
!  type_id 	 - identifier for opaque datatype
!  tag 	         - unique ASCII string with which the opaque
!                  datatype is to be tagged.
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tset_tag_f(type_id, tag, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            CHARACTER(LEN=*), INTENT(IN) :: tag !Unique ASCII string with which
                                                !the opaque datatype is to be tagged
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTEGER :: taglen

            INTERFACE
              INTEGER FUNCTION h5tset_tag_c(type_id, tag, taglen)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TSET_TAG_C'::h5tset_tag_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: tag
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(IN) :: tag
              INTEGER :: taglen
              END FUNCTION h5tset_tag_c
            END INTERFACE

            taglen = LEN(tag)
            hdferr = h5tset_tag_c(type_id, tag, taglen)
          END SUBROUTINE h5tset_tag_f

!
!****s* H5T/h5tget_tag_f
!
! NAME
!  h5tget_tag_f
!
! PURPOSE
!  Gets the tag associated with an opaque datatype.
!
! INPUTS
!  type_id 	 - identifier for opaque datatype
! OUTPUTS
!  tag 	         - unique ASCII string associated with opaque
!                  datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  August 12, 1999
!
! HISTORY
!  Explicit Fortran interfaces were added for
!  called C functions (it is needed for Windows
!  port).  March 7, 2001
! SOURCE
  SUBROUTINE h5tget_tag_f(type_id, tag,taglen, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id ! Datatype identifier
            CHARACTER(LEN=*), INTENT(OUT) :: tag  ! Unique ASCII string with which
                                                  !  the opaque datatype is to be tagged
            INTEGER, INTENT(OUT) :: taglen        ! Length of tag
            INTEGER(SIZE_T)      :: tag_size      ! Declared character length of tab 
            INTEGER, INTENT(OUT) :: hdferr        ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_tag_c(type_id, tag, tag_size, taglen)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_TAG_C'::h5tget_tag_c
              !DEC$ENDIF
              !DEC$ATTRIBUTES reference :: tag
              INTEGER(HID_T), INTENT(IN) :: type_id
              CHARACTER(LEN=*), INTENT(OUT) :: tag
              INTEGER(SIZE_T), INTENT(IN) :: tag_size
              INTEGER, INTENT(OUT) :: taglen
              END FUNCTION h5tget_tag_c
            END INTERFACE

            tag_size = LEN(tag)

            hdferr = h5tget_tag_c(type_id, tag, tag_size, taglen )
          END SUBROUTINE h5tget_tag_f

!
!****s* H5T/h5tvlen_create_f
!
! NAME
!  h5tvlen_create_f
!
! PURPOSE
!  Creates a new variable-length datatype.
!
! INPUTS
!  type_id 	 - identifier iof base datatype
! OUTPUTS
!  vltype_id 	 - identifier for VL datatype
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  Wednesday, October 23, 2002
!
! NOTES
!  Only basic Fortran base datatypes are supported
!
! SOURCE
  SUBROUTINE h5tvlen_create_f(type_id, vltype_id, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN)  :: type_id    ! Datatype identifier
            INTEGER(HID_T), INTENT(OUT) :: vltype_id  ! VL datatype identifier
            INTEGER, INTENT(OUT) :: hdferr            ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tvlen_create_c(type_id, vltype_id)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TVLEN_CREATE_C'::h5tvlen_create_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN)  :: type_id
              INTEGER(HID_T), INTENT(OUT) :: vltype_id
              END FUNCTION h5tvlen_create_c
            END INTERFACE

            hdferr = h5tvlen_create_c(type_id, vltype_id)
          END SUBROUTINE h5tvlen_create_f

!
!****s* H5T/h5tis_variable_str_f
!
! NAME
!  h5tis_variable_str_f
!
! PURPOSE
!  Determines whether a dattype is a variable string.
!
! INPUTS
!  type_id 	 - datartpe identifier
! OUTPUTS
!  status 	 - flag to indicate if datatype
!                  is a variable string
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  March 12, 2003
!
! SOURCE
  SUBROUTINE h5tis_variable_str_f(type_id, status, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
            LOGICAL, INTENT(OUT) :: status      ! Flag, idicates if datatype
                                                ! is a variable string or not ( TRUE or
                                                ! FALSE)
            INTEGER, INTENT(OUT) :: hdferr      ! Error code
!*****
            INTEGER :: flag                     ! "TRUE/FALSE/ERROR from C"

            INTERFACE
              INTEGER FUNCTION h5tis_variable_str_c(type_id, flag)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TIS_VARIABLE_STR_C'::h5tis_variable_str_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER :: flag
              END FUNCTION h5tis_variable_str_c
            END INTERFACE

            hdferr = h5tis_variable_str_c(type_id, flag)
            status = .TRUE.
            if (flag .EQ. 0) status = .FALSE.

          END SUBROUTINE h5tis_variable_str_f

!
!****s* H5T/h5tget_member_class_f
!
! NAME
!  h5tget_member_class_f
!
! PURPOSE
!  Returns datatype class of compound datatype member.
!
! INPUTS
!  type_id 	 - datartpe identifier
!  member_no 	 - index of compound datatype member
! OUTPUTS
!  class 	 - class type for compound dadtype member
!                  Valid classes:
!                    H5T_NO_CLASS_F (error)
!                    H5T_INTEGER_F
!                    H5T_FLOAT_F
!                    H5T_TIME_F
!                    H5T_STRING_F
!                    H5T_BITFIELD_F
!                    H5T_OPAQUE_F
!                    H5T_COMPOUND_F
!                    H5T_REFERENCE_F
!                    H5T_ENUM_F
!                    H5T_VLEN_F
!                    H5T_ARRAY_F
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  Elena Pourmal
!  April 6, 2005
!
! SOURCE
  SUBROUTINE h5tget_member_class_f(type_id, member_no, class, hdferr)
            IMPLICIT NONE
            INTEGER(HID_T), INTENT(IN) :: type_id  ! Datatype identifier
            INTEGER, INTENT(IN)       :: member_no  ! Member number
            INTEGER, INTENT(OUT)     :: class      ! Member class
            INTEGER, INTENT(OUT) :: hdferr      ! Error code
!*****
            INTERFACE
              INTEGER FUNCTION h5tget_member_class_c(type_id, member_no, class)
              USE H5GLOBAL
              !DEC$IF DEFINED(HDF5F90_WINDOWS)
              !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_MEMBER_CLASS_C'::h5tget_member_class_c
              !DEC$ENDIF
              INTEGER(HID_T), INTENT(IN) :: type_id
              INTEGER, INTENT(IN)       :: member_no
              INTEGER, INTENT(OUT)     :: class
              END FUNCTION h5tget_member_class_c
            END INTERFACE

            hdferr = h5tget_member_class_c(type_id, member_no, class)

          END SUBROUTINE h5tget_member_class_f

!
!****s* H5T/h5tcommit_anon_f
!
! NAME
!  h5tcommit_anon_f
!
! PURPOSE
!  Commits a transient datatype to a file,
!  creating a new named datatype,
!  but does not link it into the file structure.
!
! INPUTS
!  loc_id 	 - A file or group identifier specifying the file
!                  in which the new named datatype is to be created.
!  dtype_id 	 - A datatype identifier.
!
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
! OPTIONAL PARAMETERS
!  tcpl_id 	 - A datatype creation property list identifier.
!                  (H5P_DEFAULT_F for the default property list.)
!  tapl_id 	 - A datatype access property list identifier.
!                  should always be passed as the value H5P_DEFAULT_F.
!
! AUTHOR
!  M. Scot Breitenfeld
!  February 25, 2008
!
! SOURCE
  SUBROUTINE h5tcommit_anon_f(loc_id, dtype_id, hdferr, tcpl_id, tapl_id)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: loc_id  ! A file or group identifier specifying
                                          ! the file in which the new named datatype
                                          ! is to be created.
    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
    INTEGER, INTENT(OUT) :: hdferr          ! Error code
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tcpl_id ! A datatype creation property
                                                    ! list identifier.
                                                    ! (H5P_DEFAULT_F for the default property list.)
    INTEGER(HID_T), OPTIONAL, INTENT(IN) :: tapl_id ! A datatype access property list identifier.
                                                    ! should always be passed as the value H5P_DEFAULT_F.
!*****
    INTEGER(HID_T) :: tcpl_id_default
    INTEGER(HID_T) :: tapl_id_default

    INTERFACE
       INTEGER FUNCTION h5tcommit_anon_c(loc_id, dtype_id, &
            tcpl_id_default, tapl_id_default)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMIT_ANON_C'::h5tcommit_anon_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: loc_id
         INTEGER(HID_T), INTENT(IN) :: dtype_id
         INTEGER(HID_T) :: tcpl_id_default
         INTEGER(HID_T) :: tapl_id_default
       END FUNCTION h5tcommit_anon_c
    END INTERFACE

    tcpl_id_default = H5P_DEFAULT_F
    tapl_id_default = H5P_DEFAULT_F

    IF(PRESENT(tcpl_id)) tcpl_id_default = tcpl_id
    IF(PRESENT(tapl_id)) tapl_id_default = tapl_id

    hdferr = h5tcommit_anon_c(loc_id, dtype_id, &
         tcpl_id_default, tapl_id_default )

  END SUBROUTINE h5tcommit_anon_f

!
!****s* H5T/h5tcommitted_f
!
! NAME
!  h5tcommitted_f
!
! PURPOSE
!  Determines whether a datatype is a named type or a transient type.
!
! INPUTS
!  dtype_id 	 - A datatype identifier.
!
! OUTPUTS
!  committed 	 - .TRUE., if the datatype has been committed
!                  .FALSE., if the datatype has not been committed.
!  hdferr 	 - Returns 0 if successful and -1 if fails
! AUTHOR
!  M. Scot Breitenfeld
!  February 25, 2008
!
! SOURCE
  SUBROUTINE h5tcommitted_f(dtype_id, committed, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! A datatype identifier
    LOGICAL, INTENT(OUT) :: committed ! .TRUE., if the datatype has been committed
                                      !.FALSE., if the datatype has not been committed.
    INTEGER, INTENT(OUT) :: hdferr     ! Error code:
!  Success:  0
!  Failure: -1
!*****
    INTERFACE
       INTEGER FUNCTION h5tcommitted_c(dtype_id)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMMITTED_C'::h5tcommitted_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: dtype_id
       END FUNCTION h5tcommitted_c
    END INTERFACE

    hdferr = h5tcommitted_c(dtype_id)

    IF(hdferr.GT.0)THEN
       committed = .TRUE.
       hdferr = 0
    ELSE IF(hdferr.EQ.0)THEN
       committed = .FALSE.
       hdferr = 0
    ELSE
       hdferr = -1
    ENDIF


  END SUBROUTINE h5tcommitted_f

!
!****s* H5T/H5Tdecode_f
!
! NAME
!  H5Tdecode_f
!
! PURPOSE
!  Decode a binary object description of data type and return a new object handle.
! INPUTS
!  buf 	         -  Buffer for the data space object to be decoded.
!  obj_id 	 - Object ID
! OUTPUTS
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  M. Scot Breitenfeld
!  April 9, 2008
!
! SOURCE
  SUBROUTINE h5tdecode_f(buf, obj_id, hdferr)
    IMPLICIT NONE
    CHARACTER(LEN=*), INTENT(IN) :: buf ! Buffer for the data space object to be decoded.
    INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
    INTEGER, INTENT(OUT) :: hdferr     ! Error code
!*****
    INTERFACE
       INTEGER FUNCTION h5tdecode_c(buf, obj_id)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TDECODE_C'::h5tdecode_c
         !DEC$ENDIF
         !DEC$ATTRIBUTES reference :: buf
         CHARACTER(LEN=*), INTENT(IN) :: buf
         INTEGER(HID_T), INTENT(OUT) :: obj_id  ! Object ID
       END FUNCTION h5tdecode_c
    END INTERFACE

    hdferr = h5tdecode_c(buf, obj_id)

  END SUBROUTINE h5tdecode_f

!
!****s* H5T/H5Tencode_f
!
! NAME
!  H5Tencode_f
!
! PURPOSE
!  Encode a data type object description into a binary buffer.
!
! INPUTS
!  obj_id 	 - Identifier of the object to be encoded.
!  buf 	         - Buffer for the object to be encoded into.
!  nalloc 	 - The size of the allocated buffer.
! OUTPUTS
!  nalloc 	 - The size of the buffer needed.
!  hdferr 	 - Returns 0 if successful and -1 if fails.
!
! AUTHOR
!  M. Scot Breitenfeld
!  April 9, 2008
! SOURCE
  SUBROUTINE h5tencode_f(obj_id, buf, nalloc, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: obj_id ! Identifier of the object to be encoded.
    CHARACTER(LEN=*), INTENT(OUT) :: buf ! Buffer for the object to be encoded into.
    INTEGER(SIZE_T), INTENT(INOUT) :: nalloc ! The size of the allocated buffer.
    INTEGER, INTENT(OUT) :: hdferr     ! Error code
!*****

    INTERFACE
       INTEGER FUNCTION h5tencode_c(buf, obj_id, nalloc)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TENCODE_C'::h5tencode_c
         !DEC$ENDIF
         !DEC$ATTRIBUTES reference :: buf
         INTEGER(HID_T), INTENT(IN) :: obj_id
         CHARACTER(LEN=*), INTENT(OUT) :: buf
         INTEGER(SIZE_T), INTENT(INOUT) :: nalloc
       END FUNCTION h5tencode_c
    END INTERFACE

    hdferr = h5tencode_c(buf, obj_id, nalloc)

  END SUBROUTINE h5tencode_f

!
!****s* H5T/h5tget_create_plist_f
!
! NAME
!  h5tget_create_plist_f
!
! PURPOSE
!  Returns a copy of a datatype creation property list.
!
! INPUTS
!  dtype_id 	 - Datatype identifier
! OUTPUTS
!  dtpl_id 	 - Datatype property list identifier
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  M. Scot Breitenfeld
!  April 9, 2008
!
! SOURCE
  SUBROUTINE h5tget_create_plist_f(dtype_id, dtpl_id, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
    INTEGER(HID_T), INTENT(OUT) :: dtpl_id  ! Datatype property list identifier.
    INTEGER, INTENT(OUT) :: hdferr       ! Error code:
                                         ! 0 on success and -1 on failure
!*****
    INTERFACE
       INTEGER FUNCTION h5tget_create_plist_c(dtype_id, dtpl_id)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_CREATE_PLIST_C'::h5tget_create_plist_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: dtype_id
         INTEGER(HID_T), INTENT(OUT) :: dtpl_id
       END FUNCTION h5tget_create_plist_c
    END INTERFACE

    hdferr = h5tget_create_plist_c(dtype_id, dtpl_id)
  END SUBROUTINE h5tget_create_plist_f

!
!****s* H5T/h5tcompiler_conv_f
!
! NAME
!  h5tcompiler_conv_f
!
! PURPOSE
!  Check whether the library’s default conversion is hard conversion.R
!
! INPUTS
!  src_id 	 - Identifier for the source datatype.
!  dst_id 	 - Identifier for the destination datatype.
! OUTPUTS
!  flag 	 - TRUE for compiler conversion, FALSE for library conversion
!  hdferr 	 - Returns 0 if successful and -1 if fails
!
! AUTHOR
!  M. Scot Breitenfeld
!  April 9, 2008
! SOURCE
  SUBROUTINE h5tcompiler_conv_f( src_id, dst_id, flag, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: src_id ! Identifier for the source datatype.
    INTEGER(HID_T), INTENT(IN) :: dst_id ! Identifier for the destination datatype.
    LOGICAL, INTENT(OUT) :: flag  ! .TRUE. for compiler conversion, .FALSE. for library conversion
    INTEGER, INTENT(OUT) :: hdferr  ! Error code:
                                    ! 0 on success and -1 on failure
!*****
    INTEGER :: c_flag

    INTERFACE
       INTEGER FUNCTION h5tcompiler_conv_c(src_id, dst_id, c_flag)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TCOMPILER_CONV_C'::h5tcompiler_conv_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: src_id
         INTEGER(HID_T), INTENT(IN) :: dst_id
         INTEGER :: c_flag
       END FUNCTION h5tcompiler_conv_c
    END INTERFACE

    hdferr = h5tcompiler_conv_c(src_id, dst_id, c_flag)

    flag = .FALSE.
    IF(c_flag .GT. 0) flag = .TRUE.

  END SUBROUTINE h5tcompiler_conv_f

!
!****s* H5T/h5tget_native_type_f
!
! NAME
!  h5tget_native_type_f
!
! PURPOSE
!  Returns the native datatype of a specified datatype.
!
! INPUTS
!  dtype_id 	 - Datatype identifier for the dataset datatype.
!  
!  direction 	 - Direction of search:
!                  H5T_DIR_DEFAULT     = 0,    /*default direction is inscendent */
!                  H5T_DIR_ASCEND      = 1,    /*in inscendent order             */
!                  H5T_DIR_DESCEND     = 2     /*in descendent order             */
!  * NOTE: In C it is defined as a structure: H5T_direction_t
!
! OUTPUTS
!  native_dtype_id - The native datatype identifier for the specified dataset datatype
!  hdferr 	   - Returns 0 if successful and -1 if fails
! AUTHOR
!  M. Scot Breitenfeld
!  June 18, 2008
! SOURCE
  SUBROUTINE h5tget_native_type_f(dtype_id, direction, native_dtype_id, hdferr)
    IMPLICIT NONE
    INTEGER(HID_T), INTENT(IN) :: dtype_id  ! Datatype identifier
    INTEGER, INTENT(IN) :: direction  ! Direction of search:
                                      ! H5T_DIR_ASCEND_F      = 1  in inscendent order
                                      ! H5T_DIR_DESCEND_F     = 2  in descendent order
    INTEGER(HID_T), INTENT(OUT) :: native_dtype_id  ! The native datatype identifier
    INTEGER, INTENT(OUT) :: hdferr    ! Error code:
                                      ! 0 on success and -1 on failure
!*****
    INTERFACE
       INTEGER FUNCTION h5tget_native_type_c(dtype_id, direction, native_dtype_id)
         USE H5GLOBAL
         !DEC$IF DEFINED(HDF5F90_WINDOWS)
         !DEC$ATTRIBUTES C,reference,decorate,alias:'H5TGET_NATIVE_TYPE_C'::h5tget_native_type_c
         !DEC$ENDIF
         INTEGER(HID_T), INTENT(IN) :: dtype_id
         INTEGER, INTENT(IN) :: direction
         INTEGER(HID_T), INTENT(OUT) :: native_dtype_id
       END FUNCTION h5tget_native_type_c
    END INTERFACE

    hdferr = h5tget_native_type_c(dtype_id, direction, native_dtype_id)
  END SUBROUTINE h5tget_native_type_f

END MODULE H5T