/**
* Write a new bookmark entry to the end of bookmark file.
*/
-void bookmark_add(const char *uri, const char *tags)
+gboolean bookmark_add(const char *uri, const char *tags)
{
FILE *f;
file_lock_set(fileno(f), F_UNLCK);
fclose(f);
+
+ return true;
}
+ return false;
}
/**
#ifndef _BOOKMARK_H
#define _BOOKMARK_H
-void bookmark_add(const char *uri, const char *tags);
+gboolean bookmark_add(const char *uri, const char *tags);
GList *bookmark_get_by_tags(const char *tags);
#endif /* end of include guard: _BOOKMARK_H */
{
vb_set_mode(VB_MODE_NORMAL, false);
- bookmark_add(GET_URI(), arg->s);
- return true;
+ if (bookmark_add(GET_URI(), arg->s)) {
+ vb_echo_force(VB_MSG_NORMAL, false, "Bookmark added");
+
+ return true;
+ }
+ return false;
}
gboolean command_eval(const Arg *arg)