From: David Lawrence Ramsey Date: Thu, 2 Jun 2005 05:50:58 +0000 (+0000) Subject: fix more bad #ifdefs, and add a few formatting fixes X-Git-Tag: v1.3.8~227 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1726050ef9cda00631d9f5fc1ed1928047eeffb2;p=nano.git 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-d3aeb78583b8 --- diff --git a/src/files.c b/src/files.c index 4e6d46c7..78294072 100644 --- a/src/files.c +++ b/src/files.c @@ -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); } diff --git a/src/proto.h b/src/proto.h index 33ae447f..c6049bf3 100644 --- a/src/proto.h +++ b/src/proto.h @@ -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, ...); diff --git a/src/winio.c b/src/winio.c index 0b923fb5..964f44c4 100644 --- a/src/winio.c +++ b/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, ...)