Panu Matilainen
9a9f3c3abb
Don't segfault on unknown format specifiers
2008-09-18 12:36:31 +03:00
Panu Matilainen
6ea17f9ca4
Shove header legacy interfaces into rpmlegacy.h
...
- get them out of sight from main header.h
- turn headerSprintf() into macro around headerFormat(), that way
rpmTagTable and rpmHeaderFormats lossage can be hidden away as far
as headerSprintf() use is concerned
2008-07-08 18:54:28 +03:00
Panu Matilainen
d4c04512a1
rpmtdCount() knows how to handle BIN types, use it..
2008-06-07 13:17:52 +03:00
Panu Matilainen
bc84f12def
Convert hsaNext() to new header iterator interface
2008-05-26 09:27:02 +03:00
Panu Matilainen
7c3d5dc15d
Add arraysize format
...
- it's a bit silly but avoids ugly special casing in formatting
2008-05-21 12:04:51 +03:00
Panu Matilainen
5d10e43f8f
Drop unused variables from formatValues()
2008-05-21 12:04:51 +03:00
Panu Matilainen
fae1edeb93
Lose padding argument from formatters
...
- formatPrefix already contains the padding, just use rasprintf() on that
to get properly allocated buffer without messing with it manually
- xml format doesn't honor padding anyway so don't bother with it
2008-05-21 12:04:50 +03:00
Panu Matilainen
9b32e58e17
Add rpmtdFormat() method and enumeration of supported formats
...
- permits formatting any rpmtd data to our supported formats over
iteration
2008-05-21 12:04:50 +03:00
Panu Matilainen
2bfc0fad38
Add stringFormat() for barebones string representation
...
- use for everything not specifically overridden
- pushes practically all formatting out of formatValue() into formats.c
2008-05-21 12:04:50 +03:00
Panu Matilainen
f12983793e
Make formatter functions operate on rpmtd current item
...
- avoids extra abuse of the element field and simplifies things a bit
(eventually, not really yet)
2008-05-21 12:04:50 +03:00
Panu Matilainen
a40e326683
Push rpmtd a bit deeper into formatting
...
- use rpmtd methods for pulling current integer/string values
- allows collapsing string and string array handling into one case
- CHAR/INT8 type aren't handled atm, but then nothing at all uses them...
2008-05-21 12:04:50 +03:00
Panu Matilainen
91c13fbf4f
Minimally convert formatting to pass around rpmtd
2008-05-21 12:04:50 +03:00
Panu Matilainen
246c2e2be2
Remove unused datafree handling from formatValue()
...
- the data is always cached and cleared elsewhere..
2008-05-21 12:04:50 +03:00
Panu Matilainen
019ee37f62
Eliminate rpmHeaderFormats and rpmHeaderTagExtensions from the API
2008-05-16 17:46:49 +03:00
Panu Matilainen
cbf1a479ee
Push finding of formatter and tag extension functions down to formats.c
2008-05-16 16:56:32 +03:00
Panu Matilainen
eef5417dea
Make extension formatter functions opaque
...
- tag extensions are only needed by headerGet(), formats only by headerFormat()
2008-05-16 16:26:19 +03:00
Panu Matilainen
696184533a
Eliminate the now unnecessary extension type fields
2008-05-16 16:07:41 +03:00
Panu Matilainen
44bdb776b7
Split format and tag extensions to separate tables
2008-05-16 15:55:44 +03:00
Panu Matilainen
504ff9ce06
Unbreak conditional formatting
2008-05-15 18:28:50 +03:00
Panu Matilainen
5198c91280
Eliminate unnecessary extension fields
...
- push default extensions yet deeper into format parsing
- single bounds-checked function to retrieve from cache
2008-05-15 13:42:12 +03:00
Panu Matilainen
6f18834d4e
Permit tags down to HEADER_IMAGE in queries to match previous behavior
2008-05-15 12:27:20 +03:00
Panu Matilainen
445671ee82
Unify header and extension tag handling of headerFormat()
...
- retrieve both header and extension tag data through headerGet,
- cache the return data for both types for an enormous speedup especially
for array types
2008-05-15 12:04:17 +03:00
Panu Matilainen
6fd646f238
Remove tags from headerSprintfArguments
...
- its always rpmTagTable so no point carrying it around
2008-05-12 18:32:11 +03:00
Panu Matilainen
e02523286c
Use rpmTagGetFoo() instead of local myTagFoo() versions
...
- hsa tags will always be our default rpmTagTable so we can use the
somewhat optimized rpmTagGet() versions instead of dumb linear searchs
2008-05-12 18:03:47 +03:00
Panu Matilainen
95386fe331
Push extension defaults one level deeper into headerFormat()
2008-05-12 17:25:54 +03:00
Panu Matilainen
fe3ba99910
Simplify header extension handling
...
- remove the now unnecessary chaining to different extension tables
2008-05-12 17:08:12 +03:00
Panu Matilainen
67b4f3a13d
Add simpler headerFormat() function, deprecate headerSprintf()
...
- headerSprintf() is just a dumb wrapper around headerFormat() now,
tbltags and extensions are not used at all
- baby steps towards eliminating the the tag and extension tables from
the API/ABI...
2008-05-12 16:16:37 +03:00
Panu Matilainen
05b70ba53c
Split header sprintf formatting to separate source
...
- header.c is now just low level header handling, headerfmt.c is the
formatting engine and formats.c has the actual formats
- also move bunch of formatting-related stuff from header_internal.h to
headerfmt.c, nothing else needs it
2008-05-12 15:52:29 +03:00