SOURCES: mc-nolibs.patch, mc-pld-developerfriendly.patch, mc-srpm....

arekm arekm at pld-linux.org
Tue Feb 28 17:52:07 CET 2006


Author: arekm                        Date: Tue Feb 28 16:52:07 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated for new snap

---- Files affected:
SOURCES:
   mc-nolibs.patch (1.2 -> 1.3) , mc-pld-developerfriendly.patch (1.2 -> 1.3) , mc-srpm.patch (1.4 -> 1.5) , mc-userhost.patch (1.1 -> 1.2) , mc-utf8.patch (1.3 -> 1.4) 

---- Diffs:

================================================================
Index: SOURCES/mc-nolibs.patch
diff -u SOURCES/mc-nolibs.patch:1.2 SOURCES/mc-nolibs.patch:1.3
--- SOURCES/mc-nolibs.patch:1.2	Fri Jun 10 17:13:48 2005
+++ SOURCES/mc-nolibs.patch	Tue Feb 28 17:52:01 2006
@@ -1,31 +1,8 @@
---- mc-4.6.1-pre1/configure.ac.orig	2004-07-23 17:51:54.373386000 +0000
-+++ mc-4.6.1-pre1/configure.ac	2004-07-23 18:42:08.714170339 +0000
-@@ -291,9 +291,6 @@
- dnl Network related functions
- dnl
- 
--AC_CHECK_LIB(nsl, t_accept)
--AC_CHECK_LIB(socket, socket)
--
- have_socket=no
- AC_CHECK_FUNCS(socket, have_socket=yes)
- if test $have_socket = no; then
-@@ -311,7 +308,7 @@
- AC_CHECK_FUNC(gethostbyname, [have_gethostbyname=yes])
- if test $have_gethostbyname = no; then
-   # gethostbyname is not in the default libraries.  See if it's in some other.
--  for lib in bsd socket inet; do
-+  for lib in bsd socket inet nsl; do
-     AC_CHECK_LIB([$lib], [gethostbyname],
- 		 [LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
-   done
---- mc-4.6.1-pre1/acinclude.m4.orig	2003-11-28 06:18:32.000000000 +0000
-+++ mc-4.6.1-pre1/acinclude.m4	2004-07-23 18:50:44.777640579 +0000
-@@ -144,10 +144,9 @@
- 
-   if test "x$enable_netcode" != xno; then
+diff -urN mc-2006-02-24-22.org/acinclude.m4 mc-2006-02-24-22/acinclude.m4
+--- mc-2006-02-24-22.org/acinclude.m4	2006-02-28 17:39:56.356182000 +0100
++++ mc-2006-02-24-22/acinclude.m4	2006-02-28 17:42:26.541568000 +0100
+@@ -146,7 +146,7 @@
      dnl FIXME: network checks should probably be in their own macro.
--    AC_CHECK_LIB(nsl, main)
      AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
      if test x$have_socket = xyes; then
 -      AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet])
