commit 0a3a6441bc30ff3c1837562d6620c5e74317cf04
parent 2eafe7bf582a7e9b978789d108ad969e4577f11b
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 25 Jul 2016 17:23:45 +0200
tweaks: unconditionally compile a couple of parameters
Having two unneeded parameters in the tiny version is acceptable --
the code gets so much more readable.
Diffstat:
2 files changed, 13 insertions(+), 49 deletions(-)
diff --git a/src/move.c b/src/move.c
@@ -403,13 +403,7 @@ void do_end(void)
/* If scroll_only is FALSE, move up one line. If scroll_only is TRUE,
* scroll up one line without scrolling the cursor. */
-void do_up(
-#ifndef NANO_TINY
- bool scroll_only
-#else
- void
-#endif
- )
+void do_up(bool scroll_only)
{
/* If we're at the top of the file, or if scroll_only is TRUE and
* the top of the file is onscreen, get out. */
@@ -455,30 +449,12 @@ void do_up(
/* Move up one line. */
void do_up_void(void)
{
- do_up(
-#ifndef NANO_TINY
- FALSE
-#endif
- );
-}
-
-#ifndef NANO_TINY
-/* Scroll up one line without scrolling the cursor. */
-void do_scroll_up(void)
-{
- do_up(TRUE);
+ do_up(FALSE);
}
-#endif
/* If scroll_only is FALSE, move down one line. If scroll_only is TRUE,
* scroll down one line without scrolling the cursor. */
-void do_down(
-#ifndef NANO_TINY
- bool scroll_only
-#else
- void
-#endif
- )
+void do_down(bool scroll_only)
{
#ifndef NANO_TINY
int amount = 0, enough;
@@ -555,14 +531,16 @@ void do_down(
/* Move down one line. */
void do_down_void(void)
{
- do_down(
-#ifndef NANO_TINY
- FALSE
-#endif
- );
+ do_down(FALSE);
}
#ifndef NANO_TINY
+/* Scroll up one line without scrolling the cursor. */
+void do_scroll_up(void)
+{
+ do_up(TRUE);
+}
+
/* Scroll down one line without scrolling the cursor. */
void do_scroll_down(void)
{
diff --git a/src/proto.h b/src/proto.h
@@ -406,26 +406,12 @@ void do_next_word_void(void);
#endif
void do_home(void);
void do_end(void);
-void do_up(
-#ifndef NANO_TINY
- bool scroll_only
-#else
- void
-#endif
- );
+void do_up(bool scroll_only);
void do_up_void(void);
-#ifndef NANO_TINY
-void do_scroll_up(void);
-#endif
-void do_down(
-#ifndef NANO_TINY
- bool scroll_only
-#else
- void
-#endif
- );
+void do_down(bool scroll_only);
void do_down_void(void);
#ifndef NANO_TINY
+void do_scroll_up(void);
void do_scroll_down(void);
#endif
void do_left(void);