Commit Graph

33 Commits

Author SHA1 Message Date
Pavel Roskin
60f9328e8d * key.c: Use the maximal file descriptor, not FD_SETSIZE in all
calls to select().
* subshell.c: Likewise.
2002-08-25 05:44:57 +00:00
Pavel Roskin
d0b31c1c81 * key.c (delete_select_channel): Avoid using freed memory. 2002-08-10 04:37:13 +00:00
Pavel Roskin
e2a37d3809 * charsets.c: Unconditionally enable finalization code that was
only used with HAVE_MAD.
* color.c: Likewise.
* color.h: Likewise.
* key.c: Likewise.
* main.c: Likewise.
* slint.c: Likewise.
* subshell.c (exit_subshell): Free subshell_prompt.
2002-08-01 20:31:52 +00:00
Pavel Roskin
5257da5f83 * key.c [USE_NCURSES] (get_key_code): Ignore KEY_RESIZE.
* layout.c [USE_NCURSES] (flag_winch): Don't call
low_level_change_screen_size() from signal handler.
From Thomas Dickey <dickey@herndon4.his.com>
2002-02-06 05:23:50 +00:00
Andrew V. Samoilov
58f1577542 * key.c (push_char): Fix buffer length calculation.
By drk@sgi.com.
http://bugzilla.gnome.org/show_bug.cgi?id=60932

(define_sequence): Likewise.
(key_define_t): Add const declaration.
2001-10-26 10:21:25 +00:00
Pavel Roskin
34947b1819 * mouse.h: Major cleanup and interface change. init_mouse()
should only be called once, disable_mouse() and enable_mouse()
should be used later.  Distinguish between disabled and
undetected mouse.  Remove debugging stuff.  Adjust all users.
* mouse.c: Implementation of the above.
* key.c: Don't use gpm_flag - check mouse_enabled instead.
2001-09-17 04:43:58 +00:00
Pavel Roskin
7efdf3527d * key.c (get_event): Recognize KEY_MOUSE, not just MCKEY_MOUSE.
* mouse.c: Don't use or emulate keyok(), since MC understands
KEY_MOUSE now.
2001-09-15 01:18:11 +00:00
Pavel Roskin
c11389facb * global.h: Include io.h, pwd.h, grp.h and utime.h. Adjust all
sources not to include them and to include global.h at the right
place.
2001-09-07 17:52:19 +00:00
Pavel Roskin
a8ef641beb * x.h: Remove. Adjust all users. Make sure that global.h is
included instead.  Don't include sys/param.h unconditionally -
rely on global.h taking care of it.
* Makefile.in: Remove x.h.
2001-09-03 05:07:40 +00:00
Pavel Roskin
ff7a2a0ceb * key.c: Remove support for BUGGY_CURSES. 2001-09-03 03:12:22 +00:00
Pavel Roskin
596869e68a * key.c (learn_key): Turn off keypad to disable intepreting keys
by ncurses.
Reported by Frederic L. W. Meunier <fredlwm@pervalidus.net>
2001-08-27 21:24:29 +00:00
Pavel Roskin
fdc234060f * key.c (xmouse_get_event): Filter out GPM_UP events that don't
follow a GPM_DOWN event.  Filter out events with unknown button
numbers, such as mouse wheel events.
(get_event): Return EV_NONE if xmouse_get_event() decided to
ignore the event.
2001-08-18 19:27:31 +00:00
Pavel Roskin
4cac4d66ba * key.c (mc_bindings) [linux]: Remove old hack - recognizing
"e[2~" on all terminals.
2001-08-17 04:41:31 +00:00
Pavel Roskin
403dfdc24b * key.h (define_sequence): Change declaration to return int.
* key.c (define_sequence): Return 1 on success, 0 on error.
* learn.c (learn_button): Don't accept sequence if
define_sequence() has failed.
2001-08-14 04:48:26 +00:00
Pavel Roskin
2dd2dc2182 * file.c (panel_get_file): Use g_assert_not_reached().
* key.c (xgetch_second): Make static.
2001-07-20 16:19:28 +00:00
Pavel Roskin
c83fdc336c * key.c (ctrl_pressed): Don't limit functionality to Linux.
* screen.c (prev_page_key): Don't require console_flag to be set
to use ctrl_pressed(), only require that HAVE_X is undefined.
(next_page_key): Likewise.
* widget.c (key_left): Don't limit functionality to Linux.
(key_right): Likewise.
2001-06-26 03:20:22 +00:00
Pavel Roskin
72db8e927d * key.c [HAVE_TEXTMODE_X11_SUPPORT]: Rename `display' to
`x11_display' and `w' to `x11_window'. Make them static.
(init_textmode_x11_support): Include into init_key().
(done_textmode_x11_support): Include into done_key().
(k_dispose): Make static.
(s_dispose): Likewise.
* key.h: Remove init_textmode_x11_support() and
done_textmode_x11_support().
* main.c: Don't call init_textmode_x11_support() and
done_textmode_x11_support().
2001-06-05 22:08:31 +00:00
Pavel Roskin
7b340a2af9 * achown.c: Make global variables static if possible. Remove now
useless preprocessor directives, since this file is now used in
the text edition only.
* boxes.c: Remove useless ifdefs.
[USE_VFS]: Don't undef USE_NETCODE - it's done in extraconf.h.
* cmd.c [USE_VFS]: Don't undef USE_NETCODE.
* chmod.c: Remove useless ifdefs.
* filegui.c: Likewise.
* hotlist.c: Likewise.
* info.c: Likewise.
* layout.c: Likewise.
* listmode.c: Likewise.
* option.c: Likewise.
* subshell.c: Likewise.
* help.c: Remove useless ifdefs. Make global variables static if
possible.
* key.c: Likewise.
* learn.c: Likewise.
2001-06-05 16:41:44 +00:00
Pavel Roskin
a53712bb71 * key.c (mi_getch): Discard non-events (EV_NONE), but not
keycode 0 (Ctrl-@).
2001-03-02 23:04:52 +00:00
Pavel Roskin
e828211662 Updated address of Free Software Foundation 2000-08-22 22:50:00 +00:00
Norbert Warmuth
3fd90ce83b This patch set adds a new feature to the text edtion (off by default).
`--with-tm-x-support'
     This option enables minimal X Window support in the text edition. It
     enables MC to query the status of the modifiers CONTROL and SHIFT
     when invoked in a terminal emulation under X11. That's necessary
     to recognice key combinations like C-HOME or S-Cursor key.


Wed Apr 21 20:37:32 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* configure.in: New option --with-tm-x-support, use MCCFLAGS and
MCLIBS for build flags which are specific to the text edition.

* INSTALL: Added documentation for --with-tm-x-support

* src/Makefile.in: use MCCFLAGS and MCLIBS


Wed Apr 21 20:19:45 1999  Norbert Warmuth  <nwarmuth@privat.circular.de>

* src/key.c (get_modifier): Query the state of the modifier keys when
running inside a terminal emulation under X11.

* src/key.c (init_textmode_x11_support, done_textmode_x11_support): new
functions, only used in the text edition. Connect to and disconnect
from the X Server when DISPLAY is set.

* src/key.h: added prototypes for the new functions

* src/main.c (main): call (init|done)_textmode_x11_support
1999-04-21 19:18:31 +00:00
Timur Bakeyev
a39568367e Glibing..... (2)
Wed Jan 27 03:17:44 1999  Timur Bakeyev <mc@bat.ru>

	* Converted memory managment to Glib. Now we use g_new()/g_malloc()/
	g_strdup()/g_free() routings. Also, copy_strings() replaced by
	g_strconcat(), strcasecmp() -> g_strcasecmp(),and sprintf() by
	g_snprintf().

	* Some sequences of malloc()/sprintf() changed to g_strdup_printf().

	* mad.[ch]: Modified, to work with new GLib's memory managment. Fixed
	a missing #undef for tempnam, which caused dead loop. Add several new
	functions to emulate GLib memory managment.

	*main.c, mad.[ch]: Add a new switch  "-M", which allows to redirect MAD
	messages to the file.

	* util.[ch], utilunix.c: Modified, deleted our variants of strcasecmp()
	and strdup() - we have g_ equivalences. Remove get_full_name() - it is
	similar to concat_dir_and_file(). Some other tricks with g_* functions.

	* global.h: Modified, extended. Now it is main memory mangment include -
	i.e. all inclusions of <stdlib.h>, <malloc.h>, <glib.h>, "fs.h", "mem.h",
	"util.h" and "mad.h" done there. This elimanates problem with proper or-
	der of #include's.

	* All around the source - changed order of #include's, most of them gone
	to global.h (see above), minor changes, like "0" -> NULL in string func-
	tions.
1999-01-27 01:08:30 +00:00
Miguel de Icaza
bf682eb9d1 Warning fixes.
Miguel.
1998-12-02 21:27:27 +00:00
Miguel de Icaza
dabe341f88 1998-12-01 Miguel de Icaza <miguel@nuclecu.unam.mx>
* configure.in (slang_use_system_installed_lib): Define slang
	here, to avoid having this on LIBS.

1998-11-26  Herbert Valerio Riedel  <hvr@hvrlab.ml.org>
1998-12-02 06:51:40 +00:00
Miguel de Icaza
aaa7b5e9a2 Lots of changes:
- GNOME edition now compiles without any trace of the text mode
  dependencies.

- We no longer link with libraries we do not use (crypt, gpm), this
  fixes the recent bug reports.

- More tree updates, enhancements.

Miguel.
1998-12-02 05:18:20 +00:00
Miguel de Icaza
a7996c0a20 Weee!
Ok, finally splitted the GUI code that dealt with the file operations into
a separate file.  It is now possible to write a native Gtk version of this.

