summaryrefslogtreecommitdiffstats
path: root/common/collection/collection_tools.c
Commit message (Collapse)AuthorAgeFilesLines
* COLLECTION Adding item comparison and sortingDmitri Pal2009-10-051-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
* COLLECTION Improvements to copy functionsDmitri Pal2009-09-101-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.
* COMMON Fixes to return values, errno, leaksDmitri Pal2009-08-201-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.
* COLLECTION Adding flat traversal & copyDmitri Pal2009-07-151-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.
* Clean up warnings in common/Simo Sorce2009-07-031-10/+11
| | | | Fix consts and function declarations
* Changing function names for collection API.Dmitri Pal2009-07-021-101/+105
| | | | | | | Patch prepends prefix "col_" to all functions related to collection. This caused some formatiing issues so the alignement was addressed too.
* Added functions to create list of sections and attributes.Dmitri Pal2009-04-101-0/+100
|
* Fix const warningsSimo Sorce2009-04-071-5/+5
|
* Style fixes for /commonSimo Sorce2009-04-071-266/+319
|
* Clean up a lot of warnings in Collection and INI parserStephen Gallagher2009-04-061-0/+1
|
* First commit of basic collection API.Dmitri Pal2009-04-061-0/+587