- update from CVS

- convert spec to UTF-8
- sync utf8, promptfix, 64bit patches
- drop upstreamed gcc4, ftpcrash, find, symcrash, cstrans, searchfix
    patches
- drop ctrl-t patch
- update userhost patch to let the edited/viewed file name be displayed in
    xterm title
This commit is contained in:
Jindrich Novy 2005-10-17 13:48:53 +00:00
parent 74ca0a8984
commit 3d8328499a
4 changed files with 895 additions and 776 deletions

View File

@ -52,14 +52,3 @@
} }
#if defined(_AIX) && defined(_I386) #if defined(_AIX) && defined(_I386)
--- mc-4.6.1a/acinclude.m4.64bit 2005-05-10 17:09:24.084859280 +0200
+++ mc-4.6.1a/acinclude.m4 2005-05-10 17:09:24.124853200 +0200
@@ -501,7 +501,7 @@ dnl job is to detect a method to get fil
if test $ac_cv_func_statvfs = yes; then
space=yes
AC_DEFINE(STAT_STATVFS, 1,
- [Define if function `statfs' can be used])
+ [Define if function `statvfs' can be used])
fi
fi

View File

@ -1,17 +1,17 @@
--- mc-4.6.1-pre5/src/main.c.userhost 2005-07-08 11:04:37.718907992 +0200 --- mc-4.6.1a/src/main.c.userhost 2005-10-16 18:11:07.000000000 +0200
+++ mc-4.6.1-pre5/src/main.c 2005-07-08 11:07:53.888085744 +0200 +++ mc-4.6.1a/src/main.c 2005-10-16 18:14:26.000000000 +0200
@@ -33,6 +33,7 @@ @@ -28,6 +28,7 @@
# include <unistd.h> #include <stdio.h>
#endif #include <stdlib.h>
#include <string.h>
+#include <pwd.h> +#include <pwd.h>
#include <errno.h>
#include <ctype.h> #include <sys/types.h>
#include <signal.h> #include <sys/stat.h>
@@ -1607,9 +1608,22 @@ void @@ -1608,9 +1609,22 @@ void
update_xterm_title_path (void) update_xterm_title_path (void)
{ {
unsigned char *p, *s; char *p, *s;
+ char h[64]; + char h[64];
+ struct passwd *pw; + struct passwd *pw;
@ -30,4 +30,99 @@
+ } + }
do { do {
#ifndef UTF8 #ifndef UTF8
if (!is_printable (*s)) if (!is_printable ((unsigned char) *s))
--- mc-4.6.1a/src/main.h.viewfile 2005-09-05 04:10:48.000000000 +0200
+++ mc-4.6.1a/src/main.h 2005-10-17 14:41:46.000000000 +0200
@@ -67,6 +67,7 @@ extern int alternate_plus_minus;
extern int only_leading_plus_minus;
extern int output_starts_shell;
extern int midnight_shutdown;
+extern char *xterm_title_str;
extern char cmd_buf [512];
extern const char *shell;
--- mc-4.6.1a/src/view.c.viewfile 2005-10-17 14:41:46.000000000 +0200
+++ mc-4.6.1a/src/view.c 2005-10-17 15:11:54.000000000 +0200
@@ -3344,6 +3344,11 @@ mc_internal_viewer (const char *command,
WButtonBar *bar;
Dlg_head *view_dlg;
+ if (xterm_flag && xterm_title && xterm_title_str) {
+ fprintf (stdout, "\33]0;mc - %s/%s\7", xterm_title_str, file);
+ fflush(stdout);
+ }
+
/* Create dialog and widgets, put them on the dialog */
view_dlg =
create_dlg (0, 0, LINES, COLS, NULL, view_dialog_callback,
@@ -3367,6 +3372,8 @@ mc_internal_viewer (const char *command,
}
destroy_dlg (view_dlg);
+ update_xterm_title_path();
+
return succeeded;
}
--- mc-4.6.1a/src/main.c.viewfile 2005-10-17 14:41:46.000000000 +0200
+++ mc-4.6.1a/src/main.c 2005-10-17 14:41:46.000000000 +0200
@@ -270,6 +270,9 @@ int midnight_shutdown = 0;
/* The user's shell */
const char *shell = NULL;
+/* The xterm title */
+char *xterm_title_str = NULL;
+
/* mc_home: The home of MC */
char *mc_home = NULL;
@@ -1617,6 +1620,7 @@ update_xterm_title_path (void)
struct passwd *pw;
if (xterm_flag && xterm_title) {
+ if ( xterm_title_str ) g_free (xterm_title_str);
p = s = g_strdup (strip_home_and_password (current_panel->cwd));
if ( !gethostname (h, 64) ) {
h[63] = '\0'; /* Be sure the hostname is NUL terminated */
@@ -1639,7 +1643,7 @@ update_xterm_title_path (void)
} while (*++s);
fprintf (stdout, "\33]0;mc - %s\7", p);
fflush (stdout);
- g_free (p);
+ xterm_title_str = p;
}
}
--- mc-4.6.1a/edit/editwidget.c.viewfile 2005-10-17 14:41:46.000000000 +0200
+++ mc-4.6.1a/edit/editwidget.c 2005-10-17 14:41:46.000000000 +0200
@@ -44,6 +44,9 @@
#include "../src/widget.h" /* buttonbar_redraw() */
#include "../src/menu.h" /* menubar_new() */
#include "../src/key.h" /* is_idle() */
+#include "../src/main.h" /* xterm_title_str */
+#include "../src/win.h" /* xterm_flag */
+#include "../src/layout.h" /* xterm_title */
WEdit *wedit;
struct WMenu *edit_menubar;
@@ -184,6 +187,11 @@ edit_file (const char *_file, int line)
static int made_directory = 0;
Dlg_head *edit_dlg;
WButtonBar *edit_bar;
+
+ if (xterm_flag && xterm_title && xterm_title_str) {
+ fprintf (stdout, "\33]0;mc - %s/%s\7", xterm_title_str, _file);
+ fflush(stdout);
+ }
if (!made_directory) {
char *dir = concat_dir_and_file (home_dir, EDIT_DIR);
@@ -219,6 +227,8 @@ edit_file (const char *_file, int line)
edit_done_menu (edit_menubar); /* editmenu.c */
destroy_dlg (edit_dlg);
+
+ update_xterm_title_path();
return 1;
}

File diff suppressed because it is too large Load Diff

51
mc.spec
View File

@ -1,11 +1,11 @@
Summary: User-friendly text console file manager and visual shell. Summary: User-friendly text console file manager and visual shell.
Name: mc Name: mc
Version: 4.6.1a Version: 4.6.1a
Release: 0.18 Release: 0.19
Epoch: 1 Epoch: 1
License: GPL License: GPL
Group: System Environment/Shells Group: System Environment/Shells
Source0: http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-4.6.1.tar.bz2 Source0: http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/mc-%{version}.tar.bz2
URL: http://www.ibiblio.org/mc/ URL: http://www.ibiblio.org/mc/
BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: gpm-devel, slang-devel, glib2-devel BuildRequires: gpm-devel, slang-devel, glib2-devel
@ -19,14 +19,7 @@ Patch3: mc-uglydir.patch
Patch4: mc-fish-upload.patch Patch4: mc-fish-upload.patch
Patch5: mc-userhost.patch Patch5: mc-userhost.patch
Patch6: mc-64bit.patch Patch6: mc-64bit.patch
Patch7: mc-gcc4.patch Patch7: mc-specsyntax.patch
Patch8: mc-ftpcrash.patch
Patch9: mc-specsyntax.patch
Patch10: mc-find.patch
Patch11: mc-symcrash.patch
Patch12: mc-cstrans.patch
Patch13: mc-ctrl-t.patch
Patch14: mc-searchfix.patch
%description %description
Midnight Commander is a visual shell much like a file manager, only Midnight Commander is a visual shell much like a file manager, only
@ -36,7 +29,7 @@ best features are its ability to FTP, view tar and zip files, and to
poke into RPMs for specific files. poke into RPMs for specific files.
%prep %prep
%setup -q -n %{name}-4.6.1 %setup -q -n %{name}-%{version}
%patch0 -p1 -b .utf8 %patch0 -p1 -b .utf8
%patch1 -p1 -b .extensions %patch1 -p1 -b .extensions
@ -45,14 +38,7 @@ poke into RPMs for specific files.
%patch4 -p1 -b .fish-upload %patch4 -p1 -b .fish-upload
%patch5 -p1 -b .userhost %patch5 -p1 -b .userhost
%patch6 -p1 -b .64bit %patch6 -p1 -b .64bit
%patch7 -p1 -b .gcc4 %patch7 -p1 -b .specsyntax
%patch8 -p1 -b .ftpcrash
%patch9 -p1 -b .specsyntax
%patch10 -p1 -b .find
%patch11 -p1 -b .symcrash
%patch12 -p1 -b .cstrans
%patch13 -p1 -b .ctrl-t
%patch14 -p1 -b .searchfix
# convert files in /lib to UTF-8 # convert files in /lib to UTF-8
pushd lib pushd lib
@ -189,6 +175,15 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/mc %dir %{_datadir}/mc
%changelog %changelog
* Mon Oct 16 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-0.19
- update from CVS
- convert spec to UTF-8
- sync utf8, promptfix, 64bit patches
- drop upstreamed gcc4, ftpcrash, find, symcrash, cstrans, searchfix patches
- drop ctrl-t patch
- update userhost patch to let the edited/viewed file name be displayed in
xterm title
* Tue Oct 4 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-0.18 * Tue Oct 4 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-0.18
- fix off-by-one highlighting when searching backwards in mcedit (#169823) - fix off-by-one highlighting when searching backwards in mcedit (#169823)
- fix yet another duplicates in menus for Czech locale - fix yet another duplicates in menus for Czech locale
@ -560,7 +555,7 @@ rm -rf $RPM_BUILD_ROOT
- Add patch to recognize kudzu's fstab entries - Add patch to recognize kudzu's fstab entries
- Fix path to memstick icon - Fix path to memstick icon
* Fri Feb 23 2001 Trond Eivind Glomsrød <teg@redhat.com> * Fri Feb 23 2001 Trond Eivind Glomsrød <teg@redhat.com>
- use %%{_tmppath} - use %%{_tmppath}
- langify - langify
@ -574,7 +569,7 @@ rm -rf $RPM_BUILD_ROOT
- include both sys/time.h and time.h on glibc 2.2.2 - include both sys/time.h and time.h on glibc 2.2.2
- fix Japanese patch to include locale.h. - fix Japanese patch to include locale.h.
* Tue Feb 6 2001 Trond Eivind Glomsrød <teg@redhat.com> * Tue Feb 6 2001 Trond Eivind Glomsrød <teg@redhat.com>
- i18nize initscript - i18nize initscript
* Sat Jan 27 2001 Akira TAGOH <tagoh@redhat.com> * Sat Jan 27 2001 Akira TAGOH <tagoh@redhat.com>
@ -771,7 +766,7 @@ rm -rf $RPM_BUILD_ROOT
* Wed Apr 8 1998 Marc Ewing <marc@redhat.com> * Wed Apr 8 1998 Marc Ewing <marc@redhat.com>
- add %{prefix}/lib/mc/layout to gmc - add %{prefix}/lib/mc/layout to gmc
* Tue Dec 23 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Tue Dec 23 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- added --without-debug to configure, - added --without-debug to configure,
- modification in %%build and %%install and cosmetic modification in packages - modification in %%build and %%install and cosmetic modification in packages
headers, headers,
@ -795,7 +790,7 @@ rm -rf $RPM_BUILD_ROOT
- fixed spec file. - fixed spec file.
- Updated to 4.1.8 - Updated to 4.1.8
* Sun Oct 26 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Sun Oct 26 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- updated to 4.1.6 - updated to 4.1.6
- added %attr macros in %%files, - added %attr macros in %%files,
@ -839,7 +834,7 @@ rm -rf $RPM_BUILD_ROOT
- reverted to un-gzipped man pages (RedHat style) - reverted to un-gzipped man pages (RedHat style)
- removed double install line for mcserv.pamd - removed double install line for mcserv.pamd
* Tue May 13 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Tue May 13 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- added new rpmfs script, - added new rpmfs script,
- removed mcfn_install from mc (adding mc() to bash enviroment is in - removed mcfn_install from mc (adding mc() to bash enviroment is in
@ -848,25 +843,25 @@ rm -rf $RPM_BUILD_ROOT
- removed %{prefix}/lib/mc/bin/create_vcs, - removed %{prefix}/lib/mc/bin/create_vcs,
- removed %{prefix}/lib/mc/term. - removed %{prefix}/lib/mc/term.
* Wed May 9 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Wed May 9 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- changed source url, - changed source url,
- fixed link mcedit to mc, - fixed link mcedit to mc,
* Tue May 7 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Tue May 7 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- new version 3.5.27, - new version 3.5.27,
- %dir %{prefix}/lib/mc/icons and icons removed from tkmc, - %dir %{prefix}/lib/mc/icons and icons removed from tkmc,
- added commented xmc part. - added commented xmc part.
* Tue Apr 22 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Tue Apr 22 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- FIX spec: - FIX spec:
- added URL field, - added URL field,
- in mc added missing %{prefix}/lib/mc/mc.ext, %{prefix}/lib/mc/mc.hint, - in mc added missing %{prefix}/lib/mc/mc.ext, %{prefix}/lib/mc/mc.hint,
%{prefix}/lib/mc/mc.hlp, %{prefix}/lib/mc/mc.lib, %{prefix}/lib/mc/mc.menu. %{prefix}/lib/mc/mc.hlp, %{prefix}/lib/mc/mc.lib, %{prefix}/lib/mc/mc.menu.
* Fri Apr 18 1997 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl> * Fri Apr 18 1997 Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
- added making packages: tkmc, mcserv (xmc not work yet), - added making packages: tkmc, mcserv (xmc not work yet),
- gziped man pages, - gziped man pages,