Commit 0a3a6441 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: unconditionally compile a couple of parameters

Having two unneeded parameters in the tiny version is acceptable --
the code gets so much more readable.
No related merge requests found
Showing with 13 additions and 49 deletions
+13 -49
......@@ -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)
{
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment