1
1

Adding four needed compilation conditions on ENABLE_NANORC.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4590 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Benno Schulenberg 2014-02-22 16:26:30 +00:00
родитель 44e8583a66
Коммит d6e39724d8
3 изменённых файлов: 13 добавлений и 7 удалений

Просмотреть файл

@ -1,3 +1,9 @@
2014-02-22 Benno Schulenberg <bensberg@justemail.net>
* src/nano.c (main) - Add two conditions on ENABLE_NANORC.
* src/files.c (close_buffer, do_insertfile) - Likewise.
This avoids compilation failure when nano is configured
with both --disable-color and --disable-nanorc.
2014-02-22 Felipe Bugno <capent@Savannah> (tiny change) 2014-02-22 Felipe Bugno <capent@Savannah> (tiny change)
* doc/nanorc.sample.in - Add an include for CMake files. * doc/nanorc.sample.in - Add an include for CMake files.

Просмотреть файл

@ -482,9 +482,9 @@ bool close_buffer(void)
if (openfile == openfile->next) if (openfile == openfile->next)
return FALSE; return FALSE;
#ifndef NANO_TINY #if !defined(NANO_TINY) && defined(ENABLE_NANORC)
update_poshistory(openfile->filename, openfile->current->lineno, xplustabs()+1); update_poshistory(openfile->filename, openfile->current->lineno, xplustabs()+1);
#endif /* NANO_TINY */ #endif
/* Switch to the next file buffer. */ /* Switch to the next file buffer. */
switch_to_next_buffer_void(); switch_to_next_buffer_void();
@ -1194,7 +1194,7 @@ void do_insertfile(
} }
#endif #endif
#ifdef ENABLE_MULTIBUFFER #if defined(ENABLE_MULTIBUFFER) && defined(ENABLE_NANORC)
if (ISSET(MULTIBUFFER)) { if (ISSET(MULTIBUFFER)) {
/* Update the screen to account for the current /* Update the screen to account for the current
* buffer. */ * buffer. */

Просмотреть файл

@ -2653,7 +2653,7 @@ int main(int argc, char **argv)
iline = 1; iline = 1;
icol = 1; icol = 1;
} }
#ifndef NANO_TINY #if !defined(NANO_TINY) && defined(ENABLE_NANORC)
else { else {
/* See if we have a POS history to use if we haven't overridden it */ /* See if we have a POS history to use if we haven't overridden it */
ssize_t savedposline, savedposcol; ssize_t savedposline, savedposcol;
@ -2661,7 +2661,7 @@ int main(int argc, char **argv)
do_gotolinecolumn(savedposline, savedposcol, FALSE, FALSE, FALSE, do_gotolinecolumn(savedposline, savedposcol, FALSE, FALSE, FALSE,
FALSE); FALSE);
} }
#endif /* NANO_TINY */ #endif
} }
} }
} }
@ -2699,14 +2699,14 @@ int main(int argc, char **argv)
if (startline > 1 || startcol > 1) if (startline > 1 || startcol > 1)
do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE, do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE,
FALSE); FALSE);
# ifndef NANO_TINY #if !defined(NANO_TINY) && defined(ENABLE_NANORC)
else { else {
/* See if we have a POS history to use if we haven't overridden it */ /* See if we have a POS history to use if we haven't overridden it */
ssize_t savedposline, savedposcol; ssize_t savedposline, savedposcol;
if (check_poshistory(argv[optind], &savedposline, &savedposcol)) if (check_poshistory(argv[optind], &savedposline, &savedposcol))
do_gotolinecolumn(savedposline, savedposcol, FALSE, FALSE, FALSE, FALSE); do_gotolinecolumn(savedposline, savedposcol, FALSE, FALSE, FALSE, FALSE);
} }
#endif /* NANO_TINY */ #endif
display_main_list(); display_main_list();