patch: misc/mc
Emanuel Haupt
haupt at critical.ch
Thu Jan 13 01:12:54 PST 2005
hello,
the following patch will suppress a pretty useless warning that is written if you
follow a symlink. the warning written to stderr breaks almost every terminal and
requires you to press ctrl-l.
the patch also includes previous changes at src/subshell.c so you can completely
replace misc/mc/files/patch-src-subshell.c with this patch:
regards,
emanuel
---patch starts here---
--- src/subshell.c.orig Fri Jan 24 22:37:28 2003
+++ src/subshell.c Thu Jan 13 09:57:04 2005
@@ -710,7 +710,9 @@
}
g_free (subshell_prompt);
+ g_free (pty_buffer);
subshell_prompt = NULL;
+ pty_buffer = NULL;
return quit;
}
@@ -838,8 +840,10 @@
subshell_state = RUNNING_COMMAND;
feed_subshell (QUIETLY, FALSE);
+ /* this warning breaks almost every terminal if the directory you follow is a symlink
if (subshell_alive && strcmp (subshell_cwd, cpanel->cwd) && strcmp (cpanel->cwd, "."))
fprintf (stderr, _("Warning: Cannot change to %s.\n"), cpanel->cwd);
+ */
if (reset_prompt)
prompt_pos = 0;
@@ -1166,6 +1170,8 @@
#elif IS_AIX
strcpy (pty_name, "/dev/ptc");
pty_master = open (pty_name, O_RDWR);
+#elif defined(__FreeBSD__)
+ pty_master = posix_openpt(O_RDWR);
#else
strcpy (pty_name, "/dev/ptmx");
pty_master = open (pty_name, O_RDWR);
---patch ends here---
More information about the freebsd-ports
mailing list