Commit Graph

22 Commits

Author SHA1 Message Date
Panu Matilainen fde961e25b Rewrite rpmMkTempFile() for sanity
- Actually use mkstemp() for creating the temp file and return a FD_t
  dupped from the file descriptor returned by mkstemp().
- Simplify the interface while at it.
- Change callers for the new interface.
- Yes we now require mkstemp() to work, mkstemp() is in POSIX.1-2001 and
  this is year 2008...
2008-04-11 09:05:05 +03:00
Panu Matilainen a5a3cfc3ed Rename currentDirectory() to rpmGetCwd() and move to librpmio 2008-04-04 09:53:17 +03:00
Panu Matilainen 2b39ddc25d Enable variadic checks for rpmExpand(), rpmlog() and rpmGetPath()
Suggested by Michal Marek
2008-02-25 11:03:38 +02:00
Panu Matilainen e886043a10 Add rpm_off_t type for file size types, use where spotted
- preliminaries for bumping up the max size, use rpm-specific type
  as off_t size varies, header data needs fixed size
2008-02-04 11:27:00 +02:00
Panu Matilainen 95b03441cc Rename isCompressed() -> rpmFileIsCompressed() for namespacing 2008-01-27 16:39:40 +02:00
Panu Matilainen 8e2965886f Couple of missing doxygen groupings 2008-01-27 16:13:47 +02:00
Panu Matilainen f0f392cce6 Helper function for checking given suffix on path 2008-01-27 16:00:06 +02:00
Panu Matilainen a97100ba1d Handle spaces in file path arguments correctly (#217258)
Ported from rpm5.org work of Jeff Johnson with some differences:
- place into rpmfileutil instead of rpmgi as it's more generic than just rpmgi
- rename rpmgiEscapeSpaces -> rpmEscapeSpaces
- return char *, not const char * as the return string must be freed by caller
2008-01-09 10:21:01 +02:00
Panu Matilainen 78ad426f04 Remove bogus const from rpmGlob argv return type
- it's malloced and must be freed by caller
2007-12-18 10:17:18 +02:00
Panu Matilainen 14284725e6 Remove const from rpmMkTempFile file name parameter
- the temp name is malloced and needs to be freed by caller
2007-12-16 16:25:09 +02:00
Panu Matilainen 3b6a6c9030 Fix incorrect rpmCleanPath() retval comment 2007-12-15 17:08:18 +02:00
Panu Matilainen dce66192f2 Remove bogus const from rpmGenPath and rpmGetPath return type
- both return malloced strings you're supposed to free
2007-12-15 09:39:32 +02:00
Panu Matilainen 9ce13e09ef Switch to <rpm/foo.h> style for public headers
- adjust include paths accordingly
2007-12-08 14:02:32 +02:00
Panu Matilainen 89ecfb96d0 Include sanity
- don't pull in rpmio into rpmpgp.h
- make rpmpgp.h standalone (needs rpmints and stdio)
- rpmfileutil needs rpmio (makes sense, huh...)
2007-12-01 12:47:30 +02:00
Panu Matilainen 31ad46a64b Add doxygen group for rpmfileutil, include in librpm + hacking docs 2007-11-23 15:11:21 +02:00
Panu Matilainen 7b2a9b3c24 Move rpmGlob() from macros to rpmfileutil.h
- macros is all just macros now
- internal copy of popt stuff needs to go...
2007-11-23 10:27:29 +02:00
Panu Matilainen 2c6905dd9f Move rpmGetPath and rpmGenPath to rpmfileutil.h 2007-11-23 10:20:19 +02:00
Panu Matilainen 178e32a0ba Move rpmCleanPath from macros to rpmfileutil.h 2007-11-23 10:10:19 +02:00
Panu Matilainen ff77bfa2a1 Move file compression stuff from rpmmacro.h to rpmfileutil.h 2007-11-23 10:05:49 +02:00
Panu Matilainen c1bcd63301 Move rpmioMkpath from rpmio.h to rpmfileutil.h 2007-11-23 09:58:02 +02:00
Panu Matilainen d10acc7c2a Move makeTempFile() from misc.h to rpmfileutil.h
- 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-22 16:28:30 +02:00
Panu Matilainen e063854e11 Calculating file checksums aint legacy activity
- move the checksumming into librpmio
- rename domd5() to rpmDoDigest() with future expansion for specifying
  digest algorithm type (ignored for now)
- rearrange parameters to leave return types last
- one less rpmio_internal outside rpmio/, whee...
- used all over the rpm tree, and it knows about handling prelinked files
  so potentially useful for outside users, might as well export it
- new public header rpmfilutil.h for collecting this sort of stuff
2007-11-22 16:06:11 +02:00