diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-05-20 08:53:05 +0300 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-05-21 12:04:50 +0300 |
commit | d5381c16a794e03c0e4f202daa3c882dc1876f41 (patch) | |
tree | 16aa89faf033765027668ce1b098e59f8f1935f2 /lib/rpmtd.c | |
parent | 2bfc0fad3876bcee0143664cae9f0f0107a86a33 (diff) | |
download | librpm-tizen-d5381c16a794e03c0e4f202daa3c882dc1876f41.tar.gz librpm-tizen-d5381c16a794e03c0e4f202daa3c882dc1876f41.tar.bz2 librpm-tizen-d5381c16a794e03c0e4f202daa3c882dc1876f41.zip |
Handle RPM_CHAR_TYPE too in stringFormat()
- used by filestates and nothing else apparently, duh..
Diffstat (limited to 'lib/rpmtd.c')
-rw-r--r-- | lib/rpmtd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/rpmtd.c b/lib/rpmtd.c index e0a29dedd..ee554355e 100644 --- a/lib/rpmtd.c +++ b/lib/rpmtd.c @@ -82,6 +82,18 @@ int rpmtdNext(rpmtd td) return i; } +char * rpmtdGetChar(rpmtd td) +{ + char *res = NULL; + + assert(td != NULL); + + if (td->type == RPM_CHAR_TYPE) { + int ix = (td->ix >= 0 ? td->ix : 0); + res = (char *) td->data + ix; + } + return res; +} uint16_t * rpmtdGetUint16(rpmtd td) { uint16_t *res = NULL; |