summaryrefslogtreecommitdiff
path: root/strings/apr_strings.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright notices to 2003.Thom May2003-01-011-1/+1
| | | | | | | No functional changes git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64251 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
* add some needed const to apr_strtoll and apr_atollJeff Trawick2002-07-241-4/+4
| | | | | | | fix the parms to strtol[l] in apr_strtoll git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63731 13f79535-47bb-0310-9956-ffa450edef68
* Added apr_strtoll() and apr_atoll() to strings lib.Wilfredo Sanchez2002-07-241-0/+19
| | | | | | | Submitted by: Shantonu Sen <ssen@apple.com> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63730 13f79535-47bb-0310-9956-ffa450edef68
* Continue the Bill Rowe apr_size_t crusade.Victor J. Orlikowski2002-07-101-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63595 13f79535-47bb-0310-9956-ffa450edef68
* Well it appears that binary compatibility is already broken. ThisWilliam A. Rowe Jr2002-06-281-2/+2
| | | | | | | | axes it for Win32, but it's a transition that was necessary [at some point in the future.] The change is a noop on all other platforms. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63528 13f79535-47bb-0310-9956-ffa450edef68
* Fix a char'ness issue.William A. Rowe Jr2002-05-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63389 13f79535-47bb-0310-9956-ffa450edef68
* Added apr_strcatv(), a string concatenation function thatBrian Pane2002-05-121-0/+38
| | | | | | | | | uses writev-style arguments. It's a faster alternative to apr_strcat() in situations where the caller knows the lengths of the strings to be concatenated. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63387 13f79535-47bb-0310-9956-ffa450edef68
* Fixed apr_strfsize formatting of values over 1 gigBrian Pane2002-05-081-1/+1
| | | | | | | | Submitted by: Matsuzaki Yoshinobu <maz@iij.ad.jp> Reviewed by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63370 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63117 13f79535-47bb-0310-9956-ffa450edef68
* This patch adds a function apr_strmemdup(), which works likeWilliam A. Rowe Jr2001-12-021-0/+13
| | | | | | | | | | | apr_pstrndup() except that it's optimized for the case where the caller can guarantee that the length of the supplied string is >= 'n' Submitted by: Brian Pane <bpane@pacbell.net> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62594 13f79535-47bb-0310-9956-ffa450edef68
* this time make it actually an optimizationIan Holsman2001-09-281-1/+0
| | | | | | | ;( git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62380 13f79535-47bb-0310-9956-ffa450edef68
* optimize apr_pstrcat by storing the lengths of the first 6 stringsIan Holsman2001-09-281-1/+18
| | | | | | | | | | (changed const to #define as suggested, and so that it compiles on NT) Submitted by: Brian Pane <bpane@pacbell.net> Reviewed by: Ian Holsman git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62379 13f79535-47bb-0310-9956-ffa450edef68
* Silence warnings:Cliff Woolley2001-07-261-7/+5
| | | | | | | | - sprintf() was used without including stdio.h (fixed by using apr_want.h) - too many arguments to sprintf() for the format string given git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62025 13f79535-47bb-0310-9956-ffa450edef68
* Replace the very limited-use ap_send_size with apr_strfsize(), whichWilliam A. Rowe Jr2001-07-251-0/+34
| | | | | | | | | works within a fixed buffer. I'm open to using the old ap_send_size() text formatting, but this result is one character shorter in size and equally readable. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62023 13f79535-47bb-0310-9956-ffa450edef68
* Yes, this is a bogus cast. It's necessary since win32 figures out theWilliam A. Rowe Jr2001-07-251-1/+1
| | | | | | | | same calculation in apr_ltoa() is safe, but can't figure this out for an int64 value :( git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62020 13f79535-47bb-0310-9956-ffa450edef68
* Fix build breakage due to mismatch between function and prototypeCliff Woolley2001-07-251-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62016 13f79535-47bb-0310-9956-ffa450edef68
* Reduce CPU consumption in conv_10 function, used to format "%d" by apr_*printfGreg Ames2001-07-241-0/+72
| | | | | | | | | | | | | | | | | | | | This includes two changes to APR: * new functions apr_itoa, apr_ltoa, and apr_off_t_toa that provide itoa-type functionality based on pools * Inline code in inet_ntop4 to replace sprintf for converting binary IP addresses into dotted-decimal format and two changes to Apache: * use the apr_itoa functions in setting the content length, in place of apr_psprintf * use the apr_itoa functions to replace frequent uses of 'sprintf("%d",...)' in mod_log_config. Submitted by: Brian Pane Reviewed by: Dean Gaudet, Greg Ames git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@62015 13f79535-47bb-0310-9956-ffa450edef68
* make termination of apr_pstrcat-ed string a bit faster (from jeff trawick)Doug MacEachern2001-06-201-1/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61787 13f79535-47bb-0310-9956-ffa450edef68
* apr_pstrcat() optimizations:Doug MacEachern2001-06-191-3/+4
| | | | | | | | | | | | reuse calculated strlen() length use memcpy instead of strcpy PR: Obtained from: Submitted by: dougm Reviewed by: jeff trawick, ryan bloom, bill stoddard git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61783 13f79535-47bb-0310-9956-ffa450edef68
* * apr_pstrndup: Check string length with memchr instead of strlen soBranko Čibej2001-05-101-4/+18
| | | | | | | | that s doesn't have to be null-terminated. * Provide memchr implementation if !APR_HAS_MEMCHR. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61606 13f79535-47bb-0310-9956-ffa450edef68
* Clean up a warning.William A. Rowe Jr2001-02-231-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61283 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001Roy T. Fielding2001-02-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61235 13f79535-47bb-0310-9956-ffa450edef68
* *) rename apr_memdup() to apr_pmemdup()Greg Stein2001-02-121-8/+7
| | | | | | | *) optimize the allocation size in apr_pstrndup() git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61222 13f79535-47bb-0310-9956-ffa450edef68
* ap_pstrndup could have caused out-of-bounds memory accesses (this is aBen Laurie2001-02-111-2/+7
| | | | | | | theoretical problem that I happened to notice). Only lightly tested. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61215 13f79535-47bb-0310-9956-ffa450edef68
* Add memdup function.Ben Laurie2001-02-111-0/+11
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61214 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate some missing prototype warnings.Roy T. Fielding2001-01-281-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61145 13f79535-47bb-0310-9956-ffa450edef68
* These two patches for apr and apr-util fix compile warnings on Solaris forJeff Trawick2000-12-221-1/+1
| | | | | | | | | | str* and mem* functions. This fixes all of them. APR_HAVE_STRINGS_H is now defined in apr.h. Submitted by: Dale Ghent <daleg@elemental.org> Reviewed by: Jeff Trawick git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60987 13f79535-47bb-0310-9956-ffa450edef68
* Cleanup a group of apr compil warnings on SolarisRyan Bloom2000-12-211-0/+3
| | | | | | | Submitted by: Dale Ghent <daleg@elemental.org> git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60978 13f79535-47bb-0310-9956-ffa450edef68
* Get NULL defined on some systems (e.g., FreeBSD 3.4).Jeff Trawick2000-11-271-0/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60800 13f79535-47bb-0310-9956-ffa450edef68
* Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbolsWilliam A. Rowe Jr2000-10-161-3/+3
| | | | | | | | | | for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper) and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE. All _VAR_ flavors changes to _DATA to be absolutely clear. Thank you Greg, for the most obvious suggestion. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60587 13f79535-47bb-0310-9956-ffa450edef68
* prefix libapr functions and types with apr_Doug MacEachern2000-08-021-7/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
* Move all APR functions related to strings to their own directory, andRyan Bloom2000-07-211-0/+125
create a new header for those functions. This is the first step to removing the apr/lib directory completely, and moving those files/functions to descriptive directories. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60398 13f79535-47bb-0310-9956-ffa450edef68