summaryrefslogtreecommitdiff
path: root/common/collection/collection_tools.c
AgeCommit message (Collapse)AuthorFilesLines
2010-08-19Remove common directoryStephen Gallagher1-754/+0
All files formerly in common are now being built individually out of the ding-libs repository. git clone git://git.fedorahosted.org/git/ding-libs.git
2010-03-15Convert collection to use sized values.Dmitri Pal1-10/+14
This patch replaces int with int32_t, unsigned with uint32_t, long with int64_t, unsigned long with uint64_t as values that collection can store and hold.
2009-10-05COLLECTION Adding item comparison and sortingDmitri Pal1-1/+1
Needed item comparison functions and realized that the easiest way to test them would be using sorting. Since there already been a ticket #73 to do that I added function to sort collection based on different properties of the item. COLLECTION Fixing issues with comparisons COLLECTION Adding do-while to macro
2009-09-10COLLECTION Improvements to copy functionsDmitri Pal1-1/+1
This patch adds better options for copying collections in flat mode. It allows caller of the interface to control prefixing of the fields when one collection is appended to another. It also avoids creating prefixes when the collection is simply copied in flat mode. Also for ELAPI I realized that the most efficient way to deal with the "resolved" event (event where all templeted values are actually replaced with the real values) is to add a callback capability to a copy collection function so that the callback can be used to modify the data (resolve it) while the copy operation is in progress. This approach eliminates the need for separate set of lookups after the event is already copied.
2009-08-20COMMON Fixes to return values, errno, leaksDmitri Pal1-14/+10
Started looking at the ticket #107 related to traverse functions. Realized that the return values are not consistent. That ovelapped with the work that I wanted to do for ticket #103 - errno cleanup. So I (across collection, INI and ELAPI): * Made the return codes consistent (where found) * Removed errno where it is not needed While was testing used valgrind and found a nasty problem when the value was added to collection with overwriting duplicates the count was decreased improperly. Fixing collection.c to not decrease count made valgrind happy. While I was debugging this I also spotted several build warnings in trace statements when the " exp ? v1 : v2 " was used. Fixed those. In ini_config.c there was a trace stament that used variable after it was freed. Removed trace stament.
2009-07-15COLLECTION Adding flat traversal & copyDmitri Pal1-14/+22
The collection is hearachical. The flattening of the collection was not implemented before both for traversal and copying. This patch introduces functionality to traverse or iterate through collection as flat set and also copy collection into another flattening it and automatically resolving conflicts. Also imptoved tracability and fixed memory leak in unbind iterator code.
2009-07-03Clean up warnings in common/Simo Sorce1-10/+11
Fix consts and function declarations
2009-07-02Changing function names for collection API.Dmitri Pal1-101/+105
Patch prepends prefix "col_" to all functions related to collection. This caused some formatiing issues so the alignement was addressed too.
2009-04-10Added functions to create list of sections and attributes.Dmitri Pal1-0/+100
2009-04-07Fix const warningsSimo Sorce1-5/+5
2009-04-07Style fixes for /commonSimo Sorce1-266/+319
2009-04-06Clean up a lot of warnings in Collection and INI parserStephen Gallagher1-0/+1
2009-04-06First commit of basic collection API.Dmitri Pal1-0/+587