Moved pass through mode functions to normal.c.
authorDaniel Carl <danielcarl@gmx.de>
Thu, 4 Dec 2014 21:13:01 +0000 (22:13 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Thu, 4 Dec 2014 21:14:30 +0000 (22:14 +0100)
src/main.c
src/normal.c
src/normal.h
src/pass.c [deleted file]
src/pass.h [deleted file]

index ad3ccbb..00a72da 100644 (file)
@@ -39,7 +39,6 @@
 #include "ex.h"
 #include "input.h"
 #include "map.h"
-#include "pass.h"
 #include "bookmark.h"
 #include "js.h"
 #include "autocmd.h"
index fb24641..2e085e3 100644 (file)
@@ -310,6 +310,31 @@ VbResult normal_keypress(int key)
     return res;
 }
 
+/**
+ * Function called when vimb enters the passthrough mode.
+ */
+void pass_enter(void)
+{
+    vb_update_mode_label("-- PASS THROUGH --");
+}
+
+/**
+ * Called when passthrough mode is left.
+ */
+void pass_leave(void)
+{
+    vb_update_mode_label("");
+}
+
+VbResult pass_keypress(int key)
+{
+    if (key == CTRL('[')) { /* esc */
+        mode_enter('n');
+    }
+    vb.state.processed_key = false;
+    return RESULT_COMPLETE;
+}
+
 static VbResult normal_clear_input(const NormalCmdInfo *info)
 {
     gtk_widget_grab_focus(GTK_WIDGET(vb.gui.webview));
index ac2eae0..e9a2f93 100644 (file)
@@ -26,5 +26,8 @@
 void normal_enter(void);
 void normal_leave(void);
 VbResult normal_keypress(int key);
+void pass_enter(void);
+void pass_leave(void);
+VbResult pass_keypress(int key);
 
 #endif /* end of include guard: _NORMAL_H */
diff --git a/src/pass.c b/src/pass.c
deleted file mode 100644 (file)
index d98104a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * vimb - a webkit based vim like browser.
- *
- * Copyright (C) 2012-2014 Daniel Carl
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- */
-
-#include "config.h"
-#include "main.h"
-#include "pass.h"
-#include "mode.h"
-#include "dom.h"
-#include "ascii.h"
-
-extern VbCore vb;
-
-
-/**
- * Function called when vimb enters the passthrough mode.
- */
-void pass_enter(void)
-{
-    vb_update_mode_label("-- PASS THROUGH --");
-}
-
-/**
- * Called when passthrough mode is left.
- */
-void pass_leave(void)
-{
-    vb_update_mode_label("");
-}
-
-VbResult pass_keypress(int key)
-{
-    if (key == CTRL('[')) { /* esc */
-        mode_enter('n');
-    }
-    vb.state.processed_key = false;
-    return RESULT_COMPLETE;
-}
diff --git a/src/pass.h b/src/pass.h
deleted file mode 100644 (file)
index 03b34a2..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/**
- * vimb - a webkit based vim like browser.
- *
- * Copyright (C) 2012-2014 Daniel Carl
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see http://www.gnu.org/licenses/.
- */
-
-#ifndef _PASS_H
-#define _PASS_H
-
-#include "config.h"
-#include "main.h"
-
-void pass_enter(void);
-void pass_leave(void);
-VbResult pass_keypress(int key);
-
-#endif /* end of include guard: _PASS_H */