/usr/share/gtk-doc/html/libgwyddion/libgwyddion-gwyutils.html is in libgwyddion20-doc 2.26-1ubuntu1.
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 | <!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</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.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.8 (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="2">
<tr valign="middle">
<td><a accesskey="p" href="GwySIUnit.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td> </td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">Gwyddion Library Reference Manual</th>
<td><a accesskey="n" href="libgwyddion-gwyversion.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#libgwyddion-gwyutils.synopsis" class="shortcut">Top</a>
|
<a href="#libgwyddion-gwyutils.description" class="shortcut">Description</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 valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="libgwyddion-gwyutils.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <libgwyddion/gwyddion.h>
enum <a class="link" href="libgwyddion-gwyutils.html#GwyByteOrder" title="enum GwyByteOrder">GwyByteOrder</a>;
enum <a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType">GwyRawDataType</a>;
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-equal" title="gwy_ascii_strcase_equal ()">gwy_ascii_strcase_equal</a> (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v1</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v2</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-ascii-strcase-hash" title="gwy_ascii_strcase_hash ()">gwy_ascii_strcase_hash</a> (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> v</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-canonicalize-path" title="gwy_canonicalize_path ()">gwy_canonicalize_path</a> (<em class="parameter"><code>const <a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *path</code></em>);
<span class="returnvalue">void</span> <a class="link" href="libgwyddion-gwyutils.html#gwy-convert-raw-data" title="gwy_convert_raw_data ()">gwy_convert_raw_data</a> (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gconstpointer"><span class="type">gconstpointer</span></a> data</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> nitems</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/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="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> *target</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> scale</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> offset</code></em>);
<a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-file-abandon-contents" title="gwy_file_abandon_contents ()">gwy_file_abandon_contents</a> (<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/glib/glib-Basic-Types.html#guchar"><span class="type">guchar</span></a> *buffer</code></em>,
<em class="parameter"><code><a href="http://developer.gnome.org/doc/API/2.0/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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-file-get-contents" title="gwy_file_get_contents ()">gwy_file_get_contents</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-filename-ignore" title="gwy_filename_ignore ()">gwy_filename_ignore</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-find-self-dir" title="gwy_find_self_dir ()">gwy_find_self_dir</a> (<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>);
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-get-home-dir" title="gwy_get_home_dir ()">gwy_get_home_dir</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
const <a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-get-user-dir" title="gwy_get_user_dir ()">gwy_get_user_dir</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <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> (<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>);
<span class="returnvalue">void</span> <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> (<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>);
<span class="returnvalue">void</span> <a class="link" href="libgwyddion-gwyutils.html#gwy-memcpy-byte-swap" title="gwy_memcpy_byte_swap ()">gwy_memcpy_byte_swap</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-memmem" title="gwy_memmem ()">gwy_memmem</a> (<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>);
<span class="returnvalue">void</span> <a class="link" href="libgwyddion-gwyutils.html#gwy-object-set-or-reset" title="gwy_object_set_or_reset ()">gwy_object_set_or_reset</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-raw-data-size" title="gwy_raw_data_size ()">gwy_raw_data_size</a> (<em class="parameter"><code><a class="link" href="libgwyddion-gwyutils.html#GwyRawDataType" title="enum GwyRawDataType"><span class="type">GwyRawDataType</span></a> datatype</code></em>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-sgettext" title="gwy_sgettext ()">gwy_sgettext</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-str-next-line" title="gwy_str_next_line ()">gwy_str_next_line</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-stramong" title="gwy_stramong ()">gwy_stramong</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint"><span class="returnvalue">gint</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-strdiffpos" title="gwy_strdiffpos ()">gwy_strdiffpos</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="libgwyddion-gwyutils.html#gwy-strisident" title="gwy_strisident ()">gwy_strisident</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-strkill" title="gwy_strkill ()">gwy_strkill</a> (<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>);
<a href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="libgwyddion-gwyutils.html#gwy-strreplace" title="gwy_strreplace ()">gwy_strreplace</a> (<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>
</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.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="GwyByteOrder"></a><h3>enum GwyByteOrder</h3>
<pre class="programlisting">typedef enum {
GWY_BYTE_ORDER_NATIVE = 0,
GWY_BYTE_ORDER_LITTLE_ENDIAN = G_LITTLE_ENDIAN,
GWY_BYTE_ORDER_BIG_ENDIAN = G_BIG_ENDIAN,
} GwyByteOrder;
</pre>
<p>
Type of byte order.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GWY-BYTE-ORDER-NATIVE:CAPS"></a><span class="term"><code class="literal">GWY_BYTE_ORDER_NATIVE</code></span></p></td>
<td>Native byte order.
</td>
</tr>
<tr>
<td><p><a name="GWY-BYTE-ORDER-LITTLE-ENDIAN:CAPS"></a><span class="term"><code class="literal">GWY_BYTE_ORDER_LITTLE_ENDIAN</code></span></p></td>
<td>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>).
</td>
</tr>
<tr>
<td><p><a name="GWY-BYTE-ORDER-BIG-ENDIAN:CAPS"></a><span class="term"><code class="literal">GWY_BYTE_ORDER_BIG_ENDIAN</code></span></p></td>
<td>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>).
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</div>
<hr>
<div class="refsect2">
<a name="GwyRawDataType"></a><h3>enum GwyRawDataType</h3>
<pre class="programlisting">typedef enum {
GWY_RAW_DATA_SINT8,
GWY_RAW_DATA_UINT8,
GWY_RAW_DATA_SINT16,
GWY_RAW_DATA_UINT16,
GWY_RAW_DATA_SINT32,
GWY_RAW_DATA_UINT32,
GWY_RAW_DATA_SINT64,
GWY_RAW_DATA_UINT64,
GWY_RAW_DATA_HALF,
GWY_RAW_DATA_FLOAT,
GWY_RAW_DATA_REAL,
GWY_RAW_DATA_DOUBLE,
} GwyRawDataType;
</pre>
<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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="GWY-RAW-DATA-SINT8:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_SINT8</code></span></p></td>
<td>Signed 8bit integer (one byte).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-UINT8:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_UINT8</code></span></p></td>
<td>Unsigned 8bit integer (one byte).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-SINT16:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_SINT16</code></span></p></td>
<td>Signed 16bit integer (two bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-UINT16:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_UINT16</code></span></p></td>
<td>Unsigned 16bit integer (two bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-SINT32:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_SINT32</code></span></p></td>
<td>Signed 32bit integer (four bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-UINT32:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_UINT32</code></span></p></td>
<td>Unsigned 32bit integer (four bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-SINT64:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_SINT64</code></span></p></td>
<td>Signed 64bit integer (eight bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-UINT64:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_UINT64</code></span></p></td>
<td>Unsigned 64bit integer (eight bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-HALF:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_HALF</code></span></p></td>
<td>Half-precision floating point number (two bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-FLOAT:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_FLOAT</code></span></p></td>
<td>Single-precision floating point number (four bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-REAL:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_REAL</code></span></p></td>
<td>Pascal ‘real’ floating point number (six bytes).
</td>
</tr>
<tr>
<td><p><a name="GWY-RAW-DATA-DOUBLE:CAPS"></a><span class="term"><code class="literal">GWY_RAW_DATA_DOUBLE</code></span></p></td>
<td>Double-precision floating point number (eight bytes).
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>v1</code></em> :</span></p></td>
<td>String key.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>v2</code></em> :</span></p></td>
<td>String key to compare with <em class="parameter"><code>v1</code></em>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<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.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>v</code></em> :</span></p></td>
<td>String key.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The hash value corresponding to the key <em class="parameter"><code>v</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.26</p>
</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 `..' and `.', 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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
<td>A filesystem path.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The canonical path, as a newly created string.</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nitems</code></em> :</span></p></td>
<td>Data block length, i.e. the number of consecutive items to convert.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>stride</code></em> :</span></p></td>
<td>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.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>datatype</code></em> :</span></p></td>
<td>Type of the raw data items.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>byteorder</code></em> :</span></p></td>
<td>Byte order of the raw data.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>target</code></em> :</span></p></td>
<td>Array of <em class="parameter"><code>nitems</code></em> to store the converted input data to.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>scale</code></em> :</span></p></td>
<td>Factor to multiply the data with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td>
<td>Constant to add to the data after multiplying with <em class="parameter"><code>scale</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>Buffer size.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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>.</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
<td>A file to read contents of.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>Buffer to store the file contents.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>size</code></em> :</span></p></td>
<td>Location to store buffer (file) size.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Return location for a <a href="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>filename_sys</code></em> :</span></p></td>
<td>File name in GLib encoding.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<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.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>dirname</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The path as a newly allocated string.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.</td>
</tr></tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The directory as a constant string that should not be freed.</td>
</tr></tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unused_key</code></em> :</span></p></td>
<td>Hash key (unused).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>Hash value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>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>*).</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>unused_key</code></em> :</span></p></td>
<td>Hash key (unused).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>Hash value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>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>*).</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>source</code></em> :</span></p></td>
<td>Source memory block.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest</code></em> :</span></p></td>
<td>Destination memory location.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>item_size</code></em> :</span></p></td>
<td>Size of one copied item, it should be a power of two.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>nitems</code></em> :</span></p></td>
<td>Number of items of size <em class="parameter"><code>item_size</code></em> to copy.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>byteswap</code></em> :</span></p></td>
<td>Byte swap pattern.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.1</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em> :</span></p></td>
<td>Memory block to search in.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack_len</code></em> :</span></p></td>
<td>Size of <em class="parameter"><code>haystack</code></em>, in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em> :</span></p></td>
<td>Memory block to find.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle_len</code></em> :</span></p></td>
<td>Size of <em class="parameter"><code>needle</code></em>, in bytes.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>object</code></em> :</span></p></td>
<td>A <a href="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#GObject"><span class="type">GObject</span></a>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>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).</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
<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.</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>datatype</code></em> :</span></p></td>
<td>Raw data type.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>The size of a single raw data item of type <em class="parameter"><code>datatype</code></em>.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.25</p>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>msgid</code></em> :</span></p></td>
<td>Message id to translate, containing `|'-separated prefix.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Translated message, or <em class="parameter"><code>msgid</code></em> itself with all text up to the last
`|' removed if there is no translation.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>buffer</code></em> :</span></p></td>
<td>Text buffer.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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>.</td>
</tr>
</tbody>
</table></div>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>str</code></em> :</span></p></td>
<td>A string to find.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td>
<td>
<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.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.11</p>
</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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s1</code></em> :</span></p></td>
<td>A string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>s2</code></em> :</span></p></td>
<td>A string.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>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.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
<td>A NUL-terminated string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>more</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>startmore</code></em> :</span></p></td>
<td>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>.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<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.</td>
</tr>
</tbody>
</table></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="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>s</code></em> :</span></p></td>
<td>A NUL-terminated string.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>killchars</code></em> :</span></p></td>
<td>A string containing characters to kill.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<em class="parameter"><code>s</code></em> itself, the return value is to allow function call nesting.</td>
</tr>
</tbody>
</table></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>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>haystack</code></em> :</span></p></td>
<td>A NUL-terminated string to search in.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>needle</code></em> :</span></p></td>
<td>A NUL-terminated string to search for.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>replacement</code></em> :</span></p></td>
<td>A NUL-terminated string to replace <em class="parameter"><code>needle</code></em> with.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>maxrepl</code></em> :</span></p></td>
<td>Maximum number of occurences to replace (use (gsize)-1 to replace
all occurences).</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>A newly allocated string.</td>
</tr>
</tbody>
</table></div>
</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.8</div>
</body>
</html>
|