Commit Diff


commit - 84b880390e4a2a475936742c3b1aa37609ca2cab
commit + 450a89f74f2e3bc45112aa7c9bfa22b71f7fb6d2
blob - 4cf6090fd4e119dbe9786d16b60ec2f58f0b7bf5
blob + 64aecc62d05073ecff4ab1b9b3a5b471830e27c3
--- Makefile.am
+++ Makefile.am
@@ -14,6 +14,7 @@ telescope_SOURCES =	cmd.c		\
 			keymap.c	\
 			mime.c		\
 			minibuffer.c	\
+			minibuffer.h	\
 			pages.c		\
 			parse.y		\
 			parser.c	\
blob - 78c9c7fa881c57bf6fa0727bf970895c94cc9b5a
blob + 74ec84973f8a92ff8712093e7bb14509367b728f
--- cmd.c
+++ cmd.c
@@ -18,6 +18,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "minibuffer.h"
 #include "telescope.h"
 
 /* return 1 if moved, 0 otherwise */
blob - 9c208d86af425dd4ff8edc99b0d903e25b1f9cea
blob + 8cfc88176eebe2d3b388cb20eb188d642aad611c
--- minibuffer.c
+++ minibuffer.c
@@ -17,7 +17,7 @@
 #include <stdlib.h>
 #include <string.h>
 
-#include "telescope.h"
+#include "minibuffer.h"
 
 static void		 minibuffer_hist_save_entry(void);
 static void		 minibuffer_self_insert(void);
blob - /dev/null
blob + 5b4b4a41765c2935870f90262a5a1d4ab9a7855a (mode 644)
--- /dev/null
+++ minibuffer.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2021 Omar Polo <op@omarpolo.com>
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#ifndef MINIBUFFER_H
+#define MINIBUFFER_H
+
+#include "telescope.h"
+
+void	 enter_minibuffer(void(*)(void), void(*)(void), void(*)(void),
+	     struct histhead *);
+void	 exit_minibuffer(void);
+void	 yornp(const char *, void (*)(int, struct tab *), struct tab *);
+void	 completing_read(const char *,
+	     void (*)(const char *, unsigned int),
+	     unsigned int);
+
+#endif
blob - 5adf485a07ae9fee6013a4d24bd3987c75255895
blob + 936bbbbc66130b1cd5e40d11d07d3b92796f0832
--- telescope.h
+++ telescope.h
@@ -343,15 +343,6 @@ int		 kmap_define_key(struct kmap*, const char*, void(
 /* mime.c */
 int		 setup_parser_for(struct tab*);
 
-/* minibuffer.c */
-void		 enter_minibuffer(void(*)(void), void(*)(void), void(*)(void),
-		     struct histhead *);
-void		 exit_minibuffer(void);
-void		 yornp(const char *, void (*)(int, struct tab *), struct tab *);
-void		 completing_read(const char *,
-		     void (*)(const char *, unsigned int),
-		     unsigned int);
-
 /* pages.c */
 extern const char	*about_about;
 extern const char	*about_blank;
blob - 8055b9d85b8cacb91708ce0f17d71ba19cfdb826
blob + 45987d73e1268e311d608a0b3f38cd58055c2168
--- ui.c
+++ ui.c
@@ -30,6 +30,7 @@
  *
  */
 
+#include "minibuffer.h"
 #include "telescope.h"
 
 #include <assert.h>