summaryrefslogtreecommitdiff
path: root/rpmio/rpmstring.c
AgeCommit message (Collapse)AuthorFilesLines
2012-09-18Enhanced string hash to permit calculating string length on the same callPanu Matilainen1-17/+0
- String hashing needs to walk the entire string anyhow, might as well take advantage of this and have it return the string length to avoid having to separately call strlen() in the cases where this matters. - Move the implementation into rpmstrpool.c for inlining possibilities, rstrhash() is now just a wrapper to rstrlenhash(). The generic hash implementation could not take advantage of this anyway really.
2011-03-17Missing va_end() callPanu Matilainen1-0/+1
2011-03-10Move string hash function to librpmio and rename for namespacingPanu Matilainen1-0/+17
- There are places in rpmio and build that would benefit from hashing, but hashFunctionString() being internal to librpm has prevented that. Rename to rstrhash() to resemble the other foo in rpmstring.h for minimal namespacing as its now public function and update callers. - Also mark the function as "pure" - it only looks at its arguments. This is one of the busiest functions in entire rpm so any optimization no matter how minor is well worth it. - Hereby awarding hashFunctionString() with the grand prize for the Most Moved Around Function in rpm ;)
2010-10-26Bury stripTrailingChar() inside the only remaining userPanu Matilainen1-8/+0
- There used to be some other callers too but seems they've passed away, leaving just the relocation code in rpmte.c. Which means we can get this ugly bit out of the API.
2010-10-26Bury StringBuf inside librpmbuild internalsPanu Matilainen1-77/+0
2010-01-05Move <stdio.h> includes out of system.h to the places that need itPanu Matilainen1-0/+1
2008-09-25Use safer xrealloc() instead of realloc()Jindrich Novy1-1/+1
2008-04-17Eliminate splitString() and freeSplitString()Panu Matilainen1-43/+0
- use ARGV_t instead, it does the same and more...
2008-04-17Add rstrlcpy() string helper functionPanu Matilainen1-0/+28
- adopted from strlcpy() function of OpenBSD originally developed by Todd C. Miller <Todd.Miller@courtesan.com>
2008-04-17Introduce rstrscat()Jindrich Novy1-1/+50
- concatenates NULL terminated strings to newly (re)allocated memory - purpose is to prevent overflows caused by writing unknown-sized stuff to static arrays
2008-04-15Introduce rstrcat()Jindrich Novy1-0/+32
2008-03-18Erm, off-by-one in rasprintf()Panu Matilainen1-1/+1
- should probably change the comment to "simple, stupid and buggy" ;)
2008-03-18Add custom asprintf() clone to rpmstringPanu Matilainen1-0/+31
2008-03-18Minimal namespacing for locale-insensitive x*() string functionsPanu Matilainen1-7/+7
2008-03-18More xstr[n]casecmp to rpmstring along the other string-stuff...Panu Matilainen1-0/+41
2007-12-14More size_t type pedantryPanu Matilainen1-1/+1
2007-12-08Switch to <rpm/foo.h> style for public headersPanu Matilainen1-1/+1
- adjust include paths accordingly
2007-11-23Move the xstr*() string variants from rpmio.h to rpmstring.hPanu Matilainen1-7/+0
2007-11-23Move string helpers from lib/misc.h to rpmio/rpmstring.hPanu Matilainen1-0/+51
- splitString, freeSplitString, stripTrailingChar
2007-11-23Move stringbuf into librpmio, rename headerPanu Matilainen1-0/+93
- rename header to more generic rpmstring.h for collecting misc string helper functions