mirror of
git://git.sv.gnu.org/nano.git
synced 2024-12-27 12:49:45 +03:00
Added --disable-wrapping configure flag
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@583 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
a0238ed022
commit
cef7fbb41a
@ -1,4 +1,10 @@
|
|||||||
CVS -
|
CVS -
|
||||||
|
- General:
|
||||||
|
- added configure option --disable-wrapping. Does what it says,
|
||||||
|
no wrapping or checks are done. Separate from --enable-tiny,
|
||||||
|
some may want a barebones Pico clone that does wrap text.
|
||||||
|
Affects configure, nano.c:do_char() and check_wrap() obviously,
|
||||||
|
version(), and do_char().
|
||||||
- aclocal.m4:
|
- aclocal.m4:
|
||||||
- Minor patch for intl check (really this time) (Albert Chin)
|
- Minor patch for intl check (really this time) (Albert Chin)
|
||||||
- faq.html:
|
- faq.html:
|
||||||
|
@ -47,3 +47,7 @@
|
|||||||
|
|
||||||
/* Define this to disable the built-in (crappy) file browser */
|
/* Define this to disable the built-in (crappy) file browser */
|
||||||
#undef DISABLE_BROWSER
|
#undef DISABLE_BROWSER
|
||||||
|
|
||||||
|
/* Define this to disable any and all text wrapping */
|
||||||
|
#undef DISABLE_WRAPPING
|
||||||
|
|
||||||
|
5
aclocal.m4
vendored
5
aclocal.m4
vendored
@ -370,9 +370,10 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
|
|
||||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
||||||
AC_CHECK_LIB(intl, bindtextdomain,
|
AC_CHECK_LIB(intl, bindtextdomain,
|
||||||
[AC_CACHE_VAL(gt_cv_func_gettext_libintl,
|
[AC_CACHE_CHECK([for gettext in libintl],
|
||||||
|
gt_cv_func_gettext_libintl,
|
||||||
[AC_CHECK_LIB(intl, gettext,
|
[AC_CHECK_LIB(intl, gettext,
|
||||||
[gt_cv_func_gettext_libintl=yes; LIBS="$LIBS -lintl"],
|
gt_cv_func_gettext_libintl=yes,
|
||||||
gt_cv_func_gettext_libintl=no)],
|
gt_cv_func_gettext_libintl=no)],
|
||||||
gt_cv_func_gettext_libintl=no)])
|
gt_cv_func_gettext_libintl=no)])
|
||||||
fi
|
fi
|
||||||
|
@ -100,6 +100,9 @@
|
|||||||
/* Define this to disable the built-in (crappy) file browser */
|
/* Define this to disable the built-in (crappy) file browser */
|
||||||
#undef DISABLE_BROWSER
|
#undef DISABLE_BROWSER
|
||||||
|
|
||||||
|
/* Define this to disable any and all text wrapping */
|
||||||
|
#undef DISABLE_WRAPPING
|
||||||
|
|
||||||
/* Define if you have the __argz_count function. */
|
/* Define if you have the __argz_count function. */
|
||||||
#undef HAVE___ARGZ_COUNT
|
#undef HAVE___ARGZ_COUNT
|
||||||
|
|
||||||
|
@ -62,6 +62,12 @@ AC_ARG_ENABLE(browser,
|
|||||||
AC_DEFINE(DISABLE_BROWSER)
|
AC_DEFINE(DISABLE_BROWSER)
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(wrapping,
|
||||||
|
[ --disable-wrapping Disables all wrapping of text (and -w flag)],
|
||||||
|
[if test x$enableval != xyes; then
|
||||||
|
AC_DEFINE(DISABLE_WRAPPING)
|
||||||
|
fi])
|
||||||
|
|
||||||
AC_MSG_CHECKING([whether to use slang])
|
AC_MSG_CHECKING([whether to use slang])
|
||||||
CURSES_LIB_NAME=""
|
CURSES_LIB_NAME=""
|
||||||
AC_ARG_WITH(slang,
|
AC_ARG_WITH(slang,
|
||||||
|
17
nano.c
17
nano.c
@ -395,8 +395,10 @@ void usage(void)
|
|||||||
(" -t --tempfile Auto save on exit, don't prompt\n"));
|
(" -t --tempfile Auto save on exit, don't prompt\n"));
|
||||||
printf(_
|
printf(_
|
||||||
(" -v --view View (read only) mode\n"));
|
(" -v --view View (read only) mode\n"));
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
printf(_
|
printf(_
|
||||||
(" -w --nowrap Don't wrap long lines\n"));
|
(" -w --nowrap Don't wrap long lines\n"));
|
||||||
|
#endif
|
||||||
printf(_
|
printf(_
|
||||||
(" -x --nohelp Don't show help window\n"));
|
(" -x --nohelp Don't show help window\n"));
|
||||||
printf(_
|
printf(_
|
||||||
@ -429,7 +431,9 @@ void usage(void)
|
|||||||
#endif
|
#endif
|
||||||
printf(_(" -t Auto save on exit, don't prompt\n"));
|
printf(_(" -t Auto save on exit, don't prompt\n"));
|
||||||
printf(_(" -v View (read only) mode\n"));
|
printf(_(" -v View (read only) mode\n"));
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
printf(_(" -w Don't wrap long lines\n"));
|
printf(_(" -w Don't wrap long lines\n"));
|
||||||
|
#endif
|
||||||
printf(_(" -x Don't show help window\n"));
|
printf(_(" -x Don't show help window\n"));
|
||||||
printf(_(" -z Enable suspend\n"));
|
printf(_(" -z Enable suspend\n"));
|
||||||
printf(_(" +LINE Start at line number LINE\n"));
|
printf(_(" +LINE Start at line number LINE\n"));
|
||||||
@ -469,6 +473,9 @@ void version(void)
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef DISABLE_WRAPPING
|
||||||
|
printf(" --disable-wrapping");
|
||||||
|
#endif
|
||||||
#ifdef USE_SLANG
|
#ifdef USE_SLANG
|
||||||
printf(" --with-slang");
|
printf(" --with-slang");
|
||||||
#endif
|
#endif
|
||||||
@ -558,8 +565,11 @@ void do_char(char ch)
|
|||||||
current->data[current_x] = ch;
|
current->data[current_x] = ch;
|
||||||
do_right();
|
do_right();
|
||||||
|
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
if (!ISSET(NO_WRAP) && (ch != '\t'))
|
if (!ISSET(NO_WRAP) && (ch != '\t'))
|
||||||
check_wrap(current, ch);
|
check_wrap(current, ch);
|
||||||
|
#endif
|
||||||
|
|
||||||
set_modified();
|
set_modified();
|
||||||
check_statblank();
|
check_statblank();
|
||||||
UNSET(KEEP_CUTBUFFER);
|
UNSET(KEEP_CUTBUFFER);
|
||||||
@ -688,6 +698,7 @@ void do_next_word(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef DISABLE_WRAPPING
|
||||||
void do_wrap(filestruct * inptr, char input_char)
|
void do_wrap(filestruct * inptr, char input_char)
|
||||||
{
|
{
|
||||||
int i = 0; /* Index into ->data for line. */
|
int i = 0; /* Index into ->data for line. */
|
||||||
@ -1043,6 +1054,7 @@ void check_wrap(filestruct * inptr, char ch)
|
|||||||
do_wrap(inptr, ch);
|
do_wrap(inptr, ch);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
|
|
||||||
/* Stuff we do when we abort from programs and want to clean up the
|
/* Stuff we do when we abort from programs and want to clean up the
|
||||||
* screen. This doesnt do much right now.
|
* screen. This doesnt do much right now.
|
||||||
@ -2279,8 +2291,13 @@ int main(int argc, char *argv[])
|
|||||||
SET(VIEW_MODE);
|
SET(VIEW_MODE);
|
||||||
break;
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
|
#ifdef DISABLE_WRAPPING
|
||||||
|
usage();
|
||||||
|
exit(0);
|
||||||
|
#else
|
||||||
SET(NO_WRAP);
|
SET(NO_WRAP);
|
||||||
break;
|
break;
|
||||||
|
#endif /* DISABLE_WRAPPING */
|
||||||
case 'x':
|
case 'x':
|
||||||
SET(NO_HELP);
|
SET(NO_HELP);
|
||||||
break;
|
break;
|
||||||
|
@ -378,6 +378,10 @@ consider the following command line options:
|
|||||||
cut to line (-k) option which it depends on to work properly. It
|
cut to line (-k) option which it depends on to work properly. It
|
||||||
also disables the function toggles and mouse support.
|
also disables the function toggles and mouse support.
|
||||||
|
|
||||||
|
`--disable-wrapping'
|
||||||
|
Disables all word wrapping in the editor. This also eliminates the
|
||||||
|
-w command line flag, as nonwrapping is then the default behavior.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
|
@ -404,6 +404,11 @@ This options disables all the above. It also disables some of
|
|||||||
the larger internals of the editor, like the marker code (^^) and
|
the larger internals of the editor, like the marker code (^^) and
|
||||||
the cut to line (-k) option which it depends on to work properly.
|
the cut to line (-k) option which it depends on to work properly.
|
||||||
It also disables the function toggles and mouse support.
|
It also disables the function toggles and mouse support.
|
||||||
|
|
||||||
|
@item --disable-wrapping
|
||||||
|
Disables all word wrapping in the editor. This also eliminates the
|
||||||
|
-w command line flag, as nonwrapping is then the default behavior.
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
@contents
|
@contents
|
||||||
|
Loading…
Reference in New Issue
Block a user