Commit 84de552b authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Added --disable-mouse option

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@595 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 235ab192
Showing with 1268 additions and 925 deletions
+1268 -925
......@@ -3,6 +3,10 @@ Cvs code -
- New global variables currshortcut and currslen to support using
the mouse with the shortcuts. FIXME - Does not support clicking
on filenames in the browser, yet.
- Changed mouse disabling code from depending on --enable-tiny
to its own flag, --disable mouse. The --tiny option defines
this automatically, but now just mouse support can be disabled
if desired.
nano 1.1 tree forked here 04/07/2001
......
......@@ -57,26 +57,31 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
host_alias = @host_alias@
host_triplet = @host@
AS = @AS@
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
CC = @CC@
CURSES_LIB = @CURSES_LIB@
DATADIRNAME = @DATADIRNAME@
GENCAT = @GENCAT@
DLLTOOL = @DLLTOOL@
GLIB_CFLAGS = @GLIB_CFLAGS@
GLIB_CONFIG = @GLIB_CONFIG@
GLIB_LIBS = @GLIB_LIBS@
GMOFILES = @GMOFILES@
GMSGFMT = @GMSGFMT@
GT_NO = @GT_NO@
GT_YES = @GT_YES@
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
INSTOBJEXT = @INSTOBJEXT@
INTLDEPS = @INTLDEPS@
INTLBISON = @INTLBISON@
INTLLIBS = @INTLLIBS@
INTLOBJS = @INTLOBJS@
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
LIBICONV = @LIBICONV@
LIBTOOL = @LIBTOOL@
LN_S = @LN_S@
MKINSTALLDIRS = @MKINSTALLDIRS@
MSGFMT = @MSGFMT@
OBJDUMP = @OBJDUMP@
PACKAGE = @PACKAGE@
POFILES = @POFILES@
POSUB = @POSUB@
......@@ -84,7 +89,6 @@ RANLIB = @RANLIB@
USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
USE_NLS = @USE_NLS@
VERSION = @VERSION@
l = @l@
bin_PROGRAMS = nano
nano_SOURCES = cut.c files.c global.c move.c nano.c nano.h proto.h search.c utils.c winio.c
......@@ -132,8 +136,8 @@ MANS = $(man_MANS)
NROFF = nroff
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
INSTALL Makefile.am Makefile.in NEWS TODO acconfig.h aclocal.m4 \
config.h.in configure configure.in install-sh missing mkinstalldirs \
texinfo.tex
config.guess config.h.in config.sub configure configure.in install-sh \
missing mkinstalldirs texinfo.tex
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
......@@ -203,8 +207,8 @@ install-binPROGRAMS: $(bin_PROGRAMS)
$(mkinstalldirs) $(DESTDIR)$(bindir)
@list='$(bin_PROGRAMS)'; for p in $$list; do \
if test -f $$p; then \
echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \
$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \
else :; fi; \
done
......
......@@ -51,3 +51,7 @@
/* Define this to disable any and all text wrapping */
#undef DISABLE_WRAPPING
/* Define this to disable the mouse functions */
#undef DISABLE_MOUSE
This diff is collapsed.
......@@ -31,9 +31,6 @@
/* Define to `long' if <sys/types.h> doesn't define. */
#undef off_t
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
......@@ -61,21 +58,6 @@
/* Define this if your curses lib has the _use_keypad flag */
#undef HAVE_USEKEYPAD
/* Define this if you have NLS */
#undef ENABLE_NLS
/* Define this is you have the catgets command */
#undef HAVE_CATGETS
/* Define this is you have GNU gettext */
#undef HAVE_GETTEXT
/* Define this for HAVE_LC_MESSAGES */
#undef HAVE_LC_MESSAGES
/* Define this if you have the stpcpy function (cool) */
#undef HAVE_STPCPY
/* Define this to make the nano executable as small as possible */
#undef NANO_SMALL
......@@ -103,6 +85,9 @@
/* Define this to disable any and all text wrapping */
#undef DISABLE_WRAPPING
/* Define this to disable the mouse functions */
#undef DISABLE_MOUSE
/* Define if you have the __argz_count function. */
#undef HAVE___ARGZ_COUNT
......@@ -115,6 +100,12 @@
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
/* Define if you have the feof_unlocked function. */
#undef HAVE_FEOF_UNLOCKED
/* Define if you have the fgets_unlocked function. */
#undef HAVE_FGETS_UNLOCKED
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
......@@ -124,6 +115,9 @@
/* Define if you have the getpagesize function. */
#undef HAVE_GETPAGESIZE
/* Define if you have the mempcpy function. */
#undef HAVE_MEMPCPY
/* Define if you have the munmap function. */
#undef HAVE_MUNMAP
......@@ -151,6 +145,9 @@
/* Define if you have the strdup function. */
#undef HAVE_STRDUP
/* Define if you have the tsearch function. */
#undef HAVE_TSEARCH
/* Define if you have the vsnprintf function. */
#undef HAVE_VSNPRINTF
......@@ -184,6 +181,12 @@
/* Define if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define if you have the <stddef.h> header file. */
#undef HAVE_STDDEF_H
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
......@@ -199,12 +202,28 @@
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define if you have the i library (-li). */
#undef HAVE_LIBI
/* Name of package */
#undef PACKAGE
/* Version number of package */
#undef VERSION
/* Define if you have the iconv() function. */
#undef HAVE_ICONV
/* Define as const if the declaration of iconv() needs const. */
#undef ICONV_CONST
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define if your <locale.h> file defines LC_MESSAGES. */
#undef HAVE_LC_MESSAGES
/* Define to 1 if translation of program messages to the user's native language
is requested. */
#undef ENABLE_NLS
/* Define if the GNU gettext() function is already present or preinstalled. */
#undef HAVE_GETTEXT
This diff is collapsed.
......@@ -24,6 +24,7 @@ AC_ARG_ENABLE(tiny,
AC_DEFINE(DISABLE_HELP)
AC_DEFINE(DISABLE_JUSTIFY)
AC_DEFINE(DISABLE_BROWSER)
AC_DEFINE(DISABLE_MOUSE)
fi])
AC_ARG_ENABLE(extra,
......@@ -68,6 +69,12 @@ AC_ARG_ENABLE(wrapping,
AC_DEFINE(DISABLE_WRAPPING)
fi])
AC_ARG_ENABLE(mouse,
[ --disable-mouse Disables mouse support (and -m flag)],
[if test x$enableval != xyes; then
AC_DEFINE(DISABLE_MOUSE)
fi])
AC_MSG_CHECKING([whether to use slang])
CURSES_LIB_NAME=""
AC_ARG_WITH(slang,
......
......@@ -377,7 +377,7 @@ void usage(void)
#endif
printf(_
(" -l --nofollow Don't follow symbolic links, overwrite\n"));
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
printf(_(" -m --mouse Enable mouse\n"));
#endif
......@@ -419,7 +419,7 @@ void usage(void)
#endif
printf(_
(" -l Don't follow symbolic links, overwrite\n"));
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
printf(_(" -m Enable mouse\n"));
#endif
......@@ -472,7 +472,10 @@ void version(void)
#ifdef DISABLE_HELP
printf(" --disable-help");
#endif
#ifdef DISABLE_MOUSE
printf(" --disable-mouse");
#endif
#endif /* NANO_SMALL */
#ifdef DISABLE_WRAPPING
printf(" --disable-wrapping");
......@@ -1516,7 +1519,7 @@ int do_exit(void)
return 1;
}
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
void do_mouse(void)
{
......@@ -1766,7 +1769,7 @@ void window_init(void)
void mouse_init(void)
{
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
if (ISSET(USE_MOUSE)) {
keypad_on(edit, 1);
......@@ -2627,7 +2630,7 @@ int main(int argc, char *argv[])
/* Last gasp, stuff that's not in the main lists */
if (!keyhandled)
switch (kbinput) {
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
do_mouse();
......
......@@ -382,6 +382,10 @@ consider the following command line options:
Disables all word wrapping in the editor. This also eliminates the
-w command line flag, as nonwrapping is then the default behavior.
`--disable-mouse'
Disables all mouse functionality. This also disables the -m
commands line flag which enables the mouse functions.

Tag Table:
......
......@@ -409,6 +409,10 @@ It also disables the function toggles and mouse support.
Disables all word wrapping in the editor. This also eliminates the
-w command line flag, as nonwrapping is then the default behavior.
@item --disable-mouse
Disables all mouse functionality. This also disables the -m commands line
flag which enables the mouse functions.
@end table
@contents
......
......@@ -308,7 +308,7 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen,
case 545: /* Right alt again */
break;
#endif
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
do_mouse();
......@@ -1044,7 +1044,7 @@ int do_yesno(int all, int leavecursor, char *msg, ...)
char *nostr; /* Same for no */
char *allstr; /* And all, surprise! */
char shortstr[5]; /* Temp string for above */
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
MEVENT mevent;
#endif
......@@ -1097,7 +1097,7 @@ int do_yesno(int all, int leavecursor, char *msg, ...)
kbinput = wgetch(edit);
switch (kbinput) {
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
......@@ -1297,7 +1297,7 @@ int do_help(void)
do {
ptr = help_text;
switch (kbinput) {
#ifndef NANO_SMALL
#ifndef DISABLE_MOUSE
#ifdef NCURSES_MOUSE_VERSION
case KEY_MOUSE:
do_mouse();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment