summaryrefslogtreecommitdiff
path: root/src/bookmarks.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-18 23:50:28 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-18 23:50:28 +0300
commit01b09cc3cf3cd25396c53e184563fbfdab74f8e7 (patch)
tree5da0135101930e2c992ce7616087b495d9e63434 /src/bookmarks.c
parent35a40515d7bfef700ed7680b07112ef5d5fa35b2 (diff)
Home button opens a random "homepage" bookmark
Diffstat (limited to 'src/bookmarks.c')
-rw-r--r--src/bookmarks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bookmarks.c b/src/bookmarks.c
index 8fe7d109..7e98fb27 100644
--- a/src/bookmarks.c
+++ b/src/bookmarks.c
@@ -26,6 +26,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
26#include <the_Foundation/hash.h> 26#include <the_Foundation/hash.h>
27#include <the_Foundation/mutex.h> 27#include <the_Foundation/mutex.h>
28#include <the_Foundation/path.h> 28#include <the_Foundation/path.h>
29#include <the_Foundation/regexp.h>
29 30
30void init_Bookmark(iBookmark *d) { 31void init_Bookmark(iBookmark *d) {
31 init_String(&d->url); 32 init_String(&d->url);
@@ -166,6 +167,12 @@ iBookmark *get_Bookmarks(iBookmarks *d, uint32_t id) {
166 return (iBookmark *) value_Hash(&d->bookmarks, id); 167 return (iBookmark *) value_Hash(&d->bookmarks, id);
167} 168}
168 169
170iBool filterTagsRegExp_Bookmarks(void *regExp, const iBookmark *bm) {
171 iRegExpMatch m;
172 init_RegExpMatch(&m);
173 return matchString_RegExp(regExp, &bm->tags, &m);
174}
175
169const iPtrArray *list_Bookmarks(const iBookmarks *d, iBookmarksCompareFunc cmp, 176const iPtrArray *list_Bookmarks(const iBookmarks *d, iBookmarksCompareFunc cmp,
170 iBookmarksFilterFunc filter, void *context) { 177 iBookmarksFilterFunc filter, void *context) {
171 lock_Mutex(d->mtx); 178 lock_Mutex(d->mtx);