/usr/share/gtk-doc/html/libgwyddion/libgwyddion-gwyutils.html is in libgwyddion20-doc 2.44-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | <!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 V1.78.1">
<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="GwySIUnit.html" title="GwySIUnit">
<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="GwySIUnit.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 width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<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="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-canonicalize-path" title="gwy_canonicalize_path ()">gwy_canonicalize_path</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-filename-ignore" title="gwy_filename_ignore ()">gwy_filename_ignore</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-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-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">
<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">
<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">
<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 width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</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>
</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="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="id-1.16.7.2.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.3.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.4.7"></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="id-1.16.7.5.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.5.7"></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="id-1.16.7.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.6.6"></a><h4>Returns</h4>
<p> The last position where the strings do not differ yet.
Particularly, -1 is 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="id-1.16.7.7.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.7.8"></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="id-1.16.7.8.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.8.8"></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="id-1.16.7.9.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.9.8"></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="id-1.16.7.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.10.6"></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 + 1 of the first string
<em class="parameter"><code>str</code></em>
equals to is returned in the latter case.</p>
</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 <code class="literal">NUL</code>-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.</p>
<div class="refsect3">
<a name="id-1.16.7.11.8"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.11.9"></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="id-1.16.7.12.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.12.7"></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="id-1.16.7.13.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.13.6"></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="id-1.16.7.14.9"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.14.10"></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="id-1.16.7.15.7"></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="id-1.16.7.16.6"></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="id-1.16.7.17.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.17.8"></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="id-1.16.7.18.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.18.7"></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="id-1.16.7.19.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.19.6"></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="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">p </span><span class="symbol">=</span><span class="normal"> text</span><span class="symbol">;</span>
<span class="keyword">for</span><span class="normal"> </span><span class="symbol">(</span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">line </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="#gwy-str-next-line">gwy_str_next_line</a></span><span class="symbol">(&</span><span class="normal">p</span><span class="symbol">);</span>
<span class="normal"> line</span><span class="symbol">;</span>
<span class="normal"> line </span><span class="symbol">=</span><span class="normal"> </span><span class="function"><a href="#gwy-str-next-line">gwy_str_next_line</a></span><span class="symbol">(&</span><span class="normal">p</span><span class="symbol">))</span><span class="normal"> </span><span class="cbracket">{</span>
<span class="normal"> </span><span class="function"><a href="/usr/share/gtk-doc/html/glib/glib-String-Utility-Functions.html#g-strstrip">g_strstrip</a></span><span class="symbol">(</span><span class="normal">line</span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">// Do something more with line</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p></p>
<div class="refsect3">
<a name="id-1.16.7.20.10"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.20.11"></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-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="id-1.16.7.21.8"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.21.9"></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="id-1.16.7.22.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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-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="id-1.16.7.23.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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 precise.</p>
<div class="refsect3">
<a name="id-1.16.7.24.6"></a><h4>Parameters</h4>
<div class="informaltable"><table 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>Item stride in the raw data, measured in raw values. Pass 1 for
consecutive raw data. For backward reading, pass -1 and point
<em class="parameter"><code>data</code></em>
to the last raw item instead of the first.</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.</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.</p>
<div class="refsect3">
<a name="id-1.16.7.25.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.25.6"></a><h4>Returns</h4>
<p> The size 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-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="id-1.16.7.26.8"></a><h4>Parameters</h4>
<div class="informaltable"><table 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"><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-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="id-1.16.7.27.7"></a><h4>Parameters</h4>
<div class="informaltable"><table 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="id-1.16.7.27.8"></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="id-1.16.7.28.5"></a><h4>Parameters</h4>
<div class="informaltable"><table 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
string precision pitfalls</p></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="id-1.16.7.28.6"></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>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="id-1.16.8.2.5"></a><h4>Members</h4>
<div class="informaltable"><table 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>
</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>
<div class="refsect3">
<a name="id-1.16.8.3.4"></a><h4>Members</h4>
<div class="informaltable"><table 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.</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>
</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>
</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> --
<p> utility macros</p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.19</div>
</body>
</html>
|