1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>gwyutils: Gwyddion Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="up" href="index.html" title="Gwyddion Library Reference Manual">
<link rel="prev" href="libgwyddion-GwySIValueFormat.html" title="GwySIValueFormat">
<link rel="next" href="libgwyddion-gwyversion.html" title="gwyversion">
<meta name="generator" content="GTK-Doc V1.19 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
<a href="#libgwyddion-gwyutils.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><img src="up-insensitive.png" width="16" height="16" border="0"></td>
<td><a accesskey="p" href="libgwyddion-GwySIValueFormat.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libgwyddion-gwyversion.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libgwyddion-gwyutils"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libgwyddion-gwyutils.top_of_page"></a>gwyutils</span></h2>
<p>gwyutils — Various utility functions</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgwyddion-gwyutils.html#GwySetFractionFunc" title="GwySetFractionFunc ()">*GwySetFractionFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="libgwyddion-gwyutils.html#GwySetMessageFunc" title="GwySetMessageFunc ()">*GwySetMessageFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-parse-doubles-error-quark" title="gwy_parse_doubles_error_quark ()">gwy_parse_doubles_error_quark</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-hash-table-to-slist-cb" title="gwy_hash_table_to_slist_cb ()">gwy_hash_table_to_slist_cb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-hash-table-to-list-cb" title="gwy_hash_table_to_list_cb ()">gwy_hash_table_to_list_cb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-strkill" title="gwy_strkill ()">gwy_strkill</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-strreplace" title="gwy_strreplace ()">gwy_strreplace</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-strdiffpos" title="gwy_strdiffpos ()">gwy_strdiffpos</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-strisident" title="gwy_strisident ()">gwy_strisident</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-equal" title="gwy_ascii_strcase_equal ()">gwy_ascii_strcase_equal</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-hash" title="gwy_ascii_strcase_hash ()">gwy_ascii_strcase_hash</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-stramong" title="gwy_stramong ()">gwy_stramong</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-memmem" title="gwy_memmem ()">gwy_memmem</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-file-get-contents" title="gwy_file_get_contents ()">gwy_file_get_contents</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-file-abandon-contents" title="gwy_file_abandon_contents ()">gwy_file_abandon_contents</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-find-self-dir" title="gwy_find_self_dir ()">gwy_find_self_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-get-user-dir" title="gwy_get_user_dir ()">gwy_get_user_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-get-home-dir" title="gwy_get_home_dir ()">gwy_get_home_dir</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-canonicalize-path" title="gwy_canonicalize_path ()">gwy_canonicalize_path</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-filename-ignore" title="gwy_filename_ignore ()">gwy_filename_ignore</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-sgettext" title="gwy_sgettext ()">gwy_sgettext</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-str-next-line" title="gwy_str_next_line ()">gwy_str_next_line</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-str-fixed-font-width" title="gwy_str_fixed_font_width ()">gwy_str_fixed_font_width</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-gstring-replace" title="gwy_gstring_replace ()">gwy_gstring_replace</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-gstring-to-native-eol" title="gwy_gstring_to_native_eol ()">gwy_gstring_to_native_eol</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-get-decimal-separator" title="gwy_get_decimal_separator ()">gwy_get_decimal_separator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-append-doubles-to-gstring" title="gwy_append_doubles_to_gstring ()">gwy_append_doubles_to_gstring</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-parse-doubles" title="gwy_parse_doubles ()">gwy_parse_doubles</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-memcpy-byte-swap" title="gwy_memcpy_byte_swap ()">gwy_memcpy_byte_swap</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-convert-raw-data" title="gwy_convert_raw_data ()">gwy_convert_raw_data</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-raw-data-size" title="gwy_raw_data_size ()">gwy_raw_data_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-raw-data-size-bits" title="gwy_raw_data_size_bits ()">gwy_raw_data_size_bits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-convert-to-utf8" title="gwy_convert_to_utf8 ()">gwy_convert_to_utf8</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-utf16-to-utf8" title="gwy_utf16_to_utf8 ()">gwy_utf16_to_utf8</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-utf8-strescape" title="gwy_utf8_strescape ()">gwy_utf8_strescape</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-assign-string" title="gwy_assign_string ()">gwy_assign_string</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-object-set-or-reset" title="gwy_object_set_or_reset ()">gwy_object_set_or_reset</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-set-member-object" title="gwy_set_member_object ()">gwy_set_member_object</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">FILE</span> *
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-fopen" title="gwy_fopen ()">gwy_fopen</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
</td>
<td class="function_name">
<a class="link" href="libgwyddion-gwyutils.html#gwy-fprintf" title="gwy_fprintf ()">gwy_fprintf</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType">GwyRawDataType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgwyddion-gwyutils.html#GwyByteOrder" title="enum GwyByteOrder">GwyByteOrder</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgwyddion-gwyutils.html#GwyParseDoublesFlags" title="enum GwyParseDoublesFlags">GwyParseDoublesFlags</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="libgwyddion-gwyutils.html#GwyParseDoublesError" title="enum GwyParseDoublesError">GwyParseDoublesError</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libgwyddion-gwyutils.html#GWY-PARSE-DOUBLES-ERROR:CAPS" title="GWY_PARSE_DOUBLES_ERROR">GWY_PARSE_DOUBLES_ERROR</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include <libgwyddion/gwyddion.h>
</pre>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.description"></a><h2>Description</h2>
<p>Various utility functions: creating GLib lists from hash tables <a class="link" href="libgwyddion-gwyutils.html#gwy-hash-table-to-list-cb" title="gwy_hash_table_to_list_cb ()"><code class="function">gwy_hash_table_to_list_cb()</code></a>), protably finding
Gwyddion application directories (<a class="link" href="libgwyddion-gwyutils.html#gwy-find-self-dir" title="gwy_find_self_dir ()"><code class="function">gwy_find_self_dir()</code></a>), string functions (<a class="link" href="libgwyddion-gwyutils.html#gwy-strreplace" title="gwy_strreplace ()"><code class="function">gwy_strreplace()</code></a>), path manipulation
(<a class="link" href="libgwyddion-gwyutils.html#gwy-canonicalize-path" title="gwy_canonicalize_path ()"><code class="function">gwy_canonicalize_path()</code></a>).</p>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="GwySetFractionFunc"></a><h3>GwySetFractionFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GwySetFractionFunc<span class="c_punctuation">)</span> (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> fraction</code></em>);</pre>
<p>Type of function for reporting progress of a long computation.</p>
<p>Usually you want to use <a href="../libgwyapp-wait.html#gwy-app-wait-set-fraction"><code class="function">gwy_app_wait_set_fraction()</code></a>.</p>
<div class="refsect3">
<a name="GwySetFractionFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>fraction</p></td>
<td class="parameter_description"><p>Progress estimate as a number from the interval [0,1].</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GwySetFractionFunc.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the computation should continue; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it should be cancelled.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GwySetMessageFunc"></a><h3>GwySetMessageFunc ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
<span class="c_punctuation">(</span>*GwySetMessageFunc<span class="c_punctuation">)</span> (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *message</code></em>);</pre>
<p>Type of function for reporting what a long computation is doing now.</p>
<p>Usually you want to use <a href="../libgwyapp-wait.html#gwy-app-wait-set-message"><code class="function">gwy_app_wait_set_message()</code></a>.</p>
<div class="refsect3">
<a name="GwySetMessageFunc.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>message</p></td>
<td class="parameter_description"><p>Message to be shown together with the progress fraction. If the computation has stages the messages
should reflect this. Otherwise at least some general message should be set.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="GwySetMessageFunc.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the computation should continue; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if it should be cancelled.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-parse-doubles-error-quark"></a><h3>gwy_parse_doubles_error_quark ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Quarks.html#GQuark"><span class="returnvalue">GQuark</span></a>
gwy_parse_doubles_error_quark (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns error domain for floating point value parsing and evaluation.</p>
<p>See and use <a class="link" href="libgwyddion-gwyutils.html#GWY-PARSE-DOUBLES-ERROR:CAPS" title="GWY_PARSE_DOUBLES_ERROR"><code class="literal">GWY_PARSE_DOUBLES_ERROR</code></a>.</p>
<div class="refsect3">
<a name="gwy-parse-doubles-error-quark.returns"></a><h4>Returns</h4>
<p> The error domain.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-hash-table-to-slist-cb"></a><h3>gwy_hash_table_to_slist_cb ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_hash_table_to_slist_cb (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> unused_key</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> value</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> to <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a> convertor.</p>
<p>Usble in <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>, pass a pointer to a <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>* as user data to it.</p>
<div class="refsect3">
<a name="gwy-hash-table-to-slist-cb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unused_key</p></td>
<td class="parameter_description"><p>Hash key (unused).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>Hash value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data (a pointer to <a href="/usr/share/gtk-doc/html/glib/glib-Singly-Linked-Lists.html#GSList"><span class="type">GSList</span></a>*).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-hash-table-to-list-cb"></a><h3>gwy_hash_table_to_list_cb ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_hash_table_to_list_cb (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> unused_key</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> value</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> user_data</code></em>);</pre>
<p><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> to <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> convertor.</p>
<p>Usble in <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-foreach"><code class="function">g_hash_table_foreach()</code></a>, pass a pointer to a <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a>* as user data to it.</p>
<div class="refsect3">
<a name="gwy-hash-table-to-list-cb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>unused_key</p></td>
<td class="parameter_description"><p>Hash key (unused).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>value</p></td>
<td class="parameter_description"><p>Hash value.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>User data (a pointer to <a href="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a>*).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-strkill"></a><h3>gwy_strkill ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_strkill (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *killchars</code></em>);</pre>
<p>Removes characters in <em class="parameter"><code>killchars</code></em>
from string <em class="parameter"><code>s</code></em>
, modifying it in place.</p>
<p>Use gwy_strkill(g_strdup(<em class="parameter"><code>s</code></em>
), <em class="parameter"><code>killchars</code></em>
) to get a modified copy.</p>
<div class="refsect3">
<a name="gwy-strkill.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>s</p></td>
<td class="parameter_description"><p>A NUL-terminated string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>killchars</p></td>
<td class="parameter_description"><p>A string containing characters to kill.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-strkill.returns"></a><h4>Returns</h4>
<p> <em class="parameter"><code>s</code></em>
itself, the return value is to allow function call nesting.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-strreplace"></a><h3>gwy_strreplace ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_strreplace (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *haystack</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *needle</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *replacement</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> maxrepl</code></em>);</pre>
<p>Replaces occurences of string <em class="parameter"><code>needle</code></em>
in <em class="parameter"><code>haystack</code></em>
with <em class="parameter"><code>replacement</code></em>
.</p>
<p>See <a class="link" href="libgwyddion-gwyutils.html#gwy-gstring-replace" title="gwy_gstring_replace ()"><code class="function">gwy_gstring_replace()</code></a> for a function which does in-place replacement on a <a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a>.</p>
<div class="refsect3">
<a name="gwy-strreplace.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>haystack</p></td>
<td class="parameter_description"><p>A NUL-terminated string to search in.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>needle</p></td>
<td class="parameter_description"><p>A NUL-terminated string to search for.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>replacement</p></td>
<td class="parameter_description"><p>A NUL-terminated string to replace <em class="parameter"><code>needle</code></em>
with.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>maxrepl</p></td>
<td class="parameter_description"><p>Maximum number of occurences to replace (use (gsize)-1 to replace all occurences).</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-strreplace.returns"></a><h4>Returns</h4>
<p> A newly allocated string.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-strdiffpos"></a><h3>gwy_strdiffpos ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gwy_strdiffpos (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s1</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s2</code></em>);</pre>
<p>Finds position where two strings differ.</p>
<div class="refsect3">
<a name="gwy-strdiffpos.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>s1</p></td>
<td class="parameter_description"><p>A string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>s2</p></td>
<td class="parameter_description"><p>A string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-strdiffpos.returns"></a><h4>Returns</h4>
<p> The last position where the strings do not differ yet. Possibly -1 can be returned if either string is
<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, zero-length, or they differ in the very first character.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-strisident"></a><h3>gwy_strisident ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_strisident (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *more</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *startmore</code></em>);</pre>
<p>Checks whether a string is valid identifier.</p>
<p>Valid identifier must start with an alphabetic character or a character from <em class="parameter"><code>startmore</code></em>
, and it must continue with
alphanumeric characters or characters from <em class="parameter"><code>more</code></em>
.</p>
<p>Note underscore is not allowed by default, you have to pass it in <em class="parameter"><code>more</code></em>
and/or <em class="parameter"><code>startmore</code></em>
.</p>
<div class="refsect3">
<a name="gwy-strisident.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>s</p></td>
<td class="parameter_description"><p>A NUL-terminated string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>more</p></td>
<td class="parameter_description"><p>List of additional ASCII characters allowed inside identifier, empty list can be passed as <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>startmore</p></td>
<td class="parameter_description"><p>List of additional ASCII characters allowed as the first identifier characters, empty list can be
passed as <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-strisident.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>s</code></em>
is valid identifier, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-ascii-strcase-equal"></a><h3>gwy_ascii_strcase_equal ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_ascii_strcase_equal (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v1</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v2</code></em>);</pre>
<p>Compares two strings for equality, ignoring case.</p>
<p>The case folding is performed only on ASCII characters.</p>
<p>This function is intended to be passed to <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as <em class="parameter"><code>key_equal_func</code></em>
, namely in conjuction with
<a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-hash" title="gwy_ascii_strcase_hash ()"><code class="function">gwy_ascii_strcase_hash()</code></a> hashing function.</p>
<div class="refsect3">
<a name="gwy-ascii-strcase-equal.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>v1</p></td>
<td class="parameter_description"><p>String key.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>v2</p></td>
<td class="parameter_description"><p>String key to compare with <em class="parameter"><code>v1</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-ascii-strcase-equal.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the two string keys match, ignoring case.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-ascii-strcase-hash"></a><h3>gwy_ascii_strcase_hash ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_ascii_strcase_hash (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v</code></em>);</pre>
<p>Converts a string to a hash value, ignoring case.</p>
<p>The case folding is performed only on ASCII characters.</p>
<p>This function is intended to be passed to <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-new"><code class="function">g_hash_table_new()</code></a> as <em class="parameter"><code>hash_func</code></em>
, namely in conjuction with
<a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-equal" title="gwy_ascii_strcase_equal ()"><code class="function">gwy_ascii_strcase_equal()</code></a> comparison function.</p>
<div class="refsect3">
<a name="gwy-ascii-strcase-hash.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>v</p></td>
<td class="parameter_description"><p>String key.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-ascii-strcase-hash.returns"></a><h4>Returns</h4>
<p> The hash value corresponding to the key <em class="parameter"><code>v</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-26.html#api-index-2.26">2.26</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-stramong"></a><h3>gwy_stramong ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_stramong (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Checks whether a string is equal to any from given list.</p>
<div class="refsect3">
<a name="gwy-stramong.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>A string to find.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of string to compare <em class="parameter"><code>str</code></em>
with.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-stramong.returns"></a><h4>Returns</h4>
<p> Zero if <em class="parameter"><code>str</code></em>
does not equal to any string from the list, nozero othwerise. More precisely, the position</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>1 of the first string <em class="parameter"><code>str</code></em>
equals to is returned in the latter case.</p></li></ul></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-11.html#api-index-2.11">2.11</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-memmem"></a><h3>gwy_memmem ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a>
gwy_memmem (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> haystack</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> haystack_len</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> needle</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> needle_len</code></em>);</pre>
<p>Find a block of memory in another block of memory.</p>
<p>This function is very similar to <code class="function">strstr()</code>, except that it works with arbitrary memory blocks instead of
NUL-terminated strings.</p>
<p>If <em class="parameter"><code>needle_len</code></em>
is zero, <em class="parameter"><code>haystack</code></em>
is always returned.</p>
<p>On GNU systems with glibc at least 2.1 this is a just a trivial <code class="function">memmem()</code> wrapper. On other systems it emulates
<code class="function">memmem()</code> behaviour but may be a bit slower.</p>
<div class="refsect3">
<a name="gwy-memmem.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>haystack</p></td>
<td class="parameter_description"><p>Memory block to search in.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>haystack_len</p></td>
<td class="parameter_description"><p>Size of <em class="parameter"><code>haystack</code></em>
, in bytes.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>needle</p></td>
<td class="parameter_description"><p>Memory block to find.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>needle_len</p></td>
<td class="parameter_description"><p>Size of <em class="parameter"><code>needle</code></em>
, in bytes.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-memmem.returns"></a><h4>Returns</h4>
<p> Pointer to the first byte of memory block in <em class="parameter"><code>haystack</code></em>
that matches <em class="parameter"><code>needle</code></em>
; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no such block
exists.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-12.html#api-index-2.12">2.12</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-get-contents"></a><h3>gwy_file_get_contents ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_file_get_contents (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> **buffer</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> *size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Reads or mmaps file <em class="parameter"><code>filename</code></em>
into memory.</p>
<p>The buffer must be treated as read-only and must be freed with <a class="link" href="libgwyddion-gwyutils.html#gwy-file-abandon-contents" title="gwy_file_abandon_contents ()"><code class="function">gwy_file_abandon_contents()</code></a>. It is NOT guaranteed
to be NUL-terminated, use <em class="parameter"><code>size</code></em>
to find its end.</p>
<div class="refsect3">
<a name="gwy-file-get-contents.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>A file to read contents of.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>Buffer to store the file contents.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>Location to store buffer (file) size.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-file-get-contents.returns"></a><h4>Returns</h4>
<p> Whether it succeeded. In case of failure <em class="parameter"><code>buffer</code></em>
and <em class="parameter"><code>size</code></em>
are reset too.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-file-abandon-contents"></a><h3>gwy_file_abandon_contents ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_file_abandon_contents (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Frees or unmmaps memory allocated by <a class="link" href="libgwyddion-gwyutils.html#gwy-file-get-contents" title="gwy_file_get_contents ()"><code class="function">gwy_file_get_contents()</code></a>.</p>
<div class="refsect3">
<a name="gwy-file-abandon-contents.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>Buffer with file contents as created by <a class="link" href="libgwyddion-gwyutils.html#gwy-file-get-contents" title="gwy_file_get_contents ()"><code class="function">gwy_file_get_contents()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>Buffer size.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>. Since 2.22 no error can occur; safely pass <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-file-abandon-contents.returns"></a><h4>Returns</h4>
<p> Whether it succeeded. Since 2.22 it always return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-find-self-dir"></a><h3>gwy_find_self_dir ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_find_self_dir (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *dirname</code></em>);</pre>
<p>Finds a system Gwyddion directory.</p>
<p>On Unix, a compiled-in path is returned, unless it's overriden with environment variables (see gwyddion manual
page).</p>
<p>On Win32, the directory where the libgwyddion DLL from which this function was called resides is taken as the base
and the location of other Gwyddion directories is calculated from it.</p>
<p>The returned value is not actually tested for existence, it's up to caller.</p>
<p>To obtain the Gwyddion user directory see <a class="link" href="libgwyddion-gwyutils.html#gwy-get-user-dir" title="gwy_get_user_dir ()"><code class="function">gwy_get_user_dir()</code></a>.</p>
<div class="refsect3">
<a name="gwy-find-self-dir.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>dirname</p></td>
<td class="parameter_description"><p>A gwyddion directory name:
<code class="literal">"modules"</code>,
<code class="literal">"plugins"</code>,
<code class="literal">"pixmaps"</code>,
<code class="literal">"locale"</code>, or
<code class="literal">"data"</code>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-find-self-dir.returns"></a><h4>Returns</h4>
<p> The path as a newly allocated string.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-get-user-dir"></a><h3>gwy_get_user_dir ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_get_user_dir (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns the directory where Gwyddion user settings and data should be stored.</p>
<p>On Unix this is usually a dot-directory in user's home directory. On modern Win32 the returned directory resides
in user's Documents and Settings. On silly platforms or silly occasions, silly locations (namely a temporary
directory) can be returned as fallback.</p>
<p>To obtain a Gwyddion system directory see <a class="link" href="libgwyddion-gwyutils.html#gwy-find-self-dir" title="gwy_find_self_dir ()"><code class="function">gwy_find_self_dir()</code></a>.</p>
<div class="refsect3">
<a name="gwy-get-user-dir.returns"></a><h4>Returns</h4>
<p> The directory as a constant string that should not be freed.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-get-home-dir"></a><h3>gwy_get_home_dir ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_get_home_dir (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Returns home directory, or temporary directory as a fallback.</p>
<p>Under normal circumstances the same string as <a href="/usr/share/gtk-doc/html/glib/glib-Miscellaneous-Utility-Functions.html#g-get-home-dir"><code class="function">g_get_home_dir()</code></a> would return is returned. But on MS Windows,
something like "C:\Windows\Temp" can be returned too, as it is as good as anything else (we can write there).</p>
<div class="refsect3">
<a name="gwy-get-home-dir.returns"></a><h4>Returns</h4>
<p> Something usable as user home directory. It may be silly, but never <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or empty.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-canonicalize-path"></a><h3>gwy_canonicalize_path ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_canonicalize_path (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);</pre>
<p>Canonicalizes a filesystem path.</p>
<p>Particularly it makes the path absolute, resolves <code class="literal">..' and </code>.', and fixes slash sequences to single slashes. On
Win32 it also converts all backslashes to slashes along the way.</p>
<p>Note this function does NOT resolve symlinks, use <a href="/usr/share/gtk-doc/html/glib/glib-File-Utilities.html#g-file-read-link"><code class="function">g_file_read_link()</code></a> for that.</p>
<div class="refsect3">
<a name="gwy-canonicalize-path.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>path</p></td>
<td class="parameter_description"><p>A filesystem path.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-canonicalize-path.returns"></a><h4>Returns</h4>
<p> The canonical path, as a newly created string.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-filename-ignore"></a><h3>gwy_filename_ignore ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_filename_ignore (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename_sys</code></em>);</pre>
<p>Checks whether file should be ignored.</p>
<p>This function checks for common file names indicating files that should be normally ignored. Currently it means
backup files (ending with ~ or .bak) and Unix hidden files (starting with a dot).</p>
<div class="refsect3">
<a name="gwy-filename-ignore.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>filename_sys</p></td>
<td class="parameter_description"><p>File name in GLib encoding.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-filename-ignore.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to ignore this file, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-sgettext"></a><h3>gwy_sgettext ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_sgettext (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *msgid</code></em>);</pre>
<p>Translate a message id containing disambiguating prefix ending with `|'.</p>
<div class="refsect3">
<a name="gwy-sgettext.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>msgid</p></td>
<td class="parameter_description"><p>Message id to translate, containing `|'-separated prefix.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-sgettext.returns"></a><h4>Returns</h4>
<p> Translated message, or <em class="parameter"><code>msgid</code></em>
itself with all text up to the last `|' removed if there is no translation.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-str-next-line"></a><h3>gwy_str_next_line ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_str_next_line (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **buffer</code></em>);</pre>
<p>Extracts a next line from a character buffer, modifying it in place.</p>
<p><em class="parameter"><code>buffer</code></em>
is updated to point after the end of the line and the "\n" (or "\r" or "\r\n") is replaced with "\0", if
present.</p>
<p>The final line may or may not be terminated with an EOL marker, its contents is returned in either case. Note,
however, that the empty string "" is not interpreted as an empty unterminated line. Instead, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is immediately
returned.</p>
<p>The typical usage of <a class="link" href="libgwyddion-gwyutils.html#gwy-str-next-line" title="gwy_str_next_line ()"><code class="function">gwy_str_next_line()</code></a> is:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">p</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">text</span><span class="p">;</span>
<span class="k">for</span><span class="w"> </span><span class="p">(</span><span class="n">gchar</span><span class="w"> </span><span class="o">*</span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gwy_str_next_line</span><span class="p">(</span><span class="o">&</span><span class="n">p</span><span class="p">);</span>
<span class="w"> </span><span class="n">line</span><span class="p">;</span>
<span class="w"> </span><span class="n">line</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">gwy_str_next_line</span><span class="p">(</span><span class="o">&</span><span class="n">p</span><span class="p">))</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">g_strstrip</span><span class="p">(</span><span class="n">line</span><span class="p">);</span>
<span class="w"> </span><span class="c1">// Do something more with line</span>
<span class="p">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="gwy-str-next-line.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>Text buffer.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-str-next-line.returns"></a><h4>Returns</h4>
<p> The start of the line. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the buffer is empty or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. The return value is
<span class="emphasis"><em>not</em></span> a new string; the normal return value is the previous value of <em class="parameter"><code>buffer</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-str-fixed-font-width"></a><h3>gwy_str_fixed_font_width ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_str_fixed_font_width (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
<p>Measures the width of UTF-8 encoded string in fixed-width font.</p>
<p>This corresponds to width of the string displayed on a text terminal, for instance. Zero and double width
characters are taken into account. It is not guaranteed all terminals display the string with the calculated
width.</p>
<div class="refsect3">
<a name="gwy-str-fixed-font-width.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>UTF-8 encoded string.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-str-fixed-font-width.returns"></a><h4>Returns</h4>
<p> String width in fixed font, in character cells.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-52.html#api-index-2.52">2.52</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-gstring-replace"></a><h3>gwy_gstring_replace ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_gstring_replace (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> *str</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *old</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *replacement</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> count</code></em>);</pre>
<p>Replaces non-overlapping occurrences of one string with another in a <a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a>.</p>
<p>Passing <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or the empty string for <em class="parameter"><code>replacement</code></em>
will cause the occurrences of <em class="parameter"><code>old</code></em>
to be removed.</p>
<p>Passing <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> or the empty string for <em class="parameter"><code>old</code></em>
means a match occurs at every position in the string, including after
the last character. So <em class="parameter"><code>replacement</code></em>
will be inserted at every position in this case.</p>
<p>See <a class="link" href="libgwyddion-gwyutils.html#gwy-strreplace" title="gwy_strreplace ()"><code class="function">gwy_strreplace()</code></a> for a function which creates a new plain C string with substring replacement.</p>
<div class="refsect3">
<a name="gwy-gstring-replace.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> string to modify in place.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>old</p></td>
<td class="parameter_description"><p>The character sequence to find and replace. Passing <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is the same as passing the empty string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>replacement</p></td>
<td class="parameter_description"><p>The character sequence that should replace <em class="parameter"><code>old</code></em>
. Passing <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is the same as passing the empty
string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>count</p></td>
<td class="parameter_description"><p>The maximum number of replacements to make. A negative number means replacing all occurrences of <em class="parameter"><code>old</code></em>
.
Note zero means just zero, i.e. no replacements are made.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-gstring-replace.returns"></a><h4>Returns</h4>
<p> The number of replacements made. A non-zero value means the string has been modified, no-op replacements
do not count.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-gstring-to-native-eol"></a><h3>gwy_gstring_to_native_eol ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_gstring_to_native_eol (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> *str</code></em>);</pre>
<p>Converts "\n" in a string to operating system native line terminators.</p>
<p>Text files are most easily written by opening them in the text mode. This function can be useful for writing text
files using functions such as <a href="/usr/share/gtk-doc/html/glib/glib-File-Utilities.html#g-file-set-contents"><code class="function">g_file_set_contents()</code></a> that do not permit the conversion to happen automatically.</p>
<p>It is a no-op on all POSIX systems, including OS X. So at present, it actually performs any conversion at all only
on MS Windows.</p>
<div class="refsect3">
<a name="gwy-gstring-to-native-eol.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> string to modify in place.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-36.html#api-index-2.36">2.36</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-get-decimal-separator"></a><h3>gwy_get_decimal_separator ()</h3>
<pre class="programlisting">const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_get_decimal_separator (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Find the decimal separator for the current locale.</p>
<p>This is a <code class="function">localeconv()</code> wrapper.</p>
<div class="refsect3">
<a name="gwy-get-decimal-separator.returns"></a><h4>Returns</h4>
<p> The decimal separator for the current locale as a static string.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-63.html#api-index-2.63">2.63</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-append-doubles-to-gstring"></a><h3>gwy_append_doubles_to_gstring ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_append_doubles_to_gstring (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a> *str</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *values</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> precision</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *field_separator</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> force_decimal_dot</code></em>);</pre>
<p>Formats a sequence of double values to a <a href="/usr/share/gtk-doc/html/glib/glib-Strings.html#GString"><span class="type">GString</span></a>.</p>
<div class="refsect3">
<a name="gwy-append-doubles-to-gstring.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>String to append the formated numbers to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p>Array of double values to format.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>n</p></td>
<td class="parameter_description"><p>Number of values in <em class="parameter"><code>values</code></em>
to format.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>precision</p></td>
<td class="parameter_description"><p>Format precision, within the standard precision of double.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>field_separator</p></td>
<td class="parameter_description"><p>String to put between each two formatted numbers, usually a space or tab character.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>force_decimal_dot</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to ensure the numbers use a decimal dot, regardless of locale. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> to honour the
current locale.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-63.html#api-index-2.63">2.63</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-parse-doubles"></a><h3>gwy_parse_doubles ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a> *
gwy_parse_doubles (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *s</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *values</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyParseDoublesFlags" title="enum GwyParseDoublesFlags"><span class="type">GwyParseDoublesFlags</span></a> flags</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *nlines</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="type">gint</span></a> *ncols</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **endptr</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>Parse a block of text floating point values.</p>
<p>Any combinations of a priori known and unknown dimensions is possible. For an unknown number of columns the number
of columns must still be the same on each line, unless the flag <a class="link" href="libgwyddion-gwyutils.html#GWY-PARSE-DOUBLES-FREE-FORM:CAPS"><code class="literal">GWY_PARSE_DOUBLES_FREE_FORM</code></a> is passed. If any
dimension is unknown, <em class="parameter"><code>values</code></em>
cannot be preallocated as must be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
<p>Currently the values must be whitespace separated and in the POSIX format.</p>
<div class="refsect3">
<a name="gwy-parse-doubles.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>s</p></td>
<td class="parameter_description"><p>String with floating point data to parse.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>values</p></td>
<td class="parameter_description"><p>Pre-allocated array where to store values (for a fixed number of values).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>Parsing flags.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>nlines</p></td>
<td class="parameter_description"><p>Location where to store the number of lines. Initialise to the number of lines for a fixed number of
lines or to -1 for unknown. The value is only changed if initially -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>ncols</p></td>
<td class="parameter_description"><p>Location where to store the number of columns. Initialise to the number of columns for a fixed number of
columns or to -1 for unknown. The value is only changed if initially -1.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>endptr</p></td>
<td class="parameter_description"><p>Location where to store pointer after the last parsed character in <em class="parameter"><code>s</code></em>
. Possibly <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>error</p></td>
<td class="parameter_description"><p>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-parse-doubles.returns"></a><h4>Returns</h4>
<p> On success, either <em class="parameter"><code>values</code></em>
(if non-<a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> <em class="parameter"><code>values</code></em>
was passed) or a newly allocated array with the data.
On failure, <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-memcpy-byte-swap"></a><h3>gwy_memcpy_byte_swap ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_memcpy_byte_swap (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *source</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint8"><span class="type">guint8</span></a> *dest</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> item_size</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> nitems</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> byteswap</code></em>);</pre>
<p>Copies a block of memory swapping bytes along the way.</p>
<p>The bits in <em class="parameter"><code>byteswap</code></em>
correspond to groups of bytes to swap: if j-th bit is set, adjacent groups of 2j bits are
swapped. For example, value 3 means items will be divided into couples (bit 1) of bytes and adjacent couples of
bytes swapped, and then divided into single bytes (bit 0) and adjacent bytes swapped. The net effect is reversal of
byte order in groups of four bytes. More generally, if you want to reverse byte order in groups of size
2<sup>j</sup>, use byte swap pattern j-1.</p>
<p>When <em class="parameter"><code>byteswap</code></em>
is zero, this function reduces to plain <code class="function">memcpy()</code>.</p>
<div class="refsect3">
<a name="gwy-memcpy-byte-swap.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>Source memory block.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>dest</p></td>
<td class="parameter_description"><p>Destination memory location.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>item_size</p></td>
<td class="parameter_description"><p>Size of one copied item, it should be a power of two.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>nitems</p></td>
<td class="parameter_description"><p>Number of items of size <em class="parameter"><code>item_size</code></em>
to copy.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>byteswap</p></td>
<td class="parameter_description"><p>Byte swap pattern.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-1.html#api-index-2.1">2.1</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-convert-raw-data"></a><h3>gwy_convert_raw_data ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_convert_raw_data (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> nitems</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gssize"><span class="type">gssize</span></a> stride</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType"><span class="type">GwyRawDataType</span></a> datatype</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyByteOrder" title="enum GwyByteOrder"><span class="type">GwyByteOrder</span></a> byteorder</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *target</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> scale</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> offset</code></em>);</pre>
<p>Converts a block of raw data items to doubles.</p>
<p>Note that conversion from 64bit integral types may lose information as they have more bits than the mantissa of
doubles. All other conversions should be exact.</p>
<p>For backward reading, pass -1 (or other negative value) as <em class="parameter"><code>stride</code></em>
and point <em class="parameter"><code>data</code></em>
to the last raw item instead of
the first. More precisely, <em class="parameter"><code>data</code></em>
must point to the first byte of the last raw value, not to the very last byte (for
most data sizes this is intuitive, but 12bit data may involve some head scracthing). Zero <em class="parameter"><code>stride</code></em>
is also allowed
and results in <em class="parameter"><code>target</code></em>
being filled with a constant value.</p>
<p>If the raw data size is not a whole number of bytes, parameter <em class="parameter"><code>byteorder</code></em>
gives the order in which the pieces are
packed into bytes. However, the usual order is to start from the high bits regardless of the machine endianness, so
you normally always pass <a class="link" href="libgwyddion-gwyutils.html#GWY-BYTE-ORDER-BIG-ENDIAN:CAPS"><code class="literal">GWY_BYTE_ORDER_BIG_ENDIAN</code></a> for fractional sized data.</p>
<p>For 12bit data only the big endian variant is defined at present. It means always storing the highest remaining
bits of the 12bit value to the highest available bits of the byte, as TIFF and various cameras normally do.</p>
<p>For fractional sized data parameter <em class="parameter"><code>stride</code></em>
specifies both the stride (always measured in raw values) and starting
position within the first
byte:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">For 1bit data <em class="parameter"><code>stride</code></em> is equal to 8<em class="parameter"><code>S</code></em> + <em class="parameter"><code>R</code></em>, where <em class="parameter"><code>S</code></em> is the actual stride. <em class="parameter"><code>R</code></em> = 0 means start
conversion from the first bit and <em class="parameter"><code>R</code></em> = 1 from the second bit, …, up to <em class="parameter"><code>R</code></em> = 7 meaning starting from the last bit
(which one is first depends on <em class="parameter"><code>byteorder</code></em>).</li>
<li class="listitem">For 4bit data <em class="parameter"><code>stride</code></em> is equal to 2<em class="parameter"><code>S</code></em> + <em class="parameter"><code>R</code></em>, where <em class="parameter"><code>S</code></em> is the actual stride. <em class="parameter"><code>R</code></em> = 0 means start conversion
from the first nibble and <em class="parameter"><code>R</code></em> = 1 from the second nibble (which one is first depends on <em class="parameter"><code>byteorder</code></em>).</li>
<li class="listitem">For 12bit data <em class="parameter"><code>stride</code></em> is equal to 2<em class="parameter"><code>S</code></em> + <em class="parameter"><code>R</code></em>, where <em class="parameter"><code>S</code></em> is the actual stride. <em class="parameter"><code>R</code></em> = 0 means the
conversion starts from a value split 8+4 (in forward direction), whereas <em class="parameter"><code>R</code></em> = 1 means the conversion starts from
the value split 4+8.</li>
<li class="listitem">
<em class="parameter"><code>R</code></em> is always positive and its meaning does not change for negative <em class="parameter"><code>S</code></em>.</li>
</ul></div>
<p>For example, consider conversion of 3 nibbles of 4bit data (in the usual big endian order). This is how they will
be read to the output:</p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">[0 1] [2 .] [. .] for <em class="parameter"><code>R</code></em> = 0, <em class="parameter"><code>S</code></em> = 1 (<em class="parameter"><code>stride</code></em> = 2), starting from the first byte.</li>
<li class="listitem">[. 0] [1 2] [. .] for <em class="parameter"><code>R</code></em> = 1, <em class="parameter"><code>S</code></em> = 1 (<em class="parameter"><code>stride</code></em> = 3), starting from the first byte.</li>
<li class="listitem">[0 .] [1 .] [2 .] for <em class="parameter"><code>R</code></em> = 0, <em class="parameter"><code>S</code></em> = 2 (<em class="parameter"><code>stride</code></em> = 4), starting from the first byte.</li>
<li class="listitem">[. .] [. 2] [1 0] for <em class="parameter"><code>R</code></em> = 1, <em class="parameter"><code>S</code></em> = -1 (<em class="parameter"><code>stride</code></em> = -1), starting from the last byte.</li>
<li class="listitem">[. .] [2 1] [0 .] for <em class="parameter"><code>R</code></em> = 0, <em class="parameter"><code>S</code></em> = -1 (<em class="parameter"><code>stride</code></em> = -2), starting from the last byte.</li>
</ul></div>
<div class="refsect3">
<a name="gwy-convert-raw-data.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>data</p></td>
<td class="parameter_description"><p>Pointer to the input raw data to be converted to doubles. The data type is given by <em class="parameter"><code>datatype</code></em>
and
<em class="parameter"><code>byteorder</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>nitems</p></td>
<td class="parameter_description"><p>Data block length, i.e. the number of consecutive items to convert.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>stride</p></td>
<td class="parameter_description"><p>For whole-byte sized data, item stride in the raw data, measured in raw values. For fractional sizes
the interpretation is more complicated, see the description body. Usually pass 1 (contiguous,
non-fractional sized data).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>datatype</p></td>
<td class="parameter_description"><p>Type of the raw data items.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>byteorder</p></td>
<td class="parameter_description"><p>Byte order of the raw data. The byte order must be explicit, i.e. <a class="link" href="libgwyddion-gwyutils.html#GWY-BYTE-ORDER-IMPLICIT:CAPS"><code class="literal">GWY_BYTE_ORDER_IMPLICIT</code></a> is not
valid. For sub-byte sized data <em class="parameter"><code>byteorder</code></em>
instead gives the order of values within one byte.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>Array of <em class="parameter"><code>nitems</code></em>
to store the converted input data to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>scale</p></td>
<td class="parameter_description"><p>Factor to multiply the data with.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>offset</p></td>
<td class="parameter_description"><p>Constant to add to the data after multiplying with <em class="parameter"><code>scale</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-25.html#api-index-2.25">2.25</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-raw-data-size"></a><h3>gwy_raw_data_size ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_raw_data_size (<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType"><span class="type">GwyRawDataType</span></a> datatype</code></em>);</pre>
<p>Reports the size of a single raw data item in bytes.</p>
<p>For raw data types which are not whole bytes (whether smaller or larger, like 12bit), zero is returned. Use
<a class="link" href="libgwyddion-gwyutils.html#gwy-raw-data-size-bits" title="gwy_raw_data_size_bits ()"><code class="function">gwy_raw_data_size_bits()</code></a> to get the size in bits.</p>
<div class="refsect3">
<a name="gwy-raw-data-size.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>datatype</p></td>
<td class="parameter_description"><p>Raw data type.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-raw-data-size.returns"></a><h4>Returns</h4>
<p> The size (in bytes) of a single raw data item of type <em class="parameter"><code>datatype</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-25.html#api-index-2.25">2.25</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-raw-data-size-bits"></a><h3>gwy_raw_data_size_bits ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gwy_raw_data_size_bits (<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType"><span class="type">GwyRawDataType</span></a> datatype</code></em>);</pre>
<p>Reports the size of a single raw data item in bits.</p>
<p>If the data type is known to be whole bytes, <a class="link" href="libgwyddion-gwyutils.html#gwy-raw-data-size" title="gwy_raw_data_size ()"><code class="function">gwy_raw_data_size()</code></a> is usually simpler to use.</p>
<div class="refsect3">
<a name="gwy-raw-data-size-bits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>datatype</p></td>
<td class="parameter_description"><p>Raw data type.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-raw-data-size-bits.returns"></a><h4>Returns</h4>
<p> The size (in bits) of a single raw data item of type <em class="parameter"><code>datatype</code></em>
.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-67.html#api-index-2.67">2.67</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-convert-to-utf8"></a><h3>gwy_convert_to_utf8 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_convert_to_utf8 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *str</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#glong"><span class="type">glong</span></a> len</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *codeset</code></em>);</pre>
<p>Converts a string to UTF-8.</p>
<p>This is a <a href="/usr/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html#g-convert"><code class="function">g_convert()</code></a> wrapper for the typical SPM file reading use case. Conversion failure is indicated just by
a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return value. Conversion is either completely successful or fails. Use <a href="/usr/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html#g-convert"><code class="function">g_convert()</code></a> or <a href="/usr/share/gtk-doc/html/glib/glib-Character-Set-Conversion.html#g-iconv"><code class="function">g_iconv()</code></a> if you
need to handle partial conversions and failure details.</p>
<div class="refsect3">
<a name="gwy-convert-to-utf8.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>A string to convert to UTF-8.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>Maximum string length. May be -1 if <em class="parameter"><code>str</code></em>
is NUL-terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>codeset</p></td>
<td class="parameter_description"><p>String code set, for instance "ISO-8859-1" or "CP1251".</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-convert-to-utf8.returns"></a><h4>Returns</h4>
<p> A newly allocated string on success; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-utf16-to-utf8"></a><h3>gwy_utf16_to_utf8 ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_utf16_to_utf8 (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar2"><span class="type">gunichar2</span></a> *str</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#glong"><span class="type">glong</span></a> len</code></em>,
<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyByteOrder" title="enum GwyByteOrder"><span class="type">GwyByteOrder</span></a> byteorder</code></em>);</pre>
<p>Convert a string from UTF-16 to UTF-8. The result will be terminated with a 0 byte.</p>
<p>This functions differs from <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-utf16-to-utf8"><code class="function">g_utf16_to_utf8()</code></a> mainly by the handling of byte order. In particular, the caller
specifies the byte order explicitly and it can differ from the native byte order.</p>
<p>It is possible to pass <a class="link" href="libgwyddion-gwyutils.html#GWY-BYTE-ORDER-IMPLICIT:CAPS"><code class="literal">GWY_BYTE_ORDER_IMPLICIT</code></a> as <em class="parameter"><code>byteorder</code></em>
. In such case <em class="parameter"><code>str</code></em>
is checked for a byte-order mark.
When one is present it is used for the byte order. Otherwise the behaviour is the same as for
<a class="link" href="libgwyddion-gwyutils.html#GWY-BYTE-ORDER-NATIVE:CAPS"><code class="literal">GWY_BYTE_ORDER_NATIVE</code></a>. The output string never begins with a byte-order mark.</p>
<p>Conversion failure is indicated just by a <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> return value. Conversion is either completely successful or fails.
Use <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#g-utf16-to-utf8"><code class="function">g_utf16_to_utf8()</code></a> if you need to handle partial conversions and failure details.</p>
<div class="refsect3">
<a name="gwy-utf16-to-utf8.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>A UTF-16 encoded string.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>Maximum string length (number of <a href="/usr/share/gtk-doc/html/glib/glib-Unicode-Manipulation.html#gunichar2"><span class="type">gunichar2</span></a> items in <em class="parameter"><code>str</code></em>
, NOT the number of bytes). May be -1 if <em class="parameter"><code>str</code></em>
is
nul-terminated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>byteorder</p></td>
<td class="parameter_description"><p>Byte order of <em class="parameter"><code>str</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-utf16-to-utf8.returns"></a><h4>Returns</h4>
<p> A newly allocated string on success; <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> on failure.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-60.html#api-index-2.60">2.60</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-utf8-strescape"></a><h3>gwy_utf8_strescape ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
gwy_utf8_strescape (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *source</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *exceptions</code></em>);</pre>
<p>Escapes special characters in a string.</p>
<p>Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' and '"' in the string source by inserting
a '\' before them. Additionally all characters in the range 0x01-0x1F (everything below SPACE), the character 0x7F,
characters 0xC0 and 0xC1, and all characters in the range 0xF5-0xFF are replaced with a '\' followed by their octal
representation. Characters supplied in exceptions are not escaped.</p>
<p>In essence, this functions differs from <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strescape"><code class="function">g_strescape()</code></a> by preserving valid UTF-8 strings, unless they contain ‘odd’
characters. Passing strings which are not valid UTF-8 is possible, but generally not advised.</p>
<p>Function <a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strcompress"><code class="function">g_strcompress()</code></a> does the reverse conversion.</p>
<div class="refsect3">
<a name="gwy-utf8-strescape.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>source</p></td>
<td class="parameter_description"><p>A string to escape.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>exceptions</p></td>
<td class="parameter_description"><p>A string containing characters to not escape, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-utf8-strescape.returns"></a><h4>Returns</h4>
<p> A newly allocated string with special characters escaped.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-62.html#api-index-2.62">2.62</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-assign-string"></a><h3>gwy_assign_string ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_assign_string (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> **target</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *newvalue</code></em>);</pre>
<p>Assigns a string, checking for equality and handling <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>s.</p>
<p>This function simplifies handling of string value setters.</p>
<p>The new value is duplicated and the old string is freed in a safe manner (it is possible to pass a pointer
somewhere within the old value as the new value, for instance). Any of the old and new value can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. If
both values are equal (including both unset), the function returns <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
<div class="refsect3">
<a name="gwy-assign-string.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>target</p></td>
<td class="parameter_description"><p>Pointer to target string, typically a struct field.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>newvalue</p></td>
<td class="parameter_description"><p>New value of the string, may be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-assign-string.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the target string has changed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-59.html#api-index-2.59">2.59</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-object-set-or-reset"></a><h3>gwy_object_set_or_reset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gwy_object_set_or_reset (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> object</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> type</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Sets object properties, resetting other properties to defaults.</p>
<p>All explicitly specified properties are set. In addition, all unspecified settable properties of type <em class="parameter"><code>type</code></em>
(or
all unspecified properties if <em class="parameter"><code>type</code></em>
is 0) are reset to defaults. Settable means the property is writable and not
construction-only.</p>
<p>The order in which properties are set is undefined beside keeping the relative order of explicitly specified
properties, therefore this function is not generally usable for objects with interdependent properties.</p>
<p>Unlike <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a>, it does not set properties that already have the requested value, as a consequences
notifications are emitted only for properties which actually change.</p>
<div class="refsect3">
<a name="gwy-object-set-or-reset.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>object</p></td>
<td class="parameter_description"><p>A <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject-struct"><span class="type">GObject</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>type</p></td>
<td class="parameter_description"><p>The type whose properties are to reset, may be zero for all types. The object must be of this type (more
precisely <em class="parameter"><code>object</code></em>
is-a <em class="parameter"><code>type</code></em>
must hold).</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p><a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of name/value pairs of properties to set as in <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a>. It can be <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> alone
to only reset properties to defaults.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gwy-set-member-object"></a><h3>gwy_set_member_object ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gwy_set_member_object (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> member_object</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/gobject/gobject-Type-Information.html#GType"><span class="type">GType</span></a> expected_type</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> member_field</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>Replaces a member object of another object, handling signal connection and disconnection.</p>
<p>If <em class="parameter"><code>member_object</code></em>
is not <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> a reference is taken, sinking any floating objects (and conversely, the reference to
the previous member object is released).</p>
<p>The purpose is to simplify bookkeeping in classes that have settable member objects and (usually but not
necessarily) need to connect to some signals of these member objects. Since this function both connects and
disconnects signals it must be always called with the same set of signals, including callbacks and flags, for
a specific member object.</p>
<p>Example for a <span class="type">GwyFoo</span> class owning a <a href="../GwyGradient.html#GwyGradient-struct"><span class="type">GwyGradient</span></a> member object, assuming the usual conventions:</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="k">typedef</span><span class="w"> </span><span class="k">struct</span><span class="w"> </span><span class="nc">_GwyFooPrivate</span><span class="w"> </span><span class="n">GwyFooPrivate</span><span class="p">;</span>
<span class="k">struct</span><span class="w"> </span><span class="nc">_GwyFooPrivate</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">GwyGradient</span><span class="w"> </span><span class="o">*</span><span class="n">gradient</span><span class="p">;</span>
<span class="w"> </span><span class="n">gulong</span><span class="w"> </span><span class="n">gradient_data_changed_id</span><span class="p">;</span>
<span class="p">};</span>
<span class="k">static</span><span class="w"> </span><span class="n">gboolean</span>
<span class="nf">set_gradient</span><span class="p">(</span><span class="n">GwyFoo</span><span class="w"> </span><span class="o">*</span><span class="n">foo</span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="n">GwyFooPrivate</span><span class="w"> </span><span class="o">*</span><span class="n">priv</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">G_TYPE_INSTANCE_GET_PRIVATE</span><span class="p">(</span><span class="n">foo</span><span class="p">,</span><span class="w"> </span><span class="n">GWY_TYPE_FOO</span><span class="p">,</span>
<span class="w"> </span><span class="n">GwyFooPrivate</span><span class="p">);</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="o">!</span><span class="n">gwy_set_member_object</span><span class="p">(</span><span class="n">foo</span><span class="p">,</span><span class="w"> </span><span class="n">gradient</span><span class="p">,</span><span class="w"> </span><span class="n">GWY_TYPE_GRADIENT</span><span class="p">,</span>
<span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">gradient</span><span class="p">,</span>
<span class="w"> </span><span class="s">"data-changed"</span><span class="p">,</span><span class="w"> </span><span class="o">&</span><span class="n">foo_gradient_data_changed</span><span class="p">,</span>
<span class="w"> </span><span class="o">&</span><span class="n">priv</span><span class="o">-></span><span class="n">gradient_data_changed_id</span><span class="p">,</span>
<span class="w"> </span><span class="n">G_CONNECT_SWAPPED</span><span class="p">,</span>
<span class="w"> </span><span class="nb">NULL</span><span class="p">))</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">FALSE</span><span class="p">;</span>
<span class="w"> </span><span class="c1">// Do whatever else needs to be done if the gradient changes.</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">TRUE</span><span class="p">;</span>
<span class="p">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
The gradient setter then usually only calls <code class="function"><code class="function">set_gradient()</code></code> and disposing of the member object
again only calls <code class="function"><code class="function">set_gradient()</code></code> but with <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> gradient.</p>
<div class="refsect3">
<a name="gwy-set-member-object.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>instance</p></td>
<td class="parameter_description"><p>An object instance.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>member_object</p></td>
<td class="parameter_description"><p>Another object to be owned by <em class="parameter"><code>instanced</code></em>
, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>expected_type</p></td>
<td class="parameter_description"><p>The type of <em class="parameter"><code>member_object</code></em>
. It is checked and a critical message is emitted if it does not
conform.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>member_field</p></td>
<td class="parameter_description"><p>Pointer to location storing the current member object to be replaced by <em class="parameter"><code>member_object</code></em>
.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>List of quadruplets of the form signal name, <a href="/usr/share/gtk-doc/html/gobject/gobject-Closures.html#GCallback"><span class="type">GCallback</span></a> callback, <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gulong"><span class="type">gulong</span></a> pointer to location to hold the
signal handler id, and <a href="/usr/share/gtk-doc/html/gobject/gobject-Signals.html#GConnectFlags"><span class="type">GConnectFlags</span></a> connection flags.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-set-member-object.returns"></a><h4>Returns</h4>
<p> <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>member_field</code></em>
was changed. <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> means the new member is identical to the current one and the
function reduced to no-op (or that an assertion faled).</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-49.html#api-index-2.49">2.49</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-fopen"></a><h3>gwy_fopen ()</h3>
<pre class="programlisting"><span class="returnvalue">FILE</span> *
gwy_fopen (<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *mode</code></em>);</pre>
<p>A wrapper for the stdio <code class="function">fopen()</code> function. The <code class="function">fopen()</code> function opens a file and associates a new stream with it.</p>
<p>Because file descriptors are specific to the C library on Windows, and a file descriptor is part of the FILE
struct, the FILE* returned by this function makes sense only to functions in the same C library. Thus if the
GLib-using code uses a different C library than GLib does, the FILE* returned by this function cannot be passed to
C library functions like <code class="function">fprintf()</code> or <code class="function">fread()</code>.</p>
<p>See your C library manual for more details about <code class="function">fopen()</code>.</p>
<div class="refsect3">
<a name="gwy-fopen.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>a pathname in the GLib file name encoding (UTF-8 on Windows)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mode</p></td>
<td class="parameter_description"><p>a string describing the mode in which the file should be opened</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-fopen.returns"></a><h4>Returns</h4>
<p> A FILE* if the file was successfully opened, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if an error occurred.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-43.html#api-index-2.43">2.43</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gwy-fprintf"></a><h3>gwy_fprintf ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a>
gwy_fprintf (<em class="parameter"><code><span class="type">FILE</span> *file</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> const *format</code></em>,
<em class="parameter"><code>...</code></em>);</pre>
<p>An implementation of the standard <code class="function">fprintf()</code> function which supports positional parameters, as specified in the
Single Unix Specification.</p>
<div class="refsect3">
<a name="gwy-fprintf.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p>the stream to write to.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>format</p></td>
<td class="parameter_description">
<p>a standard <code class="function">printf()</code> format string, but notice</p>
<GTKDOCLINK HREF="glib-String-Utility-Functions">string precision
pitfalls</GTKDOCLINK>
</td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>the arguments to insert in the output.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gwy-fprintf.returns"></a><h4>Returns</h4>
<p> the number of bytes printed.</p>
</div>
<p class="since">Since: <a class="link" href="api-index-2-43.html#api-index-2.43">2.43</a></p>
</div>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GwyRawDataType"></a><h3>enum GwyRawDataType</h3>
<p>Types of raw data.</p>
<p>They are used with <a class="link" href="libgwyddion-gwyutils.html#gwy-convert-raw-data" title="gwy_convert_raw_data ()"><code class="function">gwy_convert_raw_data()</code></a>. Multibyte types usually need to be complemented with <a class="link" href="libgwyddion-gwyutils.html#GwyByteOrder" title="enum GwyByteOrder"><span class="type">GwyByteOrder</span></a> to
get a full type specification.</p>
<div class="refsect3">
<a name="GwyRawDataType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT8:CAPS"></a>GWY_RAW_DATA_SINT8</p></td>
<td class="enum_member_description">
<p>Signed 8bit integer (one byte).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT8:CAPS"></a>GWY_RAW_DATA_UINT8</p></td>
<td class="enum_member_description">
<p>Unsigned 8bit integer (one byte).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT16:CAPS"></a>GWY_RAW_DATA_SINT16</p></td>
<td class="enum_member_description">
<p>Signed 16bit integer (two bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT16:CAPS"></a>GWY_RAW_DATA_UINT16</p></td>
<td class="enum_member_description">
<p>Unsigned 16bit integer (two bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT32:CAPS"></a>GWY_RAW_DATA_SINT32</p></td>
<td class="enum_member_description">
<p>Signed 32bit integer (four bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT32:CAPS"></a>GWY_RAW_DATA_UINT32</p></td>
<td class="enum_member_description">
<p>Unsigned 32bit integer (four bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT64:CAPS"></a>GWY_RAW_DATA_SINT64</p></td>
<td class="enum_member_description">
<p>Signed 64bit integer (eight bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT64:CAPS"></a>GWY_RAW_DATA_UINT64</p></td>
<td class="enum_member_description">
<p>Unsigned 64bit integer (eight bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-HALF:CAPS"></a>GWY_RAW_DATA_HALF</p></td>
<td class="enum_member_description">
<p>Half-precision floating point number (two bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-FLOAT:CAPS"></a>GWY_RAW_DATA_FLOAT</p></td>
<td class="enum_member_description">
<p>Single-precision floating point number (four bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-REAL:CAPS"></a>GWY_RAW_DATA_REAL</p></td>
<td class="enum_member_description">
<p>Pascal ‘real’ floating point number (six bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-DOUBLE:CAPS"></a>GWY_RAW_DATA_DOUBLE</p></td>
<td class="enum_member_description">
<p>Double-precision floating point number (eight bytes).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-BIT:CAPS"></a>GWY_RAW_DATA_BIT</p></td>
<td class="enum_member_description">
<p>Unsigned 1bit integer (one bit). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT4:CAPS"></a>GWY_RAW_DATA_SINT4</p></td>
<td class="enum_member_description">
<p>Signed 4bit integer (one nibble). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT4:CAPS"></a>GWY_RAW_DATA_UINT4</p></td>
<td class="enum_member_description">
<p>Unsigned 4bit integer (one nibble). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT12:CAPS"></a>GWY_RAW_DATA_SINT12</p></td>
<td class="enum_member_description">
<p>Signed 12bit integer (byte and half). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT12:CAPS"></a>GWY_RAW_DATA_UINT12</p></td>
<td class="enum_member_description">
<p>Unsigned 12bit integer (byte and half). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-SINT24:CAPS"></a>GWY_RAW_DATA_SINT24</p></td>
<td class="enum_member_description">
<p>Signed 24bit integer (three bytes). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-UINT24:CAPS"></a>GWY_RAW_DATA_UINT24</p></td>
<td class="enum_member_description">
<p>Unsigned 24bit integer (three bytes). (Since 2.65)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-RAW-DATA-EXTENDED:CAPS"></a>GWY_RAW_DATA_EXTENDED</p></td>
<td class="enum_member_description">
<p>x86 ‘extended’ floating point number (ten bytes). (Since 2.67)</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-25.html#api-index-2.25">2.25</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GwyByteOrder"></a><h3>enum GwyByteOrder</h3>
<p>Type of byte order.</p>
<p>Note all types are valid for all functions.</p>
<div class="refsect3">
<a name="GwyByteOrder.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GWY-BYTE-ORDER-NATIVE:CAPS"></a>GWY_BYTE_ORDER_NATIVE</p></td>
<td class="enum_member_description">
<p>Native byte order for the system the code is running on.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-BYTE-ORDER-LITTLE-ENDIAN:CAPS"></a>GWY_BYTE_ORDER_LITTLE_ENDIAN</p></td>
<td class="enum_member_description">
<p>Little endian byte order (the same as <a href="/usr/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html#G-LITTLE-ENDIAN:CAPS"><code class="literal">G_LITTLE_ENDIAN</code></a>).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-BYTE-ORDER-BIG-ENDIAN:CAPS"></a>GWY_BYTE_ORDER_BIG_ENDIAN</p></td>
<td class="enum_member_description">
<p>Big endian byte order (the same as <a href="/usr/share/gtk-doc/html/glib/glib-Byte-Order-Macros.html#G-BIG-ENDIAN:CAPS"><code class="literal">G_BIG_ENDIAN</code></a>).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-BYTE-ORDER-IMPLICIT:CAPS"></a>GWY_BYTE_ORDER_IMPLICIT</p></td>
<td class="enum_member_description">
<p>Byte order implied by data, for instance a byte-order-mark (Since 2.60).</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-25.html#api-index-2.25">2.25</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GwyParseDoublesFlags"></a><h3>enum GwyParseDoublesFlags</h3>
<p>Type of flags passed to <a class="link" href="libgwyddion-gwyutils.html#gwy-parse-doubles" title="gwy_parse_doubles ()"><code class="function">gwy_parse_doubles()</code></a>.</p>
<div class="refsect3">
<a name="GwyParseDoublesFlags.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-EMPTY-OK:CAPS"></a>GWY_PARSE_DOUBLES_EMPTY_OK</p></td>
<td class="enum_member_description">
<p>Do not set error (and return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>) when there are no data.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-COMPLETELY:CAPS"></a>GWY_PARSE_DOUBLES_COMPLETELY</p></td>
<td class="enum_member_description">
<p>For unknown number of values, consider an error when they are followed by
non-numerical garbage. This flag has no effect for a known number of values.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-FREE-FORM:CAPS"></a>GWY_PARSE_DOUBLES_FREE_FORM</p></td>
<td class="enum_member_description">
<p>Do not distinguish line breaks from other whitespace; just read the requested number
of values. For an unknown number of values they will be reported as single-column.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GwyParseDoublesError"></a><h3>enum GwyParseDoublesError</h3>
<p>Type of error which can occur in <a class="link" href="libgwyddion-gwyutils.html#gwy-parse-doubles" title="gwy_parse_doubles ()"><code class="function">gwy_parse_doubles()</code></a>.</p>
<div class="refsect3">
<a name="GwyParseDoublesError.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-EMPTY:CAPS"></a>GWY_PARSE_DOUBLES_EMPTY</p></td>
<td class="enum_member_description">
<p>There are no data at all.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-TRUNCATED:CAPS"></a>GWY_PARSE_DOUBLES_TRUNCATED</p></td>
<td class="enum_member_description">
<p>There are fewer values than expected.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-MALFORMED:CAPS"></a>GWY_PARSE_DOUBLES_MALFORMED</p></td>
<td class="enum_member_description">
<p>Non-numerical garbage encounted before reading the expected number of values.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GWY-PARSE-DOUBLES-NONUNIFORM:CAPS"></a>GWY_PARSE_DOUBLES_NONUNIFORM</p></td>
<td class="enum_member_description">
<p>Lines do not have the expected constant number of columns.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="api-index-2-64.html#api-index-2.64">2.64</a></p>
</div>
<hr>
<div class="refsect2">
<a name="GWY-PARSE-DOUBLES-ERROR:CAPS"></a><h3>GWY_PARSE_DOUBLES_ERROR</h3>
<pre class="programlisting">#define GWY_PARSE_DOUBLES_ERROR gwy_parse_doubles_error_quark()
</pre>
</div>
</div>
<div class="refsect1">
<a name="libgwyddion-gwyutils.see-also"></a><h2>See Also</h2>
<a class="link" href="libgwyddion-gwymacros.html" title="gwymacros">gwymacros</a> -- utility macros
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>
|