Re: cons.handler.c for FreeBSD

2003-03-05 Thread Max Khon
hi, there!

On Wed, Mar 05, 2003 at 04:36:57AM -0500, Pavel Roskin wrote:

  I had a chance to test the code, and it works just fine.  I forgot to test
  the output lines option (i.e. restoring just part of the text), but I'll
  do it next time I boot into FreeBSD.
 
 It didn't work, but I have fixed it.  Sorry, but you cannot use escape
 sequences directly when the screen library (S-Lang or ncurses) is active,
 otherwise you get ugly artifacts when parts of the screen are not redrawn.
 
 This also means that you cannot restore color attributes without
 allocating color pairs.  It should be possible to allocate the pairs
 dynamically.  It's already done by the editor.
 
 I have only tested output lines on FreeBSD 5.0.  If anybody has FreeBSD
 4.x or older, please test Ctrl-O and output lines on the console.
 Sorry, I don't have enough partitions to keep several versions of FreeBSD
 installed.

can you send me diff against 4.6.0 cons.handler.c?
and it is still not obvious to me how I can test output lines
with Ctrl-O.

thanks,

/fjoe

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


mc

2003-03-05 Thread To, Loc Huu
Hi,

I try to install Midnight Commnader on my home local Sun machine and run
it 
but I got an error, can you help on this.

ld.so.1: mc: fatal: libgen.so.1: open failed: No such file or
directory


Thanks
P-TAS : Publications Technology Advancement Specialists.
Loc To
Bombardier Aerospace - Defence Services
off:  (450) 476-6232
Home: (450) 619-9431
[EMAIL PROTECTED]








___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: cons.handler.c for FreeBSD

2003-03-05 Thread Max Khon
hi, there!

On Wed, Mar 05, 2003 at 04:05:54PM +0600, Max Khon wrote:

   I had a chance to test the code, and it works just fine.  I forgot to test
   the output lines option (i.e. restoring just part of the text), but I'll
   do it next time I boot into FreeBSD.
  
  It didn't work, but I have fixed it.  Sorry, but you cannot use escape
  sequences directly when the screen library (S-Lang or ncurses) is active,
  otherwise you get ugly artifacts when parts of the screen are not redrawn.
  
  This also means that you cannot restore color attributes without
  allocating color pairs.  It should be possible to allocate the pairs
  dynamically.  It's already done by the editor.
  
  I have only tested output lines on FreeBSD 5.0.  If anybody has FreeBSD
  4.x or older, please test Ctrl-O and output lines on the console.
  Sorry, I don't have enough partitions to keep several versions of FreeBSD
  installed.
 
 can you send me diff against 4.6.0 cons.handler.c?

