aboutsummaryrefslogtreecommitdiff
path: root/tests/filemap.at
AgeCommit message (Collapse)AuthorFiles
2023-10-30Update copyleft datesHEADmasterSergey Poznyakoff1
2021-01-06Update copyright yearsSergey Poznyakoff1
2018-03-15Update copyright yearsSergey Poznyakoff1
2015-01-22Update copyright years.Sergey Poznyakoff1
2014-02-03Update copyright yearsSergey Poznyakoff1
2013-01-19Update copyright years.Sergey Poznyakoff1
2012-12-15Implement direct and reverse map lookups.Sergey Poznyakoff1
Not all maps support reverse lookups generically (for example, gdbm does not), therefore introduce a new "bidi" (bi-directional) map, which is a compound of two maps, each one used for a particular lookup direction. * lib/Makefile.am (maps): List all maps here. * lib/bidimap.c: New file. Implementation of a bi-directional map. * lib/filemap.c: Update to the changes in API. Implement reverse lookup. * lib/gdbmmap.c: Update to the changes in API. * lib/nullmap.c: Likewise. * lib/seqmap.c: Likewise. * lib/ldapmap.c: Update to the changes in API. Implement reverse lookup. New configuration keywords: reverse-filter, reverse-attr. * lib/libeclat.h (eclat_map_drv) <map_get>: Change signature, take search direction as a new argument. (eclat_map_get): Likewise. (eclat_map) <eclat_map_bad_dir>: New status code. (MAP_DIR, MAP_REV): New macros. (eclat_map_name_split): New function. (eclat_map_drv_bidi): New extern. * lib/map.c (eclat_map_get): Change signature, take search direction as a new argument. Pass new keyword to the "key" translation: "dir". (eclat_map_strerror): Handle new status code. (eclat_map_name_split): New function. * src/eclat.c (main): Register eclat_map_drv_bidi. * src/util.c (translate_ids): Use eclat_map_name_split to obtain direction code from the map name. (translate_resource_ids): Use direct lookups. * tests/Makefile.am: Add new testcases. * tests/testsuite.at: Likewise. * tests/bidimap.at: New testcase. * tests/filemap.at: Test reverse lookups.
2012-10-10Improve map support.Sergey Poznyakoff1
* doc/eclat.conf.5: Document the null map. * lib/nullmap.c: New file. * lib/Makefile.am: Add new files. * lib/gdbmmap.c (gdbm_map_open): Fix gdbm_open arguments. Report a detailed error description if it fails. * lib/libeclat.h (eclat_map_drv_null): New extern. * src/eclat.c (main): Register the null map. * tests/.gitignore: Update. * tests/Makefile.am: Add new files. * tests/filemap.at: New file. * tests/gdbmload.c: New file. * tests/gdbmmap.at: New file. * tests/nullmap.at: New file. * tests/atlocal.in (GDBMLOAD): New variable. * tests/testsuite.at: Include new files.

Return to:

Send suggestions and report system problems to the System administrator.