Until the Gtk-native version is done, the code in mc/gnome/ is linking with
filegui.c.

Miguel
1998-11-18 02:31:23 +00:00
Norbert Warmuth
5c693c75be Sun May 31 22:02:33 1998 Norbert Warmuth <k3190@fh-sw.de>
* po/it.po: deleted additional "\n" in one msgstr


Sun May 31 10:23:01 1998  Norbert Warmuth  <k3190@fh-sw.de>

* key.c (define_sequence): If a sequence clashes the last
definition made will be used. This makes it possible to override
wrong definitions in terminfo/termcap database with learn keys (or
the appropriate entries in mc.lib and ~/.mc/ini).

* widget.c (show_hist): Don't display the listbox partly
off screen (the left panel's history started in column - 2).

* keyxdef.c: include tty.h instead of myslang.h as suggested by
Tamasi Gyorgy <gt_cosy@usa.net>


Fri May 29 15:41:19 1998  Alexander V. Lukyanov <lav@yars.free.net>

* widget.c (update_input): this patch allows entering 8-bit
characters in input fields without screwing attributes. (the
same old sign extension...)


Wed May 27 22:23:48 1998  Ed Cogburn <ecogburn@greene.xtn.net>

* lib/xterm.ti: The 'xterm-color' definition needs 'sgr0'. The tic
program from ncurses 4.2 doesn't like the xterm.ti file that comes
with mc.


Wed May 27 15:29:01 1998  Alexander V. Lukyanov <lav@yars.free.net>

* key.c (get_key_code): characters with high bit set were input
as 0x80 char when use_8th_bit_as_meta was set
1998-05-31 20:27:44 +00:00
Miguel de Icaza
c457d7dd96 Pass2 of the QNX port of mc from Tamasi Gyorgy 1998-05-20 02:19:17 +00:00
Miguel de Icaza
0a36428e84 Compilation fix -mig 1998-04-15 06:15:42 +00:00
Miguel de Icaza
036af40392 1998-04-15 Miguel de Icaza <miguel@nuclecu.unam.mx>
* screen.c (string_file_nlinks): The buffer was too small and we
	were overwriting parts of it.

	* subshell.c (do_subshell_chdir): Memory leak fix.

	* find.c (do_search): Do not use undefined order of evaluation.

	* user.c: Do not use undefined order of evaluation.

	* dlg.c (init_dlg): Do init the default return value.
1998-04-15 06:05:34 +00:00
Miguel de Icaza
76496220cc Wed Apr 8 11:15:29 1998 Alex Tkachenko <alex@bcs.zp.ua>
* src/find.c: changes to find_parameters/find_file i18n.

	* src/widget.c: new function introduced, button_scan_hotkey();
	button_new() and button_set_text() fixed to use mentioned function.

	* src/key.[ch], src/dlg.c: changes to make recognition of ESC char as
	ALT(c) possible for 8-bit chars. (By replacing 'A'/'Z' comparisons with
	call to isalpha() in the way proposed by Norbert).

	* src/boxes.c: changes to display box i18n

	* src/learn.c: changes to learn key dialog i18n
1998-04-08 18:50:24 +00:00
Norbert Warmuth
175f488cb8 Wed Apr 1 00:15:30 1998 Norbert Warmuth <k3190@fh-sw.de>
* key.c, key.h (numeric_keypad_mode, application_keypad_mode): New
functions which encapsulate two hardcoded escape sequences from main.c.

* main.c (main): Use the two new functions from key.c

* main.c, screen.c: Moved all file selection keys from the default
keymap to the keymap for panels in listing mode.
Changed *_selection_cmd to *_selection_cmd_panel in panel_keymap
(functions in panel_keymap get a WPanel * as first parameter,
i.e. the indirection with cpanel isn't necessary).

* main.c (midnight_callback): Keys '*' and '-' were not treated
when only_leading_plus_minus==0;
Optimized the if-clauses a little bit (i.e. removed duplicate
checks). More optimation is possible but it would make the whole
stuff completly unreadable.

* key.c (correct_key_code): KP_ADD, KP_SUBTRACT and KP_MULTIPLY
will be translated to +, - and * only if the option
alternate_plus_minus is turned off.

* learn.c (learn_keys): Turn alternate_plus_minus temporarily on
to avoid translation of KP_ADD, KP_SUBTRACT and KP_MULTIPLY in
correct_key_code/make sure keypad is in application mode (makes it
possible to learn this keys).

* cmd.c (reverse_selection_cmd_panel): New function (renamed from
reverse_selection_cmd, takes a WPanel * as parameter, references to
cpanel changed to panel/the passed parameter).
reverse_selection_cmd now simply calls this function with cpanel.
This pair was missing among the *_selection_cmd* functions.

* cmd.h: Added function prototypes.
1998-03-31 22:36:24 +00:00
Miguel de Icaza
eb6b3842ab Initial revision 1998-02-27 04:54:42 +00:00