fix more bad #ifdefs, and add a few formatting fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2576 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
8234f672d4
commit
1726050ef9
|
@ -2062,8 +2062,8 @@ char **username_tab_completion(const char *buf, size_t *num_matches,
|
|||
continue;
|
||||
#endif
|
||||
|
||||
matches = (char **)nrealloc(matches, (*num_matches + 1) *
|
||||
sizeof(char *));
|
||||
matches = (char **)nrealloc(matches,
|
||||
(*num_matches + 1) * sizeof(char *));
|
||||
matches[*num_matches] =
|
||||
charalloc(strlen(userdata->pw_name) + 2);
|
||||
sprintf(matches[*num_matches], "~%s", userdata->pw_name);
|
||||
|
@ -2158,8 +2158,8 @@ char **cwd_tab_completion(const char *buf, size_t *num_matches, size_t
|
|||
free(tmp2);
|
||||
#endif
|
||||
|
||||
matches = (char **)nrealloc(matches, (*num_matches + 1) *
|
||||
sizeof(char *));
|
||||
matches = (char **)nrealloc(matches,
|
||||
(*num_matches + 1) * sizeof(char *));
|
||||
matches[*num_matches] = mallocstrcpy(NULL, nextdir->d_name);
|
||||
++(*num_matches);
|
||||
}
|
||||
|
|
|
@ -648,7 +648,7 @@ char *display_string(const char *buf, size_t start_col, size_t len, bool
|
|||
dollars);
|
||||
void nanoget_repaint(const char *buf, const char *inputbuf, size_t x);
|
||||
int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
filestruct *history_list,
|
||||
#endif
|
||||
const shortcut *s
|
||||
|
@ -657,7 +657,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
#endif
|
||||
);
|
||||
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
filestruct *history_list,
|
||||
#endif
|
||||
const char *msg, ...);
|
||||
|
|
16
src/winio.c
16
src/winio.c
|
@ -2430,7 +2430,7 @@ void nanoget_repaint(const char *buf, const char *inputbuf, size_t x)
|
|||
/* Get the input from the keyboard; this should only be called from
|
||||
* statusq(). */
|
||||
int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
filestruct *history_list,
|
||||
#endif
|
||||
const shortcut *s
|
||||
|
@ -2446,7 +2446,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
bool tabbed = FALSE;
|
||||
/* Whether we've pressed Tab. */
|
||||
#endif
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
char *history = NULL;
|
||||
/* The current history string. */
|
||||
char *magichistory = NULL;
|
||||
|
@ -2500,7 +2500,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
#endif
|
||||
break;
|
||||
case NANO_PREVLINE_KEY:
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
if (history_list != NULL) {
|
||||
/* If we're scrolling up at the bottom of the
|
||||
* history list, answer isn't blank, and
|
||||
|
@ -2526,10 +2526,10 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
* statusbar prompt. */
|
||||
finished = FALSE;
|
||||
}
|
||||
#endif
|
||||
#endif /* !NANO_SMALL && ENABLE_NANORC */
|
||||
break;
|
||||
case NANO_NEXTLINE_KEY:
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
if (history_list != NULL) {
|
||||
/* Get the newer search from the history list and
|
||||
* save it in answer. If there is no newer search,
|
||||
|
@ -2550,7 +2550,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
statusbar_x = strlen(answer);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* !NANO_SMALL && ENABLE_NANORC */
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -2564,7 +2564,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
wrefresh(bottomwin);
|
||||
}
|
||||
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
/* Free magichistory if we need to. */
|
||||
if (magichistory != NULL)
|
||||
free(magichistory);
|
||||
|
@ -2587,7 +2587,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer,
|
|||
* The allow_tabs parameter indicates whether we should allow tabs to be
|
||||
* interpreted. */
|
||||
int statusq(bool allow_tabs, const shortcut *s, const char *curranswer,
|
||||
#ifndef NANO_SMALL
|
||||
#if !defined(NANO_SMALL) && defined(ENABLE_NANORC)
|
||||
filestruct *history_list,
|
||||
#endif
|
||||
const char *msg, ...)
|
||||
|
|
Loading…
Reference in New Issue