Added --disable-help, moved hold pointer declaration
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@404 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
c130297a79
commit
3bc8c72c8b
|
@ -1,4 +1,7 @@
|
||||||
CVS code -
|
CVS code -
|
||||||
|
General
|
||||||
|
- Added --disable-help option, affects acconfig.h, configure(.in),
|
||||||
|
winio.c:do_help, nano.c:help_init,help_text_init.
|
||||||
- cut.c:
|
- cut.c:
|
||||||
do_uncut_text()
|
do_uncut_text()
|
||||||
- Fix renumbering bug when uncutting marked test at filebot.
|
- Fix renumbering bug when uncutting marked test at filebot.
|
||||||
|
|
|
@ -36,4 +36,6 @@
|
||||||
/* Define this to disable the use(full|less) spelling functions */
|
/* Define this to disable the use(full|less) spelling functions */
|
||||||
#undef DISABLE_SPELLER
|
#undef DISABLE_SPELLER
|
||||||
|
|
||||||
|
/* Define this to disable the ^G help menu */
|
||||||
|
#undef DISABLE_HELP
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,9 @@
|
||||||
/* Define this to disable the use(full|less) spelling functions */
|
/* Define this to disable the use(full|less) spelling functions */
|
||||||
#undef DISABLE_SPELLER
|
#undef DISABLE_SPELLER
|
||||||
|
|
||||||
|
/* Define this to disable the ^G help menu */
|
||||||
|
#undef DISABLE_HELP
|
||||||
|
|
||||||
/* Define if you have the __argz_count function. */
|
/* Define if you have the __argz_count function. */
|
||||||
#undef HAVE___ARGZ_COUNT
|
#undef HAVE___ARGZ_COUNT
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,12 @@ AC_ARG_ENABLE(speller,
|
||||||
AC_DEFINE(DISABLE_SPELLER)
|
AC_DEFINE(DISABLE_SPELLER)
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
AC_ARG_ENABLE(help,
|
||||||
|
[ --disable-help Disables help function (^G)],
|
||||||
|
[if test x$enableval != xyes; then
|
||||||
|
AC_DEFINE(DISABLE_HELP)
|
||||||
|
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,
|
||||||
|
|
3
cut.c
3
cut.c
|
@ -271,9 +271,10 @@ int do_cut_text(void)
|
||||||
|
|
||||||
int do_uncut_text(void)
|
int do_uncut_text(void)
|
||||||
{
|
{
|
||||||
filestruct *tmp = current, *hold = current, *fileptr = current, *newbuf, *newend;
|
filestruct *tmp = current, *fileptr = current, *newbuf, *newend;
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
char *tmpstr, *tmpstr2;
|
char *tmpstr, *tmpstr2;
|
||||||
|
filestruct *hold = current;
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
9
nano.c
9
nano.c
|
@ -177,7 +177,7 @@ void global_init(void)
|
||||||
void init_help_msg(void)
|
void init_help_msg(void)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifndef NANO_SMALL
|
#if !defined(NANO_SMALL) && !defined(DISABLE_HELP)
|
||||||
|
|
||||||
help_text_init =
|
help_text_init =
|
||||||
_(" nano help text\n\n "
|
_(" nano help text\n\n "
|
||||||
|
@ -517,7 +517,7 @@ void nano_small_msg(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER)
|
#if defined(DISABLE_JUSTIFY) || defined(DISABLE_SPELLER) || defined(DISABLE_HELP)
|
||||||
void nano_disabled_msg(void)
|
void nano_disabled_msg(void)
|
||||||
{
|
{
|
||||||
statusbar("Sorry, support for this function has been disabled");
|
statusbar("Sorry, support for this function has been disabled");
|
||||||
|
@ -1900,7 +1900,7 @@ int do_justify(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !defined(NANO_SMALL) && !defined(DISABLE_HELP)
|
||||||
void help_init(void)
|
void help_init(void)
|
||||||
{
|
{
|
||||||
int i, sofar = 0;
|
int i, sofar = 0;
|
||||||
|
@ -1968,6 +1968,7 @@ void help_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void do_toggle(int which)
|
void do_toggle(int which)
|
||||||
{
|
{
|
||||||
|
@ -2199,7 +2200,9 @@ int main(int argc, char *argv[])
|
||||||
global_init();
|
global_init();
|
||||||
shortcut_init(0);
|
shortcut_init(0);
|
||||||
init_help_msg();
|
init_help_msg();
|
||||||
|
#if !defined(NANO_SMALL) && !defined(DISABLE_HELP)
|
||||||
help_init();
|
help_init();
|
||||||
|
#endif
|
||||||
signal_init();
|
signal_init();
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
1
proto.h
1
proto.h
|
@ -119,6 +119,7 @@ void *mallocstrcpy(void *dest, void *src);
|
||||||
void wrap_reset(void);
|
void wrap_reset(void);
|
||||||
void display_main_list(void);
|
void display_main_list(void);
|
||||||
void nano_small_msg(void);
|
void nano_small_msg(void);
|
||||||
|
void nano_disable_msg(void);
|
||||||
void do_early_abort(void);
|
void do_early_abort(void);
|
||||||
void *nmalloc(size_t howmuch);
|
void *nmalloc(size_t howmuch);
|
||||||
void *nrealloc(void *ptr, size_t howmuch);
|
void *nrealloc(void *ptr, size_t howmuch);
|
||||||
|
|
6
winio.c
6
winio.c
|
@ -1175,7 +1175,7 @@ int do_cursorpos(void)
|
||||||
But hey, it's better than nothing, and it's dynamic! */
|
But hey, it's better than nothing, and it's dynamic! */
|
||||||
int do_help(void)
|
int do_help(void)
|
||||||
{
|
{
|
||||||
#ifndef NANO_SMALL
|
#if !defined(NANO_SMALL) && !defined(DISABLE_HELP)
|
||||||
char *ptr = help_text, *end;
|
char *ptr = help_text, *end;
|
||||||
int i, j, row = 0, page = 1, kbinput = 0, no_more = 0;
|
int i, j, row = 0, page = 1, kbinput = 0, no_more = 0;
|
||||||
int no_help_flag = 0;
|
int no_help_flag = 0;
|
||||||
|
@ -1279,8 +1279,10 @@ int do_help(void)
|
||||||
|
|
||||||
curs_set(1);
|
curs_set(1);
|
||||||
edit_refresh();
|
edit_refresh();
|
||||||
#else
|
#elif defined(NANO_SMALL)
|
||||||
nano_small_msg();
|
nano_small_msg();
|
||||||
|
#elif defined(DISABLE_HELP)
|
||||||
|
nano_disabled_msg();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue