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
|
2008-03-05 James Antill <james@and.org>
* NEWS: Release 1.0.4
2008-02-19 James Antill <james@and.org>
* ustr-sub-code.h (ustr_sub_subustr): Speedup when subustr == ustr.
(ustr_sc_sub_subustr): Speedup when subustr == ustr.
* ustr-ins-code.h (ustr_ins_subustr): Speedup when subustr == ustr.
2008-02-15 James Antill <james@and.org>
* ustr-ins-code.h (ustr_ins): Make sure ustr_ins(&x, p, x) is valid.
(ustr_ins_subustr): Dito.
* ustr-replace-code.h (ustr_replace): Make sure ustr_replace(&x, x, x,0)
is valid.
* ustr-sub-code.h (ustr_sub): Make sure ustr_sub(&x, p, x) is valid.
(ustr_sub_subustr): Dito.
(ustr_sc_sub): Dito.
(ustr_sc_sub_subustr): Dito.
* ustr-spn-code.h (ustr_cspn_chr_rev): Fix for when using off > 0.
2008-02-14 James Antill <james@and.org>
* ustr-sc-code.h (ustr_sc_vconcatx): Added function.
(ustr_sc_concatx): Added function.
(ustr_sc_vconcat): Added function.
(ustr_sc_concat): Added function.
(ustr_sc_vjoinx): Added function.
(ustr_sc_joinx): Added function.
(ustr_sc_vjoin): Added function.
(ustr_sc_join): Added function.
2008-02-13 James Antill <james@and.org>
* ustr-set-code.h (ustr_set_subustr): Minor opt. for ustr_set_subustr()
in the delete everything case.
* ustr-fmt-code.h (ustr__retard_vfmt_ret): Fix use of bare va_copy.
2008-01-14 James Antill <james@and.org>
* NEWS: Release 1.0.3
2007-11-30 James Antill <james@and.org>
* Makefile (install-multilib-linux): Add Linux multilib support, as
that makes Fedora happy.
2007-11-24 James Antill <james@and.org>
* ustr-sc-code.h (ustr_sc_ltrim): Added function.
(ustr_sc_rtrim): Added function.
(ustr_sc_trim): Added function.
* T-installed/tst_vstr_chk.c (main): Add test for new option.
* ustr-cntl.h (struct Ustr_cntl_fmt): Add a way to use another
vsnprintf() type function, for instance vstr_add_vfmt().
2007-10-29 James Antill <james@and.org>
* NEWS: Release 1.0.2
2007-10-27 James Antill <james@and.org>
* ustr-main-code.h (ustr_conf): Add a reference count argument.
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_MEM_SZ): Renamed function to
follow order of arguments.
(USTR_CNTL_MALLOC_CHECK_MEM_MINSZ): Renamed function to follow order
of arguments.
(USTR_CNTL_MALLOC_CHECK_MEM_USTR): Added function to ease calls to
other USTR_CNTL_MALLOC_CHECK_MEM_*() functions.
(USTR_CNTL_MALLOC_CHECK_MEM_USTRP): Added function.
* ustr-main-code.h (ustr_conf): Remove the refnn argument as at was the
exact same thing as the ref argument.
* ustr-cntl.h (USTR_CNTL_OPT_GET_MC_M_SCRUB): Added control option for
malloc check scrubbing.
(USTR_CNTL_OPT_SET_MC_M_SCRUB): Added control option for malloc check
scrubbing.
(USTR_CNTL_OPT_GET_MC_F_SCRUB): Added control option for malloc check
scrubbing.
(USTR_CNTL_OPT_SET_MC_F_SCRUB): Added control option for malloc check
scrubbing.
(USTR_CNTL_OPT_GET_MC_R_SCRUB): Added control option for malloc check
scrubbing.
(USTR_CNTL_OPT_SET_MC_R_SCRUB): Added control option for malloc check
scrubbing.
* ustr-cntl-code.h (ustr__cntl_mc_setup_malloc): Added enablement of
malloc checking via. environment variables.
2007-10-25 James Antill <james@and.org>
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_LVL): Added function.
2007-10-24 James Antill <james@and.org>
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_BEG): Use as a general enter/exit
function macro ... so we can tell much better where the problems are.
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_EMPTY): Remove function.
* ustr-main.h (USTR1_CHK): Added macro function.
(USTR2_CHK): Added macro function.
(USTR4_CHK): Added macro function.
2007-10-23 James Antill <james@and.org>
* examples/custr.c (main): Add new example, creates constant ustr's from
input.
2007-10-22 James Antill <james@and.org>
* ustr-import.in: Missed fixes needed for install testing.
* libustr.ver: Use different versions for different minor lib. versions.
2007-10-21 James Antill <james@and.org>
* ustr-import.in: Fixes needed for bugs found by installed testing.
* ustr-import.in: Fix default ref bytes to be the same as when using
the library.
* ustr-conf.h.in: Fix pre-computed config. to be the same as that
delivered.
* ustr-cntl-code.h: Changed dynamic config. to be the same as the static
config. -- Oops.
2007-10-17 James Antill <james@and.org>
* ustr-main.h (USTR_SC_INIT_AUTO_OSTR): Added macro function.
2007-10-15 James Antill <james@and.org>
* ustr-io-code.h (ustrp__io_getdelim): Return the last line of a file,
even if it doesn't match the delimiter.
* examples/fgrep.c (fp_loop): Fixup memory allocations free's.
(fp_loop): Remove dual IO strategy, going with obvious implementation.
* ustr-pool-code.h (ustr__pool_ll_sys_realloc): Always call the fixup
function for pool realloc, as it can be used in non-debug programs.
2007-10-13 James Antill <james@and.org>
* ustr-main-code.h (ustrp__del): Change recorded size in malloc-check
for realloc() downgrade that failed.
* ustr-pool-code.h (ustr__pool_ll_sys_realloc): Change the interface
contract to say that the "oldsz" is a minimum.
(ustr__pool_ll_sys_realloc): Change recorded size in malloc-check for
realloc() downgrade.
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_MINSZ_MEM): Add function.
* ustr-cntl-code.h (ustr_cntl_opt): Remove warn_unused_ret.
* ustr-main-code.h (ustr__rw_add): Fixup alloc return value.
(ustr__rw_mod): Remove ustr__rw_add() and ustr__rw_del(), use this
instead.
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_BEG): Rename function from
USTR_CNTL_MALLOC_CHECK_ENABLE.
(USTR_CNTL_MALLOC_CHECK_END): Rename function from
USTR_CNTL_MALLOC_CHECK_DISABLE.
* ustr-pool-code.h (ustr_pool_ll_make): Choose better name for linked
list pool API.
(ustr_pool_ll_make): Add malloc check asserts for most of pool API.
(ustr_pool_ll_cntl): Add function.
2007-10-11 James Antill <james@and.org>
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_DISABLE): Add function.
2007-10-10 James Antill <james@and.org>
* ustr-main.h (USTR_CNTL_MALLOC_CHECK_ENABLE): Add function.
(USTR_CNTL_MALLOC_CHECK_MEM): Add function.
(USTR_CNTL_MALLOC_CHECK_SZ_MEM): Add function.
(USTR_CNTL_MALLOC_CHECK_EMPTY): Add function.
2007-10-06 James Antill <james@and.org>
* ustr-sc-code.h (ustrp_sc_export): Added function, redefined
ustr_sc_export() to do entire ustr.
* examples/txt2html.c (main): Added another example program.
2007-10-05 James Antill <james@and.org>
* ustr-sc-code.h (ustr_sc_export): Added function.
2007-09-21 James Antill <james@and.org>
* ustr-srch-code.h (ustr_srch_buf_fwd): Change search for len=0 to
return zero when the string is empty.
(ustr_srch_buf_rev): Change search for len=0 to return zero when the
string is empty.
(ustr_srch_rep_chr_fwd): Change search for len=0 to return zero when the
string is empty.
(ustr_srch_rep_chr_rev): Change search for len=0 to return zero when the
string is empty.
2007-09-20 James Antill <james@and.org>
* ustr-srch-code.h (ustr__memcasechr): Have the args. the same way
around as memchr()
2007-09-15 James Antill <james@and.org>
* ustr-main-code.h (ustr__ref_del): Speed improvment for ustr_free().
* examples/fgrep.c (fgrep): Add some more GNU options, and give it a
minor speed boost.
* ustr-io-code.h (ustr_io_getdelim): Fix hanging errno problem.
* libustr.ver: Add missing symbol versions from the 1.0.1 release.
* scripts/list_functions_src.pl: Add missing filenames.
* ustr-srch-code.h (ustr_srch_case_chr_fwd): Added function.
(ustr_srch_case_chr_rev): Added function.
(ustr_srch_case_buf_fwd): Added function.
(ustr_srch_case_buf_rev): Added function.
(ustr_srch_case_subustr_fwd): Added function.
(ustr_srch_case_subustr_rev): Added function.
(ustr_srch_case_rep_chr_fwd): Added function.
(ustr_srch_case_rep_chr_rev): Added function.
* ustr-cmp-internal.h (ustr__memcasecmp): Made memcasecmp available
outside cmp.
* ustr-srch-code.h (ustr__memrepchr): Rename internal functions, as
there is no existing function with this name.
2007-09-12 James Antill <james@and.org>
* libustr.ver: Add missing symbol versions from the 1.0.1 release.
2007-09-11 James Antill <james@and.org>
* ustr-cmp-code.h (ustr_cmp_prefix_subustr_eq): Added function.
(ustr_cmp_suffix_subustr_eq): Added function.
(ustr_cmp_case_prefix_subustr_eq): Added function.
(ustr_cmp_case_suffix_subustr_eq): Added function.
2007-09-10 James Antill <james@and.org>
* ustr-main-code.h (ustr_conf): Added function.
2007-09-03 James Antill <james@and.org>
* ustr-cntl-code.h: Move stdarg.h include into code file.
2007-08-28 James Antill <james@and.org>
* ustr-main.h: Fixup struct Ustr comment.
2007-08-08 James Antill <james@and.org>
* ustr-import.in: Fix name of replace file.
2007-08-04 James Antill <james@and.org>
* NEWS: Release 1.0.1
2007-08-04 James Antill <james@and.org>
* ustr-replace-code.h (ustr_replace_rep_chr): Minor speedup, for
non-owned replacements when olen == nlen.
(ustr_replace_buf): Minor speedup, for non-owned replacements when
olen == nlen.
2007-08-03 James Antill <james@and.org>
* Documentation/ustr-import.1: Add man page for ustr-import.
2007-08-02 James Antill <james@and.org>
* Documentation/txt2html.pl (convert): Fixup pre parsing to be more
resilient.
* ustr-io-code.h (ustr_io_getdelim): Added new function.
2007-08-01 James Antill <james@and.org>
* Documentation/txt2html.pl (conv_A_refs): Turn **X** into X as bold.
* Documentation/txt2man.pl (conv_A_refs): Turn **X** into X as bold.
2007-07-30 James Antill <james@and.org>
* ustr-io-code.h (ustr_io_put): Fix for IO error path.
2007-07-29 James Antill <james@and.org>
* ustr-replace-code.h (ustrp__replace_buf): Fix non-pool function calls
on pool access.
* ustr-fmt.h: Hopefully fix va_copy() snafu, dropping a bunch of code.
* ustr-main-code.h (ustr_setf_enomem_err): Set errno == ENOMEM, trickles
down to all error paths.
2007-07-28 James Antill <james@and.org>
* ustr-main-internal.h (USTR__PPTR): Remove macro, it's not safe from
aliasing as PPC dies. Also updated all users.
2007-07-27 James Antill <james@and.org>
* ustr-import.in (INCDIR): Get includedir from Makefile.
2007-07-26 James Antill <james@and.org>
* ustr-replace-code.h (ustr_replace_buf): Fix ustr_limited() case, and
do the same thing for ustr_fixed() if we can.
(ustr_replace_rep_chr): Fix ustr_limited() case, and do the same thing
for ustr_fixed() if we can.
(ustr_replace_buf): Use ustrp__del() for !tlen code path.
(ustr_replace_rep_chr): Use ustrp__del() for !tlen code path.
2007-07-25 James Antill <james@and.org>
* Makefile (VERS_FULL): Bump version to 1.0.1 for test releases.
(LDCONFIG): Add var. so we can turn off LDCONFIG at "install"
time when creating rpms etc.
* examples/fgrep.c: Added example program.
* ustr-split-code.h (ustr_split_spn_chrs): In the default mode skip
extra seperators at the end too.
(ustr_split_buf): In the default mode skip extra seperators at the
end too.
(ustr_split_buf): Add missing free.
* ustr-srch-code.h (ustr__sys_memrepchr): Fix bounds overrun.
(ustr__sys_memrepchr): Move to Boyer-Moore algo. for faster searches.
(ustr__sys_memrepchr): Fix length for memchr, so we don't miss things
if they are > needle len away.
2007-07-24 James Antill <james@and.org>
* ustr-replace-code.h (ustr_replace_rep_chr): Completely re-wrote
function to work like ustr_replace_buf() using ustr_srch_rep_chr_fwd().
* ustr-srch-code.h (ustr_srch_rep_chr_fwd): Added function.
(ustr_srch_rep_chr_rev): Added function.
* ustr-split-code.h (ustr_split_spn_chrs): Renamed function
(ustr_split_spn): Added function.
(ustr_split_spn_chrs): Use ustr_spn / ustr_cspn for main piece of code,
incl. minor cleanup.
* ustr-split.h (ustr_split_spn_cstr): Added function.
* ustr-utf8.h (USTR__SSIZE): Add special type for ssize_t, as it's not
an ISO 9899:1999 type ... currently unix only.
2007-07-24 Paul Rosenfeld <prosenfeld@tresys.com>
* ustr-replace-code.h (ustr_replace_rep_chr): Added function.
* ustr-split-code.h (ustr_sc_split_chrs): Added function.
2007-07-22 James Antill <james@and.org>
* ustr-sub.h (USTR_SUB_OBJ): Added macro.
(USTR_SUB_OSTR): Added macro.
(USTR_SC_SUB_OBJ): Added macro.
(USTR_SC_SUB_OSTR): Added macro.
* ustr-ins.h (USTR_INS_OBJ): Added macro.
(USTR_INS_OSTR): Added macro.
* ustr-set.h (USTR_SET_OSTR): Added macro.
* ustr-main.h (USTR_ADD_OSTR): Added macro.
(USTR_DUP_OSTR): Added macro.
(USTR_DUPX_OSTR): Added macro.
2007-07-21 James Antill <james@and.org>
* ustr-split-code.h (ustr_split_buf): Added storage parameter, and/or
have auto free on exit.
2007-07-20 James Antill <james@and.org>
* ustr-main.h (ustr_len): Add assert for NULL.
(ustr_cstr): Add assert for NULL.
2007-07-19 James Antill <james@and.org>
* ustr-replace-code.h (ustrp__replace_buf): Remove underflow condition,
as that can't happen.
* ustr-sub-code.h (ustr_sub_subustr): Let subustr with len=0 work.
(ustr_sc_sub_undef): Let subustr with len=0 work.
(ustr_sc_sub_subustr): Let subustr with len=0 work.
* ustr-split-code.h (ustr_split_buf): Initial cleanup.
* ustr-main.h (USTR_POOL_NULL): Added NULL specific for Ustr_pool.
2007-07-19 Paul Rosenfeld <prosenfeld@tresys.com>
* ustr-split.h (ustr_split_cstr): Added function.
* ustr-split-code.h (ustr_split_buf): Added function.
(ustr_split): Added function.
2007-07-18 James Antill <james@and.org>
* ustr-pool-code.h (ustr__pool_sys_free): Go back more than one ptr, so
dupx + copy + free etc. works better.
2007-07-16 James Antill <james@and.org>
* ustr-sub-code.h (ustr_sc_replace_buf): Fix tlen calc.
(ustr_sc_replace_buf): Fix main loop for dupx path.
(ustr_sc_replace_buf): Fix length of final sub for dupx path.
* ustr-ins-code.h (ustr_ins_undef): Fix memmove length.
* ustr-sub-code.h (ustr_sub_rep_chr): Fix return value.
* ustr-ins-code.h (ustr_ins_undef): Fix offset.
* ustr-sub-code.h (ustr_sub_vfmt_lim): Add offset to vsnrptinf(), duh!
(ustr_sub_vfmt_lim): Fix NIL overwrite from vsnprintf()
(ustr_sc_sub_vfmt_lim): Add offset to vsnrptinf(), duh!
(ustr_sc_sub_vfmt_lim): Fix NIL overwrite from vsnprintf()
* ustr-ins-code.h (ustrp__ins_undef): Use current len, not new len.
(ustr_ins_vfmt_lim): Add offset to vsnrptinf(), duh!
(ustr_ins_vfmt_lim): Fix NIL overwrite from vsnprintf()
2007-07-15 James Antill <james@and.org>
* ustr-ins-code.h (ustr_ins_rep_chr): Fix pos.
(ustr_ins_buf): Fix pos.
(ustr_ins_rep_chr): Fix return value.
(ustr_ins_undef): Get wstr after realloc().
* ustr-sub-code.h (ustr_sub_vfmt_lim): Added function.
(ustr_sub_fmt_lim): Added function.
(ustr_sub_vfmt): Added function.
(ustr_sub_fmt): Added function.
(ustr_sc_sub_vfmt_lim): Added function.
(ustr_sc_sub_fmt_lim): Added function.
(ustr_sc_sub_vfmt): Added function.
(ustr_sc_sub_fmt): Added function.
* ustr-ins-code.h (ustr_ins_vfmt_lim): Added function.
(ustr_ins_fmt_lim): Added function.
(ustr_ins_vfmt): Added function.
(ustr_ins_fmt): Added function.
* ustr-sub-internal.h (USTR_SUB_INTERNAL_H): Added file, and all ustrp
wrapper APIs.
* ustr-main-code.h (ustr_del): Try to set enomem, if dupx fails.
(ustr_del_subustr): Try to set enomem, if dupx fails.
(ustr_add): Try to set enomem, if dupx fails.
* ustr-ins-code.h (ustr_ins_undef): Added function.
(ustr_ins): Added function.
(ustr_ins_subustr): Added function.
(ustr_ins_rep_chr): Added function.
* ustr-ins.h (ustr_ins_cstr): Added function.
* ustr-sub-code.h (ustr_sc_sub_undef): Added function.
(ustr_sc_sub_undef): Move to using ustr_ins*().
2007-07-14 James Antill <james@and.org>
* ustr-main-code.h (ustr_add_buf): Remove code.
(ustr_add_rep_chr): Remove code.
* ustr-sub-code.h (ustr_sub_rep_chr): Added function.
(ustr_sub_subustr): Fix typo of *ps1 into s2, must test!
(ustr_sc_sub_subustr): Added function.
(ustr_sc_replace_buf): Added function.
(ustr_sub_undef): Added function.
* ustr-sub.h (ustr_sc_replace_cstr): Added function.
* ustr-sub-code.h (ustr_sc_replace): Optimization, so we don't go n**2.
2007-07-13 James Antill <james@and.org>
* ustr-import.in: Add sub.
* T/ctst_17_sub.c: Initial fixups.
* ustr-sub-code.h (ustr_sub_subustr): Added function.
* ustr-sub-code.h: Initial fixups.
* ustr-sub.h: Initial fixups.
2007-07-13 Paul Rosenfeld <prosenfeld@tresys.com>
* ustr-sub-code.h (ustr_sub_buf): Added function.
(ustr_sub_cstr): Added function.
(ustr_sub): Added function.
(ustr_sc_sub_buf): Added function.
(ustr_sc_sub): Added function.
(ustr_replace): Added function.
2007-07-12 James Antill <james@and.org>
* NEWS: Release 1.0.0
2007-07-12 James Antill <james@and.org>
* ustr-main-code.h (ustr__dupx_cmp_eq): More fixes for dupx comparisons.
* examples/mkdir_p.c: Added example program.
* ustr-sc-code.h (ustr_sc_dup): Fix implementation to call ustr_dup()
directly.
(ustr_sc_dupx): Fix implementation when using different configurations.
* ustr-main-code.h (ustr__dupx_cmp_eq): Fix dupx comparisons, esp. when
sizes are involved.
2007-07-11 James Antill <james@and.org>
* ustr-main-code.h (ustr_assert_valid_subustr): Make this a public
function.
* ustr-b.h (ustr_parse_b_uint16): Make the Ustr string constant.
(ustr_parse_b_uint32): Make the Ustr string constant.
(ustr_parse_b_uint64): Make the Ustr string constant.
2007-07-10 James Antill <james@and.org>
* ustr-io-code.h (ustr_io_getfile): Round up on first pass.
* ustr-main-code.h (ustr_add): Fixup code path when using subustr on
self.
* ustr-set-code.h (ustr_set_subustr): Fixup code path when using subustr
on sellf.
2007-07-09 James Antill <james@and.org>
* ustr-main-code.h (ustr_size): Remove special casing for read-only
strings.
(ustr_size_alloc): Remove special casing for read-only strings.
(ustr_size_overhead): Change "" overhead value from 0 to 1, although
it's debatable this matches the other values better.
* ustr-pool-code.h (ustr_pool_make_pool): Move the bundled pool API into
it's own file.
2007-07-08 James Antill <james@and.org>
* ustr-main-code.h (ustr_setf_enomem_err): Don't change the enomem flag
if not owner.
(ustr_setf_enomem_clr): Don't change the enomem flag if not owner.
* ustr-set-code.h (ustrp__set_undef): Cleanup code path for set_undef
to current length.
* ustr-main-code.h (ustr__ref_set): Don't allow fixed storage Ustr's to
set anything.
(ustr_init_alloc): Remove if check for ustr__ref_set.
(ustr_init_fixed): Don't call ustr__ref_set, to it all manually.
(ustrp__add): Minor optimization for when we aren't adding anything.
(ustr_setf_enomem_err): Only set the enomem flag if we are the owner.
(ustr_setf_enomem_clr): Only clear the enomem flag if we are the owner.
* Documentation/functions.txt: More docs.
* ustr-main-code.h (ustr__ref_add): Remove macro function, minor
cleanup.
2007-07-07 James Antill <james@and.org>
* ustr-main.h (USTR_CONF_REF_BYTES): Change default to 1 byte.
2007-07-06 James Antill <james@and.org>
* ustr-main-code.h (ustr_add): Simplify the implimentation.
* examples/netstr.c (cescape_decode): Add \ EOL and \v handling.
2007-07-05 James Antill <james@and.org>
* ustr-main-code.h (ustr_realloc): Simplify the realloc API. to be
closer to what people would expect.
(ustr_reallocx): Remove this API.
* ustr-sc-code.h (ustr_sc_wstr): Added function.
* ustr-import.in: Add sc handling.
* ustr-sc.h: Move most of the ustr_sc functions to a file.
* ustr-utf8-code.h (ustr_sc_utf8_reverse): Added function.
2007-07-04 James Antill <james@and.org>
* examples/netstr.c (gen_csv_netstr): Added CSV functionality.
* ustr-srch-code.h (ustr_srch_chr_fwd, ustr_srch_buf_fwd): Always
return the position as an absolute value.
2007-07-03 James Antill <james@and.org>
* ustr-spn-code.h (ustr_spn_chr_fwd, ustr_spn_chr_rev)
(ustr_spn_chrs_fwd, ustr_spn_chrs_rev)
(ustr_cspn_chr_fwd, ustr_cspn_chr_rev)
(ustr_cspn_chrs_fwd, ustr_cspn_chrs_rev)
(ustr_utf8_spn_chrs_fwd, ustr_utf8_spn_chrs_rev)
(ustr_utf8_cspn_chrs_fwd, ustr_utf8_cspn_chrs_rev): Added offset
argument.
2007-07-02 James Antill <james@and.org>
* ustr-srch-code.h (ustr_srch_chr_fwd, ustr_srch_chr_rev)
(ustr_srch_buf_fwd, ustr_srch_buf_rev)
(ustr_srch_subustr_fwd, ustr_srch_subustr_rev): Added offset argument.
* ustr-parse-code.h (ustr_parse_uintmaxx): Added offset and return
length arguments.
(ustr_parse_ulongx): Added offset and return length arguments.
* ustr-parse.h (ustrp_parse_uintmaxx): Dito.
(ustrp_parse_ulongx): Dito.
* ustr-main-code.h (ustr_size_overhead): Rename function, from
ustr_overhead().
* ustr-main.h: Rename ustr_overhead and ustrp_overhead to
ustr_size_overhead and ustrp_size_overhead.
* T/ctst_99_64bit.c (tst): Add 64bit tests.
2007-07-01 James Antill <james@and.org>
* Makefile (install): Fix pkgconfig install on x86-64.
2007-06-24 James Antill <james@and.org>
* Makefile (EXAMPLES): Add nums example to install.
* examples/Makefile: Revert to using the system headers/libs.
* examples/nums.c (main): Fix ustr_parse_intmaxx() call to use the
pointer and not the old char API.
2007-06-24 James Antill <james@and.org>
* NEWS: Release 0.99.3
2007-06-24 James Antill <james@and.org>
* ustr-compiler.h (USTR__INLINE): Move a bit closer to being able to
build without inline support.
2007-06-23 James Antill <james@and.org>
* ustr-main.h (USTR_CONF_COMPILE_USE_INLINE): Added conf. so we can
compile without inline, users only atm.
* ustr-set.h (USTR_SET_OBJ): Added macro.
* ustr-main.h (USTR_SIZE_FIXED): Added macro for sizing fixed Ustr's.
(USTR_BEG_FIXED8): Added macro.
(USTR_ADD_OBJ): Added macro.
(USTR_DUP_OBJ): Added macro.
(USTR_DUPX_OBJ): Added macro.
* scripts/gen_doc_templ_from_protos.pl: Add ustrp functions back in.
* ustr-cmp.h (ustr_cmp_case_eq): Added function.
(ustr_cmp_case_subustr_eq): Added function.
(ustr_cmp_case_cstr_eq): Added function.
(ustr_cmp_case_prefix_eq): Added function.
(ustr_cmp_case_prefix_cstr_eq): Added function.
(ustr_cmp_case_suffix_eq): Added function.
(ustr_cmp_case_suffix_cstr_eq): Added function.
(ustr_cmp_case_cstr): Added function.
* ustr-cmp-code.h (ustr_cmp_case_buf): Added function.
(ustr_cmp_case): Added function.
(ustr_cmp_case_subustr): Added function.
(ustr_cmp_case_prefix_buf_eq): Added function.
(ustr_cmp_case_suffix_buf_eq): Added function.
2007-06-22 James Antill <james@and.org>
* ustr-main-code.h (ustr_sc_tolower): Added function.
(ustr_sc_toupper): Added function.
* ustr-parse-code.h (ustr_parse_uintmaxx): Allow utf8 seperators.
2007-06-21 James Antill <james@and.org>
* ustr-parse-code.h (ustr_parse_uintmaxx): Fixup overflow to work the
same with or without the overflow error numbers.
* ustr-parse-code.h (ustr_parse_uintmaxx): Add num_min argument to
cleanup negative numbers support.
* examples/nums.c (main): Added example program, uses ustr_parse* and
ustr_sc_reverse().
* ustr-main-code.h (ustr_sc_reverse): Added function.
2007-06-20 James Antill <james@and.org>
* ustr-parse-code.h (ustr_parse_uintmaxx): Added function.
(ustr_parse_intmax, ustr_parse_intmax): Added functions.
(ustr_parse_ulongx): Added function.
(ustr_parse_long, ustr_parse_long): Added functions.
(ustr_parse_int, ustr_parse_int): Added functions.
(ustr_parse_short, ustr_parse_short): Added functions.
* examples/netstr.c (cescape_decode): Added new style python octal
escapes.
2007-06-18 James Antill <james@and.org>
* Makefile (CFLG_LIB_OPT): Remove USTR_DEBUG from CFLG_LIB_OPT
* ustr-main-code.h (ustr__pool_sys_free): Have free do the "right" thing
if using the last allocated ustrp. Same as ustr__pool_sys_realloc.
(ustr_pool_make_subpool): Added function.
* ustr-main.h (struct Ustr_pool): Create generic "class" for pool'd
data. This way multiple modules can have seperate pools, managed in
different ways. Convert all pool functions to require a Ustr_pool
argument.
2007-06-14 James Antill <james@and.org>
* ustr-main.h (USTR_ASSERT_NO_SWITCH_DEF): Add macro for switch
statements that "can't" default.
* ustr-main-code.h (ustr_owner): Only have code for 8 byte refs. in
64bit compiles.
2007-06-13 James Antill <james@and.org>
* ustr-set-code.h (ustrp__set_subustr): Simplify code.
(ustrp__set_subustr): Fix off by one bug, when going to set_buf().
* T/ctst_15_enomem.c (tst): Add test, coverage now over 98% on 32bit.
* Makefile (EXAMPLES): Add hexdump example.
* ustr-set-code.h (ustrp__set_empty): Don't dupx, if sized and owner.
* ustr-main-code.h (ustr_init_size): Fix bug with lbytes/sbytes being
wrong with sizes near the byte change marks.
(ustr_init_alloc): Fix bug with lbytes/sbytes being wrong on 64bit.
* ustr-io-code.h (ustr_io_get): Change the API to possibly return the
number of bytes read.
* examples/hexdump.c (hexdump): Fix off by one typo: > should be >=
(main): Add - files.
(usage): Fix usage.
(loop): Don't read again, if we've hit EOF.
2007-06-12 James Antill <james@and.org>
* examples/hexdump.c (main): Change read size and allow stdin reading.
* examples/hexdump.c (hexdump): Added new example.
* examples/netstr.c: Remove fake compat. IO for ustr-0.99.1.
* examples/hello_world.c: Remove fake compat. IO for ustr-0.99.1.
2007-06-11 James Antill <james@and.org>
* ustr-main.h (ustr_xi__embed_val_get)
(ustr_xi__ref_get, ustr_xi__pow2): Rename functions.
* libustr.ver: Fixup ustr__ exported functions to be ustr_xi__
* libustr.ver: Added symbols to export map.
* scripts/list_functions_src.pl: Added io and utf8 files to list.
* ustr-utf8-code.h (ustr_utf8_chars2bytes): Deal with zero length input.
* ustr-spn.h (ustr_utf8_spn_cstr_fwd, ustr_utf8_spn_cstr_rev)
(ustr_utf8_cspn_cstr_fwd, ustr_utf8_cspn_cstr_rev)
(ustr_utf8_spn_fwd, ustr_utf8_spn_rev, ustr_utf8_cspn_fwd)
(ustr_utf8_cspn_rev): Added functions.
* ustr-spn-opt-code.c: Add utf8 externs.
* ustr-spn-dbg-code.c: Add utf8 externs.
* ustr-debug.h: Move utf8 in front of spn, as ustr-import does.
* ustr.h: Move utf8 in front of spn, as ustr-import does.
* ustr-spn-code.h (ustr_utf8_spn_chrs_fwd)
(ustr_utf8_spn_chrs_rev, ustr_utf8_cspn_chrs_fwd)
(ustr_utf8_cspn_chrs_rev): Fixes for bad utf-8.
* ustr-utf8-code.h (ustr_utf8_len): Use the same logic as
ustr__utf8_prev / next. Add pointer to Wikipedia documentation on utf8.
(ustr__utf8_next): Rename from _nxt.
(ustr__utf8_prev): Rename from _beg.
(ustr_utf8_bytes2chars): Added function.
2007-06-10 James Antill <james@and.org>
* ustr-spn-code.h (ustr_utf8_spn_chrs_fwd)
(ustr_utf8_spn_chrs_rev, ustr_utf8_cspn_chrs_fwd)
(ustr_utf8_cspn_chrs_rev): Added functions. UTF-8 compatible spanning.
* ustr-srch-internal.h: Create internal file, so we can use
USTR__SYS_MEM internally.
* ustr-utf8-code.h (ustr_utf8_len): Use hardwired code, for
code decrease / speed increase.
* ustr-srch-code.h (ustr__sys_memmem): Changed to an internal symbol.
2007-06-08 James Antill <james@and.org>
* ustr-utf8-code.h (ustr_utf8_chars2bytes): Added function.
* libustr.ver: Add local matches.
2007-06-07 James Antill <james@and.org>
* ustr-utf8-code.h (ustr__utf8_check): Fix major "porting" typo, tests
are good!
* ustr-utf8-internal.h (USTR__UTF8_WCHAR): Remove dep. on wchar.h for
wchar_t ... use our own "wchar" that is unsigned and 32 bits.
2007-06-04 James Antill <james@and.org>
* Documentation/functions.txt: Add some more functions.
* ustr-main.h (ustr_pool_sys_malloc, ustr_pool_sys_realloc): Add NONULL
attribute to pool pointer argument.
(ustr_pool_sys_free): Fix NONULL argument on data pointer.
(ustr_pool_sys_realloc): Change behaviour to be like realloc() for
zero length cases.
* ustr-main-code.h (ustr_dup): Fix dupx'ing.
(ustrp__del): Fix dmpx_cmp/ing.
(ustrp__dupx): Fix dupx'ing.
(ustrp__dup_subustr): Fix dupx'ing.
(ustr_add_undef): Fix dupx'ing.
(ustrp__add): Fix dupx'ing.
(ustrp__sc_dup): Fix dupx'ing.
(ustrp__sc_ensure_owner): Fix dupx'ing.
* ustr-set-code.h (ustrp__set): Remove defunct DUPX_DEF.
(ustrp__set_undef): Remove defunct DUPX_DEF.
(ustrp__set_empty): Remove defunct DUPX_DEF.
* ustr-io-code.h (ustrp__io_put): Remove defunct DUPX_DEF.
* ustr-main-internal.h (USTR__DUPX_FROM): Change macro so it works for
everything, preserves enomem etc.
* ustr-cmp.h (ustr_cmp_prefix_buf_eq, ustr_cmp_prefix_eq)
(ustr_cmp_prefix_cstr_eq, ustr_cmp_suffix_buf_eq)
(ustr_cmp_suffix_eq, ustr_cmp_suffix_cstr_eq): Add functions.
* scripts/git-push-web.sh: Add script.
* ustr-utf8.h (ustr_utf8_valid): Added function.
* ustr-utf8-code.h (ustr_utf8_len): Added function.
(ustr_utf8_width): Added function.
* ustr-io-internal.h: Fix #define protection C&P error.
* Documentation/index.html: Fixup documention for examples.
2007-06-03 James Antill <james@and.org>
* NEWS: Release 0.99.2.
2007-06-03 James Antill <james@and.org>
* Documentation/index.html: Fix HREF as well as title
* ustr-import.in: Split *-code.h and *-opt-code.c / *-dbg-code.c. Also
fix non-cfile imports.
* scripts/clean.sh: Remove .git data
* libustr.ver: Fix typo
* Makefile (SRC_SRCS): Install ustr-b-code.h, to help people make
readable Makefiles
* examples/Makefile: Import a bunch of stuff from top level Makefile
to show people how to do it.
* Makefile (all): Fix make all to build opt static libs.
* Makefile (install): Fix install of man pages.
* Documentation/index.html: Update link to 0.99.2
* Makefile (SRC_SRCS): Install ustr-io-internal.h
* Makefile (install): Fix install permissions for ustr-import.
* ustr-debug.pc: Update for 0.99.2 release.
* ustr.pc: Update for 0.99.2 release.
* libustr.ver: Update for new symbols.
* Documentation/index.html: Add link to functions/constatns API
references.
* Makefile (install): Install examples and html / man page API
references.
* examples/hello_world.c (main): Added very simple example.
* examples/netstr.c (cescape_decode): Add options for various stuff,
add a cescape_decode() function.
* examples/Makefile (LDFLAGS): Change default CFLAGS/LDFLAGS to use
installed libustr.a/ustr.h.
* ustr-io.h (ustr_io_putfileline): Add function.
(ustrp_io_putfileline): Add function.
* ustr-io-code.h (ustr_io_putline): Add function.
(ustrp_io_putline): Add function.
2007-06-02 James Antill <james@and.org>
* Documentation/index.html: Add info. about development tree.
2007-06-01 James Antill <james@and.org>
* Documentation/constants.txt: Start documentation on constants.
* Documentation/functions.txt: Start documentation on functions.
* Documentation/txt2man.pl: Import perl script from Vstr.
* Documentation/txt2html.pl: Import perl script from Vstr.
* ustr-srch-code.h (ustr_srch_buf_rev): Fix buf=1 using _fwd typo.
* ustr-spn.h (ustr_spn_fwd, ustr_spn_rev): Remove _ustr and _cstr
namespaces.
(ustr_cspn_fwd, ustr_cspn_rev): Remove _ustr and _cstr namespaces.
(ustr_spn_cstr_fwd, ustr_spn_cstr_rev): Remove _ustr and _cstr
namespaces.
* ustr-srch-code.h (ustr_srch_subustr_fwd): Add function.
(ustr_srch_subustr_rev): Add function.
* TODO: Remove old cntl/srch_subustr data from TODO.
* scripts/clean.sh: Remove coverage data, and examples too.
* examples/netstr.c (main): Add example program.
* ustr-main.h (USTRP_SC_INIT_AUTO): Add macro.
2007-05-31 James Antill <james@and.org>
* ustr-main-code.h (ustrp__reallocx): Allow reallocx to "grow", as long
as we don't have to change byte storage.
(ustrp__add): Cleanup code.
* ustr-import.in: Add io, gdb and cntl options.
* ustr-main-code.h (ustr_pool_sys_malloc): Always have the latest
allocation at the top of the list, strict FIFO now.
(ustr_pool_sys_realloc): Allow reallocation of the "last" -- top of the
list allocation.
* ustr-fmt-code.h (ustrp__add_vfmt_lim): Remove bad va_copy()/va_end()
calls on error/retard call path.
(ustrp__dupx_vfmt_lim): Remove bad va_copy()/va_end() calls on
error/retard call path.
(ustrp__set_vfmt_lim): Remove bad va_copy()/va_end() calls on
error/retard call path.
* ustr-main-code.h (ustr_setf_enomem_err): Change namespace from
_set_ to _setf_, so it isn't confusing with ustr_set_fmt() etc.
(ustr_setf_enomem_clr, ustr_setf_share, ustr_setf_owner): Dito.
* ustr-main.h (ustr_rw): Remove function, as it's confusing with
ustr_owner()
(ustr_init_fixed, ustrp_init_fixed): Remove warn_unused_ret.
* ustr-main-code.h (ustrp_init_alloc): Fix inf. recursion typo.
2007-05-30 James Antill <james@and.org>
* ustr-set-code.h (ustr_set_empty, ustrp_set_empty): Add functions,
work like add_empty.
(ustrp__set): Add enomem on failure to dup.
(ustrp__set_subustr): Add enomem on failure to dup.
* ustr-cmp.h (ustr_cmp_fast_buf): Move function to be always inline.
(ustr_cmp_fast): Move function to be always inline.
* ustr-main-code.h (ustr_pool_sys_free): Add function.
(ustr_pool_sys_realloc, ustr_pool_sys_free): Change namespace from
"ustr_pool_api_" to "ustr_pool_sys_".
(ustrp__del): Fix bad usage of ustr_ro() to ustr_alloc()
(ustr__rw_add): Allow growing if byte storage size doesn't increase.
(ustr__treat_as_buf): Allow 0 length strings.
(ustr_sc_ensure_owner, ustrp_sc_ensure_owner): Add function, makes sure
the string passes the ustr_owner() test.
* ustr-import.in: Add missing compiler copy.
* ustr-compiler.h: Remove COMPILE_ASSERT checks, for dynamic config.
* tst.h (USE_MALLOC_CHECK): Explicitly define the option.
(mc_malloc, mc_realloc, mc_free): Use the new USTR_CONF_USE_DYNAMIC_CONF
to change the malloc cbs with ustr_cntl_opt.
(main): Move from dup_buf() to sc_ensure_owner(), tweaks for
malloc-check.
* ustr-cntl-code.h (ustr_cntl_opt): Added function, allow some of the
global config. options to be runtime vars instead.
* ustr-cmp-code.h (ustr_cmp_subustr): Fix spurious ! C&P typo.
(ustr_cmp_fast_subustr): Fix spurious ! C&P typo.
* tst.h (USTR_CONF_FREE): Add file/line data.
* malloc-check.h (malloc_check_free): Add file/line params. to free.
2007-05-28 James Antill <james@and.org>
* ustr-fmt.h: Add warn_unused_ret() to all dup funcs.
* Makefile: Move all tests into seperate T dir, generate .c files
so that coverage "does the right thing"
* scripts/lcov.sh: Update lcov.sh to do the right thing, must be called
from Makefile now.
* malloc-check.h (malloc_check_assert): Use internal namespaced
assert().
(malloc_check_mem, malloc_check_alloc, malloc_check_sz_mem): Add
file/line params. to other functions.
(MALLOC_CHECK_TRACE): Add trace option.
2007-05-27 James Antill <james@and.org>
* ustr-io-code.h (ustrp__io_getline): Speed up getline.
* Makefile: Fixup SONAME, change cc to be default.
2007-05-26 James Antill <james@and.org>
* ustr-set-code.h (ustrp__set_undef): Cleanup code.
* ustr-io-code.h (ustrp__io_put): Don't allocate an entire new string,
just the bits that'll be left over.
* Documentation/design.html: Use new USTR_BEG_FIXEDx constants in
examples.
2007-05-25 James Antill <james@and.org>
* ustr-main-code.h (ustr__rw_add): Fixup tests for if we can reuse the
current Ustr, allow lbytes to be more than the minimum needed.
* ustr-io-code.h (ustr_io_get, ustrp_io_get)
(ustr_io_getfile, ustrp_io_getfile, ustr_io_getfilename)
(ustr_io_getfilename, ustrp_io_getfilename)
(ustr_io_getline, ustrp_io_getline)
(ustr_io_put, ustrp_io_put, ustr_io_putfilename)
(ustrp_io_putfilename): Added simple blocking stdio IO functions.
* ustr-fmt.h: Add USTR__COMPILE_ATTR_WARN_UNUSED_RET() to add _dup
format functions.
* ustr-main.h: Remove USTR__COMPILE_ATTR_WARN_UNUSED_RET() from
ustr_init_fixed.
* ustr-set-internal.h: Add internal headers, to reduce obj size.
* ustr-main.h: Add internal headers, to reduce obj size.
(USTR_CONF_INCLUDE_INTERNAL_HEADERS): Add define on if you get internal
header code or not.
* ustr-main-code.h (ustr__sz_get): Fixed prototype.
* Makefile (VERS_ESONAME): Fix the SONAME to just .0
2007-05-24 James Antill <james@and.org>
* ustr-import.in: Add a gdb import only mode.
* ustr.spec: Fix typo of %{ver} to be %{version}.
* ustr-import.in: Copy .gdbinit on import.
* Makefile (install): Added .gdbinit to shared dir.
* ustr.spec: Added .gdbinit to -devel package
* Documentation/index.html: Tweaked documentation.
* Documentation/index.html: Added link to gnumeric file
* Documentation/index.html: Added link to .gdbinit file
* THANKS: Added Rik and Karl.
2007-05-23 James Antill <james@and.org>
* NEWS: Release 0.99.1
2007-05-15 James Antill <james@and.org>
* tst_4_grow.c (tst): Fix for Solaris's retarded printf.
* ctst_4_grow.c (tst): Fix for Solaris's retarded printf.
|