Converting #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4712 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
9d306cd330
commit
0636d7b797
|
@ -3,6 +3,8 @@
|
||||||
* doc/syntax/po.nanorc: New file, syntax colouring for PO files.
|
* doc/syntax/po.nanorc: New file, syntax colouring for PO files.
|
||||||
* configure.ac: Stop --with-slang from duplicating --enable-tiny.
|
* configure.ac: Stop --with-slang from duplicating --enable-tiny.
|
||||||
* configure.ac: Sort all the disabling options alphabetically.
|
* configure.ac: Sort all the disabling options alphabetically.
|
||||||
|
* src/{proto.h,files.c,global.c,nano.c,rcfile.c}, configure.ac:
|
||||||
|
Convert #ifdef ENABLE_MULTIBUFFER to #ifndef DISABLE_MULTIBUFFER.
|
||||||
|
|
||||||
2014-04-02 Benno Schulenberg <bensberg@justemail.net>
|
2014-04-02 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* configure.ac, doc/Makefile.am: Try to build the info documentation
|
* configure.ac, doc/Makefile.am: Try to build the info documentation
|
||||||
|
|
|
@ -72,6 +72,7 @@ if test "x$enable_tiny" = xyes; then
|
||||||
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
AC_DEFINE(DISABLE_HELP, 1, [Define this to disable the help text display.])
|
||||||
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
AC_DEFINE(DISABLE_JUSTIFY, 1, [Define this to disable the justify routines.])
|
||||||
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
AC_DEFINE(DISABLE_MOUSE, 1, [Define this to disable the mouse support.])
|
||||||
|
AC_DEFINE(DISABLE_MULTIBUFFER, 1, [Define this to disable multiple file buffers.])
|
||||||
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
AC_DEFINE(DISABLE_OPERATINGDIR, 1, [Define this to disable the setting of the operating directory (chroot of sorts).])
|
||||||
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
AC_DEFINE(DISABLE_SPELLER, 1, [Define this to disable the spell checker functions.])
|
||||||
AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
|
AC_DEFINE(DISABLE_TABCOMP, 1, [Define this to disable the tab completion functions for files and search strings.])
|
||||||
|
@ -136,8 +137,8 @@ fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(multibuffer,
|
AC_ARG_ENABLE(multibuffer,
|
||||||
AS_HELP_STRING([--disable-multibuffer], [Disable multiple file buffers]))
|
AS_HELP_STRING([--disable-multibuffer], [Disable multiple file buffers]))
|
||||||
if test "x$enable_multibuffer" != xno; then
|
if test "x$enable_multibuffer" = xno; then
|
||||||
AC_DEFINE(ENABLE_MULTIBUFFER, 1, [Define this to enable multiple file buffers.])
|
AC_DEFINE(DISABLE_MULTIBUFFER, 1, [Define this to disable multiple file buffers.])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_ARG_ENABLE(nanorc,
|
AC_ARG_ENABLE(nanorc,
|
||||||
|
|
29
src/files.c
29
src/files.c
|
@ -311,7 +311,7 @@ int do_lockfile(const char *filename)
|
||||||
void open_buffer(const char *filename, bool undoable)
|
void open_buffer(const char *filename, bool undoable)
|
||||||
{
|
{
|
||||||
bool new_buffer = (openfile == NULL
|
bool new_buffer = (openfile == NULL
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
|| ISSET(MULTIBUFFER)
|
|| ISSET(MULTIBUFFER)
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
@ -424,7 +424,7 @@ void display_buffer(void)
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
/* Switch to the next file buffer if next_buf is TRUE. Otherwise,
|
/* Switch to the next file buffer if next_buf is TRUE. Otherwise,
|
||||||
* switch to the previous file buffer. */
|
* switch to the previous file buffer. */
|
||||||
void switch_to_prevnext_buffer(bool next_buf)
|
void switch_to_prevnext_buffer(bool next_buf)
|
||||||
|
@ -497,7 +497,7 @@ bool close_buffer(void)
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif /* ENABLE_MULTIBUFFER */
|
#endif /* !DISABLE_MULTIBUFFER */
|
||||||
|
|
||||||
/* A bit of a copy and paste from open_file(), is_file_writable()
|
/* A bit of a copy and paste from open_file(), is_file_writable()
|
||||||
* just checks whether the file is appendable as a quick
|
* just checks whether the file is appendable as a quick
|
||||||
|
@ -1027,7 +1027,7 @@ void do_insertfile(
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (execute) {
|
if (execute) {
|
||||||
msg =
|
msg =
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
ISSET(MULTIBUFFER) ?
|
ISSET(MULTIBUFFER) ?
|
||||||
_("Command to execute in new buffer [from %s] ") :
|
_("Command to execute in new buffer [from %s] ") :
|
||||||
#endif
|
#endif
|
||||||
|
@ -1035,7 +1035,7 @@ void do_insertfile(
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
msg =
|
msg =
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
ISSET(MULTIBUFFER) ?
|
ISSET(MULTIBUFFER) ?
|
||||||
_("File to insert into new buffer [from %s] ") :
|
_("File to insert into new buffer [from %s] ") :
|
||||||
#endif
|
#endif
|
||||||
|
@ -1068,7 +1068,7 @@ void do_insertfile(
|
||||||
* filename or command begins with a newline (i.e. an encoded
|
* filename or command begins with a newline (i.e. an encoded
|
||||||
* null), treat it as though it's blank. */
|
* null), treat it as though it's blank. */
|
||||||
if (i == -1 || ((i == -2 || *answer == '\n')
|
if (i == -1 || ((i == -2 || *answer == '\n')
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
&& !ISSET(MULTIBUFFER)
|
&& !ISSET(MULTIBUFFER)
|
||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
|
@ -1082,8 +1082,7 @@ void do_insertfile(
|
||||||
s = get_shortcut(currmenu, &i, &meta_key, &func_key);
|
s = get_shortcut(currmenu, &i, &meta_key, &func_key);
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
|
|
||||||
if (s && s->scfunc == new_buffer_void) {
|
if (s && s->scfunc == new_buffer_void) {
|
||||||
/* Don't allow toggling if we're in view mode. */
|
/* Don't allow toggling if we're in view mode. */
|
||||||
if (!ISSET(VIEW_MODE))
|
if (!ISSET(VIEW_MODE))
|
||||||
|
@ -1118,7 +1117,7 @@ void do_insertfile(
|
||||||
/* If we don't have a file yet, go back to the statusbar
|
/* If we don't have a file yet, go back to the statusbar
|
||||||
* prompt. */
|
* prompt. */
|
||||||
if (i != 0
|
if (i != 0
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
&& (i != -2 || !ISSET(MULTIBUFFER))
|
&& (i != -2 || !ISSET(MULTIBUFFER))
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
|
@ -1139,7 +1138,7 @@ void do_insertfile(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
if (!ISSET(MULTIBUFFER)) {
|
if (!ISSET(MULTIBUFFER)) {
|
||||||
#endif
|
#endif
|
||||||
/* If we're not inserting into a new buffer, partition
|
/* If we're not inserting into a new buffer, partition
|
||||||
|
@ -1152,7 +1151,7 @@ void do_insertfile(
|
||||||
openfile->current_x);
|
openfile->current_x);
|
||||||
edittop_inside =
|
edittop_inside =
|
||||||
(openfile->edittop == openfile->fileage);
|
(openfile->edittop == openfile->fileage);
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1163,7 +1162,7 @@ void do_insertfile(
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (execute) {
|
if (execute) {
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
if (ISSET(MULTIBUFFER))
|
if (ISSET(MULTIBUFFER))
|
||||||
/* Open a blank buffer. */
|
/* Open a blank buffer. */
|
||||||
open_buffer("", FALSE);
|
open_buffer("", FALSE);
|
||||||
|
@ -1172,7 +1171,7 @@ void do_insertfile(
|
||||||
/* Save the command's output in the current buffer. */
|
/* Save the command's output in the current buffer. */
|
||||||
execute_command(answer);
|
execute_command(answer);
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
if (ISSET(MULTIBUFFER)) {
|
if (ISSET(MULTIBUFFER)) {
|
||||||
/* Move back to the beginning of the first line of
|
/* Move back to the beginning of the first line of
|
||||||
* the buffer. */
|
* the buffer. */
|
||||||
|
@ -1195,7 +1194,7 @@ void do_insertfile(
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLE_MULTIBUFFER) && defined(ENABLE_NANORC)
|
#if !defined(DISABLE_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. */
|
||||||
|
@ -1294,7 +1293,7 @@ void do_insertfile_void(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
if (ISSET(VIEW_MODE) && !ISSET(MULTIBUFFER))
|
if (ISSET(VIEW_MODE) && !ISSET(MULTIBUFFER))
|
||||||
statusbar(_("Key invalid in non-multibuffer mode"));
|
statusbar(_("Key invalid in non-multibuffer mode"));
|
||||||
else
|
else
|
||||||
|
|
22
src/global.c
22
src/global.c
|
@ -550,7 +550,7 @@ const char *append_msg = N_("Append");
|
||||||
const char *prepend_msg = N_("Prepend");
|
const char *prepend_msg = N_("Prepend");
|
||||||
const char *backup_file_msg = N_("Backup File");
|
const char *backup_file_msg = N_("Backup File");
|
||||||
const char *ext_cmd_msg = N_("Execute Command");
|
const char *ext_cmd_msg = N_("Execute Command");
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
const char *new_buffer_msg = N_("New Buffer");
|
const char *new_buffer_msg = N_("New Buffer");
|
||||||
#endif
|
#endif
|
||||||
const char *goto_dir_msg = N_("Go To Dir");
|
const char *goto_dir_msg = N_("Go To Dir");
|
||||||
|
@ -593,7 +593,7 @@ void shortcut_init(bool unjustify)
|
||||||
const char *nano_cancel_msg = N_("Cancel the current function");
|
const char *nano_cancel_msg = N_("Cancel the current function");
|
||||||
const char *nano_help_msg = N_("Display this help text");
|
const char *nano_help_msg = N_("Display this help text");
|
||||||
const char *nano_exit_msg =
|
const char *nano_exit_msg =
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
N_("Close the current file buffer / Exit from nano")
|
N_("Close the current file buffer / Exit from nano")
|
||||||
#else
|
#else
|
||||||
N_("Exit from nano")
|
N_("Exit from nano")
|
||||||
|
@ -657,7 +657,7 @@ void shortcut_init(bool unjustify)
|
||||||
const char *nano_scrolldown_msg =
|
const char *nano_scrolldown_msg =
|
||||||
N_("Scroll down one line without scrolling the cursor");
|
N_("Scroll down one line without scrolling the cursor");
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
const char *nano_prevfile_msg =
|
const char *nano_prevfile_msg =
|
||||||
N_("Switch to the previous file buffer");
|
N_("Switch to the previous file buffer");
|
||||||
const char *nano_nextfile_msg =
|
const char *nano_nextfile_msg =
|
||||||
|
@ -718,7 +718,7 @@ void shortcut_init(bool unjustify)
|
||||||
N_("Toggle backing up of the original file");
|
N_("Toggle backing up of the original file");
|
||||||
const char *nano_execute_msg = N_("Execute external command");
|
const char *nano_execute_msg = N_("Execute external command");
|
||||||
#endif
|
#endif
|
||||||
#if !defined(NANO_TINY) && defined(ENABLE_MULTIBUFFER)
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
const char *nano_multibuffer_msg =
|
const char *nano_multibuffer_msg =
|
||||||
N_("Toggle the use of a new buffer");
|
N_("Toggle the use of a new buffer");
|
||||||
#endif
|
#endif
|
||||||
|
@ -760,7 +760,7 @@ void shortcut_init(bool unjustify)
|
||||||
cancel_msg, IFSCHELP(nano_cancel_msg), FALSE, VIEW);
|
cancel_msg, IFSCHELP(nano_cancel_msg), FALSE, VIEW);
|
||||||
|
|
||||||
add_to_funcs(do_exit, MMAIN,
|
add_to_funcs(do_exit, MMAIN,
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
/* TRANSLATORS: Try to keep this at most 10 characters. */
|
/* TRANSLATORS: Try to keep this at most 10 characters. */
|
||||||
openfile != NULL && openfile != openfile->next ? N_("Close") :
|
openfile != NULL && openfile != openfile->next ? N_("Close") :
|
||||||
#endif
|
#endif
|
||||||
|
@ -782,7 +782,7 @@ void shortcut_init(bool unjustify)
|
||||||
add_to_funcs(do_insertfile_void,
|
add_to_funcs(do_insertfile_void,
|
||||||
/* TRANSLATORS: Try to keep this at most 10 characters. */
|
/* TRANSLATORS: Try to keep this at most 10 characters. */
|
||||||
MMAIN, N_("Read File"), IFSCHELP(nano_insert_msg), FALSE,
|
MMAIN, N_("Read File"), IFSCHELP(nano_insert_msg), FALSE,
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
VIEW);
|
VIEW);
|
||||||
#else
|
#else
|
||||||
NOVIEW);
|
NOVIEW);
|
||||||
|
@ -946,7 +946,7 @@ void shortcut_init(bool unjustify)
|
||||||
IFSCHELP(nano_scrolldown_msg), FALSE, VIEW);
|
IFSCHELP(nano_scrolldown_msg), FALSE, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
add_to_funcs(switch_to_prev_buffer_void, MMAIN, N_("Previous File"),
|
add_to_funcs(switch_to_prev_buffer_void, MMAIN, N_("Previous File"),
|
||||||
IFSCHELP(nano_prevfile_msg), FALSE, VIEW);
|
IFSCHELP(nano_prevfile_msg), FALSE, VIEW);
|
||||||
add_to_funcs(switch_to_next_buffer_void, MMAIN, N_("Next File"),
|
add_to_funcs(switch_to_next_buffer_void, MMAIN, N_("Next File"),
|
||||||
|
@ -1071,7 +1071,7 @@ void shortcut_init(bool unjustify)
|
||||||
add_to_funcs(ext_cmd_void, MINSERTFILE,
|
add_to_funcs(ext_cmd_void, MINSERTFILE,
|
||||||
ext_cmd_msg, IFSCHELP(nano_execute_msg), FALSE, NOVIEW);
|
ext_cmd_msg, IFSCHELP(nano_execute_msg), FALSE, NOVIEW);
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
add_to_funcs(new_buffer_void, MINSERTFILE|MEXTCMD,
|
add_to_funcs(new_buffer_void, MINSERTFILE|MEXTCMD,
|
||||||
new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW);
|
new_buffer_msg, IFSCHELP(nano_multibuffer_msg), FALSE, NOVIEW);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1221,7 +1221,7 @@ void shortcut_init(bool unjustify)
|
||||||
add_to_sclist(MMAIN, "M-=", do_scroll_down, 0, TRUE);
|
add_to_sclist(MMAIN, "M-=", do_scroll_down, 0, TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
add_to_sclist(MMAIN, "M-<", switch_to_prev_buffer_void, 0, TRUE);
|
add_to_sclist(MMAIN, "M-<", switch_to_prev_buffer_void, 0, TRUE);
|
||||||
add_to_sclist(MMAIN, "M-,", switch_to_prev_buffer_void, 0, TRUE);
|
add_to_sclist(MMAIN, "M-,", switch_to_prev_buffer_void, 0, TRUE);
|
||||||
add_to_sclist(MMAIN, "M->", switch_to_next_buffer_void, 0, TRUE);
|
add_to_sclist(MMAIN, "M->", switch_to_next_buffer_void, 0, TRUE);
|
||||||
|
@ -1538,7 +1538,7 @@ sc *strtosc(int menu, char *input)
|
||||||
s->scfunc = do_home;
|
s->scfunc = do_home;
|
||||||
else if (!strcasecmp(input, "end"))
|
else if (!strcasecmp(input, "end"))
|
||||||
s->scfunc = do_end;
|
s->scfunc = do_end;
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
else if (!strcasecmp(input, "prevbuf"))
|
else if (!strcasecmp(input, "prevbuf"))
|
||||||
s->scfunc = switch_to_prev_buffer_void;
|
s->scfunc = switch_to_prev_buffer_void;
|
||||||
else if (!strcasecmp(input, "nextbuf"))
|
else if (!strcasecmp(input, "nextbuf"))
|
||||||
|
@ -1588,7 +1588,7 @@ sc *strtosc(int menu, char *input)
|
||||||
} else if (!strcasecmp(input, "backup")) {
|
} else if (!strcasecmp(input, "backup")) {
|
||||||
s->scfunc = backup_file_void;
|
s->scfunc = backup_file_void;
|
||||||
s->execute = FALSE;
|
s->execute = FALSE;
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
} else if (!strcasecmp(input, "newbuffer")) {
|
} else if (!strcasecmp(input, "newbuffer")) {
|
||||||
s->scfunc = new_buffer_void;
|
s->scfunc = new_buffer_void;
|
||||||
s->execute = FALSE;
|
s->execute = FALSE;
|
||||||
|
|
22
src/nano.c
22
src/nano.c
|
@ -657,7 +657,7 @@ void die(const char *msg, ...)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
/* Save all of the other modified file buffers, if any. */
|
/* Save all of the other modified file buffers, if any. */
|
||||||
if (openfile != NULL) {
|
if (openfile != NULL) {
|
||||||
openfilestruct *tmp = openfile;
|
openfilestruct *tmp = openfile;
|
||||||
|
@ -853,7 +853,7 @@ void usage(void)
|
||||||
print_opt("-E", "--tabstospaces",
|
print_opt("-E", "--tabstospaces",
|
||||||
N_("Convert typed tabs to spaces"));
|
N_("Convert typed tabs to spaces"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
print_opt("-F", "--multibuffer", N_("Enable multiple file buffers"));
|
print_opt("-F", "--multibuffer", N_("Enable multiple file buffers"));
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
|
@ -980,6 +980,9 @@ void version(void)
|
||||||
#ifdef DISABLE_MOUSE
|
#ifdef DISABLE_MOUSE
|
||||||
printf(" --disable-mouse");
|
printf(" --disable-mouse");
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef DISABLE_MULTIBUFFER
|
||||||
|
printf(" --disable-multibuffer");
|
||||||
|
#endif
|
||||||
#ifndef ENABLE_NLS
|
#ifndef ENABLE_NLS
|
||||||
printf(" --disable-nls");
|
printf(" --disable-nls");
|
||||||
#endif
|
#endif
|
||||||
|
@ -1007,9 +1010,6 @@ void version(void)
|
||||||
#ifdef NANO_EXTRA
|
#ifdef NANO_EXTRA
|
||||||
printf(" --enable-extra");
|
printf(" --enable-extra");
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
|
||||||
printf(" --enable-multibuffer");
|
|
||||||
#endif
|
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
printf(" --enable-nanorc");
|
printf(" --enable-nanorc");
|
||||||
#endif
|
#endif
|
||||||
|
@ -1081,7 +1081,7 @@ void do_exit(void)
|
||||||
delete_lockfile(openfile->lock_filename);
|
delete_lockfile(openfile->lock_filename);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
/* Exit only if there are no more open file buffers. */
|
/* Exit only if there are no more open file buffers. */
|
||||||
if (!close_buffer())
|
if (!close_buffer())
|
||||||
#endif
|
#endif
|
||||||
|
@ -2054,7 +2054,7 @@ int main(int argc, char **argv)
|
||||||
bool fill_used = FALSE;
|
bool fill_used = FALSE;
|
||||||
/* Was the fill option used? */
|
/* Was the fill option used? */
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
bool old_multibuffer;
|
bool old_multibuffer;
|
||||||
/* The old value of the multibuffer option, restored after we
|
/* The old value of the multibuffer option, restored after we
|
||||||
* load all files on the command line. */
|
* load all files on the command line. */
|
||||||
|
@ -2063,7 +2063,7 @@ int main(int argc, char **argv)
|
||||||
const struct option long_options[] = {
|
const struct option long_options[] = {
|
||||||
{"help", 0, NULL, 'h'},
|
{"help", 0, NULL, 'h'},
|
||||||
{"boldtext", 0, NULL, 'D'},
|
{"boldtext", 0, NULL, 'D'},
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
{"multibuffer", 0, NULL, 'F'},
|
{"multibuffer", 0, NULL, 'F'},
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
|
@ -2194,7 +2194,7 @@ int main(int argc, char **argv)
|
||||||
SET(TABS_TO_SPACES);
|
SET(TABS_TO_SPACES);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
case 'F':
|
case 'F':
|
||||||
SET(MULTIBUFFER);
|
SET(MULTIBUFFER);
|
||||||
break;
|
break;
|
||||||
|
@ -2631,7 +2631,7 @@ int main(int argc, char **argv)
|
||||||
optind++;
|
optind++;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
old_multibuffer = ISSET(MULTIBUFFER);
|
old_multibuffer = ISSET(MULTIBUFFER);
|
||||||
SET(MULTIBUFFER);
|
SET(MULTIBUFFER);
|
||||||
|
|
||||||
|
@ -2686,7 +2686,7 @@ int main(int argc, char **argv)
|
||||||
UNSET(VIEW_MODE);
|
UNSET(VIEW_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
if (!old_multibuffer)
|
if (!old_multibuffer)
|
||||||
UNSET(MULTIBUFFER);
|
UNSET(MULTIBUFFER);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -267,7 +267,7 @@ void open_buffer(const char *filename, bool undoable);
|
||||||
void replace_buffer(const char *filename);
|
void replace_buffer(const char *filename);
|
||||||
#endif
|
#endif
|
||||||
void display_buffer(void);
|
void display_buffer(void);
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
void switch_to_prevnext_buffer(bool next);
|
void switch_to_prevnext_buffer(bool next);
|
||||||
void switch_to_prev_buffer_void(void);
|
void switch_to_prev_buffer_void(void);
|
||||||
void switch_to_next_buffer_void(void);
|
void switch_to_next_buffer_void(void);
|
||||||
|
|
|
@ -48,7 +48,7 @@ static const rcoption rcopts[] = {
|
||||||
#ifndef DISABLE_MOUSE
|
#ifndef DISABLE_MOUSE
|
||||||
{"mouse", USE_MOUSE},
|
{"mouse", USE_MOUSE},
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_MULTIBUFFER
|
#ifndef DISABLE_MULTIBUFFER
|
||||||
{"multibuffer", MULTIBUFFER},
|
{"multibuffer", MULTIBUFFER},
|
||||||
#endif
|
#endif
|
||||||
{"morespace", MORE_SPACE},
|
{"morespace", MORE_SPACE},
|
||||||
|
|
Loading…
Reference in New Issue