aboutsummaryrefslogtreecommitdiffstats
path: root/src/libstrongswan/collections/enumerator.c
Commit message (Collapse)AuthorAgeFilesLines
* Change interface for enumerator_create_filter() callbackTobias Brunner2017-05-261-18/+11
| | | | | This avoids the unportable 5 pointer hack, but requires enumerating in the callback.
* Migrate all enumerators to venumerate() interface changeTobias Brunner2017-05-261-156/+171
|
* enumerator: Add venumerate() method to enumerator_t that takes a va_listTobias Brunner2017-05-261-3/+21
| | | | | | | | | | This will allow us to implement e.g. enumerator_cleaner without having to use that unportable 5 pointer forwarding or having to define a callback for each instance. A generic implementation for enumerate() is provided so only venumerate() has to be implemented, which may be simplified by using the VA_ARGS_VGET() macro.
* enumerator: Enumerate glob(3) matches using gl_pathcMartin Willi2014-07-071-9/+6
| | | | | | | While glob should return a NULL terminated gl_pathv when having no matches, at least on OS X this is not true when using GLOB_DOOFFS. Rely on the number of matches returned in gl_pathc, which seems to be more reliable in error cases.
* enumerator: Add enumerator to enumerate files matching a patternTobias Brunner2014-05-151-2/+104
| | | | | | | | | | | | This enumerator is a wrapper around glob(3). If that function is not supported NULL is returned. If no files match or an error occurs during the pattern expansion an error is logged and the enumerator simply returns no items. RFC: if GLOB_ERR is not supplied glob returns GLOB_NOMATCH if e.g. the base directory of the pattern does not exist, which would otherwise result in an error. This way there is at least a clear error message in case of a typo.
* Remove dead code in token enumeratorTobias Brunner2013-06-111-12/+2
| | | | | | Since we always search for the nearest separator (and strip them from the front of the next token) there can't be any separators left at the end of a token.
* Moved debug.[ch] to utils folderTobias Brunner2012-10-241-1/+1
|
* Moved data structures to new collections subfolderTobias Brunner2012-10-241-0/+560