Commit Diff


commit - 281b8b39d3f344573f3d0f575cb3f381c5f86950
commit + 486bde7d965b776a646acd77807b514f3e16537c
blob - 055d8061449bdc4efeae2d66f59b07941e8e7941
blob + 9742dfe81e28da1cd69fdc3192f2bcf0c8789358
--- fs.c
+++ fs.c
@@ -256,18 +256,6 @@ done:
 		fclose(fp);
 	else
 		load_page_from_str(tab, fallback);
-}
-
-int
-bookmark_page(const char *url)
-{
-	FILE *f;
-
-	if ((f = fopen(bookmark_file, "a")) == NULL)
-		return -1;
-	fprintf(f, "=> %s\n", url);
-	fclose(f);
-	return 0;
 }
 
 int
blob - 984e9d4e4252b6a78b374f1536b06960bf7624e5
blob + f6f86704ada4997fc0ab7c8d46f761999084b522
--- include/fs.h
+++ include/fs.h
@@ -36,7 +36,6 @@ extern char	history_file[PATH_MAX], history_file_tmp[P
 int		 fs_init(void);
 int		 lock_session(void);
 void		 fs_load_url(struct tab *, const char *);
-int		 bookmark_page(const char *);
 int		 save_cert(const struct tofu_entry *e);
 int		 update_cert(const struct tofu_entry *e);
 int		 fs_load_state(struct ohash *);
blob - e84ebaa3ff51abebb6b2a55dbf935db3ccc15b46
blob + 8ffa54d566c4c5be813eae3d2923e91f125cb265
--- include/telescope.h
+++ include/telescope.h
@@ -353,6 +353,7 @@ int		 load_previous_page(struct tab*);
 int		 load_next_page(struct tab*);
 void		 write_buffer(const char *, struct tab *);
 void		 humanify_url(const char *, char *, size_t);
+int		 bookmark_page(const char *);
 int		 ui_send_net(int, uint32_t, const void *, uint16_t);
 
 /* tofu.c */
blob - be43e355c74f7332ed707c95332953fb45ee1e2d
blob + ff04a90ef09dc65f836eee6b836b1f6ecdde4cd5
--- telescope.c
+++ telescope.c
@@ -949,6 +949,18 @@ humanify_url(const char *raw, char *ret, size_t len)
 
 	strlcpy(ret, "gemini://", len);
 	strlcat(ret, raw, len);
+}
+
+int
+bookmark_page(const char *url)
+{
+	FILE *fp;
+
+	if ((fp = fopen(bookmark_file, "a")) == NULL)
+		return -1;
+	fprintf(fp, "=> %s\n", url);
+	fclose(fp);
+	return 0;
 }
 
 static pid_t