@@ -33,3 +10,15 @@
        AC_CHECK_MEMBERS([struct linger.l_linger], , , [
  #include <sys/types.h>
  #include <sys/socket.h>
+diff -urN mc-2006-02-24-22.org/configure.ac mc-2006-02-24-22/configure.ac
+--- mc-2006-02-24-22.org/configure.ac	2006-02-24 23:36:32.000000000 +0100
++++ mc-2006-02-24-22/configure.ac	2006-02-28 17:43:17.424748000 +0100
+@@ -304,8 +304,6 @@
+ dnl
+ dnl Network related functions
+ dnl
+-
+-AC_SEARCH_LIBS([socket], [socket])
+ AC_SEARCH_LIBS([gethostbyname], [nsl])
+ 
+ dnl

================================================================
Index: SOURCES/mc-pld-developerfriendly.patch
diff -u SOURCES/mc-pld-developerfriendly.patch:1.2 SOURCES/mc-pld-developerfriendly.patch:1.3
--- SOURCES/mc-pld-developerfriendly.patch:1.2	Mon Jun 13 15:12:44 2005
+++ SOURCES/mc-pld-developerfriendly.patch	Tue Feb 28 17:52:01 2006
@@ -1,6 +1,6 @@
-diff -urN mc-4.6.0-orig/syntax/cvs-userlist.syntax mc-4.6.0/syntax/cvs-userlist.syntax
---- mc-4.6.0-orig/syntax/cvs-userlist.syntax	1970-01-01 01:00:00.000000000 +0100
-+++ mc-4.6.0/syntax/cvs-userlist.syntax	2004-02-11 04:16:02.995824416 +0100
+diff -urN mc-2006-02-24-22.org/syntax/cvs-userlist.syntax mc-2006-02-24-22/syntax/cvs-userlist.syntax
+--- mc-2006-02-24-22.org/syntax/cvs-userlist.syntax	1970-01-01 01:00:00.000000000 +0100
++++ mc-2006-02-24-22/syntax/cvs-userlist.syntax	2006-02-28 17:37:11.801898000 +0100
 @@ -0,0 +1,20 @@
 +wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._-
 +
@@ -22,57 +22,57 @@
 +	keyword , yellow black
 +	
 +
-diff -urN mc-4.6.0-orig/syntax/Makefile.am mc-4.6.0/syntax/Makefile.am
---- mc-4.6.0-orig/syntax/Makefile.am	2004-02-11 03:21:32.000000000 +0100
-+++ mc-4.6.0/syntax/Makefile.am	2004-02-11 04:17:12.818209800 +0100
-@@ -5,6 +5,7 @@
- 	ada95.syntax		\
- 	c.syntax		\
+diff -urN mc-2006-02-24-22.org/syntax/Makefile.am mc-2006-02-24-22/syntax/Makefile.am
+--- mc-2006-02-24-22.org/syntax/Makefile.am	2006-01-30 18:01:58.000000000 +0100
++++ mc-2006-02-24-22/syntax/Makefile.am	2006-02-28 17:38:02.617073750 +0100
+@@ -7,6 +7,7 @@
  	changelog.syntax	\
+ 	cs.syntax		\
+ 	css.syntax		\
 +	cvs-userlist.syntax	\
  	diff.syntax		\
  	dos.syntax		\
- 	fortran.syntax		\
-@@ -24,6 +25,7 @@
-	pascal.syntax		\
+ 	eiffel.syntax		\
+@@ -28,6 +29,7 @@
+ 	pascal.syntax		\
  	perl.syntax		\
  	php.syntax		\
 +	pld-update-todo.syntax	\
  	po.syntax		\
-	povray.syntax		\
+ 	povray.syntax		\
  	python.syntax		\
-diff -urN mc-4.6.0-orig/syntax/Makefile.in mc-4.6.0/syntax/Makefile.in
---- mc-4.6.0-orig/syntax/Makefile.in	2003-02-05 19:09:09.000000000 +0100
-+++ mc-4.6.0/syntax/Makefile.in	2004-02-11 04:18:08.730709808 +0100
-@@ -190,6 +190,7 @@
- 	ada95.syntax		\
- 	c.syntax		\
+diff -urN mc-2006-02-24-22.org/syntax/Makefile.in mc-2006-02-24-22/syntax/Makefile.in
+--- mc-2006-02-24-22.org/syntax/Makefile.in	2006-02-24 23:36:58.000000000 +0100
++++ mc-2006-02-24-22/syntax/Makefile.in	2006-02-28 17:38:24.266426750 +0100
+@@ -241,6 +241,7 @@
  	changelog.syntax	\
+ 	cs.syntax		\
+ 	css.syntax		\
 +	cvs-userlist.syntax	\
  	diff.syntax		\
  	dos.syntax		\
- 	fortran.syntax		\
-@@ -208,6 +209,7 @@
+ 	eiffel.syntax		\
+@@ -262,6 +263,7 @@
  	pascal.syntax		\
  	perl.syntax		\
  	php.syntax		\
 +	pld-update-todo.syntax	\
  	po.syntax		\
+ 	povray.syntax		\
  	python.syntax		\
- 	sh.syntax		\
-diff -urN mc-4.6.0-orig/syntax/pld-update-todo.syntax mc-4.6.0/syntax/pld-update-todo.syntax
---- mc-4.6.0-orig/syntax/pld-update-todo.syntax	1970-01-01 01:00:00.000000000 +0100
-+++ mc-4.6.0/syntax/pld-update-todo.syntax	2004-02-11 04:16:02.996824264 +0100
+diff -urN mc-2006-02-24-22.org/syntax/pld-update-todo.syntax mc-2006-02-24-22/syntax/pld-update-todo.syntax
+--- mc-2006-02-24-22.org/syntax/pld-update-todo.syntax	1970-01-01 01:00:00.000000000 +0100
++++ mc-2006-02-24-22/syntax/pld-update-todo.syntax	2006-02-28 17:37:11.805898250 +0100
 @@ -0,0 +1,5 @@
 +context default
 +	keyword wholeleft	[OLD]\s*\s	brightred
 +	keyword wholeleft	[NEW]\s*\n	green
 +	keyword wholeright	(*)	white black
 +
-diff -urN mc-4.6.0-orig/syntax/Syntax mc-4.6.0/syntax/Syntax
---- mc-4.6.0-orig/syntax/Syntax	2004-02-11 03:21:32.000000000 +0100
-+++ mc-4.6.0/syntax/Syntax	2004-02-11 04:16:02.997824112 +0100
-@@ -125,6 +125,12 @@
+diff -urN mc-2006-02-24-22.org/syntax/Syntax mc-2006-02-24-22/syntax/Syntax
+--- mc-2006-02-24-22.org/syntax/Syntax	2005-10-31 22:15:34.000000000 +0100
++++ mc-2006-02-24-22/syntax/Syntax	2006-02-28 17:37:11.805898250 +0100
+@@ -145,5 +145,11 @@
  file Don_t_match_me Mail\sfolder ^From\s
  include mail.syntax
  
@@ -84,4 +84,156 @@
 +
  file .\* unknown
  include unknown.syntax
- 
+diff -urN mc-2006-02-24-22.org/syntax/Syntax.orig mc-2006-02-24-22/syntax/Syntax.orig
+--- mc-2006-02-24-22.org/syntax/Syntax.orig	1970-01-01 01:00:00.000000000 +0100
++++ mc-2006-02-24-22/syntax/Syntax.orig	2005-10-31 22:15:34.000000000 +0100
+@@ -0,0 +1,149 @@
++# This file describes which highlighting scheme is applied to a particular
++# file in mcedit.
++#
++# Each entry consists of two lines: a "file" specification and the
++# corresponding highlighting definition ("include"). A file specification
++# can have two or three fields, each separated by white-space characters.
++#
++# The first field is a regular expression that is matched against the file
++# name. The second field is a description of the file type and is
++# currently unused. The third (optional) field is a regular expression
++# that is matched against the first line of the file. The first entry
++# that matches wins, that is, all the entries below are ignored.
++#
++# Certain characters must be quoted in these fields. These are space (\s),
++# tabs (\t), backslashes(\\), plus (\+) and asterisk (\*). Braces {} and
++# brackets [] must not be quoted in this file. However, they have a special
++# meaning when used in the actual syntax definitions.
++#
++# You can use the following colors in the syntax highlighting files:
++# black, blue, brightblue, brightcyan, brightgreen, brightmagenta,
++# brightred, brown, cyan, gray, green, lightgray, magenta, red, white,
++# yellow
++#
++
++file [Ss]yntax$ Syntax\sHighlighting\sdefinitions ^#\ssyntax\srules\sversion\s
++include syntax.syntax
++
++file ..\*\\.(e)$ Eiffel\sSource\sFile
++include eiffel.syntax
++
++file ..\*\\.(diff|rej|patch)$ Diff\sOutput ^(diff|Index:)\s
++include diff.syntax
++
++file ..\*\\.lsm$ LSM\sFile
++include lsm.syntax
++
++file ..\*\\.sh$ Shell\sScript ^#!.\*([\s/]([abd-z]?|ba|pdk)sh|@SH@)
++include sh.syntax
++
++file ..\*\\.(pl|PL|pm|PM)$ Perl\sProgram ^#!.\*([\s/]perl|@PERL@)
++include perl.syntax
++
++file ..\*\\.(py|PY)$ Python\sProgram ^#!.\*([\s/]python|@PYTHON@)
++include python.syntax
++
++file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
++include ruby.syntax
++
++file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource
++include nroff.syntax
++
++file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile
++include html.syntax
++
++file ..\*\\.(xml|XML|xsd|XSD|xslt?|XSLT?|dtd|DTD|qpg|qpg.in)$ XML\sdocument (\\?xml\sversion|!DOCTYPE\s)
++include xml.syntax
++
++file (.\*[Mm]akefile[\\\.A-Za-z0-9]\*|..\*\\.mk|Kbuild)$ Makefile
++include makefile.syntax
++
++file ..\*\\.(pp|PP|pas|PAS|dpr|DPR|inc|INC)$ Pascal\sProgram
++include pascal.syntax
++
++file ..\*\\.(ada|adb|ads|ADA|ADB|ADS)$ Ada\sProgram
++include ada95.syntax
++
++file ..\*\\.(tcl|itcl|TCL|ITCL)$ Tcl\sProgram
++include tcl.syntax
++
++file ..\*\\.(sl|SL)$ S-Lang\sProgram
++include slang.syntax
++
++file ..\*\\.tex$ LaTeX\s2.09\sDocument
++include latex.syntax
++
++file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
++include texinfo.syntax
++
++file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
++include c.syntax
++
++file ..\*\\.[fF]$ Fortran\sProgram
++include fortran.syntax
++
++file ..\*\\.i$ SWIG\sSource
++include swig.syntax
++
++file ..\*\\.(php|PHP)[0-9]?$ PHP\sProgram
++include php.syntax
++
++file ..\*\\.(java|JAVA|Java|jav)$ Java\sProgram
++include java.syntax
++
++file ..\*\\.(cs|CS)$ C\#\sProgram
++include cs.syntax
++
++file ..\*\\.(js|JS)$ JavaScript\sProgram
++include js.syntax
++
++file ..\*\\.(asax|aspx|ascx|asmx|ashx)$ ASPX\sFile
++include aspx.syntax
++
++file ..\*\\.st$ SmallTalk\sProgram
++include smalltalk.syntax
++
++file ..\*\\.(lisp|lsp|el)$ Lisp\sProgram
++include lisp.syntax
++
++file ..\*\\.(ml|mli|mly|mll|mlp)$ ML\sProgram
++include ml.syntax
++
++file ..\*\\.m$ Matlab\sor\sOctave\sFile
++include octave.syntax
++
++file ..\*\\.(sql|SQL)$ SQL\sProgram
++include sql.syntax
++
++file ..\*\\.(spec|spec\.in)$ RPM\sSpecfile
++include spec.syntax
++
++file .\*ChangeLog[\\\.A-Za-z0-9_]\*$ GNU\sChangeLog\sFile
++include changelog.syntax
++
++file (..\*\\.m4$|configure\\.in|configure\\.ac) M4\sMacroprocessor\sSource
++include m4.syntax
++
++file ..\*\\.(bat|cmd)$ DOS\sBatch
++include dos.syntax
++
++file ..\*\\.(po|pot|pox)$ PO\sFile
++include po.syntax
++
++file ..\*\\.([Aa][Ss][Mm]|s|S)$ ASM\sProgram
++include assembler.syntax
++ 
++file ..\*\\.([Pp][Oo][Vv])$ POV\sScript
++include povray.syntax
++
++file ..\*\\.([lL][uU][aA])$ LUA\sProgram
++include lua.syntax
++
++file ..\*\\.([iI][dD][lL])$ CORBA\sIDL
++include idl.syntax
++
++file Don_t_match_me Mail\sfolder ^From\s
++include mail.syntax
++
++file .\* unknown
++include unknown.syntax

================================================================
Index: SOURCES/mc-srpm.patch
diff -u SOURCES/mc-srpm.patch:1.4 SOURCES/mc-srpm.patch:1.5
--- SOURCES/mc-srpm.patch:1.4	Fri Jun 10 17:13:48 2005
+++ SOURCES/mc-srpm.patch	Tue Feb 28 17:52:01 2006
@@ -1,6 +1,7 @@
---- ./lib/mc.ext.in.org	2005-06-10 17:04:56.341735824 +0200
-+++ ./lib/mc.ext.in	2005-06-10 17:06:41.384766856 +0200
-@@ -217,7 +217,11 @@
+diff -urN mc-2006-02-24-22.org/lib/mc.ext.in mc-2006-02-24-22/lib/mc.ext.in
+--- mc-2006-02-24-22.org/lib/mc.ext.in	2006-02-20 16:12:48.000000000 +0100
++++ mc-2006-02-24-22/lib/mc.ext.in	2006-02-28 16:55:32.869724500 +0100
+@@ -192,7 +192,11 @@
  	View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
  
  # RPM packages (SuSE uses *.spm for source packages)
@@ -13,20 +14,10 @@
  	Open=%cd %p#rpm
  	View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
  
---- ./vfs/extfs/Makefile.am.org	2005-06-10 17:08:02.014509272 +0200
-+++ ./vfs/extfs/Makefile.am	2005-06-10 17:08:23.234283376 +0200
-@@ -4,7 +4,7 @@
- EXTFS_MISC  = README extfs.ini sfs.ini
- 
- # Scripts hat don't need adaptation to the local system
--EXTFS_CONST = bpp rpm trpm
-+EXTFS_CONST = bpp rpm trpm srpm
- 
- # Scripts that need adaptation to the local system - source files
- EXTFS_IN    = 			\
---- ./vfs/extfs/extfs.ini.org	2005-06-10 17:07:21.512666488 +0200
-+++ ./vfs/extfs/extfs.ini	2005-06-10 17:07:48.611546832 +0200
-@@ -15,6 +15,7 @@
+diff -urN mc-2006-02-24-22.org/vfs/extfs/extfs.ini mc-2006-02-24-22/vfs/extfs/extfs.ini
+--- mc-2006-02-24-22.org/vfs/extfs/extfs.ini	2005-07-20 21:03:54.000000000 +0200
++++ mc-2006-02-24-22/vfs/extfs/extfs.ini	2006-02-28 16:55:32.869724500 +0100
+@@ -17,6 +17,7 @@
  
  # Packages from popular Linux distributions
  rpm
@@ -34,8 +25,21 @@
  deb
  
  # a: - mtools filesystem
---- ./vfs/extfs/srpm.org	2005-06-10 17:01:18.087915448 +0200
-+++ ./vfs/extfs/srpm	2005-06-10 17:04:37.956530800 +0200
+diff -urN mc-2006-02-24-22.org/vfs/extfs/Makefile.am mc-2006-02-24-22/vfs/extfs/Makefile.am
+--- mc-2006-02-24-22.org/vfs/extfs/Makefile.am	2005-07-20 21:03:54.000000000 +0200
++++ mc-2006-02-24-22/vfs/extfs/Makefile.am	2006-02-28 16:55:57.719277500 +0100
+@@ -4,7 +4,7 @@
+ EXTFS_MISC  = README extfs.ini sfs.ini
+ 
+ # Scripts hat don't need adaptation to the local system
+-EXTFS_CONST = bpp rpm trpm u7z
++EXTFS_CONST = bpp rpm trpm srpm u7z
+ 
+ # Scripts that need adaptation to the local system - source files
+ EXTFS_IN    = 			\
+diff -urN mc-2006-02-24-22.org/vfs/extfs/srpm mc-2006-02-24-22/vfs/extfs/srpm
+--- mc-2006-02-24-22.org/vfs/extfs/srpm	2006-02-28 16:53:07.272625000 +0100
++++ mc-2006-02-24-22/vfs/extfs/srpm	2006-02-28 16:55:32.869724500 +0100
 @@ -19,8 +19,15 @@
  LC_TIME=C
  export LC_TIME

================================================================
Index: SOURCES/mc-userhost.patch
diff -u SOURCES/mc-userhost.patch:1.1 SOURCES/mc-userhost.patch:1.2
--- SOURCES/mc-userhost.patch:1.1	Tue Sep 20 00:00:30 2005
+++ SOURCES/mc-userhost.patch	Tue Feb 28 17:52:01 2006
@@ -1,33 +1,128 @@
---- mc-4.6.1-pre5/src/main.c.userhost	2005-07-08 11:04:37.718907992 +0200
-+++ mc-4.6.1-pre5/src/main.c	2005-07-08 11:07:53.888085744 +0200
-@@ -33,6 +33,7 @@
- #   include <unistd.h>
- #endif
- 
+--- mc-4.6.1a/src/main.c.userhost	2005-10-16 18:11:07.000000000 +0200
++++ mc-4.6.1a/src/main.c	2005-10-16 18:14:26.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
 +#include <pwd.h>
- #include <errno.h>
- #include <ctype.h>
- #include <signal.h>
-@@ -1607,9 +1608,22 @@ void
+ 
+ #include <sys/types.h>
+ #include <sys/stat.h>
+@@ -1608,9 +1609,22 @@ void
  update_xterm_title_path (void)
  {
-     unsigned char *p, *s;
+     char *p, *s;
 +    char h[64];
 +    struct passwd *pw;
  
      if (xterm_flag && xterm_title) {
  	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 */
-+                s = g_strdup_printf ("%s:%s", h, s);
-+                g_free (p);
-+                p = s;
-+        }
-+        if ( (pw = getpwuid(getuid())) ) {
-+                s = g_strdup_printf ("%s@%s", pw->pw_name, s);
-+                g_free (p);
-+                p = s;
-+        }
++	if ( !gethostname (h, 64) ) {
++	    h[63] = '\0'; /* Be sure the hostname is NUL terminated */
++	    s = g_strdup_printf ("%s:%s", h, s);
++	    g_free (p);
++	    p = s;
++	}
++	if ( (pw = getpwuid(getuid())) ) {
++	    s = g_strdup_printf ("%s@%s", pw->pw_name, s);
++	    g_free (p);
++	    p = s;
++	}
  	do {
  #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;
+ }

================================================================
Index: SOURCES/mc-utf8.patch
diff -u SOURCES/mc-utf8.patch:1.3 SOURCES/mc-utf8.patch:1.4
--- SOURCES/mc-utf8.patch:1.3	Wed Jan 18 22:56:48 2006
+++ SOURCES/mc-utf8.patch	Tue Feb 28 17:52:01 2006
@@ -1,2443 +1,2013 @@
---- mc-4.6.1-pre5/edit/editdraw.c.utf8	2005-05-27 16:19:18.000000000 +0200
-+++ mc-4.6.1-pre5/edit/editdraw.c	2005-07-08 11:22:41.891088768 +0200
+--- mc-4.6.1a/acinclude.m4.utf8	2005-11-16 00:27:27.000000000 +0100
++++ mc-4.6.1a/acinclude.m4	2006-02-01 14:25:01.000000000 +0100
+@@ -768,14 +768,14 @@ AC_DEFUN([MC_WITH_SLANG], [
+     fi
  
- static void status_string (WEdit * edit, char *s, int w)
- {
--    char byte_str[16];
-+    char byte_str[32];
+     dnl Unless external S-Lang was requested, reject S-Lang with UTF-8 hacks
+-    if test x$with_screen = xslang; then
+-	:
+-	m4_if([$1], strict, ,
+-	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
+-	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
+-it's not fully supported yet])
+-	      with_screen=mcslang])])
+-    fi
++dnl    if test x$with_screen = xslang; then
++dnl	:
++dnl	m4_if([$1], strict, ,
++dnl	      [AC_CHECK_LIB([slang], [SLsmg_write_nwchars],
++dnl	    		    [AC_MSG_WARN([Rejecting S-Lang with UTF-8 support, \
++dnl it's not fully supported yet])
++dnl	      with_screen=mcslang])])
++dnl    fi
  
-     /*
-      * If we are at the end of file, print <EOF>,
-@@ -56,11 +56,16 @@ static void status_string (WEdit * edit,
-      * as decimal and as hex.
-      */
-     if (edit->curs1 < edit->last_byte) {
--	unsigned char cur_byte = edit_get_byte (edit, edit->curs1);
-+        mc_wchar_t cur_byte = edit_get_byte (edit, edit->curs1);
-+#ifndef UTF8
- 	g_snprintf (byte_str, sizeof (byte_str), "%c %3d 0x%02X",
- 		    is_printable (cur_byte) ? cur_byte : '.',
--		    (int) cur_byte,
--		    (unsigned) cur_byte);
-+#else /* UTF8 */
-+        g_snprintf (byte_str, sizeof(byte_str), "%lc %3d 0x%02X",
-+                    iswprint(cur_byte) ? cur_byte : '.',
-+#endif /* UTF8 */
-+                    (int) cur_byte,
-+                    (unsigned) cur_byte);
-     } else {
- 	strcpy (byte_str, "<EOF>");
-     }
-@@ -183,11 +188,16 @@ void edit_scroll_screen_over_cursor (WEd
- #define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color))
- #endif
+     if test x$with_screen = xslang; then
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/mc-nolibs.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/SOURCES/mc-pld-developerfriendly.patch?r1=1.2&r2=1.3&f=u
    http://cvs.pld-linux.org/SOURCES/mc-srpm.patch?r1=1.4&r2=1.5&f=u
    http://cvs.pld-linux.org/SOURCES/mc-userhost.patch?r1=1.1&r2=1.2&f=u
    http://cvs.pld-linux.org/SOURCES/mc-utf8.patch?r1=1.3&r2=1.4&f=u



More information about the pld-cvs-commit mailing list