tweaks: improve some indentation and reshuffle a few lines

master
Benno Schulenberg 2016-08-26 12:18:04 +02:00
parent 7e0c4e5726
commit b77b1391c3
4 changed files with 36 additions and 36 deletions

View File

@ -681,13 +681,13 @@ int filesearch_init(void)
/* This is now one simple call. It just does a lot. */ /* This is now one simple call. It just does a lot. */
input = do_prompt(FALSE, input = do_prompt(FALSE,
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
TRUE, TRUE,
#endif #endif
MWHEREISFILE, NULL, MWHEREISFILE, NULL,
#ifndef DISABLE_HISTORIES #ifndef DISABLE_HISTORIES
&search_history, &search_history,
#endif #endif
browser_refresh, "%s%s", _("Search"), buf); browser_refresh, "%s%s", _("Search"), buf);
/* Release buf now that we don't need it anymore. */ /* Release buf now that we don't need it anymore. */
free(buf); free(buf);

View File

@ -1085,21 +1085,21 @@ void do_insertfile(
while (TRUE) { while (TRUE) {
#ifndef NANO_TINY #ifndef NANO_TINY
if (execute) { if (execute) {
msg =
#ifndef DISABLE_MULTIBUFFER #ifndef DISABLE_MULTIBUFFER
ISSET(MULTIBUFFER) ? if (ISSET(MULTIBUFFER))
_("Command to execute in new buffer [from %s] ") : msg = _("Command to execute in new buffer [from %s] ");
else
#endif #endif
_("Command to execute [from %s] "); msg = _("Command to execute [from %s] ");
} else } else
#endif /* NANO_TINY */ #endif /* NANO_TINY */
{ {
msg =
#ifndef DISABLE_MULTIBUFFER #ifndef DISABLE_MULTIBUFFER
ISSET(MULTIBUFFER) ? if (ISSET(MULTIBUFFER))
_("File to insert into new buffer [from %s] ") : msg = _("File to insert into new buffer [from %s] ");
else
#endif #endif
_("File to insert [from %s] "); msg = _("File to insert [from %s] ");
} }
present_path = mallocstrcpy(present_path, "./"); present_path = mallocstrcpy(present_path, "./");
@ -1117,8 +1117,8 @@ void do_insertfile(
#endif #endif
edit_refresh, msg, edit_refresh, msg,
#ifndef DISABLE_OPERATINGDIR #ifndef DISABLE_OPERATINGDIR
operating_dir != NULL && strcmp(operating_dir, operating_dir != NULL && strcmp(operating_dir, ".") != 0 ?
".") != 0 ? operating_dir : operating_dir :
#endif #endif
"./"); "./");

View File

@ -546,7 +546,7 @@ functionptrtype acquire_an_answer(int *actual, bool allow_tabs,
} }
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "acquire_an_answer: answer = \"%s\", statusbar_x = %lu\n", answer, (unsigned long) statusbar_x); fprintf(stderr, "acquiring: answer = \"%s\", statusbar_x = %lu\n", answer, (unsigned long) statusbar_x);
#endif #endif
update_the_statusbar(); update_the_statusbar();
@ -709,7 +709,7 @@ int do_prompt(bool allow_tabs,
{ {
va_list ap; va_list ap;
int retval = KEY_WINCH; int retval = KEY_WINCH;
functionptrtype func; functionptrtype func = NULL;
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
bool listed = FALSE; bool listed = FALSE;
#endif #endif

View File

@ -155,32 +155,32 @@ int search_init(bool replacing, bool use_answer)
/* This is now one simple call. It just does a lot. */ /* This is now one simple call. It just does a lot. */
i = do_prompt(FALSE, i = do_prompt(FALSE,
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
TRUE, TRUE,
#endif #endif
replacing ? MREPLACE : MWHEREIS, backupstring, replacing ? MREPLACE : MWHEREIS, backupstring,
#ifndef DISABLE_HISTORIES #ifndef DISABLE_HISTORIES
&search_history, &search_history,
#endif #endif
/* TRANSLATORS: This is the main search prompt. */ /* TRANSLATORS: This is the main search prompt. */
edit_refresh, "%s%s%s%s%s%s", _("Search"), edit_refresh, "%s%s%s%s%s%s", _("Search"),
#ifndef NANO_TINY #ifndef NANO_TINY
/* TRANSLATORS: The next three strings are modifiers of the search prompt. */ /* TRANSLATORS: The next three modify the search prompt. */
ISSET(CASE_SENSITIVE) ? _(" [Case Sensitive]") : ISSET(CASE_SENSITIVE) ? _(" [Case Sensitive]") :
#endif #endif
"", "",
#ifdef HAVE_REGEX_H #ifdef HAVE_REGEX_H
ISSET(USE_REGEXP) ? _(" [Regexp]") : ISSET(USE_REGEXP) ? _(" [Regexp]") :
#endif #endif
"", "",
#ifndef NANO_TINY #ifndef NANO_TINY
ISSET(BACKWARDS_SEARCH) ? _(" [Backwards]") : ISSET(BACKWARDS_SEARCH) ? _(" [Backwards]") :
#endif #endif
"", replacing ? "", replacing ?
#ifndef NANO_TINY #ifndef NANO_TINY
/* TRANSLATORS: The next two strings are modifiers of the search prompt. */ /* TRANSLATORS: The next two modify the search prompt. */
openfile->mark_set ? _(" (to replace) in selection") : openfile->mark_set ? _(" (to replace) in selection") :
#endif #endif
_(" (to replace)") : "", buf); _(" (to replace)") : "", buf);
/* Release buf now that we don't need it anymore. */ /* Release buf now that we don't need it anymore. */
free(buf); free(buf);
@ -834,14 +834,14 @@ void do_replace(void)
i = do_prompt(FALSE, i = do_prompt(FALSE,
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
TRUE, TRUE,
#endif #endif
MREPLACEWITH, NULL, MREPLACEWITH, NULL,
#ifndef DISABLE_HISTORIES #ifndef DISABLE_HISTORIES
&replace_history, &replace_history,
#endif #endif
/* TRANSLATORS: This is a prompt. */ /* TRANSLATORS: This is a prompt. */
edit_refresh, _("Replace with")); edit_refresh, _("Replace with"));
#ifndef DISABLE_HISTORIES #ifndef DISABLE_HISTORIES
/* If the replace string is not "", add it to the replace history list. */ /* If the replace string is not "", add it to the replace history list. */