ok, I've got the patch from cvs. can you set up something like
cvsweb (I can't get how to obtain unified diff using LXR or Bonsai).

 and it is still not obvious to me how I can test output lines
 with Ctrl-O.

another question is about non-standard console modes.
I (and other users) are getting core dumps when console video mode
is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere
inside ncurses. The backtrace is:

[EMAIL PROTECTED]:/usr/ports/misc/mc/work/mc-4.6.0/src$gdb mc mc.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type show copying to see the conditions.
There is absolutely no warranty for GDB.  Type show warranty for details.
This GDB was configured as i386-unknown-freebsd...Deprecated bfd_read called at 
/usr/fbsd/RELENG_4/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 
2627 in elfstab_build_psymtabs
Deprecated bfd_read called at 
/usr/fbsd/RELENG_4/gnu/usr.bin/binutils/gdb/../../../../contrib/gdb/gdb/dbxread.c line 
933 in fill_symbuf

Core was generated by `mc'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libncurses.so.5...done.
Reading symbols from /usr/local/lib/libintl.so.4...done.
Reading symbols from /usr/local/lib/libglib-2.0.so.200...done.
Reading symbols from /usr/local/lib/libiconv.so.3...done.
Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /usr/local/lib/libslang.so...done.
Reading symbols from /usr/lib/libc.so.4...done.
Reading symbols from /usr/X11R6/lib/libXThrStub.so.6...done.
Reading symbols from /usr/lib/libm.so.2...done.
Reading symbols from /usr/libexec/ld-elf.so.1...done.
#0  0x281118bf in tgetstr () from /usr/lib/libncurses.so.5
(gdb) bt
#0  0x281118bf in tgetstr () from /usr/lib/libncurses.so.5
#1  0x28372532 in SLtt_tgetstr () from /usr/local/lib/libslang.so
#2  0x807b8dd in slang_keypad (set=0) at slint.c:308
#3  0x8052950 in view_other_cmd () at cmd.c:993
#4  0x806b288 in midnight_callback (h=0x810f380, id=16399, msg=10)
at main.c:1816
#5  0x8058605 in dlg_key_event (h=0x810f380, d_key=16399) at dlg.c:667
#6  0x80588fd in dlg_process_event (h=0x810f380, key=16399, event=0xbfbff9c0)
at dlg.c:779
#7  0x80589ca in run_dlg (h=0x810f380) at dlg.c:813
#8  0x806b4ac in setup_panels_and_run_mc () at main.c:1912
#9  0x806b688 in do_nc () at main.c:1985
#10 0x806beca in main (argc=1, argv=0xbfbffaa4) at main.c:2520
(gdb)

can you take a look at this bug?

/fjoe

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: cons.handler.c for FreeBSD

2003-03-05 Thread Max Khon
hi, there!

On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote:

  and it is still not obvious to me how I can test output lines
  with Ctrl-O.
 
 another question is about non-standard console modes.
 I (and other users) are getting core dumps when console video mode
 is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere
 inside ncurses. The backtrace is:

[...]

 can you take a look at this bug?

I have fixed the bug. Diff against trunk is attached

/fjoe
Index: cons.handler.c
===
RCS file: /cvs/gnome/mc/src/cons.handler.c,v
retrieving revision 1.17
diff -u -p -r1.17 cons.handler.c
--- cons.handler.c  5 Mar 2003 09:29:31 -   1.17
+++ cons.handler.c  5 Mar 2003 17:13:17 -
@@ -403,7 +403,7 @@ console_init (void)
 screen_shot.xsize = screen_info.mv_csz;
 screen_shot.ysize = screen_info.mv_rsz;
 if ((screen_shot.buf =
-g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL)
+g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL)
return;
 
 console_flag = 1;
@@ -499,7 +499,7 @@ console_save (void)
 
 if (ioctl (FD_OUT, GIO_SCRNMAP, map) == -1) {
console_shutdown ();
-   exit (1);
+   return;
 }
 
 for (i = 0; i  256; i++) {


Re: cons.handler.c for FreeBSD

2003-03-05 Thread Andrew V. Samoilov
Max Khon wrote:
hi, there!

On Wed, Mar 05, 2003 at 10:34:21PM +0600, Max Khon wrote:


and it is still not obvious to me how I can test output lines
with Ctrl-O.
another question is about non-standard console modes.
I (and other users) are getting core dumps when console video mode
is not 80x25. E.g. after 'vidcontrol 80x30' mc dumps core somewhere
inside ncurses. The backtrace is:


[...]


can you take a look at this bug?


I have fixed the bug. Diff against trunk is attached

Index: cons.handler.c
===
RCS file: /cvs/gnome/mc/src/cons.handler.c,v
retrieving revision 1.17
diff -u -p -r1.17 cons.handler.c
--- cons.handler.c	5 Mar 2003 09:29:31 -	1.17
+++ cons.handler.c	5 Mar 2003 17:13:17 -
@@ -403,7 +403,7 @@ console_init (void)
 screen_shot.xsize = screen_info.mv_csz;
 screen_shot.ysize = screen_info.mv_rsz;
 if ((screen_shot.buf =
-	 g_malloc (screen_info.mv_csz * screen_info.mv_rsz)) == NULL)
+	 g_malloc (screen_info.mv_csz * screen_info.mv_rsz * 2)) == NULL)
 	return;
 
 console_flag = 1;
Well, I think this fix is not enough.  It shall be SIGWINCH catched and
screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash 
mc again.

--
Regards,
Andrew V. Samoilov


___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Running mc from mc

2003-03-05 Thread Pavel Roskin
Hello!

Adam asked me in private if it's possible to disable running one mc from
another.  I have committed a patch that implements this check.

The patch prevents running two copies of mc with subshells in the same
login session.  It is still possible to run mcview or mcedit from mc
because they don't need the subshell.  It's also possible to run xterm
from mc and run mc in it, because it would be in a different session.

It's still possible to run su from mc and run mc in it.  It's not a bug,
although one could make a big mess by using Ctrl-O.

The session id is set in the environment variable MC_SID.  It can be used
as an indicator that we are running from mc, directly or indirectly.

-- 
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel


Re: cons.handler.c for FreeBSD

2003-03-05 Thread Max Khon
hi, there!

On Wed, Mar 05, 2003 at 09:21:41PM +0200, Andrew V. Samoilov wrote:

 Well, I think this fix is not enough.  It shall be SIGWINCH catched and
 screen_shot.buf reallocated dynamically or vidcontrol 132x60 will crash 
 mc again.

screen_shot.buf is reallocated in console_save()

/fjoe

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel