[bug #15621] file/dir entries with international characters mess up the columns
URL: http://savannah.gnu.org/bugs/?func=detailitemitem_id=15621 Summary: file/dir entries with international characters mess up the columns Project: GNU Midnight Commander Submitted by: waiter Submitted on: Sat 02/04/06 at 10:12 Category: Screen output Severity: 3 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Release: 4.6.1 Platform Version: GNU/Linux ___ Details: File or directory entries containing international charaters pull all other characters found right to them towards the file/dir entry. I think the problem is with the correct determination of string lengths in case of strings containing international characters. A screenshot of the problem has been attached. ___ File Attachments: --- Date: Sat 02/04/06 at 10:12 Name: mc-screenshot.jpg Size: 97.46KB By: waiter This screenshot shows how the international characters screw up the panel. http://savannah.gnu.org/bugs/download.php?item_id=15621item_file_id=3370 ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=15621 ___ Message sent via/by Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[bug #14155] 4.6.1: mouse wheel strangeness
Update of bug #14155 (project mc): Status: Fixed = Need Info Open/Closed: Closed = Open ___ Follow-up Comment #15: The second patch broke mouse handling on a number of terminal emulators for me. This is an overview of which terminals can handle which escape sequence. [?1000h [?1002h Terminal --- xx xterm x- rxvt x- aterm xx pterm (PuTTY) -- Eterm For me, the patch broke more than it helped. Please add your experiences, so we can discuss on how to solve this problem. ___ Reply to this item at: http://savannah.gnu.org/bugs/?func=detailitemitem_id=14155 ___ Nachricht geschickt von/durch Savannah http://savannah.gnu.org/ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
[patch] new pty allocation strategy for BSD
Hi, subshell.c currently contains hard-coded values for the available pty names. These names do not match with the ptys that can be found on actual systems. NetBSD 3.0 has ptyp[0-9A-Za-z], as well as pty[qrs][0-9A-Za-z], so mc can only use 64 of the 100 available ptys. There may be similar issues on other systems, I haven't checked. The appended patch just scans through the /dev/ directory, looking for anything that matches /^pty..$/. Roland Index: subshell.c === RCS file: /cvsroot/mc/mc/src/subshell.c,v retrieving revision 1.90 diff -u -p -r1.90 subshell.c --- subshell.c 23 Jan 2006 18:55:36 - 1.90 +++ subshell.c 4 Feb 2006 11:57:08 - @@ -39,6 +39,10 @@ #endif #include unistd.h +#ifndef HAVE_GRANTPT +# include dirent.h +#endif + #ifdef HAVE_STROPTS_H # include stropts.h /* For I_PUSH */ #endif /* HAVE_STROPTS_H */ @@ -67,7 +71,7 @@ static char tcsh_fifo[128]; static void init_raw_mode (void); static int feed_subshell (int how, int fail_on_error); static void synchronize (void); -static int pty_open_master (char *pty_name); +static int pty_open_master (char *pty_name, size_t pty_name_size); static int pty_open_slave (const char *pty_name); static int resize_tty (int fd); @@ -406,7 +410,7 @@ init_subshell (void) /* FIXME: We may need to open a fresh pty each time on SVR4 */ - subshell_pty = pty_open_master (pty_name); + subshell_pty = pty_open_master (pty_name, sizeof(pty_name)); if (subshell_pty == -1) { fprintf (stderr, Cannot open master side of pty: %s\r\n, unix_error_string (errno)); @@ -1071,7 +1075,7 @@ static void synchronize (void) /* System V version of pty_open_master */ -static int pty_open_master (char *pty_name) +static int pty_open_master (char *pty_name, size_t pty_name_size) { char *slave_name; int pty_master; @@ -1082,10 +1086,10 @@ static int pty_open_master (char *pty_na /* getpt () is a GNU extension (glibc 2.1.x) */ pty_master = getpt (); #elif IS_AIX -strcpy (pty_name, /dev/ptc); +g_strlcpy (pty_name, /dev/ptc, pty_name_size); pty_master = open (pty_name, O_RDWR); #else -strcpy (pty_name, /dev/ptmx); +g_strlcpy (pty_name, /dev/ptmx, pty_name_size); pty_master = open (pty_name, O_RDWR); #endif @@ -1099,7 +1103,7 @@ static int pty_open_master (char *pty_na close (pty_master); return -1; } -strcpy (pty_name, slave_name); +g_strlcpy (pty_name, slave_name, pty_name_size); return pty_master; } @@ -1151,36 +1155,45 @@ pty_open_slave (const char *pty_name) #else /* !HAVE_GRANTPT */ /* BSD version of pty_open_master */ -static int pty_open_master (char *pty_name) +static int pty_open_master (char *pty_name, size_t pty_name_size) { int pty_master; -const char *ptr1, *ptr2; +DIR *dir; +struct dirent *ent; +const char *p; -strcpy (pty_name, /dev/ptyXX); -for (ptr1 = pqrstuvwxyzPQRST; *ptr1; ++ptr1) -{ - pty_name [8] = *ptr1; - for (ptr2 = 0123456789abcdef; *ptr2; ++ptr2) - { - pty_name [9] = *ptr2; +pty_master = -1; - /* Try to open master */ - if ((pty_master = open (pty_name, O_RDWR)) == -1) { - if (errno == ENOENT) /* Different from EIO */ - return -1;/* Out of pty devices */ - else - continue; /* Try next pty device */ - } - pty_name [5] = 't'; /* Change pty to tty */ - if (access (pty_name, 6)){ - close (pty_master); - pty_name [5] = 'p'; - continue; - } - return pty_master; - } +if ((dir = opendir (/dev)) == NULL) + return -1; + +while ((ent = readdir (dir)) != NULL) { + + /* d_name =~ qr^pty..$ */ + p = ent-d_name; + if (!(*p++ == 'p' *p++ == 't' *p++ == 'y' + *p++ != '\0' *p++ != '\0' *p++ == '\0')) { + continue; + } + + if (g_strlcpy (pty_name, /dev/, pty_name_size) = pty_name_size || + g_strlcat (pty_name, ent-d_name, pty_name_size) = pty_name_size) + break; /* pty_name too short */ + + /* Try to open master */ + if ((pty_master = open (pty_name, O_RDWR)) == -1) + continue; + + pty_name [5] = 't'; /* Change /dev/pty to /dev/tty */ + if (access (pty_name, W_OK | R_OK) == 0) + break; /* We've found a terminal */ + + close (pty_master); + pty_master = -1; } -return -1; /* Ran out of pty devices */ + +closedir (dir); +return pty_master; } /* BSD version of pty_open_slave */ ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [bug #14155] 4.6.1: mouse wheel strangeness
anonymous wrote: Follow-up Comment #7, bug #14155 (project mc): hey everyone. ok so this problem had been bugging me too. and i see the patch fixed it and for that I am very grateful. but now it appears something else has broke, the situation is this; i use Eterm for my terminal. I noticed that the function keys and the mouse did not work with mc from Eterm, but they worked fine with xterm. eventually how I got around this was by symlinking my Eterm binary to a file called xterm, and then setting my enviroment variable TERM to xterm. I have just committed a patch that adds Eterm to the list of terminals that understand mouse sequences. It works for me now. Roland ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
Re: [patch] new pty allocation strategy for BSD
On Sat, 4 Feb 2006, Roland Illig wrote: subshell.c currently contains hard-coded values for the available pty names. These names do not match with the ptys that can be found on actual systems. NetBSD 3.0 has ptyp[0-9A-Za-z], as well as pty[qrs][0-9A-Za-z], so mc can only use 64 of the 100 available ptys. There may be similar issues on other systems, I haven't checked. The appended patch just scans through the /dev/ directory, looking for anything that matches /^pty..$/. The first part of the patch really doesn't have much to do with the problem you are trying to solve. As for the second part NetBSD 3.0 has posix_openpt() so MC should use it. I don't think that scanning the /dev directory makes sense - it's an overkill. Modern platforms have other means for acquiring pseudo terminals. Just my $0.02. ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel
AMC patches ported to mc-2006-02-03-13.tar.gz
Hi, I've just ported (updated) my patch set for the today version of mc. I didnt attach for size, download if interested, packed together: http://www1.mplayerhq.hu/~arpi/amc-patches-2006-02-03-13.tgz List of patches included: (content of README.patches) AMC patches, ported to mc-2006-02-03-13: (should work with others too) contact: [EMAIL PROTECTED] accept-screen.TERM-format.patch Newer GNU Screen sets TERM to screen.xxx where xxx is the client's terminal name. Currently mc only accepts TERM=screen, not TERM=screen* avoid-mc-in-mc.patch Do NOT allow starting mc from inside mc (mc in mc causes conflicts and confusion when changing to subshell with ctrl+o) deb-support-without-dpkg.patch For systems withoput dpkg (almost any non-debian OS). It handles .deb files as regular .ar archives, as they are in reality. esc+shift+numbers_as_shift+F-keys.patch Useful only with english keyboard map! Maps ESC,Shift+0..9 to Shift+F1..F10 keys, like ESC,0..9 are mapped to F1..F10 (useful on dumb terminals not handling F-key codes correctly) extfs-esp-archiver-support.patch Support for my (ESP-team's) ESP archive file format (listing, unpacking) ftpfs-allow-connect-interrupting.patch Let the user interrupt ftpfs in hostname lookup / connection state (for mistyped URL/IP or servers being shut down) more-syntax-defs.patch Syntax highlight definition files for BAssPasC language, MHTML and JASM more-xterm-keycodes.patch xterm codes for Shift + Pageup/Pagedown and some cosmetics (grouping same keys with different modifiers together) option_beep_when_fileop_finished.patch beep sound when file op (copy,. move etc) finished. optional. option_ctrl-o_blocking.patch block Ctrl+O (switch back to panels from subshell) when there is something types in the subshell (to avoid the annoying 'Subshell is already running a command' wahrning coming soon) - optional option_editor_prefix_control_chars.patch optional: disable prefixing of control chars (^M etc) in the editor option_prompt_type_and_subshell_chdir.patch optional: prompt can be changed (disable/short/path) optional: do not allow subshell to change panel's cwd options-COMMON.patch required for the option-* patches (common part) select_dirs.patch In select/unselect files dialog: let mask/ select directories only, and /mask select dirs+files swap-backslash-and-greyminus.patch map \ to directory-hotlist instead of unselect-files wildcards_and_quoting_in_quick_cd.patch allows quoting (cd There\ are\ spaces\ in\ this\ path) and wildcards (cd Mar*) in quick-cd. Quoting is required to 'cd ' then Alt+A to work for evil paths. Wildcarding is useful for very slow terminal connections. (easier to type cd W* than typing many UP keys then wait for result) Please apply the ones you can accept... thx. A'rpi ___ Mc-devel mailing list http://mail.gnome.org/mailman/listinfo/mc-devel