summaryrefslogtreecommitdiff
path: root/strings
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix the typo.Joe Orton2006-08-034-4/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428317 13f79535-47bb-0310-9956-ffa450edef68
* Update license header.Joe Orton2006-08-034-24/+24
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@428313 13f79535-47bb-0310-9956-ffa450edef68
* * strings/apr_snprintf.c (apr_snprintf, apr_vsnprintf): Fix toJoe Orton2006-07-111-2/+2
| | | | | | | | | | | | returning number of bytes *without* NUL in overflow case. * test/teststr.c (snprintf_overflow): New test case. PR: 39996 Submitted by: Michal Luczaj <regenrecht o2.pl> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@420858 13f79535-47bb-0310-9956-ffa450edef68
* Restyle this code, slightly, to avoid code-not-reached warnings fromWilliam A. Rowe Jr2006-03-101-4/+4
| | | | | | | the optimizer (detected on Solaris cc 5.8) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@384926 13f79535-47bb-0310-9956-ffa450edef68
* * strings/apr_snprintf.c (conv_os_thread_t, conv_os_thread_t_hex):Joe Orton2006-02-231-6/+8
| | | | | | | Avoid strict-aliasing warnings with gcc 4.1. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@380106 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate a type mismatch, this is the smaller patch - changingWilliam A. Rowe Jr2006-01-131-2/+2
| | | | | | | | the declaration of apr_gcvt() - an exported function, is much dicier. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@368548 13f79535-47bb-0310-9956-ffa450edef68
* apr_tokenize_to_argv(): Stop touching storage after theJeff Trawick2005-10-211-1/+1
| | | | | | | | | | end of the input string. (Purify reports this problem when using an Apache piped logger.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@327141 13f79535-47bb-0310-9956-ffa450edef68
* Fix handling of %pI with psprintf; the psprintf implementation assumesJoe Orton2005-09-081-2/+10
| | | | | | | | | | | | | | | | | | | that the vformatter code will not palloc. * include/apr_network_io.h (apr_sockaddr_ip_getbuf): Declare new function. * network_io/unix/sockaddr.c (apr_sockaddr_ip_getbuf): Rewrite of apr_sockaddr_ip_get, taking a buffer argument. (apr_sockaddr_ip_get): Reimplement using apr_sockaddr_ip_getbuf. * strings/apr_snprintf.c (conv_apr_sockaddr): Use apr_sockaddr_ip_getbuf to avoid use of pool. * test/testsock.c (test_print_addr): New test case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@279566 13f79535-47bb-0310-9956-ffa450edef68
* Fix multiple sign'edness issues; for %width.prec variables, neitherWilliam A. Rowe Jr2005-09-031-9/+11
| | | | | | | | | | is -ever- signed, we pull out -width as a flag, and prec is folded +. Changing the code only required special handling of %*.* variables, continuing to read them as int, and preserving the folding of negative values that's already there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@267459 13f79535-47bb-0310-9956-ffa450edef68
* * strings/apr_snprintf.c (apr_vformatter): Add support for %pm toJoe Orton2005-08-181-0/+19
| | | | | | | | | | | print the error string corresponding to an apr_status_t. * test/testfmt.c (error_fmt): New test. * include/apr_lib.h: Document %pm and note the versioning constraint. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@233381 13f79535-47bb-0310-9956-ffa450edef68
* Add %pt support to apr_snprintf() for printing an apr_os_thread_tJeff Trawick2005-06-171-0/+46
| | | | | | | in hex format. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@191138 13f79535-47bb-0310-9956-ffa450edef68
* Buffer lengths in these internal functions must all be in apr_size_tWilliam A. Rowe Jr2005-05-161-13/+13
| | | | | | | quantums - to match the size of memory. Prevents many many ugly casts. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@170470 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright year to 2005 and standardize on current copyright owner line.Justin Erenkrantz2005-02-044-4/+8
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@151412 13f79535-47bb-0310-9956-ffa450edef68
* Remove .cvsignore files.Joe Orton2004-11-181-4/+0
| | | | | | | Tipped-of-by: Uwe Zeisberger git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@76269 13f79535-47bb-0310-9956-ffa450edef68
* Avoid any edge case or clib bug that might result in a stringWilliam A. Rowe Jr2004-06-281-3/+6
| | | | | | | | overflow of the fixed 5-byte buffer for our size function. Returns the '****' string when the buffer would overflow. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65226 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_snprintf() to respect precision for small floating pointJeff Trawick2004-06-271-1/+2
| | | | | | | | | | numbers. PR: 29621 Submitted by: Artur Zaprzala <zybi talex.pl> Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65222 13f79535-47bb-0310-9956-ffa450edef68
* Move APR_INT64_STRFN to apr_private.h and remove redundantJoe Orton2004-06-041-1/+1
| | | | | | | | | | | | | | | | | | APR_HAVE_INT64_STRFN macro. * configure.in: Define APR_HAVE_INT64 macro. * include/apr.h.in, include/apr.hw, include/apr.hnw: Remove APR_INT64_STRFN, APR_HAVE_INT64_STRFN macros. * include/arch/win32/apr_private.h, include/arch/netware/apr_private.h: Define APR_INT64_STRFN (and correctly for Win32, fix from Andr��). * strings/apr_strings.c (apr_strtoi64): Just use APR_INT64_STRFN. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65160 13f79535-47bb-0310-9956-ffa450edef68
* * configure.in, include/arch/win32/apr_private.h,Joe Orton2004-05-241-0/+8
| | | | | | | | | | | | | | include/arch/netware/apr_private.h: Define APR_OFF_T_STRFN. * include/apr_strings.h, strings/apr_strings.c: Add apr_strtoff() function. * test/teststr.c (string_strtoff): Add test. Submitted by: Andr�� Malo, Joe Orton git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65120 13f79535-47bb-0310-9956-ffa450edef68
* * strings/apr_strings.c (apr_strtoi64): Fix handling of negativeJoe Orton2004-04-041-2/+2
| | | | | | | | | integers on platforms without strtoll. * test/teststr.c (string_strtoi64): New function. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65039 13f79535-47bb-0310-9956-ffa450edef68
* * string/apr_snprintf.c (conv_10_quad): Fix formatting of integersJoe Orton2004-04-041-1/+2
| | | | | | | | | smaller than LONG_MIN. * test/testfmt.c (more_int64_fmts): Add regression test. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@65037 13f79535-47bb-0310-9956-ffa450edef68
* Fix a bug in apr_match_glob. We need to strdup the filename, otherwiseRyan Bloom2004-03-061-1/+1
| | | | | | | each call to apr_dir_read will overwrite the previous name. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64937 13f79535-47bb-0310-9956-ffa450edef68
* Add apr_match_glob and two tests to make sure that it is working. ThereRyan Bloom2004-03-051-0/+50
| | | | | | | | is a problem that is documented in the code that requires an apr_filepath_basename. That will be added soon. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64936 13f79535-47bb-0310-9956-ffa450edef68
* Relicense APR under Apache License, Version 2.0Justin Erenkrantz2004-02-134-201/+42
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64904 13f79535-47bb-0310-9956-ffa450edef68
* First whack at switching to a single top-level make. This adds a dependencyGreg Stein2004-02-051-19/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | upon Python at packaging time, but not at end-user config/build time. As far as I can tell, the build continues to function properly. (out-of-dir config/make not tested, and apr-iconv prolly needs some work) The buildconf scripts now generate a build-outputs.mk file which is included by the root's Makefile (via the build/gen-build.py script). bulid-outputs.mk specifies all of the various files present in the distribution. The top-level Makefiles were simplified to use an $(OBJECTS) symbol rather than 'find'ing them. Similarly, a $(HEADERS) symbol is used for the exports. The corresponding delete-* targets were eliminated since we have a precise set of inputs. The subdirs' Makefiles were removed since they are no longer called/used. The apr-util/uri Makefile was responsible for compiling a C program to generate the uri_delims.h file. That process was replaced by a Python script to generate the header (called by buildconf). The .c and .dsp were left for the Windows build to continue, but that should be revamped. build/apr_rules.mk was revamped somewhat to avoid recursion, but a lot of cleanup is still needed. Much of the recursive/local/x- logic is no longer needed and can be elimianated. rules.mk was created for inclusion by N makefiles, but that isn't really true any more, so it could probably be tossed (caveat: test/Makefile). Saved for a phase 2. Some additional work was added to properly clean up files in */build/, rather than relying on a makefile in there. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64891 13f79535-47bb-0310-9956-ffa450edef68
* * configure.in, include/apr.h.in, include/apr.hw, include/apr.hnw:Joe Orton2003-10-011-10/+10
| | | | | | | | | | | | | | | Remove definitions of APR_INT64_T_FMT_LEN, APR_UINT64_T_FMT_LEN and APR_UINT64_T_HEX_FMT_LEN. Die at configure-time if a 64-bit integer type is not found rather than placing "#error"s in apr.h. * strings/apr_snprintf.c (apr_vformatter): Rework to use sizeof() rather than APR_INT64_T_FMT_LEN. One (intensional) functional change, for the sizeof(int) == 8 case: previously the first if condition would always be true since strncmp(a, b, 0) == 0; now the condition will always be false. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64675 13f79535-47bb-0310-9956-ffa450edef68
* axe these deprecated functions:Jeff Trawick2003-09-031-6/+0
| | | | | | | | | apr_is_fnmatch apr_file_set_inherit apr_file_unset_inherit git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64608 13f79535-47bb-0310-9956-ffa450edef68
* remove these interfaces:Jeff Trawick2003-09-031-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_compare_groups apr_compare_users apr_current_userid apr_explode_localtime apr_explode_time apr_filename_of_pathname apr_get_groupid apr_get_groupname apr_get_home_directory apr_get_userid apr_get_username apr_group_name_get apr_implode_gmt apr_lstat FNM_NOMATCH FNM_NOESCAPE FNM_PATHNAME FNM_PERIOD FNM_CASE_BLIND change the function args to this interface: apr_mmap_dup this function's args changed in a previous commit, so mention that in CHANGES apr_socket_create git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64607 13f79535-47bb-0310-9956-ffa450edef68
* In the case of invalid %p formats, skip the bogus argument too when skipping ↵Martin Kraemer2003-06-201-0/+1
| | | | | | the false format item git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64545 13f79535-47bb-0310-9956-ffa450edef68
* Add %pT support to apr_snprintf() for printing an apr_os_thread_t.Jeff Trawick2003-04-171-0/+50
| | | | | | | (from a series of suggestions on #apr) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64485 13f79535-47bb-0310-9956-ffa450edef68
* Namespace protection, thanks to Craig Rodrigues <rodrigc@attbi.com>William A. Rowe Jr2003-02-241-32/+32
| | | | | | | | for the original patch. Use the new symbols in all internals, taking us one step closer to being ready to just chop out the old defines. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64378 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright notices to 2003.Thom May2003-01-014-4/+4
| | | | | | | No functional changes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 13f79535-47bb-0310-9956-ffa450edef68
* A few NOTICEs for developers modifying code, not 'XXX' developer pointers.William A. Rowe Jr2002-12-101-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64136 13f79535-47bb-0310-9956-ffa450edef68
* Get rid of somewhat long-standing issue regarding large valuesJim Jagielski2002-12-091-8/+10
| | | | | | | | | | | | of precision causing a buffer to be clobbered in the vformatter function (eg: apr_snprintf) PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64132 13f79535-47bb-0310-9956-ffa450edef68
* *) Renames done (deprecated functions wrapped):Thom May2002-11-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | apr_filename_of_pathname -> apr_filepath_name_get apr_get_groupid -> apr_gid_get apr_get_groupname -> apr_gid_name_get apr_compare_groups -> apr_gid_compare apr_parse_addr_port -> apr_port_addr_parse apr_shutdown -> apr_socket_shutdown apr_bind -> apr_socket_bind apr_listen -> apr_socket_listen apr_accept -> apr_socket_accept apr_connect -> apr_socket_connect apr_send -> apr_socket_send apr_sendv -> apr_socket_sendv apr_sendto -> apr_socket_sendto apr_implode_gmt -> apr_time_exp_gmt_get apr_get_home_directory -> apr_uid_homepath_get apr_get_userid -> apr_uid_get apr_current_userid -> apr_uid_current apr_compare_users -> apr_uid_compare apr_get_username -> apr_uid_name_get apr_recvfrom -> apr_socket_recvfrom apr_sendfile -> apr_socket_sendfile apr_recv -> apr_socket_recv git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64043 13f79535-47bb-0310-9956-ffa450edef68
* fix typo before someone else notices it and pounces :)Jim Jagielski2002-08-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63835 13f79535-47bb-0310-9956-ffa450edef68
* Fix typo that broke things in really odd ways.Justin Erenkrantz2002-08-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63834 13f79535-47bb-0310-9956-ffa450edef68
* Document the len == 0 special case for apr_snprintf() and allow it toJim Jagielski2002-08-261-6/+24
| | | | | | | | | | | work no matter what buf is (NULL or not). PR: Obtained from: Submitted by: Reviewed by: rbb git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63832 13f79535-47bb-0310-9956-ffa450edef68
* If the length argument to apr_snprintf is 0, then we should return theRyan Bloom2002-08-251-15/+15
| | | | | | | | | length that the string would be if we actually were going to fill it out. However, if the length argument is 0, we can also accept a NULL string. Also, added a test case for this. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63829 13f79535-47bb-0310-9956-ffa450edef68
* Printing a string with apr_snprintf can seg fault, if a precision isRyan Bloom2002-08-251-3/+32
| | | | | | | | | | | | | specified for the string, and the string being printed doesn't have a trailing '\0'. Fix that seg fault by not calling strlen if a precision is specified when printing a string. Also add a test to the test suite for this case. PR: 8554 Submitted by: R Samuel Klatchko <rsk@brightmail.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63828 13f79535-47bb-0310-9956-ffa450edef68
* Fix apr_tokenize_to_argv() to remove the escape characterJeff Trawick2002-08-211-2/+30
| | | | | | | | | | | (backslash) from the argument tokens. PR: 11793 Submitted by: Paul J. Reder Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63824 13f79535-47bb-0310-9956-ffa450edef68
* comment the checks being done, making it clear that theJim Jagielski2002-08-201-3/+4
| | | | | | | | short-circuit is safe, because we've already noted an over/underflow (so we're just biding our time) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63823 13f79535-47bb-0310-9956-ffa450edef68
* Allow for behavior to be compile-timeJim Jagielski2002-08-201-1/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63821 13f79535-47bb-0310-9956-ffa450edef68
* apr_atoi64 must use base 10Jim Jagielski2002-08-191-3/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63818 13f79535-47bb-0310-9956-ffa450edef68
* apr_strtoi64: off-by-one errors in the ebcdic test (i.e. 'I' - 'A' is 8).Greg Ames2002-08-131-1/+1
| | | | | | | It's much more straightforward to test APR_CHARSET_EBCDIC. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63807 13f79535-47bb-0310-9956-ffa450edef68
* c is the valid first digit, must use it for the first iterationWilliam A. Rowe Jr2002-08-041-2/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63791 13f79535-47bb-0310-9956-ffa450edef68
* fix an uninitialized variableBrian Pane2002-08-041-0/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63789 13f79535-47bb-0310-9956-ffa450edef68
* Roll-our-own apr_strtoi64 [based on the bsd, factoring out the div/modWilliam A. Rowe Jr2002-08-031-4/+135
| | | | | | | | | | | operations that cutoff required]. It's pretty hackish if you consider that we can't trust our INT64_MIN/MAX on any non-2's-compliment cpu. But I fixed EBCDIC, so I'll leave it up to a clever mainframe hack to work out the non-2's-compliment case. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63786 13f79535-47bb-0310-9956-ffa450edef68
* Out of time and at the end of my config-foo. This should get us theWilliam A. Rowe Jr2002-08-031-4/+4
| | | | | | | | | | appropriate 64 bit atoi/atol/atoll or signal that the fn is unavailable. Someone with better config foo than I might want to make both variables private and relocate them into apr_private.h (without APR_ decoration.) git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63781 13f79535-47bb-0310-9956-ffa450edef68
* Step one, rename from the meaningless 'll' to 'i64'.William A. Rowe Jr2002-08-031-4/+4
| | | | | | | | I have nothing against spelling out apr_atoint64 but I think that's probably excessive. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63780 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_int64_t instead of long long as return type for apr_strtoll() and ↵Wilfredo Sanchez2002-07-241-4/+4
| | | | | | apr_atol(). git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63732 13f79535-47bb-0310-9956-ffa450edef68