summaryrefslogtreecommitdiff
path: root/lib/misc.h
AgeCommit message (Collapse)AuthorFilesLines
2011-08-17Handle query format field width centrally in formatValue()Panu Matilainen1-1/+1
- Eliminate the quirky formatPrefix buffer argument to formatter functions, deal with the width at formatValue() if specified. - This not only simplifies things a great deal, removes a nasty unbounded buffer writing from formatter functions and speeds things up somewhat by removing extra rasprintf()'s in many cases, it also gives us width formatting of everything including "error messages" like "(none)" and "(not a number)" which previously got dumped without any formatting. - The cost of this is the loss of zero padding support for numeric data but that's hardly a big deal.
2011-03-10Move string hash function to librpmio and rename for namespacingPanu Matilainen1-3/+0
- 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-12-15Split user+group caching to separate source (again), renamePanu Matilainen1-19/+0
- We'll want to unify this and the similar caching done in librpmbuild, so we need to expose these in the ABI at least, rename to get them namespaced and use a separate source module (again) as this is a pretty distinct functionality. - This would really belong to librpmio but leaving here for now...
2010-10-22Switch header APIs to use rpmTagVal instead of rpmTagPanu Matilainen1-1/+1
- The header getters are used for both signature header and the "normal" header, and even beyond that there's no requirement for a tag in the header to be part of rpmTag enum. The headerPutFoo() variants technically do require the tag to be found in the tag table (ie be an rpmTag) but they still operate on the integer value, they dont require it to be a "true" enum. - Inside tagexts.c there are a few "true" enum uses in the internal helper functions, leave them be. - While this technically changes some the most commonly used API's, this wont affect callers really: if the callers were using an enum before, enum can always be cast naturally to an integer. The other way around was the problematic part (ie the braindamage we're fixing here now...)
2010-09-21Use proper types for tag and format extension functionsPanu Matilainen1-0/+14
- Stuff the tag prototypes into misc.h in lack of better place - Actually use the headerTagFooFunction prototypes instead of void *
2010-05-28Add internal helper for formatting file attribute stringsPanu Matilainen1-0/+3
- Eliminates some copy-paste slopping. Verify code traditionally only shows the first attribute, take care to keep that format to avoid breaking scripts unnecessarily
2010-05-28Add internal helper for formatting verify flagsPanu Matilainen1-0/+3
2010-05-21Move the lone hashFunctionString() into misc.[ch], eliminate rpmhash.[ch]Panu Matilainen1-0/+2
- Besides there not being much point in having a separate source + header for a small single function, this fixes build on case-insensitive systems such as Mac OS X.
2008-11-05Nuke the ugly hardwired "known arch" list from label parsingPanu Matilainen1-0/+4
- we have list of known archs in rpmrc, might as well use it - avoids having to patch & recompile rpm just to have rpmtsInitIterator() recognize new archs when it's runtime configurable otherwise - checking against compatible arch would be saner except then people could get into even more trouble using --ignorearch...
2008-10-10And out goes rpmMkdirPath()Panu Matilainen1-10/+0
2008-10-09Mark uidToUname() and friends as internalPanu Matilainen1-0/+7
2008-07-04Stuff rpmio/ugid.[ch] contents to lib/misc.[ch]Panu Matilainen1-0/+13
- no uses outside librpm itself, and there they can be hidden away from exported ABI whereas in librpmio they cant
2008-06-03Rip doputenv() for goodPanu Matilainen1-7/+0
2008-06-03Rip dosetenv()Panu Matilainen1-9/+0
- just use regular setenv() instead - we already carry setenv() in misc/ for platforms that don't have it
2008-04-04Rename currentDirectory() to rpmGetCwd() and move to librpmioPanu Matilainen1-6/+0
2008-01-30rpmlib.h mass evictionPanu Matilainen1-0/+1
- explicitly include what's really needed instead - document remaining uses
2007-11-22Move makeTempFile() from misc.h to rpmfileutil.hPanu Matilainen1-17/+0
- probably not very useful outside rpm but used all over the tree, - rename to rpmMkTempFile() for namespacing since we're exporting it now
2007-11-23Move string helpers from lib/misc.h to rpmio/rpmstring.hPanu Matilainen1-30/+0
- splitString, freeSplitString, stripTrailingChar
2007-09-11Remove splint tags.Ralf Corsépius1-27/+11
2007-07-09Fix include of misc.h, rpmpgp.h and rpmsq.h in C++.Panu Matilainen1-0/+2
2004-03-02- permit globs in macrofiles: directive (#117217).jbj1-13/+0
CVS patchset: 7139 CVS date: 2004/03/02 01:31:01
2003-05-08- don't use error string after gzclose (Dmitry V. Levin).jbj1-2/+2
Spliddles for rpmio, drill h_errno all the way through. CVS patchset: 6826 CVS date: 2003/05/08 20:39:29
2002-07-08Propagate splint-3.0.1.7 close(2) internalState annotation throughout.jbj1-2/+2
CVS patchset: 5542 CVS date: 2002/07/08 14:21:26
2002-07-04- fix: forgot lazy open of database on --freshen path (#67907).jbj1-0/+11
- proof-of-concept rpmcache functionality. CVS patchset: 5539 CVS date: 2002/07/04 21:08:05
2002-06-22Factor bounds checking annotations into source code.jbj1-0/+2
CVS patchset: 5521 CVS date: 2002/06/22 18:51:56
2002-04-08doxygen cleanup.jbj1-1/+1
CVS patchset: 5379 CVS date: 2002/04/08 18:56:01
2001-10-29Remove DYING code.jbj1-8/+0
CVS patchset: 5139 CVS date: 2001/10/29 16:39:13
2001-10-21- all symbols but hdrVec are now forward references in linkage.jbj1-73/+2
CVS patchset: 5128 CVS date: 2001/10/21 21:43:32
2001-10-20- stupid macros to configure public key file paths.jbj1-9/+0
CVS patchset: 5127 CVS date: 2001/10/20 22:31:09
2001-10-19- beecrypt is at least as good as pgp/gpg on verify, pull the plug.jbj1-6/+0
CVS patchset: 5124 CVS date: 2001/10/19 19:51:18
2001-10-17Converging on lclint-3.0.17 strict level.jbj1-2/+6
CVS patchset: 5118 CVS date: 2001/10/17 16:43:36
2001-10-15lclint fiddles to annotate globals.jbj1-7/+19
CVS patchset: 5106 CVS date: 2001/10/15 03:22:10
2001-09-29- create RFC-2440 OpenPGP API in rpmio.jbj1-3/+1
- display signature packets before exec'ing gpg/pgp when verifying. CVS patchset: 5090 CVS date: 2001/09/29 17:44:45
2001-09-25- legacy: drop brokenMD5 support (rrpm-2.3.3 to rpm-2.3.8 on sparc).jbj1-40/+29
- eliminate DYING code. CVS patchset: 5082 CVS date: 2001/09/25 20:51:34
2001-09-25- drop rpmio/base64.[ch] in favor of beecrypt.jbj1-0/+77
- drop lib/md5*.[ch] files in favor of beecrypt. CVS patchset: 5081 CVS date: 2001/09/25 16:21:44
2001-09-15Sync with rpm-4_0 branch.jbj1-7/+0
CVS patchset: 5048 CVS date: 2001/09/15 13:49:11
2001-06-17Sync with rpm-4_0 branch.jbj1-2/+5
CVS patchset: 4876 CVS date: 2001/06/17 22:18:03
2001-06-17- popt: add POPT_ARGFLAG_SHOW_DEFAULT to display initial values (#32558).jbj1-2/+2
CVS patchset: 4872 CVS date: 2001/06/17 00:36:01
2001-06-12- remove dead code frpm popt table reorg.jbj1-1/+12
- more CLI typedefs/prototypes moved from rpmlib.h to rpmcli.h. - rpm --verify skips files in non-installed states. - rpm --verify skips content checks for %ghost files. - rpm --verify displays config/doc/gnost/license/readme atrrs for files. - rpm --verify checks immutable header region digest if available. - rpmbuild adds header region digest (SHA1 as string). - use rpmTag* typedefs in new hge/hae/hme/hre header vectors. CVS patchset: 4854 CVS date: 2001/06/12 04:10:21
2001-06-05- fix typos in linux.{req,prov}.jbj1-1/+1
CVS patchset: 4834 CVS date: 2001/06/05 19:26:22
2001-06-04lclint fiddles.jbj1-14/+27
CVS patchset: 4833 CVS date: 2001/06/04 13:55:58
2001-05-31- return multiple suggested packages (Pawel Kolodziej <pawelk@pld.org.pl>).jbj1-5/+7
- fix: return suggested packages when using Depends cache. CVS patchset: 4823 CVS date: 2001/05/31 22:31:14
2001-04-29- globalize _free(3) wrapper in rpmlib.h, consistent usage throughout.jbj1-1/+2
- internalize locale insensitive ctype(3) in rpmio.h - boring lclint annotations and fiddles. CVS patchset: 4721 CVS date: 2001/04/29 01:05:43
2001-04-10Doxygen annotations for config files.jbj1-1/+2
Doxygen annotations for rpmdep section. Add manifests for install modes. CVS patchset: 4675 CVS date: 2001/04/10 12:36:45
2001-01-26lclint annotations.jbj1-8/+0
CVS patchset: 4500 CVS date: 2001/01/26 17:06:09
2001-01-09- tsorted packages processed in successor count order.jbj1-2/+13
- fix: resurrect --excludepath (#19666). CVS patchset: 4418 CVS date: 2001/01/09 04:07:49
2000-08-27Doxygen annotations.jbj1-0/+4
CVS patchset: 4132 CVS date: 2000/08/27 19:27:03
2000-08-23doxygen annotations.jbj1-4/+53
CVS patchset: 4105 CVS date: 2000/08/23 13:02:13
2000-06-09Remove dead code.jbj1-11/+0
CVS patchset: 3823 CVS date: 2000/06/09 19:33:52
2000-06-09Move low level support routines to librpmio.jbj1-0/+3
CVS patchset: 3822 CVS date: 2000/06/09 18:57:23