[Pkg-mc-commits] r132 - in trunk/debian: . patches patches/bugs patches/debian patches/mc.ext patches/po patches/syntax patches/utf8 patches/vfs
winnie at alioth.debian.org
winnie at alioth.debian.org
Sat May 17 17:35:21 UTC 2008
Author: winnie
Date: 2008-05-17 17:35:18 +0000 (Sat, 17 May 2008)
New Revision: 132
Added:
trunk/debian/patches/README
trunk/debian/patches/all.series
trunk/debian/patches/bugs/
trunk/debian/patches/bugs/28_mc-dontrewrite.patch
trunk/debian/patches/bugs/61_escaping.patch
trunk/debian/patches/bugs/64_visible_tabs.patch
trunk/debian/patches/debian/
trunk/debian/patches/debian/01_correct_conffile_paths_in_man.patch
trunk/debian/patches/debian/02_use_correct_smb_conf_path.patch
trunk/debian/patches/debian/03_use_awk_first.patch
trunk/debian/patches/debian/04_debian_menu_additions.patch
trunk/debian/patches/fixes/
trunk/debian/patches/mc.ext/
trunk/debian/patches/mc.ext/01_tar_forgot_arg.patch
trunk/debian/patches/mc.ext/02_use_arj.patch
trunk/debian/patches/mc.ext/03_debian_packages.patch
trunk/debian/patches/mc.ext/04_view_ascii.patch
trunk/debian/patches/mc.ext/05_gimp_remote.patch
trunk/debian/patches/mc.ext/06_use_several_text_browsers.patch
trunk/debian/patches/mc.ext/07_add_antiword.patch
trunk/debian/patches/mc.ext/08_several_additions_debian.patch
trunk/debian/patches/mc.ext/09_several_additions_mandriva.patch
trunk/debian/patches/po/
trunk/debian/patches/po/09_de.po.patch
trunk/debian/patches/po/10_it.po.patch
trunk/debian/patches/syntax/
trunk/debian/patches/syntax/01_debian_syntax.patch
trunk/debian/patches/syntax/02_improving_nroff_filematch.patch
trunk/debian/patches/syntax/03_cxx.syntax.patch
trunk/debian/patches/syntax/04_sh_syntax.patch
trunk/debian/patches/syntax/05_html-syntax.patch
trunk/debian/patches/syntax/06_strace_syntax.patch
trunk/debian/patches/syntax/07_named_syntax.patch
trunk/debian/patches/syntax/08_c-vs-cxx.patch
trunk/debian/patches/syntax/09_spec-syntax.patch
trunk/debian/patches/syntax/10_vhdl-syntax.patch
trunk/debian/patches/utf8/
trunk/debian/patches/utf8/mc-utf8-8bit-hex.patch
trunk/debian/patches/utf8/mc-utf8-look-and-feel.patch
trunk/debian/patches/utf8/mc-utf8-nlink.patch
trunk/debian/patches/utf8/mc-utf8.patch
trunk/debian/patches/vfs/
trunk/debian/patches/vfs/01_ftpfs_symlink.patch
trunk/debian/patches/vfs/02_ignore_ftp_chmod_error.patch
trunk/debian/patches/vfs/03_dont_hang_on_errors.patch
trunk/debian/patches/vfs/03_fix_whitespace_via_fish.patch
trunk/debian/patches/vfs/04_error_on_copymove_over_fish.patch
trunk/debian/patches/vfs/04_fix_whitespace_via_fish.patch
trunk/debian/patches/vfs/05_add_lzma_support.patch
trunk/debian/patches/vfs/05_error_on_copymove_over_fish.patch
trunk/debian/patches/vfs/06_remove_obsolete_rpm_tags.patch
trunk/debian/patches/vfs/07_srpm_support.patch
trunk/debian/patches/vfs/08_improved_u7z_support.patch
trunk/debian/patches/vfs/09_choose_correct_urar.patch
Removed:
trunk/debian/patches/01_mc.ext.in.mime.patch
trunk/debian/patches/02_debian_syntax.patch
trunk/debian/patches/03_conffiles_in_mans.patch
trunk/debian/patches/04_off64t.patch
trunk/debian/patches/06_smbconf_path.patch
trunk/debian/patches/08_awk.patch
trunk/debian/patches/09_de.po.patch
trunk/debian/patches/10_it.po.patch
trunk/debian/patches/13_syntax.patch
trunk/debian/patches/14_cxx.syntax.patch
trunk/debian/patches/18_sh_syntax.patch
trunk/debian/patches/22_main.c.patch
trunk/debian/patches/28_mc-ctype.patch
trunk/debian/patches/28_mc-dontrewrite.patch
trunk/debian/patches/32_c-vs-cxx.patch
trunk/debian/patches/45_ftpfs_symlink2.patch
trunk/debian/patches/47_mc.menu.patch
trunk/debian/patches/48_utf8-slang2.patch
trunk/debian/patches/49_64bit.patch
trunk/debian/patches/50_ignore_ftp_chmod_error.patch
trunk/debian/patches/51_html-syntax.patch
trunk/debian/patches/52_debian_dsc.patch
trunk/debian/patches/53_strace_syntax.patch
trunk/debian/patches/54_named_syntax.patch
trunk/debian/patches/60_recode.patch
trunk/debian/patches/61_escaping.patch
trunk/debian/patches/62_dont_hang_on_errors.patch
trunk/debian/patches/63_fix_whitespace_via_fish.patch
trunk/debian/patches/64_visible_tabs.patch
trunk/debian/patches/65_error_on_copymove_over_fish.patch
Modified:
trunk/debian/changelog
trunk/debian/control
trunk/debian/rocks
trunk/debian/rules
Log:
switch patchtool and some other stuff for next upload
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/changelog 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,13 +1,9 @@
-mc (1:4.6.2~cvs20080311-1) UNRELEASED; urgency=low
+mc (1:4.6.2~git20080311-1) UNRELEASED; urgency=low
- * New cvs snapshot in order to have some new patches included into mc
- and to ease up patch writing.
+ * New git snapshot from (http://repo.or.cz/w/mc.git) in order to have
+ some new patches included into mc and to ease up patch writing.
* Reordered patches and use now quilt for applying them.
- + Add several new patches from mandriva for several not yet tracked
- issues.
- + Using now utf8 patch from mandriva (Closes: #359016)
- * Removed native smb support from mc. For details please have a look on
- README.Debian. (Closes: #451964, #432324)
+ + Add several new patches from mandriva
-- Patrick Winnertz <winnie at debian.org> Thu, 06 Mar 2008 17:30:26 +0100
Modified: trunk/debian/control
===================================================================
--- trunk/debian/control 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/control 2008-05-17 17:35:18 UTC (rev 132)
@@ -3,7 +3,7 @@
Priority: optional
Maintainer: Debian MC Packaging Group <pkg-mc-devel at lists.alioth.debian.org>
Uploaders: Patrick Winnertz <winnie at debian.org>
-Build-Depends: debhelper (> 5), libglib2.0-dev, libgpmg1-dev |not+linux-gnu, gettext, libslang2-dev
+Build-Depends: debhelper (> 5), libglib2.0-dev, libgpmg1-dev |not+linux-gnu, gettext, libslang2-dev, quilt
Standards-Version: 3.7.3
Homepage: http://www.ibiblio.org/mc/
Deleted: trunk/debian/patches/01_mc.ext.in.mime.patch
===================================================================
--- trunk/debian/patches/01_mc.ext.in.mime.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/01_mc.ext.in.mime.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,350 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/lib/mc.ext.in mc-4.6.2~pre1/lib/mc.ext.in
---- mc-4.6.2~pre1.orig/lib/mc.ext.in 2008-02-16 16:08:28.000000000 +0100
-+++ mc-4.6.2~pre1/lib/mc.ext.in 2008-02-16 16:09:41.000000000 +0100
-@@ -132,7 +132,7 @@
- # tar
- regex/\.(tar|TAR)$
- Open=%cd %p#utar
-- View=%view{ascii} tar tvvf %f
-+ View=%view{ascii} tar tvvf - < %f
-
- # lha
- type/^LHa\ .*archive
-@@ -142,7 +142,7 @@
- # arj
- regex/\.a(rj|[0-9][0-9])$
- Open=%cd %p#uarj
-- View=%view{ascii} unarj l %f
-+ View=%view{ascii} arj l %f
-
- # ha
- regex/\.([Hh][Aa])$
-@@ -201,6 +201,15 @@
- Open=%cd %p#deb
- View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
-
-+# dpkg
-+shell/.debd
-+ Open=%cd %p#debd
-+ View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
-+# apt
-+shell/.deba
-+ Open=%cd %p#deba
-+ View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
-+
- # ISO9660
- regex/\.iso$
- Open=%cd %p#iso9660
-@@ -220,28 +229,28 @@
-
- # C
- shell/.c
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-
- # Fortran
- shell/.f
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-
- # Header
- regex/\.(h|hpp)$
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-
- # Object
- type/^ELF
-- #Open=%var{PAGER:more} %f
-+ #Open=sensible-pager %f
- View=%view{ascii} file %f && nm %f
-
- # Asm
- shell/.s
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-
- # C++
- regex/\.(C|cc|cpp)$
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-
-
- ### Documentation ###
-@@ -262,7 +271,7 @@
- View=%view{ascii} file %f && nm %f
-
- regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
-- Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | %var{PAGER:more}
-+ Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | sensible-pager
- View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac
-
- # Perl pod page
-@@ -277,25 +286,25 @@
- View=
-
- shell/.me
-- Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
-+ Open=nroff @MAN_FLAGS@ -me %f | sensible-pager
- View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
-
- # Troff with ms macros.
- shell/.ms
-- Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
-+ Open=nroff @MAN_FLAGS@ -ms %f | sensible-pager
- View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
-
- # Manual page - compressed
- regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
-- Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
-+ Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
- View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
-
- regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
-- Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
-+ Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
- View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
-
- regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
-- Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
-+ Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
- View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
-
-
-@@ -305,6 +314,7 @@
- Include=image
-
- type/^JPEG
-+ View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f
- Include=image
-
- type/^PC\ bitmap
-@@ -329,17 +339,19 @@
- Include=image
-
- shell/.xcf
-- Open=(gimp %f &)
-+ Open=(gimp-remote %f &)
-
- shell/.xbm
-- Open=bitmap %f
-+ Include=image
-+ #Open=bitmap %f
-
- shell/.xpm
- Include=image
- View=sxpm %f
-
- include/image
-- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
-+ Open=see %f &
-+ #Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
- View=%view{ascii} identify %f
- #View=%view{ascii} asciiview %f
-
-@@ -347,25 +359,30 @@
- ### Sound files ###
-
- regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
-- Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms -e %f 1>/dev/null 2>&1 &); fi
-
- regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
-- Open=mikmod %f
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=mikmod %f
- #Open=tracker %f
-
- regex/\.([wW][aA][wW]22)$
- Open=vplay -s 22 %f
-
- regex/\.([mM][pP]3)$
-- Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
-- View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f &); fi
-+ View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/Title:/,/Comment:/p;/^MPEG/,/^Audio/p'
-
- regex/\.([oO][gG][gG])$
-- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f &); fi
- View=%view{ascii} ogginfo %s
-
- regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
-- Open=timidity %f
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=timidity %f
-
- regex/\.([wW][mM][aA])$
- Open=mplayer -vo null %f
-@@ -405,10 +422,12 @@
- Include=video
-
- regex/\.([rR][aA]?[mM])$
-- Open=(realplay %f >/dev/null 2>&1 &)
-+ Open=run-mailcap %f 2>&1
-+ #Open=(realplay %f >/dev/null 2>&1 &)
-
- include/video
-- Open=(mplayer %f >/dev/null 2>&1 &)
-+ Open=see %f &
-+ #Open=(mplayer %f >/dev/null 2>&1 &)
- #Open=(gtv %f >/dev/null 2>&1 &)
- #Open=(xanim %f >/dev/null 2>&1 &)
-
-@@ -417,12 +436,14 @@
-
- # Postscript
- type/^PostScript
-- Open=(gv %f &)
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(gv %f &)
- View=%view{ascii} ps2ascii %f
-
- # PDF
- type/^PDF
-- Open=(xpdf %f &)
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(xpdf %f &)
- #Open=(acroread %f &)
- #Open=(ghostview %f &)
- View=%view{ascii} pdftotext %f -
-@@ -432,8 +453,9 @@
-
- # html
- regex/\.([hH][tT][mM][lL]?)$
-- Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
-- View=%view{ascii} lynx -dump -force_html %f
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
-+ View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
-
- # StarOffice 5.2
- shell/.sdw
-@@ -450,22 +472,26 @@
-
- # Microsoft Word Document
- regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
-- Open=(abiword %f >/dev/null 2>&1 &)
-- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(abiword %f >/dev/null 2>&1 &)
-+ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
- type/^Microsoft\ Word
- Open=(abiword %f >/dev/null 2>&1 &)
-- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
-+ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
-
- # RTF document
- regex/\.([rR][tT][fF])$
-- Open=(abiword %f >/dev/null 2>&1 &)
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(abiword %f >/dev/null 2>&1 &)
-
- # Microsoft Excel Worksheet
- regex/\.([xX][lL][sSwW])$
-- Open=(gnumeric %f >/dev/null 2>&1 &)
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(gnumeric %f >/dev/null 2>&1 &)
- View=%view{ascii} xls2csv %f || strings %f
- type/^Microsoft\ Excel
-- Open=(gnumeric %f >/dev/null 2>&1 &)
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=(gnumeric %f >/dev/null 2>&1 &)
- View=%view{ascii} xls2csv %f || strings %f
-
- # Use OpenOffice.org to open any MS Office documents
-@@ -478,12 +504,14 @@
-
- # DVI
- regex/\.([dD][vV][iI])$
-- Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
-+ Open=run-mailcap %f 2>&1 &
-+ #Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
- View=%view{ascii} dvi2tty %f
-
- # TeX
- regex/\.([Tt][Ee][Xx])$
-- Open=%var{EDITOR:vi} %f
-+ Open=sensible-editor %f
-+ #Open=%var{EDITOR:vi} %f
-
-
- ### Miscellaneous ###
-@@ -509,6 +537,33 @@
- regex/\.(rexx?|cmd)$
- Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
-
-+### Debian additions ###
-+
-+# view gzipped HTML
-+regex/\.([hH][tT][mM][lL]?)\.([gG][zZ])$
-+ Open=zcat %f|run-mailcap - &
-+ View=zcat %f|%view{ascii} w3m -dump -T text/html 2>&1 ||zcat %f|%view{ascii} links -dump 2>&1 ||zcat %f|lynx -dump -force_html 2>&1
-+
-+# view bzipped HTML
-+regex/\.([hH][tT][mM][lL]?)\.([bB][zZ])2$
-+ Open=bzcat %f|run-mailcap - &
-+ View=bzcat %f|%view{ascii} w3m -dump -T text/html 2>&1||zcat %f|%view{ascii} links -dump 2>&1||zcat %f|lynx -dump -force_html 2>&1
-+
-+# view gzipped (E)PS
-+regex/\.(e|)ps\.gz$
-+ Open=gv %f 2>&1 &
-+ Icon=postscript.xpm
-+ View with GhostView=gv %f 2>&1 &
-+
-+# compressed PDF
-+shell/.pdf.gz
-+ Open=zxpdf %f 2>&1 &
-+ View=zxpdf %f 2>&1 &
-+
-+# compressed postscript
-+shell/.ps.gz
-+ Open=gv %f 2>&1 &
-+ View=gv %f 2>&1 &
-
- ### Plain compressed files ###
-
-@@ -524,30 +579,36 @@
-
- # gzip
- type/^gzip
-- Open=gzip -dc %f | %var{PAGER:more}
-+ Open=gzip -dc %f | sensible-pager
- View=%view{ascii} gzip -dc %f 2>/dev/null
-
- # bzip2
- type/^bzip2
-- Open=bzip2 -dc %f | %var{PAGER:more}
-+ Open=bzip2 -dc %f | sensible-pager
- View=%view{ascii} bzip2 -dc %f 2>/dev/null
-
- # bzip
- type/^bzip
-- Open=bzip -dc %f | %var{PAGER:more}
-+ Open=bzip -dc %f | sensible-pager
- View=%view{ascii} bzip -dc %f 2>/dev/null
-
- # compress
- type/^compress
-- Open=gzip -dc %f | %var{PAGER:more}
-+ Open=gzip -dc %f | sensible-pager
- View=%view{ascii} gzip -dc %f 2>/dev/null
-
-+### Debian additions ###
-+
-+
-+# Gettext Catalogs
-+shell/.mo
-+ View=%view{ascii} msgunfmt %f || cat %f
-
- ### Default ###
-
- # Default target for anything not described above
- default/*
-- Open=
-+ Open=
- View=
-
-
Deleted: trunk/debian/patches/02_debian_syntax.patch
===================================================================
--- trunk/debian/patches/02_debian_syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/02_debian_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,111 +0,0 @@
---- /dev/null 2008-01-24 11:33:29.248015015 +0100
-+++ ./syntax/debian-changelog.syntax 2008-01-24 22:59:41.000000000 +0100
-@@ -0,0 +1,20 @@
-+context default
-+
-+ keyword linestart \s\s\* brightcyan/17
-+ keyword linestart \s-- brightred/19
-+ keyword linestart \s\s\s\s\+ cyan/17
-+
-+ keyword <*@*> brightred/19
-+ keyword whole experimental; brightmagenta/magenta
-+ keyword whole unstable; brightmagenta/magenta
-+ keyword whole stable; brightmagenta/magenta
-+ keyword whole urgency=low yellow/24
-+ keyword whole urgency=medium brightgreen/6
-+ keyword whole urgency=high white/25
-+ keyword whole urgency=LOW yellow/24
-+ keyword whole urgency=MEDIUM brightgreen/6
-+ keyword whole urgency=HIGH white/25
-+
-+ keyword whole bug white/25
-+ keyword whole Bug white/25
-+ keyword whole BUG white/25
---- /dev/null 2008-01-24 11:33:29.248015015 +0100
-+++ ./syntax/debian-control.syntax 2008-01-24 22:59:41.000000000 +0100
-@@ -0,0 +1,23 @@
-+context default
-+ keyword linestart Source brightmagenta/20
-+ keyword linestart Section brightmagenta/20
-+ keyword linestart Priority brightmagenta/20
-+ keyword linestart Maintainer brightmagenta/20
-+ keyword linestart Standards-Version brightmagenta/20
-+ keyword linestart Package green/6
-+ keyword linestart Architecture green/6
-+ keyword linestart Depends green/6
-+ keyword linestart Recommends green/6
-+ keyword linestart Suggests green/6
-+ keyword linestart Conflicts green/6
-+ keyword linestart Replaces green/6
-+ keyword linestart Provides green/6
-+ keyword linestart Pre-Depends green/6
-+ keyword linestart Build-Depends green/6
-+ keyword linestart Build-Depends-Indep green/6
-+ keyword linestart Build-Conflicts green/6
-+ keyword linestart Build-Conflicts-Indep green/6
-+ keyword linestart Description green/6
-+ keyword <*@*> brightred/19
-+
-+context linestart \s \n brown/22
---- /dev/null 2008-01-24 11:33:29.248015015 +0100
-+++ ./syntax/debian-sources-list.syntax 2008-01-24 22:59:41.000000000 +0100
-@@ -0,0 +1,12 @@
-+context default
-+ keyword linestart deb-src brightmagenta/20
-+ keyword linestart deb brightmagenta/20
-+ keyword \$\(ARCH\) brightred/18
-+
-+context # \n brown/22
-+context ftp\:\/\/ \s green/6
-+context http\:\/\/ \s green/6
-+context cdrom\:\/ \s yellow/24
-+context file\:\/ \s brightcyan/14
-+
-+###############################################################################
---- ./syntax/Makefile.in 2007-09-11 16:33:39.000000000 +0200
-+++ ./syntax/Makefile.in 2008-01-24 22:59:12.000000000 +0100
-@@ -241,6 +241,9 @@
- assembler.syntax \
- c.syntax \
- changelog.syntax \
-+ debian-changelog.syntax \
-+ debian-control.syntax \
-+ debian-sources-list.syntax \
- cs.syntax \
- css.syntax \
- d.syntax \
---- ./syntax/Makefile.am 2007-08-27 08:56:47.000000000 +0200
-+++ ./syntax/Makefile.am 2008-01-24 22:59:18.000000000 +0100
-@@ -5,6 +5,9 @@
- assembler.syntax \
- c.syntax \
- changelog.syntax \
-+ debian-changelog.syntax \
-+ debian-control.syntax \
-+ debian-sources-list.syntax \
- cs.syntax \
- css.syntax \
- d.syntax \
---- ./syntax/Syntax 2007-08-27 08:56:47.000000000 +0200
-+++ ./syntax/Syntax 2008-01-24 23:02:04.000000000 +0100
-@@ -148,5 +148,20 @@
- file Don_t_match_me Mail\sfolder ^From\s
- include mail.syntax
-
-+file sources.list$ sources\slist
-+include debian-sources-list.syntax
-+
-+file control$ Debian\scontrol\sfile
-+include debian-control.syntax
-+
-+file (rules|rocks)$ Debian\srules
-+include makefile.syntax
-+
-+file .\*changelog$ Debian\schangelog\sfile
-+include debian-changelog.syntax
-+
-+file changelog.Debian$ Debian\schangelog\sfile
-+include debian-changelog.syntax
-+
- file .\* unknown
- include unknown.syntax
Deleted: trunk/debian/patches/03_conffiles_in_mans.patch
===================================================================
--- trunk/debian/patches/03_conffiles_in_mans.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/03_conffiles_in_mans.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,90 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/doc/mc.1.in mc-4.6.2~pre1/doc/mc.1.in
---- mc-4.6.2~pre1/doc/mc.1.in 2007-09-10 16:25:30.000000000 +0200
-+++ mc-4.6.2~pre1/doc/mc.1.in 2008-01-24 23:04:13.000000000 +0100
-@@ -1396,7 +1396,7 @@
- but only if it is owned by user or root and is not world-writable.
- If no such file found, ~/.mc/menu is tried in the same way,
- and otherwise mc uses the default system-wide menu
-- at prefix@/share/mc/mc.menu.
-+/etc/mc/mc.menu.
- .PP
- The format of the menu file is very simple. Lines that start with
- anything but space or tab are considered entries for the menu (in
-@@ -1923,7 +1923,7 @@
- At startup the Midnight Commander will try to load initialization
- information from the ~/.mc/ini file. If this file doesn't exist, it will
- load the information from the system-wide configuration file, located in
-- at prefix@/share/mc/mc.ini. If the system-wide configuration file doesn't
-+/etc/mc/mc.ini. If the system-wide configuration file doesn't
- exist, MC uses the default settings.
- .PP
- The
-@@ -3251,7 +3251,7 @@
- .IP
- The help file for the program.
- .PP
--.I @prefix@/share/mc/mc.ext
-+.I /etc/mc/mc.ext
- .IP
- The default system-wide extensions file.
- .PP
-@@ -3260,12 +3260,12 @@
- User's own extension, view configuration and edit configuration
- file. They override the contents of the system wide files if present.
- .PP
--.I @prefix@/share/mc/mc.ini
-+.I /etc/mc/mc.ini
- .IP
- The default system-wide setup for the Midnight Commander, used only if
- the user doesn't have his own ~/.mc/ini file.
- .PP
--.I @prefix@/share/mc/mc.lib
-+.I /etc/mc/mc.lib
- .IP
- Global settings for the Midnight Commander. Settings in this file
- affect all users, whether they have ~/.mc/ini or not. Currently, only
-@@ -3283,7 +3283,7 @@
- .IP
- This file contains the hints displayed by the program.
- .PP
--.I @prefix@/share/mc/mc.menu
-+.I /etc/mc/mc.menu
- .IP
- This file contains the default system-wide applications menu.
- .PP
-diff -Nurwd mc-4.6.2~pre1/doc/mcedit.1.in mc-4.6.2~pre1/doc/mcedit.1.in
---- mc-4.6.2~pre1/doc/mcedit.1.in 2003-03-04 11:34:28.000000000 +0100
-+++ mc-4.6.2~pre1/doc/mcedit.1.in 2008-01-24 23:04:13.000000000 +0100
-@@ -464,12 +464,12 @@
- .IP
- The help file for the program.
- .PP
--.I @prefix@/share/mc/mc.ini
-+.I /etc/mc/mc.ini
- .IP
- The default system-wide setup for GNU Midnight Commander, used only if
- the user's own ~/.mc/ini file is missing.
- .PP
--.I @prefix@/share/mc/mc.lib
-+.I /etc/mc/mc.lib
- .IP
- Global settings for the Midnight Commander. Settings in this file
- affect all users, whether they have ~/.mc/ini or not.
-diff -Nurwd mc-4.6.2~pre1/doc/mcview.1.in mc-4.6.2~pre1/doc/mcview.1.in
---- mc-4.6.2~pre1/doc/mcview.1.in 2003-01-20 15:08:22.000000000 +0100
-+++ mc-4.6.2~pre1/doc/mcview.1.in 2008-01-24 23:04:13.000000000 +0100
-@@ -65,12 +65,12 @@
- .IP
- The help file for the program.
- .PP
--.I @prefix@/share/mc/mc.ini
-+.I /etc/mc/mc.ini
- .IP
- The default system-wide setup for GNU Midnight Commander, used only if
- the user's own ~/.mc/ini file is missing.
- .PP
--.I @prefix@/share/mc/mc.lib
-+.I /etc/mc/mc.lib
- .IP
- Global settings for the Midnight Commander. Settings in this file
- affect all users, whether they have ~/.mc/ini or not.
Deleted: trunk/debian/patches/04_off64t.patch
===================================================================
--- trunk/debian/patches/04_off64t.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/04_off64t.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,190 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/vfs/cpio.c mc-4.6.2~pre1/vfs/cpio.c
---- mc-4.6.2~pre1/vfs/cpio.c 2005-05-27 05:35:16.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/cpio.c 2008-01-24 23:07:35.000000000 +0100
-@@ -90,7 +90,7 @@
- };
-
- /* FIXME: should be off_t instead of int. */
--static int cpio_position;
-+static off_t cpio_position;
-
- static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super);
- static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super);
-@@ -114,7 +114,7 @@
- return l;
- }
-
--static int cpio_skip_padding(struct vfs_s_super *super)
-+static off_t cpio_skip_padding(struct vfs_s_super *super)
- {
- switch(super->u.arch.type) {
- case CPIO_BIN:
-diff -Nurwd mc-4.6.2~pre1/vfs/direntry.c mc-4.6.2~pre1/vfs/direntry.c
---- mc-4.6.2~pre1/vfs/direntry.c 2006-03-30 15:04:50.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/direntry.c 2008-01-24 23:09:01.000000000 +0100
-@@ -849,7 +849,7 @@
- return 0;
- }
-
--static int
-+static off_t
- vfs_s_lseek (void *fh, off_t offset, int whence)
- {
- off_t size = FH->ino->st.st_size;
-@@ -858,7 +858,7 @@
- vfs_die ("cannot lseek() after linear_read!");
-
- if (FH->handle != -1){ /* If we have local file opened, we want to work with it */
-- int retval = lseek (FH->handle, offset, whence);
-+ off_t retval = lseek (FH->handle, offset, whence);
- if (retval == -1)
- FH->ino->super->me->verrno = errno;
- return retval;
-diff -Nurwd mc-4.6.2~pre1/vfs/extfs.c mc-4.6.2~pre1/vfs/extfs.c
---- mc-4.6.2~pre1/vfs/extfs.c 2006-03-23 16:00:50.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/extfs.c 2008-01-24 23:06:15.000000000 +0100
-@@ -1140,7 +1140,7 @@
- return 0;
- }
-
--static int extfs_lseek (void *data, off_t offset, int whence)
-+static off_t extfs_lseek (void *data, off_t offset, int whence)
- {
- struct pseudofile *file = (struct pseudofile *) data;
-
-diff -Nurwd mc-4.6.2~pre1/vfs/local.c mc-4.6.2~pre1/vfs/local.c
---- mc-4.6.2~pre1/vfs/local.c 2005-07-05 23:01:57.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/local.c 2008-01-24 23:06:15.000000000 +0100
-@@ -226,7 +226,7 @@
- return chdir (path);
- }
-
--int
-+off_t
- local_lseek (void *data, off_t offset, int whence)
- {
- int fd = * (int *) data;
-diff -Nurwd mc-4.6.2~pre1/vfs/local.h mc-4.6.2~pre1/vfs/local.h
---- mc-4.6.2~pre1/vfs/local.h 2005-07-05 23:01:57.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/local.h 2008-01-24 23:09:40.000000000 +0100
-@@ -11,6 +11,6 @@
- extern int local_read (void *data, char *buffer, int count);
- extern int local_fstat (void *data, struct stat *buf);
- extern int local_errno (struct vfs_class *me);
--extern int local_lseek (void *data, off_t offset, int whence);
-+extern off_t local_lseek (void *data, off_t offset, int whence);
-
- #endif
-diff -Nurwd mc-4.6.2~pre1/vfs/mcfs.c mc-4.6.2~pre1/vfs/mcfs.c
---- mc-4.6.2~pre1/vfs/mcfs.c 2005-06-08 02:34:55.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/mcfs.c 2008-01-24 23:06:15.000000000 +0100
-@@ -1068,7 +1068,7 @@
- return 0;
- }
-
--static int
-+static off_t
- mcfs_lseek (void *data, off_t offset, int whence)
- {
- mcfs_handle *info = (mcfs_handle *) data;
-diff -Nurwd mc-4.6.2~pre1/vfs/smbfs.c mc-4.6.2~pre1/vfs/smbfs.c
---- mc-4.6.2~pre1/vfs/smbfs.c 2005-11-11 03:22:02.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/smbfs.c 2008-01-24 23:06:15.000000000 +0100
-@@ -1624,7 +1624,7 @@
-
- #define smbfs_lstat smbfs_stat /* no symlinks on smb filesystem? */
-
--static int
-+static off_t
- smbfs_lseek (void *data, off_t offset, int whence)
- {
- smbfs_handle *info = (smbfs_handle *) data;
-diff -Nurwd mc-4.6.2~pre1/vfs/tar.c mc-4.6.2~pre1/vfs/tar.c
---- mc-4.6.2~pre1/vfs/tar.c 2006-04-18 09:27:21.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/tar.c 2008-01-24 23:06:15.000000000 +0100
-@@ -209,7 +209,7 @@
- }
-
- /* As we open one archive at a time, it is safe to have this static */
--static int current_tar_position = 0;
-+static off_t current_tar_position = 0;
-
- /* Returns fd of the open tar file */
- static int
-@@ -521,7 +521,7 @@
- struct stat st;
- struct vfs_s_entry *entry;
- struct vfs_s_inode *inode, *parent;
-- long data_position;
-+ off_t data_position;
- char *q;
- int len;
- char *current_file_name, *current_link_name;
-@@ -750,8 +750,9 @@
- int fd = FH_SUPER->u.arch.fd;
- struct vfs_class *me = FH_SUPER->me;
-
-- if (mc_lseek (fd, begin + FH->pos, SEEK_SET) !=
-- begin + FH->pos) ERRNOR (EIO, -1);
-+
-+ off_t o = mc_lseek(fd, begin + FH->pos, SEEK_SET);
-+ if ( o != begin + FH->pos) ERRNOR (EIO, -1);
-
- count = MIN(count, FH->ino->st.st_size - FH->pos);
-
-diff -Nurwd mc-4.6.2~pre1/vfs/undelfs.c mc-4.6.2~pre1/vfs/undelfs.c
---- mc-4.6.2~pre1/vfs/undelfs.c 2005-05-27 05:35:16.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/undelfs.c 2008-01-24 23:06:15.000000000 +0100
-@@ -648,7 +648,7 @@
- }
-
- /* this has to stay here for now: vfs layer does not know how to emulate it */
--static int
-+static off_t
- undelfs_lseek(void *vfs_info, off_t offset, int whence)
- {
- return -1;
-diff -Nurwd mc-4.6.2~pre1/vfs/vfs.c mc-4.6.2~pre1/vfs/vfs.c
---- mc-4.6.2~pre1/vfs/vfs.c 2005-07-05 23:01:57.000000000 +0200
-+++ mc-4.6.2~pre1/vfs/vfs.c 2008-01-24 23:06:15.000000000 +0100
-@@ -627,14 +627,14 @@
- off_t mc_lseek (int fd, off_t offset, int whence)
- {
- struct vfs_class *vfs;
-- int result;
-+ off_t result;
-
- if (fd == -1)
- return -1;
-
- vfs = vfs_op (fd);
- result = vfs->lseek ? (*vfs->lseek)(vfs_info (fd), offset, whence) : -1;
-- if (result == -1)
-+ if (result == (off_t)-1)
- errno = vfs->lseek ? ferrno (vfs) : E_NOTSUPP;
- return result;
- }
-diff -Nurwd mc-4.6.2~pre1/vfs/vfs-impl.h mc-4.6.2~pre1/vfs/vfs-impl.h
---- mc-4.6.2~pre1/vfs/vfs-impl.h 2005-11-15 23:27:45.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/vfs-impl.h 2008-01-24 23:06:15.000000000 +0100
-@@ -70,7 +70,7 @@
- int (*rename) (struct vfs_class *me, const char *p1, const char *p2);
- int (*chdir) (struct vfs_class *me, const char *path);
- int (*ferrno) (struct vfs_class *me);
-- int (*lseek) (void *vfs_info, off_t offset, int whence);
-+ off_t (*lseek) (void *vfs_info, off_t offset, int whence);
- int (*mknod) (struct vfs_class *me, const char *path, int mode, int dev);
-
- vfsid (*getid) (struct vfs_class *me, const char *path);
-diff -Nurwd mc-4.6.2~pre1/vfs/xdirentry.h mc-4.6.2~pre1/vfs/xdirentry.h
---- mc-4.6.2~pre1/vfs/xdirentry.h 2006-01-27 23:16:45.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/xdirentry.h 2008-01-24 23:06:15.000000000 +0100
-@@ -94,7 +94,7 @@
- char *linkname; /* Symlink's contents */
- char *localname; /* Filename of local file, if we have one */
- struct timeval timestamp; /* Subclass specific */
-- long data_offset; /* Subclass specific */
-+ off_t data_offset; /* Subclass specific */
- };
-
- /* Data associated with an open file */
Deleted: trunk/debian/patches/06_smbconf_path.patch
===================================================================
--- trunk/debian/patches/06_smbconf_path.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/06_smbconf_path.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,12 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/vfs/smbfs.c mc-4.6.2~pre1.patched/vfs/smbfs.c
---- mc-4.6.2~pre1/vfs/smbfs.c 2005-11-11 03:22:02.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/smbfs.c 2008-01-24 23:17:43.000000000 +0100
-@@ -294,7 +294,7 @@
- static int
- smbfs_init (struct vfs_class * me)
- {
-- const char *servicesf = CONFIGDIR PATH_SEP_STR "smb.conf";
-+ const char *servicesf = CONFIGDIR PATH_SEP_STR "samba/smb.conf";
-
- /* DEBUGLEVEL = 4; */
-
Deleted: trunk/debian/patches/08_awk.patch
===================================================================
--- trunk/debian/patches/08_awk.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/08_awk.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,12 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/configure mc-4.6.2~pre1.patched/configure
---- mc-4.6.2~pre1/configure 2007-09-11 16:33:32.000000000 +0200
-+++ mc-4.6.2~pre1/configure 2008-01-24 23:37:34.000000000 +0100
-@@ -1562,7 +1562,7 @@
- fi
- fi
-
--for ac_prog in gawk mawk nawk awk
-+for ac_prog in awk gawk mawk nawk
- do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
- set dummy $ac_prog; ac_word=$2
Deleted: trunk/debian/patches/09_de.po.patch
===================================================================
--- trunk/debian/patches/09_de.po.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/09_de.po.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,57 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/po/de.po mc-4.6.2~pre1.patched/po/de.po
---- mc-4.6.2~pre1/po/de.po 2007-09-11 16:35:05.000000000 +0200
-+++ mc-4.6.2~pre1/po/de.po 2008-01-24 23:42:24.000000000 +0100
-@@ -1147,7 +1147,7 @@
-
- #, c-format
- msgid " edit symlink: %s "
--msgstr " symbolschen Link barbeiten: %s"
-+msgstr " symbolschen Link bearbeiten: %s"
-
- #, c-format
- msgid "`%s' is not a symbolic link"
-@@ -1246,7 +1246,7 @@
- " Cannot create temporary command file \n"
- " %s "
- msgstr ""
--" Kann temporäre Befehlsdaei nicht anlegen \n"
-+" Kann temporäre Befehlsdatei nicht anlegen \n"
- " %s "
-
- msgid " Parameter "
-@@ -1332,7 +1332,7 @@
- " Cannot stat source file \"%s\" \n"
- " %s "
- msgstr ""
--" Kann Quelldaei \"%s\" nicht untersuchen \n"
-+" Kann Quelldatei \"%s\" nicht untersuchen \n"
- " %s "
-
- #, c-format
-@@ -2071,7 +2071,7 @@
-
- #, c-format
- msgid " You have entered \"%s\""
--msgstr " Sie haben \"%s\" einggeben"
-+msgstr " Sie haben \"%s\" eingegeben"
-
- #. TRANSLATORS: This label appears near learned keys. Keep it short.
- msgid "OK"
-@@ -2145,7 +2145,7 @@
- msgstr "FT&P-Verbindung..."
-
- msgid "S&hell link..."
--msgstr "Shell-Verbindung..."
-+msgstr "S&hell-Verbindung..."
-
- msgid "SM&B link..."
- msgstr "SM&B-Verbindung..."
-@@ -3383,7 +3383,7 @@
-
- #, c-format
- msgid "ftpfs: connection to server failed: %s"
--msgstr "ftpfs: Verbindung zum Server fehlgeschlgen: %s"
-+msgstr "ftpfs: Verbindung zum Server fehlgeschlagen: %s"
-
- #, c-format
- msgid "Waiting to retry... %d (Control-C to cancel)"
Deleted: trunk/debian/patches/10_it.po.patch
===================================================================
--- trunk/debian/patches/10_it.po.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/10_it.po.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,12 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/po/it.po mc-4.6.2~pre1.patched/po/it.po
---- mc-4.6.2~pre1/po/it.po 2007-09-11 16:35:06.000000000 +0200
-+++ mc-4.6.2~pre1/po/it.po 2008-01-24 23:44:48.000000000 +0100
-@@ -1683,7 +1683,7 @@
- msgstr "&Riprendi"
-
- msgid "A&ppend"
--msgstr "Atta&cca"
-+msgstr "atta&Cca"
-
- msgid "Overwrite this target?"
- msgstr "Sovrascrivo questo file?"
Deleted: trunk/debian/patches/13_syntax.patch
===================================================================
--- trunk/debian/patches/13_syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/13_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,15 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/syntax/Syntax mc-4.6.2~pre1.patched/syntax/Syntax
---- mc-4.6.2~pre1/syntax/Syntax 2007-08-27 08:56:47.000000000 +0200
-+++ mc-4.6.2~pre1.patched/syntax/Syntax 2008-01-24 23:52:28.000000000 +0100
-@@ -46,9 +46,10 @@
- file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
- include ruby.syntax
-
--file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource
-+file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
- include nroff.syntax
-
-+
- file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile
- include html.syntax
-
Deleted: trunk/debian/patches/14_cxx.syntax.patch
===================================================================
--- trunk/debian/patches/14_cxx.syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/14_cxx.syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,143 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/syntax/cxx.syntax mc-4.6.2~pre1.patched/syntax/cxx.syntax
---- mc-4.6.2~pre1/syntax/cxx.syntax 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/syntax/cxx.syntax 2008-01-24 23:57:05.000000000 +0100
-@@ -0,0 +1,128 @@
-+context default
-+ keyword whole auto yellow
-+ keyword whole break yellow
-+ keyword whole case yellow
-+ keyword whole char yellow
-+ keyword whole const yellow
-+ keyword whole continue yellow
-+ keyword whole default yellow
-+ keyword whole do yellow
-+ keyword whole double yellow
-+ keyword whole else yellow
-+ keyword whole enum yellow
-+ keyword whole extern yellow
-+ keyword whole float yellow
-+ keyword whole for yellow
-+ keyword whole goto yellow
-+ keyword whole if yellow
-+ keyword whole int yellow
-+ keyword whole long yellow
-+ keyword whole register yellow
-+ keyword whole return yellow
-+ keyword whole short yellow
-+ keyword whole signed yellow
-+ keyword whole sizeof yellow
-+ keyword whole static yellow
-+ keyword whole struct yellow
-+ keyword whole switch yellow
-+ keyword whole typedef yellow
-+ keyword whole union yellow
-+ keyword whole unsigned yellow
-+ keyword whole void yellow
-+ keyword whole volatile yellow
-+ keyword whole while yellow
-+ keyword whole asm yellow
-+ keyword whole catch yellow
-+ keyword whole class yellow
-+ keyword whole friend yellow
-+ keyword whole delete yellow
-+ keyword whole inline yellow
-+ keyword whole new yellow
-+ keyword whole operator yellow
-+ keyword whole private yellow
-+ keyword whole protected yellow
-+ keyword whole public yellow
-+ keyword whole this yellow
-+ keyword whole throw yellow
-+ keyword whole template yellow
-+ keyword whole try yellow
-+ keyword whole virtual yellow
-+ keyword whole bool yellow
-+ keyword whole const_cast yellow
-+ keyword whole dynamic_cast yellow
-+ keyword whole explicit yellow
-+ keyword whole false yellow
-+ keyword whole mutable yellow
-+ keyword whole namespace yellow
-+ keyword whole reinterpret_cast yellow
-+ keyword whole static_cast yellow
-+ keyword whole true yellow
-+ keyword whole typeid yellow
-+ keyword whole typename yellow
-+ keyword whole using yellow
-+ keyword whole wchar_t yellow
-+ keyword whole ... yellow
-+ keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
-+
-+ keyword /\* brown
-+ keyword \*/ brown
-+ keyword // brown
-+
-+ keyword '\\\{"abtnvfr\}' brightgreen
-+ keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
-+ keyword '\\'' brightgreen
-+ keyword '\\\\' brightgreen
-+ keyword '\\0' brightgreen
-+ keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen
-+
-+ keyword > yellow
-+ keyword < yellow
-+ keyword \+ yellow
-+ keyword - yellow
-+ keyword \* yellow
-+ keyword / yellow
-+ keyword % yellow
-+ keyword = yellow
-+ keyword != yellow
-+ keyword == yellow
-+ keyword { brightcyan
-+ keyword } brightcyan
-+ keyword ( brightcyan
-+ keyword ) brightcyan
-+ keyword [ brightcyan
-+ keyword ] brightcyan
-+ keyword , brightcyan
-+ keyword : brightcyan
-+ keyword ? brightcyan
-+ keyword ; brightmagenta
-+
-+context exclusive /\* \*/ brown
-+ spellcheck
-+
-+context exclusive // \n brown
-+ spellcheck
-+
-+context linestart # \n brightred
-+ keyword \\\n yellow
-+ keyword /\**\*/ brown
-+ keyword //*\n brown
-+ keyword "+" red
-+ keyword <+> red
-+
-+context " " green
-+ spellcheck
-+ keyword \\" brightgreen
-+ keyword %% brightgreen
-+ keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
-+ keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
-+ keyword %\[hl\]n brightgreen
-+ keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
-+ keyword %[*] brightgreen
-+ keyword %c brightgreen
-+ keyword %p brightgreen
-+ keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
-+ keyword \\\\ brightgreen
-+ keyword \\' brightgreen
-+ keyword \\\{abtnvfr\} brightgreen
-+
-+
-diff -Nurwd mc-4.6.2~pre1/syntax/Makefile.in mc-4.6.2~pre1.patched/syntax/Makefile.in
---- mc-4.6.2~pre1/syntax/Makefile.in 2007-09-11 16:33:39.000000000 +0200
-+++ mc-4.6.2~pre1/syntax/Makefile.in 2008-01-24 23:58:04.000000000 +0100
-@@ -240,6 +240,7 @@
- aspx.syntax \
- assembler.syntax \
- c.syntax \
-+ cxx.syntax \
- changelog.syntax \
- cs.syntax \
- css.syntax \
Deleted: trunk/debian/patches/18_sh_syntax.patch
===================================================================
--- trunk/debian/patches/18_sh_syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/18_sh_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,2144 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/sh.syntax mc-4.6.2~pre1/syntax/sh.syntax
---- mc-4.6.2~pre1.orig/syntax/sh.syntax 2008-02-16 13:55:35.000000000 +0100
-+++ mc-4.6.2~pre1/syntax/sh.syntax 2008-02-16 13:57:21.000000000 +0100
-@@ -1,3 +1,8 @@
-+# Since I regulary update ths file, please send any comments
-+# to: Michelle Konzack <linux4michelle at freenet.de>
-+# Last Update: Thu, 01 Jun 2006 22:10:07 +0200
-+
-+
- context default
- keyword ;; brightred
- keyword \\@ brightred
-@@ -8,13 +13,13 @@
- keyword \\` brightred
- keyword ` brightred
- keyword ; brightcyan
-- keyword $( brightcyan
-- keyword ( brightcyan
-- keyword ) brightcyan
-+ keyword $(*) brightgreen
- keyword ${*} brightgreen
- keyword { brightcyan
- keyword } brightcyan
-
-+ keyword whole linestart #!\[\s\]*\n brightcyan black
-+
- keyword $\* brightred
- keyword $@ brightred
- keyword $# brightred
-@@ -22,7 +27,12 @@
- keyword $- brightred
- keyword $$ brightred
- keyword $! brightred
-- keyword whole $_ brightred
-+ keyword $_ brightred
-+
-+ keyword whole 2>&1 brightred
-+ keyword whole 1>&2 brightred
-+ keyword whole 2> brightred
-+ keyword whole 1> brightred
-
- keyword wholeright $\[0123456789\] brightred
-
-@@ -36,134 +46,1042 @@
-
- wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._
-
-- keyword whole alias yellow
-- keyword whole bg yellow
- keyword whole break yellow
- keyword whole case yellow
-+ keyword whole clear yellow
- keyword whole continue yellow
-+ keyword whole declare yellow
- keyword whole done yellow
- keyword whole do yellow
- keyword whole elif yellow
- keyword whole else yellow
- keyword whole esac yellow
-- keyword whole eval yellow
-- keyword whole exec yellow
- keyword whole exit yellow
-- keyword whole export yellow
-- keyword whole fg yellow
- keyword whole fi yellow
- keyword whole for yellow
-+ keyword whole getopts yellow
- keyword whole if yellow
- keyword whole in yellow
-- keyword whole read yellow
- keyword whole return yellow
- keyword whole select yellow
-- keyword whole set yellow
- keyword whole shift yellow
-+ keyword whole source yellow
- keyword whole then yellow
- keyword whole trap yellow
-- keyword whole umask yellow
-- keyword whole unset yellow
- keyword whole until yellow
- keyword whole wait yellow
- keyword whole while yellow
-
-+ keyword whole accept cyan
-+ keyword whole accessdb cyan
-+ keyword whole activate cyan
-+ keyword whole addgroup cyan
-+ keyword whole add-shell cyan
-+ keyword whole adduser cyan
-+ keyword whole anytopnm cyan
-+ keyword whole apropos cyan
-+ keyword whole apt-cache cyan
-+ keyword whole apt-cdrom cyan
-+ keyword whole apt-config cyan
-+ keyword whole apt-file cyan
-+ keyword whole apt-ftparchive cyan
-+ keyword whole apt-get cyan
-+ keyword whole aptitude cyan
-+ keyword whole apt-sortpkgs cyan
-+ keyword whole apt-source cyan
-+ keyword whole ar cyan
- keyword whole arch cyan
-+ keyword whole arp cyan
-+ keyword whole as cyan
- keyword whole ash cyan
-+ keyword whole at cyan
-+ keyword whole atd cyan
-+ keyword whole atrun cyan
-+ keyword whole atq cyan
-+ keyword whole autoconf cyan
-+ keyword whole autoheader cyan
-+ keyword whole automake cyan
-+ keyword whole autopoint cyan
-+ keyword whole autoscan cyan
- keyword whole awk cyan
-+ keyword whole badblocks cyan
-+ keyword whole base64-decode cyan
-+ keyword whole base64-encode cyan
- keyword whole basename cyan
- keyword whole bash cyan
-+ keyword whole batch cyan
-+ keyword whole bc cyan
- keyword whole bg_backup cyan
- keyword whole bg_restore cyan
-+ keyword whole blockdev cyan
-+ keyword whole bootlogd cyan
-+ keyword whole bsd-write cyan
- keyword whole bsh cyan
-+ keyword whole bunzip2 cyan
-+ keyword whole bzcat cyan
-+ keyword whole bzcmp cyan
-+ keyword whole bzdiff cyan
-+ keyword whole bzegrep cyan
-+ keyword whole bzexe cyan
-+ keyword whole bzfgrep cyan
-+ keyword whole bzgrep cyan
-+ keyword whole bzip cyan
-+ keyword whole bzip2 cyan
-+ keyword whole bzip2recover cyan
-+ keyword whole bzless cyan
-+ keyword whole bzmore cyan
-+ keyword whole cabextract cyan
-+ keyword whole cal cyan
-+ keyword whole calendar cyan
-+ keyword whole cam cyan
-+ keyword whole cancel cyan
-+ keyword whole captoinfo cyan
- keyword whole cat cyan
-+ keyword whole catchsegv cyan
-+ keyword whole catman cyan
- keyword whole cd cyan
-+ keyword whole cdda2ogg cyan
-+ keyword whole cdda2mp3 cyan
-+ keyword whole cdda2wav cyan
-+ keyword whole cdrecord cyan
-+ keyword whole cfdisk cyan
-+ keyword whole chage cyan
-+ keyword whole charset cyan
-+ keyword whole chattr cyan
-+ keyword whole checkbashisms cyan
-+ keyword whole chfn cyan
- keyword whole chgrp cyan
-+ keyword whole chkdupexe cyan
- keyword whole chmod cyan
- keyword whole chown cyan
-+ keyword whole chpasswd cyan
-+ keyword whole chroot cyan
-+ keyword whole chsh cyan
-+ keyword whole chvt cyan
-+ keyword whole cksum cyan
-+ keyword whole clear cyan
-+ keyword whole cmp cyan
-+ keyword whole codepage cyan
-+ keyword whole col cyan
-+ keyword whole colcrt cyan
-+ keyword whole colrm cyan
-+ keyword whole column cyan
-+ keyword whole comm cyan
-+ keyword whole compose cyan
-+ keyword whole compress cyan
-+ keyword whole consolechars cyan
- keyword whole cp cyan
-+ keyword whole cpan cyan
-+ keyword whole cpgr cyan
- keyword whole cpio cyan
-+ keyword whole cpp cyan
-+ keyword whole cramfsck cyan
-+ keyword whole createdb cyan
-+ keyword whole createlang cyan
-+ keyword whole createuser cyan
-+ keyword whole c_rehash cyan
-+ keyword whole crontab cyan
- keyword whole csh cyan
-+ keyword whole csplit cyan
-+ keyword whole cupsaccept cyan
-+ keyword whole cupsaddsmb cyan
-+ keyword whole cupsd cyan
-+ keyword whole cupsreject cyan
-+ keyword whole curl cyan
-+ keyword whole cut cyan
- keyword whole date cyan
-+ keyword whole dash cyan
-+ keyword whole dch cyan
- keyword whole dd cyan
-+ keyword whole deallocvt cyan
-+ keyword whole debugfs cyan
-+ keyword whole delgroup cyan
-+ keyword whole deluser cyan
-+ keyword whole depmod cyan
-+ keyword whole devdump cyan
- keyword whole df cyan
-+ keyword whole dialog cyan
-+ keyword whole diff cyan
-+ keyword whole diff3 cyan
-+ keyword whole dir cyan
-+ keyword whole dircolors cyan
-+ keyword whole directomatic cyan
-+ keyword whole dirname cyan
-+ keyword whole dirsplit cyan
-+ keyword whole disable cyan
-+ keyword whole diskd cyan
-+ keyword whole diskseekd cyan
-+ keyword whole disown cyan
- keyword whole dmesg cyan
- keyword whole dnsdomainname cyan
- keyword whole doexec cyan
- keyword whole domainname cyan
-+ keyword whole dosfsck cyan
-+ keyword whole dotextwrap cyan
-+ keyword whole dotlockfile cyan
-+ keyword whole dpasswd cyan
-+ keyword whole dpkg cyan
-+ keyword whole dpkg-architekture cyan
-+ keyword whole dpkg-buildpackage cyan
-+ keyword whole dpkg-deb cyan
-+ keyword whole dpkg-name cyan
-+ keyword whole dpkg-query cyan
-+ keyword whole dpkg-reconfigure cyan
-+ keyword whole dpkg-scanpackages cyan
-+ keyword whole dpkg-scansources cyan
-+ keyword whole dpkg-split cyan
-+ keyword whole dpkg-source cyan
-+ keyword whole dropdb cyan
-+ keyword whole droplang cyan
-+ keyword whole dropuser cyan
-+ keyword whole dscverify cyan
-+ keyword whole du cyan
-+ keyword whole dumpe2fs cyan
-+ keyword whole dumpkeys cyan
-+ keyword whole dvipdf cyan
-+ keyword whole e2fsck cyan
-+ keyword whole e2image cyan
-+ keyword whole e2label cyan
- keyword whole echo cyan
- keyword whole ed cyan
-+ keyword whole edit cyan
-+ keyword whole editor cyan
- keyword whole egrep cyan
-+ keyword whole eject cyan
-+ keyword whole enable cyan
-+ keyword whole env cyan
-+ keyword whole envsubst cyan
-+ keyword whole eqn cyan
-+ keyword whole eval_gettext cyan
- keyword whole ex cyan
-+ keyword whole expand cyan
-+ keyword whole expiry cyan
-+ keyword whole expr cyan
-+ keyword whole factor cyan
-+ keyword whole fakeroot cyan
-+ keyword whole faillog cyan
- keyword whole false cyan
-+ keyword whole fbset cyan
-+ keyword whole fc-cache cyan
-+ keyword whole fc-list cyan
-+ keyword whole fc-match cyan
-+ keyword whole fdformat cyan
-+ keyword whole fdisk cyan
-+ keyword whole fdlist cyan
-+ keyword whole fdmount cyan
-+ keyword whole fdmountd cyan
-+ keyword whole fdrawcmd cyan
-+ keyword whole fdumount cyan
-+ keyword whole fetchmail cyan
-+ keyword whole fgconsole cyan
- keyword whole fgrep cyan
-+ keyword whole file cyan
-+ keyword whole filefrag cyan
- keyword whole find cyan
-+ keyword whole find2perl cyan
-+ keyword whole findfs cyan
-+ keyword whole fitstopnm cyan
-+ keyword whole floppycontrol cyan
-+ keyword whole floppymeter cyan
-+ keyword whole fmt cyan
-+ keyword whole fold cyan
-+ keyword whole font2psf cyan
-+ keyword whole formail cyan
-+ keyword whole fping cyan
-+ keyword whole fping6 cyan
-+ keyword whole free cyan
-+ keyword whole freeze cyan
-+ keyword whole fribidi cyan
-+ keyword whole from cyan
-+ keyword whole fsck cyan
-+ keyword whole fsck.cramfs cyan
-+ keyword whole fsck.ext2 cyan
-+ keyword whole fsck.ext3 cyan
-+ keyword whole fsck.minix cyan
-+ keyword whole fsck.msdos cyan
-+ keyword whole fsck.nfs cyan
-+ keyword whole fsck.vfat cyan
- keyword whole fsconf cyan
-+ keyword whole funzip cyan
-+ keyword whole fuser cyan
-+ keyword whole fvwm cyan
- keyword whole gawk cyan
-+ keyword whole gdb cyan
-+ keyword whole gdbtui cyan
-+ keyword whole gcc cyan
-+ keyword whole gcov cyan
-+ keyword whole genksyms cyan
-+ keyword whole getconf cyan
-+ keyword whole getent cyan
-+ keyword whole getfdprm cyan
-+ keyword whole getkeycodes cyan
-+ keyword whole getopt cyan
-+ keyword whole gettext cyan
-+ keyword whole gettextize cyan
-+ keyword whole getty cyan
-+ keyword whole gpasswd cyan
-+ keyword whole gpgsplit cyan
-+ keyword whole gpgv cyan
-+ keyword whole gprof cyan
- keyword whole grep cyan
-+ keyword whole groff cyan
-+ keyword whole groupadd cyan
-+ keyword whole groupdel cyan
-+ keyword whole groupmod cyan
-+ keyword whole groups cyan
-+ keyword whole grpck cyan
-+ keyword whole grpconv cyan
-+ keyword whole grpunconv cyan
-+ keyword whole gs cyan
-+ keyword whole gsbj cyan
-+ keyword whole gsdj cyan
-+ keyword whole gsdj500 cyan
-+ keyword whole gs-gpl cyan
-+ keyword whole gslj cyan
-+ keyword whole gslp cyan
-+ keyword whole gsmctl cyan
-+ keyword whole gsmpb cyan
-+ keyword whole gsmsendsms cyan
-+ keyword whole gsmsiectl cyan
-+ keyword whole gsmsiexfer cyan
-+ keyword whole gsmsmsd cyan
-+ keyword whole gsmsmsstore cyan
-+ keyword whole gsnd cyan
- keyword whole gunzip cyan
-+ keyword whole gzexe cyan
- keyword whole gzip cyan
-+ keyword whole ha cyan
-+ keyword whole halt cyan
-+ keyword whole hd cyan
-+ keyword whole hdparm cyan
-+ keyword whole hddtemp cyan
-+ keyword whole head cyan
-+ keyword whole hexdump cyan
-+ keyword whole hman cyan
-+ keyword whole host cyan
-+ keyword whole hostid cyan
- keyword whole hostname cyan
-+ keyword whole hotkeys cyan
-+ keyword whole html2text cyan
-+ keyword whole hwclock cyan
-+ keyword whole iconv cyan
-+ keyword whole iconvconfig cyan
-+ keyword whole id cyan
-+ keyword whole ifconfig cyan
-+ keyword whole ifdown cyan
-+ keyword whole ifnames cyan
-+ keyword whole ifup cyan
- keyword whole igawk cyan
-+ keyword whole info cyan
-+ keyword whole infobrowser cyan
-+ keyword whole infocmp cyan
-+ keyword whole infokey cyan
-+ keyword whole infotocap cyan
-+ keyword whole init cyan
-+ keyword whole insmod cyan
-+ keyword whole install cyan
-+ keyword whole installkernel cyan
-+ keyword whole install-menu cyan
- keyword whole ipcalc cyan
-+ keyword whole ipcs cyan
-+ keyword whole ipmaddr cyan
-+ keyword whole ippool cyan
-+ keyword whole iptables cyan
-+ keyword whole iptunnel cyan
-+ keyword whole isoinfo cyan
-+ keyword whole join cyan
-+ keyword whole kallsyms cyan
-+ keyword whole kbdconfig cyan
-+ keyword whole kbd_mode cyan
-+ keyword whole kbdrate cyan
-+ keyword whole klogd cyan
-+ keyword whole kernelversion cyan
- keyword whole kill cyan
-+ keyword whole killall cyan
- keyword whole ksh cyan
-+ keyword whole ksyms cyan
-+ keyword whole lame cyan
-+ keyword whole last cyan
-+ keyword whole lastb cyan
-+ keyword whole lastlog cyan
-+ keyword whole ld cyan
-+ keyword whole ldconfig cyan
-+ keyword whole ldd cyan
-+ keyword whole less cyan
-+ keyword whole lessecho cyan
-+ keyword whole lessfile cyan
-+ keyword whole lesskey cyan
-+ keyword whole lesspipe cyan
-+ keyword whole lharc cyan
-+ keyword whole libtool cyan
-+ keyword whole lilo cyan
-+ keyword whole line cyan
-+ keyword whole link cyan
-+ keyword whole links2 cyan
-+ keyword whole linux_logo cyan
- keyword whole linuxconf cyan
-+ keyword whole list_audio_tracks cyan
- keyword whole ln cyan
-+ keyword whole loadkeys cyan
-+ keyword whole locale cyan
-+ keyword whole localedef cyan
-+ keyword whole locale-gen cyan
-+ keyword whole locate cyan
-+ keyword whole lockfile cyan
-+ keyword whole logger cyan
- keyword whole login cyan
-+ keyword whole logname cyan
-+ keyword whole logrotate cyan
-+ keyword whole logsave cyan
-+ keyword whole look cyan
-+ keyword whole lorder cyan
-+ keyword whole losetup cyan
-+ keyword whole lp cyan
-+ keyword whole lpadmin cyan
-+ keyword whole lpc cyan
- keyword whole lpdconf cyan
-+ keyword whole lpdomatic cyan
-+ keyword whole lpinfo cyan
-+ keyword whole lpmove cyan
-+ keyword whole lpoptions cyan
-+ keyword whole lppasswd cyan
-+ keyword whole lpq cyan
-+ keyword whole lpr cyan
-+ keyword whole lprm cyan
-+ keyword whole lprsetup cyan
-+ keyword whole lpstat cyan
- keyword whole ls cyan
-+ keyword whole lsattr cyan
-+ keyword whole lsmod cyan
-+ keyword whole lspci cyan
-+ keyword whole lsusb cyan
-+ keyword whole lynx cyan
-+ keyword whole MAKEDEV cyan
-+ keyword whole MAKEFLOPPIES cyan
- keyword whole mail cyan
-+ keyword whole mailq cyan
-+ keyword whole mailstat cyan
-+ keyword whole mailx cyan
-+ keyword whole make cyan
-+ keyword whole make-kpkg cyan
-+ keyword whole man cyan
-+ keyword whole man2html cyan
-+ keyword whole manpath cyan
-+ keyword whole mawk cyan
-+ keyword whole mc cyan
-+ keyword whole mcedit cyan
-+ keyword whole mcookie cyan
-+ keyword whole mcview cyan
-+ keyword whole mcmfmt cyan
-+ keyword whole memstat cyan
-+ keyword whole mergechanges cyan
-+ keyword whole mesg cyan
-+ keyword whole mev cyan
-+ keyword whole mkboot cyan
-+ keyword whole mkfifo cyan
-+ keyword whole mkhybrid cyan
-+ keyword whole mkisofs cyan
-+ keyword whole mk_modmap cyan
-+ keyword whole mkpasswd cyan
-+ keyword whole mii-tool cyan
-+ keyword whole mimedecode cyan
-+ keyword whole mkcramfs cyan
- keyword whole mkdir cyan
-+ keyword whole mkdirhier cyan
-+ keyword whole mkfs cyan
-+ keyword whole mkfs.cramfs cyan
-+ keyword whole mkfs.ext2 cyan
-+ keyword whole mkfs.ext3 cyan
-+ keyword whole mkfs.minix cyan
-+ keyword whole mkfs.msdos cyan
-+ keyword whole mkfs.vfat cyan
-+ keyword whole mke2fs cyan
-+ keyword whole mkdosfs cyan
-+ keyword whole mkinitrd cyan
- keyword whole mknod cyan
-+ keyword whole mkrescue cyan
-+ keyword whole mkswap cyan
- keyword whole mktemp cyan
-+ keyword whole modconf cyan
-+ keyword whole modinfo cyan
-+ keyword whole modprobe cyan
- keyword whole more cyan
- keyword whole mount cyan
-+ keyword whole mountpoint cyan
-+ keyword whole mozilla cyan
-+ keyword whole mp3info cyan
-+ keyword whole mpexpand cyan
-+ keyword whole munpack cyan
-+ keyword whole msgattrib cyan
-+ keyword whole msgcat cyan
-+ keyword whole msgcmp cyan
-+ keyword whole msgcomm cyan
-+ keyword whole msgconv cyan
-+ keyword whole msgen cyan
-+ keyword whole msgexec cyan
-+ keyword whole msgfilter cyan
-+ keyword whole msgfmt cyan
-+ keyword whole msggrep cyan
-+ keyword whole msginit cyan
-+ keyword whole msgmerge cyan
-+ keyword whole msgunfmt cyan
-+ keyword whole msguniq cyan
-+ keyword whole msmtp cyan
- keyword whole mt cyan
-+ keyword whole mt-gnu cyan
-+ keyword whole mtrace cyan
-+ keyword whole mute cyan
-+ keyword whole mutt cyan
- keyword whole mv cyan
-+ keyword whole nameif cyan
-+ keyword whole namei cyan
-+ keyword whole nano cyan
-+ keyword whole nawk cyan
-+ keyword whole ncal cyan
-+ keyword whole neqn cyan
- keyword whole netconf cyan
- keyword whole netstat cyan
-+ keyword whole newaliases cyan
-+ keyword whole newgrp cyan
-+ keyword whole newusers cyan
-+ keyword whole nex cyan
-+ keyword whole nfsstat cyan
-+ keyword whole ngettext cyan
- keyword whole nice cyan
- keyword whole nisdomainname cyan
-+ keyword whole nl cyan
-+ keyword whole nm cyan
-+ keyword whole nohup cyan
-+ keyword whole nroff cyan
-+ keyword whole nsmod cyan
-+ keyword whole nvi cyan
-+ keyword whole nview cyan
-+ keyword whole objcopy cyan
-+ keyword whole objdump cyan
-+ keyword whole od cyan
-+ keyword whole ogg123 cyan
-+ keyword whole oggdec cyan
-+ keyword whole oggenc cyan
-+ keyword whole ogginfo cyan
-+ keyword whole open cyan
-+ keyword whole openvt cyan
-+ keyword whole pager cyan
-+ keyword whole pam_getenv cyan
-+ keyword whole paperconf cyan
-+ keyword whole par cyan
-+ keyword whole passwd cyan
-+ keyword whole paste cyan
-+ keyword whole patch cyan
-+ keyword whole pathchk cyan
-+ keyword whole pcimodules cyan
-+ keyword whole pcretest cyan
-+ keyword whole pdfinfo cyan
-+ keyword whole perl cyan
-+ keyword whole perldoc cyan
-+ keyword whole pg cyan
-+ keyword whole pgrep cyan
-+ keyword whole pic cyan
-+ keyword whole pico cyan
-+ keyword whole piconv cyan
-+ keyword whole pidof cyan
-+ keyword whole pinfo cyan
- keyword whole ping cyan
-+ keyword whole pkill cyan
-+ keyword whole pmap cyan
-+ keyword whole portmap cyan
-+ keyword whole poweroff cyan
-+ keyword whole pr cyan
-+ keyword whole print cyan
-+ keyword whole printenv cyan
-+ keyword whole printf cyan
-+ keyword whole procmail cyan
-+ keyword whole prove cyan
- keyword whole ps cyan
-+ keyword whole psed cyan
-+ keyword whole psql cyan
-+ keyword whole pstree cyan
-+ keyword whole pstruct cyan
-+ keyword whole ptx cyan
-+ keyword whole pwconv cyan
-+ keyword whole pwck cyan
- keyword whole pwd cyan
-+ keyword whole pwunconv cyan
-+ keyword whole ramsize cyan
-+ keyword whole ranlib cyan
-+ keyword whole rar cyan
-+ keyword whole rarp cyan
-+ keyword whole raw cyan
-+ keyword whole rbash cyan
-+ keyword whole rcp cyan
-+ keyword whole rdev cyan
-+ keyword whole readcd cyan
-+ keyword whole readelf cyan
-+ keyword whole readlink cyan
-+ keyword whole readprofile cyan
-+ keyword whole reboot cyan
- keyword whole red cyan
-+ keyword whole regcomp cyan
-+ keyword whole reject cyan
- keyword whole remadmin cyan
-+ keyword whole remove-shell cyan
-+ keyword whole rename cyan
-+ keyword whole renice cyan
-+ keyword whole reset cyan
-+ keyword whole resize2fs cyan
-+ keyword whole rev cyan
-+ keyword whole revpath cyan
-+ keyword whole rgrep cyan
-+ keyword whole rlogin cyan
- keyword whole rm cyan
- keyword whole rmdir cyan
-+ keyword whole rmmod cyan
-+ keyword whole rmt cyan
-+ keyword whole route cyan
-+ keyword whole rpcgen cyan
-+ keyword whole rpcinfo cyan
-+ keyword whole rplay cyan
-+ keyword whole rplayd cyan
-+ keyword whole rplaydsp cyan
- keyword whole rpm cyan
-+ keyword whole rpm2cpio cyan
-+ keyword whole rptp cyan
-+ keyword whole rsh cyan
-+ keyword whole rstartd cyan
-+ keyword whole runlevel cyan
-+ keyword whole run-mailcap cyan
-+ keyword whole run-parts cyan
-+ keyword whole savelog cyan
-+ keyword whole scanimage cyan
-+ keyword whole scanpci cyan
-+ keyword whole screendump cyan
-+ keyword whole script cyan
-+ keyword whole scriptreplay cyan
-+ keyword whole sdiff cyan
- keyword whole sed cyan
-+ keyword whole see cyan
-+ keyword whole sendmail cyan
-+ keyword whole seq cyan
- keyword whole set cyan
-+ keyword whole setfdprm cyan
-+ keyword whole setkeycodes cyan
-+ keyword whole setleds cyan
-+ keyword whole setlogcons cyan
-+ keyword whole setmetamode cyan
-+ keyword whole setpci cyan
- keyword whole setserial cyan
-+ keyword whole setsid cyan
-+ keyword whole setterm cyan
-+ keyword whole setvesablank cyan
-+ keyword whole setxkbmap cyan
-+ keyword whole sfdisk cyan
-+ keyword whole sftp cyan
-+ keyword whole sg cyan
- keyword whole sh cyan
-+ keyword whole sha1sum cyan
-+ keyword whole shadowconfig cyan
-+ keyword whole showcfont cyan
-+ keyword whole showkey cyan
-+ keyword whole showmount cyan
-+ keyword whole shred cyan
-+ keyword whole shutdown cyan
-+ keyword whole size cyan
-+ keyword whole skill cyan
-+ keyword whole slabtop cyan
-+ keyword whole slattach cyan
- keyword whole sleep cyan
-+ keyword whole slogin cyan
-+ keyword whole smime_keys cyan
-+ keyword whole snice cyan
-+ keyword whole soelim cyan
- keyword whole sort cyan
-+ keyword whole sa-learn cyan
-+ keyword whole spamassassin cyan
-+ keyword whole spamc cyan
-+ keyword whole spamd cyan
-+ keyword whole splain cyan
-+ keyword whole split cyan
-+ keyword whole ssh-add cyan
-+ keyword whole ssh-copy-id cyan
-+ keyword whole ssh-keygen cyan
-+ keyword whole ssh-keyscan cyan
-+ keyword whole ssmtp cyan
-+ keyword whole start-stop-daemon cyan
-+ keyword whole stat cyan
-+ keyword whole strace cyan
-+ keyword whole strings cyan
-+ keyword whole strip cyan
- keyword whole stty cyan
- keyword whole su cyan
-+ keyword whole sulogin cyan
-+ keyword whole sum cyan
-+ keyword whole superformat cyan
-+ keyword whole su-to-root cyan
-+ keyword whole svlc cyan
-+ keyword whole swapoff cyan
-+ keyword whole swapon cyan
- keyword whole sync cyan
-+ keyword whole sysctl cyan
-+ keyword whole syslogd cyan
-+ keyword whole syslogd-listfiles cyan
-+ keyword whole syslog-facility cyan
-+ keyword whole tac cyan
-+ keyword whole tack cyan
-+ keyword whole tail cyan
- keyword whole taper cyan
- keyword whole tar cyan
-+ keyword whole tbl cyan
-+ keyword whole tcpdchk cyan
-+ keyword whole tcpdump cyan
-+ keyword whole tclsh cyan
- keyword whole tcsh cyan
-+ keyword whole tdbox cyan
-+ keyword whole tdcheckserver cyan
-+ keyword whole tddebidate cyan
-+ keyword whole tdfileview cyan
-+ keyword whole tdfmlogstrip cyan
-+ keyword whole tdformail cyan
-+ keyword whole tdlinuxcounter cyan
-+ keyword whole tdlinuxlogo cyan
-+ keyword whole tdmailblacklist cyan
-+ keyword whole tdmailbody cyan
-+ keyword whole tdmailcopy cyan
-+ keyword whole tdmaildirmake cyan
-+ keyword whole tdmailsubject cyan
-+ keyword whole tdmailwhitelist cyan
-+ keyword whole tdnewmsg cyan
-+ keyword whole tdsysbackup cyan
-+ keyword whole tee cyan
-+ keyword whole telinit cyan
-+ keyword whole telnet cyan
- keyword whole test cyan
-+ keyword whole tempfile cyan
-+ keyword whole tic cyan
- keyword whole time cyan
-+ keyword whole tload cyan
-+ keyword whole tnef cyan
-+ keyword whole toe cyan
-+ keyword whole toolame cyan
-+ keyword whole top cyan
- keyword whole touch cyan
-+ keyword whole tput cyan
-+ keyword whole tr cyan
-+ keyword whole troff cyan
- keyword whole true cyan
-+ keyword whole tset cyan
-+ keyword whole tsort cyan
-+ keyword whole tty cyan
-+ keyword whole tunctl cyan
-+ keyword whole tune2fs cyan
-+ keyword whole tunelp cyan
-+ keyword whole tzconfig cyan
-+ keyword whole tzselect cyan
-+ keyword whole tzsetup cyan
-+ keyword whole ucf cyan
-+ keyword whole ul cyan
- keyword whole umount cyan
- keyword whole uname cyan
-+ keyword whole unarj cyan
-+ keyword whole uncompress cyan
-+ keyword whole unexpand cyan
-+ keyword whole unicode_start cyan
-+ keyword whole unicode_stop cyan
-+ keyword whole unix_chkpwd cyan
-+ keyword whole uniq cyan
-+ keyword whole unlink cyan
-+ keyword whole unzip cyan
-+ keyword whole unzipsfx cyan
-+ keyword whole updatedb cyan
-+ keyword whole update-menus cyan
-+ keyword whole update-modules cyan
-+ keyword whole update-pciids cyan
-+ keyword whole uprecords cyan
-+ keyword whole uptime cyan
-+ keyword whole urlview cyan
-+ keyword whole usbmodules cyan
-+ keyword whole uscan cyan
-+ keyword whole useradd cyan
- keyword whole userconf cyan
-+ keyword whole userdel cyan
-+ keyword whole usermod cyan
-+ keyword whole users cyan
- keyword whole usleep cyan
-+ keyword whole uufilter cyan
-+ keyword whole uuidgen cyan
-+ keyword whole vacuumdb cyan
-+ keyword whole validlocale cyan
-+ keyword whole vcstime cyan
-+ keyword whole vcut cyan
-+ keyword whole vdir cyan
- keyword whole vi cyan
-+ keyword whole vidmode cyan
- keyword whole view cyan
-+ keyword whole vigr cyan
- keyword whole vim cyan
-+ keyword whole vipw cyan
-+ keyword whole vlc cyan
-+ keyword whole vmstat cyan
-+ keyword whole volname cyan
-+ keyword whole vorbiscomment cyan
-+ keyword whole vt-is-UTF8 cyan
-+ keyword whole w cyan
-+ keyword whole wall cyan
-+ keyword whole watch cyan
-+ keyword whole wc cyan
-+ keyword whole wget cyan
-+ keyword whole whatis cyan
-+ keyword whole whereis cyan
-+ keyword whole which cyan
-+ keyword whole whiptail cyan
-+ keyword whole who cyan
-+ keyword whole whoami cyan
-+ keyword whole whois cyan
-+ keyword whole wish cyan
-+ keyword whole write cyan
-+ keyword whole writevt cyan
-+ keyword whole wvWare cyan
-+ keyword whole wxvlc cyan
-+ keyword whole xargs cyan
-+ keyword whole xbmbrowser cyan
-+ keyword whole xbindkeys cyan
- keyword whole xconf cyan
-+ keyword whole xdfcopy cyan
-+ keyword whole xdfformat cyan
-+ keyword whole Xdialog cyan
-+ keyword whole xgettext cyan
-+ keyword whole xloadimage cyan
-+ keyword whole xmessage cyan
-+ keyword whole xmodmap cyan
-+ keyword whole xmms cyan
-+ keyword whole xpmroot cyan
-+ keyword whole xrdb cyan
-+ keyword whole xset cyan
-+ keyword whole xsetbg cyan
-+ keyword whole xsetmode cyan
-+ keyword whole xsetpointer cyan
-+ keyword whole xsetroot cyan
-+ keyword whole xterm cyan
-+ keyword whole xview cyan
-+ keyword whole xwd cyan
-+ keyword whole xwud cyan
-+ keyword whole xzgv cyan
-+ keyword whole yes cyan
- keyword whole ypdomainname cyan
-+ keyword whole yydecode cyan
- keyword whole zcat cyan
-+ keyword whole zcmp cyan
-+ keyword whole zdiff cyan
-+ keyword whole zdump cyan
-+ keyword whole zegrep cyan
-+ keyword whole zfgrep cyan
-+ keyword whole zforce cyan
-+ keyword whole zgrep cyan
-+ keyword whole zgv cyan
-+ keyword whole zic cyan
-+ keyword whole zip cyan
-+ keyword whole zipcloak cyan
-+ keyword whole zipgrep cyan
-+ keyword whole zipinfo cyan
-+ keyword whole zipnote cyan
-+ keyword whole zipsplit cyan
-+ keyword whole zless cyan
-+ keyword whole zmore cyan
-+ keyword whole znew cyan
-+ keyword whole zoo cyan
- keyword whole zsh cyan
-+ keyword whole zsoelim cyan
-+ keyword whole zxpdf cyan
-
--wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
-+ keyword whole pamcut cyan
-+ keyword whole pamdeinterlace cyan
-+ keyword whole pamdice cyan
-+ keyword whole pamfile cyan
-+ keyword whole pamoil cyan
-+ keyword whole pamstack cyan
-+ keyword whole pamstretch cyan
-+ keyword whole pamstretch-gen cyan
-
--context linestart #! \n brightcyan black
-+ keyword whole pbmclean cyan
-+ keyword whole pbmlife cyan
-+ keyword whole pbmmake cyan
-+ keyword whole pbmmask cyan
-+ keyword whole pbmpage cyan
-+ keyword whole pbmpscale cyan
-+ keyword whole pbmreduce cyan
-+ keyword whole pbmtext cyan
-+ keyword whole pbmtextps cyan
-+ keyword whole pbmupc cyan
-+
-+ keyword whole pbmtoascii cyan
-+ keyword whole pbmtoepsi cyan
-+ keyword whole pbmtog3 cyan
-+ keyword whole pbmtoicon cyan
-+ keyword whole pbmtolj cyan
-+ keyword whole pbmtomacp cyan
-+ keyword whole pbmtonokia cyan
-+ keyword whole pbmtopgm cyan
-+ keyword whole pbmtoplot cyan
-+ keyword whole pbmtoppa cyan
-+ keyword whole pbmtopsg3 cyan
-+ keyword whole pbmtowbmp cyan
-+ keyword whole pbmtoxbm cyan
-+
-+ keyword whole g3topbm cyan
-+ keyword whole thinkjettopbm cyan
-+ keyword whole wbmptopbm cyan
-+ keyword whole xbmtopbm cyan
-+
-+ keyword whole pgmbentley cyan
-+ keyword whole pgmcrater cyan
-+ keyword whole pgmedge cyan
-+ keyword whole pgmenhance cyan
-+ keyword whole pgmhist cyan
-+ keyword whole pgmkernel cyan
-+ keyword whole pgmnoise cyan
-+ keyword whole pgmnorm cyan
-+ keyword whole pgmoil cyan
-+ keyword whole pgmramp cyan
-+ keyword whole pgmslice cyan
-+ keyword whole pgmtexture cyan
-+
-+ keyword whole pgmtopbm cyan
-+ keyword whole pgmtoppm cyan
-+
-+ keyword whole asciitopgm cyan
-+ keyword whole bioradtopgm cyan
-+ keyword whole icontopgm cyan
-+ keyword whole jpegtopgm cyan
-+ keyword whole macptopgm cyan
-+ keyword whole rawtopgm cyan
-+
-+ keyword whole pnmalias cyan
-+ keyword whole pnmarith cyan
-+ keyword whole pnmcat cyan
-+ keyword whole pnmcolormap cyan
-+ keyword whole pnmcomp cyan
-+ keyword whole pnmconvol cyan
-+ keyword whole pnmcrop cyan
-+ keyword whole pnmcut cyan
-+ keyword whole pnmdepth cyan
-+ keyword whole pnmenlarge cyan
-+ keyword whole pnmfile cyan
-+ keyword whole pnmflip cyan
-+ keyword whole pnmgamma cyan
-+ keyword whole pnmhisteq cyan
-+ keyword whole pnmhistmap cyan
-+ keyword whole pnmindex cyan
-+ keyword whole pnminterp cyan
-+ keyword whole pnminterp-gen cyan
-+ keyword whole pnminvert cyan
-+ keyword whole pnmmargin cyan
-+ keyword whole pnmmontage cyan
-+ keyword whole pnmnlfilt cyan
-+ keyword whole pnmnoraw cyan
-+ keyword whole pnmnorm cyan
-+ keyword whole pnmpad cyan
-+ keyword whole pnmpaste cyan
-+ keyword whole pnmpsnr cyan
-+ keyword whole pnmquant cyan
-+ keyword whole pnmremap cyan
-+ keyword whole pnmrotate cyan
-+ keyword whole pnmscale cyan
-+ keyword whole pnmscalefixed cyan
-+ keyword whole pnmshear cyan
-+ keyword whole pnmsmooth cyan
-+ keyword whole pnmsplit cyan
-+ keyword whole pnmtile cyan
-+
-+ keyword whole pnmtofits cyan
-+ keyword whole pnmtojpeg cyan
-+ keyword whole pnmtopalm cyan
-+ keyword whole pnmtoplainpnm cyan
-+ keyword whole pnmtopng cyan
-+ keyword whole pnmtops cyan
-+ keyword whole pnmtorle cyan
-+ keyword whole pnmtotiff cyan
-+ keyword whole pnmtoxwd cyan
-+
-+ keyword whole bpmtopnm cyan
-+ keyword whole giftopnm cyan
-+ keyword whole palmtopnm cyan
-+ keyword whole pngtopnm cyan
-+ keyword whole pstopnm cyan
-+ keyword whole rletopnm cyan
-+ keyword whole tifftopnm cyan
-+ keyword whole xwdtopnm cyan
-+
-+ keyword whole ppm3d cyan
-+ keyword whole ppmbrighten cyan
-+ keyword whole ppmchange cyan
-+ keyword whole ppmcie cyan
-+ keyword whole ppmcolormask cyan
-+ keyword whole ppmcolors cyan
-+ keyword whole ppmdim cyan
-+ keyword whole ppmdist cyan
-+ keyword whole ppmdither cyan
-+ keyword whole ppmfade cyan
-+ keyword whole ppmflash cyan
-+ keyword whole ppmforge cyan
-+ keyword whole ppmhist cyan
-+ keyword whole ppmlabel cyan
-+ keyword whole ppmmake cyan
-+ keyword whole ppmmix cyan
-+ keyword whole ppmnorm cyan
-+ keyword whole ppmntsc cyan
-+ keyword whole ppmpat cyan
-+ keyword whole ppmquant cyan
-+ keyword whole ppmquantall cyan
-+ keyword whole ppmqvgq cyan
-+ keyword whole ppmrainbow cyan
-+ keyword whole ppmrelief cyan
-+ keyword whole ppmshadow cyan
-+ keyword whole ppmshift cyan
-+ keyword whole ppmspread cyan
-+ keyword whole ppmtv cyan
-+
-+ keyword whole ppmtoacad cyan
-+ keyword whole ppmtobmp cyan
-+ keyword whole ppmtogif cyan
-+ keyword whole ppmtojpeg cyan
-+ keyword whole ppmtolj cyan
-+ keyword whole ppmtomap cyan
-+ keyword whole ppmtompeg cyan
-+ keyword whole ppmtopcx cyan
-+ keyword whole ppmtopgm cyan
-+ keyword whole ppmtorgb3 cyan
-+ keyword whole ppmtowinicon cyan
-+ keyword whole ppmtoxpm cyan
-+
-+ keyword whole bpmtoppm cyan
-+ keyword whole pcxtoppm cyan
-+ keyword whole pdftoppm cyan
-+ keyword whole pjtoppm cyan
-+ keyword whole rawtoppm cyan
-+ keyword whole rgb3toppm cyan
-+ keyword whole winicontoppm cyan
-+ keyword whole xpmtoppm cyan
-+ keyword whole xvminitoppm cyan
-+
-+ keyword whole gpg red
-+ keyword whole md5sum red
-+ keyword whole openssl red
-+ keyword whole ssh red
-+ keyword whole scp red
-+
-+ keyword whole gettext.sh magenta
-+ keyword whole TEXTDOMAINDIR magenta
-+ keyword whole TEXTDOMAIN magenta
-+ keyword whole VERSION magenta
-+
-+ keyword whole /dev/audio brightblue
-+ keyword whole /dev/dsp brightblue
-+ keyword whole /dev/null brightblue
-+ keyword whole /dev/mixed brightblue
-+ keyword whole /dev/stdin brightblue
-+ keyword whole /dev/stdout brightblue
-+ keyword whole /dev/stderr brightblue
-+ keyword whole /dev/zero brightblue
-+
-+wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
-
- context # \n brown
- spellcheck
-@@ -215,6 +1133,10 @@
- keyword $! brightred
- keyword $_ brightred
-
-+ keyword whole 2>&1 brightred
-+ keyword whole 2> brightred
-+ keyword whole 1> brightred
-+
- keyword wholeright $\[0123456789\] brightred
-
- keyword wholeright $+ brightgreen
-@@ -225,7 +1147,9 @@
-
- keyword whole break yellow
- keyword whole case yellow
-+ keyword whole clear yellow
- keyword whole continue yellow
-+ keyword whole declare yellow
- keyword whole done yellow
- keyword whole do yellow
- keyword whole elif yellow
-@@ -234,105 +1158,1024 @@
- keyword whole exit yellow
- keyword whole fi yellow
- keyword whole for yellow
-+ keyword whole getopts yellow
- keyword whole if yellow
- keyword whole in yellow
- keyword whole return yellow
- keyword whole select yellow
- keyword whole shift yellow
-+ keyword whole source yellow
- keyword whole then yellow
- keyword whole trap yellow
- keyword whole until yellow
-+ keyword whole wait yellow
- keyword whole while yellow
-
-+ keyword whole accept cyan
-+ keyword whole accessdb cyan
-+ keyword whole activate cyan
-+ keyword whole addgroup cyan
-+ keyword whole add-shell cyan
-+ keyword whole adduser cyan
-+ keyword whole anytopnm cyan
-+ keyword whole apropos cyan
-+ keyword whole apt-cache cyan
-+ keyword whole apt-cdrom cyan
-+ keyword whole apt-config cyan
-+ keyword whole apt-file cyan
-+ keyword whole apt-ftparchive cyan
-+ keyword whole apt-get cyan
-+ keyword whole aptitude cyan
-+ keyword whole apt-sortpkgs cyan
-+ keyword whole apt-source cyan
-+ keyword whole ar cyan
- keyword whole arch cyan
-+ keyword whole arp cyan
-+ keyword whole as cyan
- keyword whole ash cyan
-+ keyword whole at cyan
-+ keyword whole atd cyan
-+ keyword whole atrun cyan
-+ keyword whole atq cyan
-+ keyword whole autoconf cyan
-+ keyword whole autoheader cyan
-+ keyword whole automake cyan
-+ keyword whole autopoint cyan
-+ keyword whole autoscan cyan
- keyword whole awk cyan
-+ keyword whole badblocks cyan
-+ keyword whole base64-decode cyan
-+ keyword whole base64-encode cyan
- keyword whole basename cyan
- keyword whole bash cyan
-+ keyword whole batch cyan
-+ keyword whole bc cyan
- keyword whole bg_backup cyan
- keyword whole bg_restore cyan
-+ keyword whole blockdev cyan
-+ keyword whole bootlogd cyan
-+ keyword whole bsd-write cyan
- keyword whole bsh cyan
-+ keyword whole bunzip2 cyan
-+ keyword whole bzcat cyan
-+ keyword whole bzcmp cyan
-+ keyword whole bzdiff cyan
-+ keyword whole bzegrep cyan
-+ keyword whole bzexe cyan
-+ keyword whole bzfgrep cyan
-+ keyword whole bzgrep cyan
-+ keyword whole bzip cyan
-+ keyword whole bzip2 cyan
-+ keyword whole bzip2recover cyan
-+ keyword whole bzless cyan
-+ keyword whole bzmore cyan
-+ keyword whole cabextract cyan
-+ keyword whole cal cyan
-+ keyword whole calendar cyan
-+ keyword whole cam cyan
-+ keyword whole cancel cyan
-+ keyword whole captoinfo cyan
- keyword whole cat cyan
-+ keyword whole catchsegv cyan
-+ keyword whole catman cyan
- keyword whole cd cyan
-+ keyword whole cdda2ogg cyan
-+ keyword whole cdda2mp3 cyan
-+ keyword whole cdda2wav cyan
-+ keyword whole cdrecord cyan
-+ keyword whole cfdisk cyan
-+ keyword whole chage cyan
-+ keyword whole charset cyan
-+ keyword whole chattr cyan
-+ keyword whole checkbashisms cyan
-+ keyword whole chfn cyan
- keyword whole chgrp cyan
-+ keyword whole chkdupexe cyan
- keyword whole chmod cyan
- keyword whole chown cyan
-+ keyword whole chpasswd cyan
-+ keyword whole chroot cyan
-+ keyword whole chsh cyan
-+ keyword whole chvt cyan
-+ keyword whole cksum cyan
-+ keyword whole clear cyan
-+ keyword whole cmp cyan
-+ keyword whole codepage cyan
-+ keyword whole col cyan
-+ keyword whole colcrt cyan
-+ keyword whole colrm cyan
-+ keyword whole column cyan
-+ keyword whole comm cyan
-+ keyword whole compose cyan
-+ keyword whole compress cyan
-+ keyword whole consolechars cyan
- keyword whole cp cyan
-+ keyword whole cpan cyan
-+ keyword whole cpgr cyan
- keyword whole cpio cyan
-+ keyword whole cpp cyan
-+ keyword whole cramfsck cyan
-+ keyword whole createdb cyan
-+ keyword whole createlang cyan
-+ keyword whole createuser cyan
-+ keyword whole c_rehash cyan
-+ keyword whole crontab cyan
- keyword whole csh cyan
-+ keyword whole csplit cyan
-+ keyword whole cupsaccept cyan
-+ keyword whole cupsaddsmb cyan
-+ keyword whole cupsd cyan
-+ keyword whole cupsreject cyan
-+ keyword whole curl cyan
-+ keyword whole cut cyan
- keyword whole date cyan
-+ keyword whole dash cyan
-+ keyword whole dch cyan
- keyword whole dd cyan
-+ keyword whole deallocvt cyan
-+ keyword whole debugfs cyan
-+ keyword whole delgroup cyan
-+ keyword whole deluser cyan
-+ keyword whole depmod cyan
-+ keyword whole devdump cyan
- keyword whole df cyan
-+ keyword whole dialog cyan
-+ keyword whole diff cyan
-+ keyword whole diff3 cyan
-+ keyword whole dir cyan
-+ keyword whole dircolors cyan
-+ keyword whole directomatic cyan
-+ keyword whole dirname cyan
-+ keyword whole dirsplit cyan
-+ keyword whole disable cyan
-+ keyword whole diskd cyan
-+ keyword whole diskseekd cyan
-+ keyword whole disown cyan
- keyword whole dmesg cyan
- keyword whole dnsdomainname cyan
- keyword whole doexec cyan
- keyword whole domainname cyan
-+ keyword whole dosfsck cyan
-+ keyword whole dotextwrap cyan
-+ keyword whole dotlockfile cyan
-+ keyword whole dpasswd cyan
-+ keyword whole dpkg cyan
-+ keyword whole dpkg-architekture cyan
-+ keyword whole dpkg-buildpackage cyan
-+ keyword whole dpkg-deb cyan
-+ keyword whole dpkg-name cyan
-+ keyword whole dpkg-query cyan
-+ keyword whole dpkg-reconfigure cyan
-+ keyword whole dpkg-scanpackages cyan
-+ keyword whole dpkg-scansources cyan
-+ keyword whole dpkg-split cyan
-+ keyword whole dpkg-source cyan
-+ keyword whole dropdb cyan
-+ keyword whole droplang cyan
-+ keyword whole dropuser cyan
-+ keyword whole dscverify cyan
-+ keyword whole du cyan
-+ keyword whole dumpe2fs cyan
-+ keyword whole dumpkeys cyan
-+ keyword whole dvipdf cyan
-+ keyword whole e2fsck cyan
-+ keyword whole e2image cyan
-+ keyword whole e2label cyan
- keyword whole echo cyan
- keyword whole ed cyan
-+ keyword whole edit cyan
-+ keyword whole editor cyan
- keyword whole egrep cyan
-+ keyword whole eject cyan
-+ keyword whole enable cyan
-+ keyword whole env cyan
-+ keyword whole envsubst cyan
-+ keyword whole eqn cyan
-+ keyword whole eval_gettext cyan
- keyword whole ex cyan
-+ keyword whole expand cyan
-+ keyword whole expiry cyan
-+ keyword whole expr cyan
-+ keyword whole factor cyan
-+ keyword whole fakeroot cyan
-+ keyword whole faillog cyan
- keyword whole false cyan
-+ keyword whole fbset cyan
-+ keyword whole fc-cache cyan
-+ keyword whole fc-list cyan
-+ keyword whole fc-match cyan
-+ keyword whole fdformat cyan
-+ keyword whole fdisk cyan
-+ keyword whole fdlist cyan
-+ keyword whole fdmount cyan
-+ keyword whole fdmountd cyan
-+ keyword whole fdrawcmd cyan
-+ keyword whole fdumount cyan
-+ keyword whole fetchmail cyan
-+ keyword whole fgconsole cyan
- keyword whole fgrep cyan
-+ keyword whole file cyan
-+ keyword whole filefrag cyan
- keyword whole find cyan
-+ keyword whole find2perl cyan
-+ keyword whole findfs cyan
-+ keyword whole fitstopnm cyan
-+ keyword whole floppycontrol cyan
-+ keyword whole floppymeter cyan
-+ keyword whole fmt cyan
-+ keyword whole fold cyan
-+ keyword whole font2psf cyan
-+ keyword whole formail cyan
-+ keyword whole fping cyan
-+ keyword whole fping6 cyan
-+ keyword whole free cyan
-+ keyword whole freeze cyan
-+ keyword whole fribidi cyan
-+ keyword whole from cyan
-+ keyword whole fsck cyan
-+ keyword whole fsck.cramfs cyan
-+ keyword whole fsck.ext2 cyan
-+ keyword whole fsck.ext3 cyan
-+ keyword whole fsck.minix cyan
-+ keyword whole fsck.msdos cyan
-+ keyword whole fsck.nfs cyan
-+ keyword whole fsck.vfat cyan
- keyword whole fsconf cyan
-+ keyword whole funzip cyan
-+ keyword whole fuser cyan
-+ keyword whole fvwm cyan
- keyword whole gawk cyan
-+ keyword whole gdb cyan
-+ keyword whole gdbtui cyan
-+ keyword whole gcc cyan
-+ keyword whole gcov cyan
-+ keyword whole genksyms cyan
-+ keyword whole getconf cyan
-+ keyword whole getent cyan
-+ keyword whole getfdprm cyan
-+ keyword whole getkeycodes cyan
-+ keyword whole getopt cyan
-+ keyword whole gettext cyan
-+ keyword whole gettextize cyan
-+ keyword whole getty cyan
-+ keyword whole gpasswd cyan
-+ keyword whole gpgsplit cyan
-+ keyword whole gpgv cyan
-+ keyword whole gprof cyan
- keyword whole grep cyan
-+ keyword whole groff cyan
-+ keyword whole groupadd cyan
-+ keyword whole groupdel cyan
-+ keyword whole groupmod cyan
-+ keyword whole groups cyan
-+ keyword whole grpck cyan
-+ keyword whole grpconv cyan
-+ keyword whole grpunconv cyan
-+ keyword whole gs cyan
-+ keyword whole gsbj cyan
-+ keyword whole gsdj cyan
-+ keyword whole gsdj500 cyan
-+ keyword whole gs-gpl cyan
-+ keyword whole gslj cyan
-+ keyword whole gslp cyan
-+ keyword whole gsmctl cyan
-+ keyword whole gsmpb cyan
-+ keyword whole gsmsendsms cyan
-+ keyword whole gsmsiectl cyan
-+ keyword whole gsmsiexfer cyan
-+ keyword whole gsmsmsd cyan
-+ keyword whole gsmsmsstore cyan
-+ keyword whole gsnd cyan
- keyword whole gunzip cyan
-+ keyword whole gzexe cyan
- keyword whole gzip cyan
-+ keyword whole ha cyan
-+ keyword whole halt cyan
-+ keyword whole hd cyan
-+ keyword whole hdparm cyan
-+ keyword whole hddtemp cyan
-+ keyword whole head cyan
-+ keyword whole hexdump cyan
-+ keyword whole hman cyan
-+ keyword whole host cyan
-+ keyword whole hostid cyan
- keyword whole hostname cyan
-+ keyword whole hotkeys cyan
-+ keyword whole html2text cyan
-+ keyword whole hwclock cyan
-+ keyword whole iconv cyan
-+ keyword whole iconvconfig cyan
-+ keyword whole id cyan
-+ keyword whole ifconfig cyan
-+ keyword whole ifdown cyan
-+ keyword whole ifnames cyan
-+ keyword whole ifup cyan
- keyword whole igawk cyan
-+ keyword whole info cyan
-+ keyword whole infobrowser cyan
-+ keyword whole infocmp cyan
-+ keyword whole infokey cyan
-+ keyword whole infotocap cyan
-+ keyword whole init cyan
-+ keyword whole insmod cyan
-+ keyword whole install cyan
-+ keyword whole installkernel cyan
-+ keyword whole install-menu cyan
- keyword whole ipcalc cyan
-+ keyword whole ipcs cyan
-+ keyword whole ipmaddr cyan
-+ keyword whole ippool cyan
-+ keyword whole iptables cyan
-+ keyword whole iptunnel cyan
-+ keyword whole isoinfo cyan
-+ keyword whole join cyan
-+ keyword whole kallsyms cyan
-+ keyword whole kbdconfig cyan
-+ keyword whole kbd_mode cyan
-+ keyword whole kbdrate cyan
-+ keyword whole klogd cyan
-+ keyword whole kernelversion cyan
- keyword whole kill cyan
-+ keyword whole killall cyan
- keyword whole ksh cyan
-+ keyword whole ksyms cyan
-+ keyword whole lame cyan
-+ keyword whole last cyan
-+ keyword whole lastb cyan
-+ keyword whole lastlog cyan
-+ keyword whole ld cyan
-+ keyword whole ldconfig cyan
-+ keyword whole ldd cyan
-+ keyword whole less cyan
-+ keyword whole lessecho cyan
-+ keyword whole lessfile cyan
-+ keyword whole lesskey cyan
-+ keyword whole lesspipe cyan
-+ keyword whole lharc cyan
-+ keyword whole libtool cyan
-+ keyword whole lilo cyan
-+ keyword whole line cyan
-+ keyword whole link cyan
-+ keyword whole links2 cyan
-+ keyword whole linux_logo cyan
- keyword whole linuxconf cyan
-+ keyword whole list_audio_tracks cyan
- keyword whole ln cyan
-+ keyword whole loadkeys cyan
-+ keyword whole locale cyan
-+ keyword whole localedef cyan
-+ keyword whole locale-gen cyan
-+ keyword whole locate cyan
-+ keyword whole lockfile cyan
-+ keyword whole logger cyan
- keyword whole login cyan
-+ keyword whole logname cyan
-+ keyword whole logrotate cyan
-+ keyword whole logsave cyan
-+ keyword whole look cyan
-+ keyword whole lorder cyan
-+ keyword whole losetup cyan
-+ keyword whole lp cyan
-+ keyword whole lpadmin cyan
-+ keyword whole lpc cyan
- keyword whole lpdconf cyan
-+ keyword whole lpdomatic cyan
-+ keyword whole lpinfo cyan
-+ keyword whole lpmove cyan
-+ keyword whole lpoptions cyan
-+ keyword whole lppasswd cyan
-+ keyword whole lpq cyan
-+ keyword whole lpr cyan
-+ keyword whole lprm cyan
-+ keyword whole lprsetup cyan
-+ keyword whole lpstat cyan
- keyword whole ls cyan
-+ keyword whole lsattr cyan
-+ keyword whole lsmod cyan
-+ keyword whole lspci cyan
-+ keyword whole lsusb cyan
-+ keyword whole lynx cyan
-+ keyword whole MAKEDEV cyan
-+ keyword whole MAKEFLOPPIES cyan
- keyword whole mail cyan
-+ keyword whole mailq cyan
-+ keyword whole mailstat cyan
-+ keyword whole mailx cyan
-+ keyword whole make cyan
-+ keyword whole make-kpkg cyan
-+ keyword whole man cyan
-+ keyword whole man2html cyan
-+ keyword whole manpath cyan
-+ keyword whole mawk cyan
-+ keyword whole mc cyan
-+ keyword whole mcedit cyan
-+ keyword whole mcookie cyan
-+ keyword whole mcview cyan
-+ keyword whole mcmfmt cyan
-+ keyword whole memstat cyan
-+ keyword whole mergechanges cyan
-+ keyword whole mesg cyan
-+ keyword whole mev cyan
-+ keyword whole mkboot cyan
-+ keyword whole mkfifo cyan
-+ keyword whole mkhybrid cyan
-+ keyword whole mkisofs cyan
-+ keyword whole mk_modmap cyan
-+ keyword whole mkpasswd cyan
-+ keyword whole mii-tool cyan
-+ keyword whole mimedecode cyan
-+ keyword whole mkcramfs cyan
- keyword whole mkdir cyan
-+ keyword whole mkdirhier cyan
-+ keyword whole mkfs cyan
-+ keyword whole mkfs.cramfs cyan
-+ keyword whole mkfs.ext2 cyan
-+ keyword whole mkfs.ext3 cyan
-+ keyword whole mkfs.minix cyan
-+ keyword whole mkfs.msdos cyan
-+ keyword whole mkfs.vfat cyan
-+ keyword whole mke2fs cyan
-+ keyword whole mkdosfs cyan
-+ keyword whole mkinitrd cyan
- keyword whole mknod cyan
-+ keyword whole mkrescue cyan
-+ keyword whole mkswap cyan
- keyword whole mktemp cyan
-+ keyword whole modconf cyan
-+ keyword whole modinfo cyan
-+ keyword whole modprobe cyan
- keyword whole more cyan
- keyword whole mount cyan
-+ keyword whole mountpoint cyan
-+ keyword whole mozilla cyan
-+ keyword whole mp3info cyan
-+ keyword whole mpexpand cyan
-+ keyword whole munpack cyan
-+ keyword whole msgattrib cyan
-+ keyword whole msgcat cyan
-+ keyword whole msgcmp cyan
-+ keyword whole msgcomm cyan
-+ keyword whole msgconv cyan
-+ keyword whole msgen cyan
-+ keyword whole msgexec cyan
-+ keyword whole msgfilter cyan
-+ keyword whole msgfmt cyan
-+ keyword whole msggrep cyan
-+ keyword whole msginit cyan
-+ keyword whole msgmerge cyan
-+ keyword whole msgunfmt cyan
-+ keyword whole msguniq cyan
-+ keyword whole msmtp cyan
- keyword whole mt cyan
-+ keyword whole mt-gnu cyan
-+ keyword whole mtrace cyan
-+ keyword whole mute cyan
-+ keyword whole mutt cyan
- keyword whole mv cyan
-+ keyword whole nameif cyan
-+ keyword whole namei cyan
-+ keyword whole nano cyan
-+ keyword whole nawk cyan
-+ keyword whole ncal cyan
-+ keyword whole neqn cyan
- keyword whole netconf cyan
- keyword whole netstat cyan
-+ keyword whole newaliases cyan
-+ keyword whole newgrp cyan
-+ keyword whole newusers cyan
-+ keyword whole nex cyan
-+ keyword whole nfsstat cyan
-+ keyword whole ngettext cyan
- keyword whole nice cyan
- keyword whole nisdomainname cyan
-+ keyword whole nl cyan
-+ keyword whole nm cyan
-+ keyword whole nohup cyan
-+ keyword whole nroff cyan
-+ keyword whole nsmod cyan
-+ keyword whole nvi cyan
-+ keyword whole nview cyan
-+ keyword whole objcopy cyan
-+ keyword whole objdump cyan
-+ keyword whole od cyan
-+ keyword whole ogg123 cyan
-+ keyword whole oggdec cyan
-+ keyword whole oggenc cyan
-+ keyword whole ogginfo cyan
-+ keyword whole open cyan
-+ keyword whole openvt cyan
-+ keyword whole pager cyan
-+ keyword whole pam_getenv cyan
-+ keyword whole paperconf cyan
-+ keyword whole par cyan
-+ keyword whole passwd cyan
-+ keyword whole paste cyan
-+ keyword whole patch cyan
-+ keyword whole pathchk cyan
-+ keyword whole pcimodules cyan
-+ keyword whole pcretest cyan
-+ keyword whole pdfinfo cyan
-+ keyword whole perl cyan
-+ keyword whole perldoc cyan
-+ keyword whole pg cyan
-+ keyword whole pgrep cyan
-+ keyword whole pic cyan
-+ keyword whole pico cyan
-+ keyword whole piconv cyan
-+ keyword whole pidof cyan
-+ keyword whole pinfo cyan
- keyword whole ping cyan
-+ keyword whole pkill cyan
-+ keyword whole pmap cyan
-+ keyword whole portmap cyan
-+ keyword whole poweroff cyan
-+ keyword whole pr cyan
-+ keyword whole print cyan
-+ keyword whole printenv cyan
-+ keyword whole printf cyan
-+ keyword whole procmail cyan
-+ keyword whole prove cyan
- keyword whole ps cyan
-+ keyword whole psed cyan
-+ keyword whole psql cyan
-+ keyword whole pstree cyan
-+ keyword whole pstruct cyan
-+ keyword whole ptx cyan
-+ keyword whole pwconv cyan
-+ keyword whole pwck cyan
- keyword whole pwd cyan
-+ keyword whole pwunconv cyan
-+ keyword whole ramsize cyan
-+ keyword whole ranlib cyan
-+ keyword whole rar cyan
-+ keyword whole rarp cyan
-+ keyword whole raw cyan
-+ keyword whole rbash cyan
-+ keyword whole rcp cyan
-+ keyword whole rdev cyan
-+ keyword whole readcd cyan
-+ keyword whole readelf cyan
-+ keyword whole readlink cyan
-+ keyword whole readprofile cyan
-+ keyword whole reboot cyan
- keyword whole red cyan
-+ keyword whole regcomp cyan
-+ keyword whole reject cyan
- keyword whole remadmin cyan
-+ keyword whole remove-shell cyan
-+ keyword whole rename cyan
-+ keyword whole renice cyan
-+ keyword whole reset cyan
-+ keyword whole resize2fs cyan
-+ keyword whole rev cyan
-+ keyword whole revpath cyan
-+ keyword whole rgrep cyan
-+ keyword whole rlogin cyan
- keyword whole rm cyan
- keyword whole rmdir cyan
-+ keyword whole rmmod cyan
-+ keyword whole rmt cyan
-+ keyword whole route cyan
-+ keyword whole rpcgen cyan
-+ keyword whole rpcinfo cyan
-+ keyword whole rplay cyan
-+ keyword whole rplayd cyan
-+ keyword whole rplaydsp cyan
- keyword whole rpm cyan
-+ keyword whole rpm2cpio cyan
-+ keyword whole rptp cyan
-+ keyword whole rsh cyan
-+ keyword whole rstartd cyan
-+ keyword whole runlevel cyan
-+ keyword whole run-mailcap cyan
-+ keyword whole run-parts cyan
-+ keyword whole savelog cyan
-+ keyword whole scanimage cyan
-+ keyword whole scanpci cyan
-+ keyword whole screendump cyan
-+ keyword whole script cyan
-+ keyword whole scriptreplay cyan
-+ keyword whole sdiff cyan
- keyword whole sed cyan
-+ keyword whole see cyan
-+ keyword whole sendmail cyan
-+ keyword whole seq cyan
- keyword whole set cyan
-+ keyword whole setfdprm cyan
-+ keyword whole setkeycodes cyan
-+ keyword whole setleds cyan
-+ keyword whole setlogcons cyan
-+ keyword whole setmetamode cyan
-+ keyword whole setpci cyan
- keyword whole setserial cyan
-+ keyword whole setsid cyan
-+ keyword whole setterm cyan
-+ keyword whole setvesablank cyan
-+ keyword whole setxkbmap cyan
-+ keyword whole sfdisk cyan
-+ keyword whole sftp cyan
-+ keyword whole sg cyan
- keyword whole sh cyan
-+ keyword whole sha1sum cyan
-+ keyword whole shadowconfig cyan
-+ keyword whole showcfont cyan
-+ keyword whole showkey cyan
-+ keyword whole showmount cyan
-+ keyword whole shred cyan
-+ keyword whole shutdown cyan
-+ keyword whole size cyan
-+ keyword whole skill cyan
-+ keyword whole slabtop cyan
-+ keyword whole slattach cyan
- keyword whole sleep cyan
-+ keyword whole slogin cyan
-+ keyword whole smime_keys cyan
-+ keyword whole snice cyan
-+ keyword whole soelim cyan
- keyword whole sort cyan
-+ keyword whole sa-learn cyan
-+ keyword whole spamassassin cyan
-+ keyword whole spamc cyan
-+ keyword whole spamd cyan
-+ keyword whole splain cyan
-+ keyword whole split cyan
-+ keyword whole ssh-add cyan
-+ keyword whole ssh-copy-id cyan
-+ keyword whole ssh-keygen cyan
-+ keyword whole ssh-keyscan cyan
-+ keyword whole ssmtp cyan
-+ keyword whole start-stop-daemon cyan
-+ keyword whole stat cyan
-+ keyword whole strace cyan
-+ keyword whole strings cyan
-+ keyword whole strip cyan
- keyword whole stty cyan
- keyword whole su cyan
-+ keyword whole sulogin cyan
-+ keyword whole sum cyan
-+ keyword whole superformat cyan
-+ keyword whole su-to-root cyan
-+ keyword whole svlc cyan
-+ keyword whole swapoff cyan
-+ keyword whole swapon cyan
- keyword whole sync cyan
-+ keyword whole sysctl cyan
-+ keyword whole syslogd cyan
-+ keyword whole syslogd-listfiles cyan
-+ keyword whole syslog-facility cyan
-+ keyword whole tac cyan
-+ keyword whole tack cyan
-+ keyword whole tail cyan
- keyword whole taper cyan
- keyword whole tar cyan
-+ keyword whole tbl cyan
-+ keyword whole tcpdchk cyan
-+ keyword whole tcpdump cyan
-+ keyword whole tclsh cyan
- keyword whole tcsh cyan
-+ keyword whole tdbox cyan
-+ keyword whole tdcheckserver cyan
-+ keyword whole tddebidate cyan
-+ keyword whole tdfileview cyan
-+ keyword whole tdfmlogstrip cyan
-+ keyword whole tdformail cyan
-+ keyword whole tdlinuxcounter cyan
-+ keyword whole tdlinuxlogo cyan
-+ keyword whole tdmailblacklist cyan
-+ keyword whole tdmailbody cyan
-+ keyword whole tdmailcopy cyan
-+ keyword whole tdmaildirmake cyan
-+ keyword whole tdmailsubject cyan
-+ keyword whole tdmailwhitelist cyan
-+ keyword whole tdnewmsg cyan
-+ keyword whole tdsysbackup cyan
-+ keyword whole tee cyan
-+ keyword whole telinit cyan
-+ keyword whole telnet cyan
- keyword whole test cyan
-+ keyword whole tempfile cyan
-+ keyword whole tic cyan
- keyword whole time cyan
-+ keyword whole tload cyan
-+ keyword whole tnef cyan
-+ keyword whole toe cyan
-+ keyword whole toolame cyan
-+ keyword whole top cyan
- keyword whole touch cyan
-+ keyword whole tput cyan
-+ keyword whole tr cyan
-+ keyword whole troff cyan
- keyword whole true cyan
-+ keyword whole tset cyan
-+ keyword whole tsort cyan
-+ keyword whole tty cyan
-+ keyword whole tunctl cyan
-+ keyword whole tune2fs cyan
-+ keyword whole tunelp cyan
-+ keyword whole tzconfig cyan
-+ keyword whole tzselect cyan
-+ keyword whole tzsetup cyan
-+ keyword whole ucf cyan
-+ keyword whole ul cyan
- keyword whole umount cyan
- keyword whole uname cyan
-+ keyword whole unarj cyan
-+ keyword whole uncompress cyan
-+ keyword whole unexpand cyan
-+ keyword whole unicode_start cyan
-+ keyword whole unicode_stop cyan
-+ keyword whole unix_chkpwd cyan
-+ keyword whole uniq cyan
-+ keyword whole unlink cyan
-+ keyword whole unzip cyan
-+ keyword whole unzipsfx cyan
-+ keyword whole updatedb cyan
-+ keyword whole update-menus cyan
-+ keyword whole update-modules cyan
-+ keyword whole update-pciids cyan
-+ keyword whole uprecords cyan
-+ keyword whole uptime cyan
-+ keyword whole urlview cyan
-+ keyword whole usbmodules cyan
-+ keyword whole uscan cyan
-+ keyword whole useradd cyan
- keyword whole userconf cyan
-+ keyword whole userdel cyan
-+ keyword whole usermod cyan
-+ keyword whole users cyan
- keyword whole usleep cyan
-+ keyword whole uufilter cyan
-+ keyword whole uuidgen cyan
-+ keyword whole vacuumdb cyan
-+ keyword whole validlocale cyan
-+ keyword whole vcstime cyan
-+ keyword whole vcut cyan
-+ keyword whole vdir cyan
- keyword whole vi cyan
-+ keyword whole vidmode cyan
- keyword whole view cyan
-+ keyword whole vigr cyan
- keyword whole vim cyan
-+ keyword whole vipw cyan
-+ keyword whole vlc cyan
-+ keyword whole vmstat cyan
-+ keyword whole volname cyan
-+ keyword whole vorbiscomment cyan
-+ keyword whole vt-is-UTF8 cyan
-+ keyword whole w cyan
-+ keyword whole wall cyan
-+ keyword whole watch cyan
-+ keyword whole wc cyan
-+ keyword whole wget cyan
-+ keyword whole whatis cyan
-+ keyword whole whereis cyan
-+ keyword whole which cyan
-+ keyword whole whiptail cyan
-+ keyword whole who cyan
-+ keyword whole whoami cyan
-+ keyword whole whois cyan
-+ keyword whole wish cyan
-+ keyword whole write cyan
-+ keyword whole writevt cyan
-+ keyword whole wvWare cyan
-+ keyword whole wxvlc cyan
-+ keyword whole xargs cyan
-+ keyword whole xbmbrowser cyan
-+ keyword whole xbindkeys cyan
- keyword whole xconf cyan
-+ keyword whole xdfcopy cyan
-+ keyword whole xdfformat cyan
-+ keyword whole Xdialog cyan
-+ keyword whole xgettext cyan
-+ keyword whole xloadimage cyan
-+ keyword whole xmessage cyan
-+ keyword whole xmodmap cyan
-+ keyword whole xmms cyan
-+ keyword whole xpmroot cyan
-+ keyword whole xrdb cyan
-+ keyword whole xset cyan
-+ keyword whole xsetbg cyan
-+ keyword whole xsetmode cyan
-+ keyword whole xsetpointer cyan
-+ keyword whole xsetroot cyan
-+ keyword whole xterm cyan
-+ keyword whole xview cyan
-+ keyword whole xwd cyan
-+ keyword whole xwud cyan
-+ keyword whole xzgv cyan
-+ keyword whole yes cyan
- keyword whole ypdomainname cyan
-+ keyword whole yydecode cyan
- keyword whole zcat cyan
-+ keyword whole zcmp cyan
-+ keyword whole zdiff cyan
-+ keyword whole zdump cyan
-+ keyword whole zegrep cyan
-+ keyword whole zfgrep cyan
-+ keyword whole zforce cyan
-+ keyword whole zgrep cyan
-+ keyword whole zgv cyan
-+ keyword whole zic cyan
-+ keyword whole zip cyan
-+ keyword whole zipcloak cyan
-+ keyword whole zipgrep cyan
-+ keyword whole zipinfo cyan
-+ keyword whole zipnote cyan
-+ keyword whole zipsplit cyan
-+ keyword whole zless cyan
-+ keyword whole zmore cyan
-+ keyword whole znew cyan
-+ keyword whole zoo cyan
- keyword whole zsh cyan
-+ keyword whole zsoelim cyan
-+ keyword whole zxpdf cyan
-+
-+ keyword whole pamcut cyan
-+ keyword whole pamdeinterlace cyan
-+ keyword whole pamdice cyan
-+ keyword whole pamfile cyan
-+ keyword whole pamoil cyan
-+ keyword whole pamstack cyan
-+ keyword whole pamstretch cyan
-+ keyword whole pamstretch-gen cyan
-+
-+ keyword whole pbmclean cyan
-+ keyword whole pbmlife cyan
-+ keyword whole pbmmake cyan
-+ keyword whole pbmmask cyan
-+ keyword whole pbmpage cyan
-+ keyword whole pbmpscale cyan
-+ keyword whole pbmreduce cyan
-+ keyword whole pbmtext cyan
-+ keyword whole pbmtextps cyan
-+ keyword whole pbmupc cyan
-+
-+ keyword whole pbmtoascii cyan
-+ keyword whole pbmtoepsi cyan
-+ keyword whole pbmtog3 cyan
-+ keyword whole pbmtoicon cyan
-+ keyword whole pbmtolj cyan
-+ keyword whole pbmtomacp cyan
-+ keyword whole pbmtonokia cyan
-+ keyword whole pbmtopgm cyan
-+ keyword whole pbmtoplot cyan
-+ keyword whole pbmtoppa cyan
-+ keyword whole pbmtopsg3 cyan
-+ keyword whole pbmtowbmp cyan
-+ keyword whole pbmtoxbm cyan
-+
-+ keyword whole g3topbm cyan
-+ keyword whole thinkjettopbm cyan
-+ keyword whole wbmptopbm cyan
-+ keyword whole xbmtopbm cyan
-+
-+ keyword whole pgmbentley cyan
-+ keyword whole pgmcrater cyan
-+ keyword whole pgmedge cyan
-+ keyword whole pgmenhance cyan
-+ keyword whole pgmhist cyan
-+ keyword whole pgmkernel cyan
-+ keyword whole pgmnoise cyan
-+ keyword whole pgmnorm cyan
-+ keyword whole pgmoil cyan
-+ keyword whole pgmramp cyan
-+ keyword whole pgmslice cyan
-+ keyword whole pgmtexture cyan
-+
-+ keyword whole pgmtopbm cyan
-+ keyword whole pgmtoppm cyan
-+
-+ keyword whole asciitopgm cyan
-+ keyword whole bioradtopgm cyan
-+ keyword whole icontopgm cyan
-+ keyword whole jpegtopgm cyan
-+ keyword whole macptopgm cyan
-+ keyword whole rawtopgm cyan
-+
-+ keyword whole pnmalias cyan
-+ keyword whole pnmarith cyan
-+ keyword whole pnmcat cyan
-+ keyword whole pnmcolormap cyan
-+ keyword whole pnmcomp cyan
-+ keyword whole pnmconvol cyan
-+ keyword whole pnmcrop cyan
-+ keyword whole pnmcut cyan
-+ keyword whole pnmdepth cyan
-+ keyword whole pnmenlarge cyan
-+ keyword whole pnmfile cyan
-+ keyword whole pnmflip cyan
-+ keyword whole pnmgamma cyan
-+ keyword whole pnmhisteq cyan
-+ keyword whole pnmhistmap cyan
-+ keyword whole pnmindex cyan
-+ keyword whole pnminterp cyan
-+ keyword whole pnminterp-gen cyan
-+ keyword whole pnminvert cyan
-+ keyword whole pnmmargin cyan
-+ keyword whole pnmmontage cyan
-+ keyword whole pnmnlfilt cyan
-+ keyword whole pnmnoraw cyan
-+ keyword whole pnmnorm cyan
-+ keyword whole pnmpad cyan
-+ keyword whole pnmpaste cyan
-+ keyword whole pnmpsnr cyan
-+ keyword whole pnmquant cyan
-+ keyword whole pnmremap cyan
-+ keyword whole pnmrotate cyan
-+ keyword whole pnmscale cyan
-+ keyword whole pnmscalefixed cyan
-+ keyword whole pnmshear cyan
-+ keyword whole pnmsmooth cyan
-+ keyword whole pnmsplit cyan
-+ keyword whole pnmtile cyan
-+
-+ keyword whole pnmtofits cyan
-+ keyword whole pnmtojpeg cyan
-+ keyword whole pnmtopalm cyan
-+ keyword whole pnmtoplainpnm cyan
-+ keyword whole pnmtopng cyan
-+ keyword whole pnmtops cyan
-+ keyword whole pnmtorle cyan
-+ keyword whole pnmtotiff cyan
-+ keyword whole pnmtoxwd cyan
-+
-+ keyword whole bpmtopnm cyan
-+ keyword whole giftopnm cyan
-+ keyword whole palmtopnm cyan
-+ keyword whole pngtopnm cyan
-+ keyword whole pstopnm cyan
-+ keyword whole rletopnm cyan
-+ keyword whole tifftopnm cyan
-+ keyword whole xwdtopnm cyan
-+
-+ keyword whole ppm3d cyan
-+ keyword whole ppmbrighten cyan
-+ keyword whole ppmchange cyan
-+ keyword whole ppmcie cyan
-+ keyword whole ppmcolormask cyan
-+ keyword whole ppmcolors cyan
-+ keyword whole ppmdim cyan
-+ keyword whole ppmdist cyan
-+ keyword whole ppmdither cyan
-+ keyword whole ppmfade cyan
-+ keyword whole ppmflash cyan
-+ keyword whole ppmforge cyan
-+ keyword whole ppmhist cyan
-+ keyword whole ppmlabel cyan
-+ keyword whole ppmmake cyan
-+ keyword whole ppmmix cyan
-+ keyword whole ppmnorm cyan
-+ keyword whole ppmntsc cyan
-+ keyword whole ppmpat cyan
-+ keyword whole ppmquant cyan
-+ keyword whole ppmquantall cyan
-+ keyword whole ppmqvgq cyan
-+ keyword whole ppmrainbow cyan
-+ keyword whole ppmrelief cyan
-+ keyword whole ppmshadow cyan
-+ keyword whole ppmshift cyan
-+ keyword whole ppmspread cyan
-+ keyword whole ppmtv cyan
-+
-+ keyword whole ppmtoacad cyan
-+ keyword whole ppmtobmp cyan
-+ keyword whole ppmtogif cyan
-+ keyword whole ppmtojpeg cyan
-+ keyword whole ppmtolj cyan
-+ keyword whole ppmtomap cyan
-+ keyword whole ppmtompeg cyan
-+ keyword whole ppmtopcx cyan
-+ keyword whole ppmtopgm cyan
-+ keyword whole ppmtorgb3 cyan
-+ keyword whole ppmtowinicon cyan
-+ keyword whole ppmtoxpm cyan
-+
-+ keyword whole bpmtoppm cyan
-+ keyword whole pcxtoppm cyan
-+ keyword whole pdftoppm cyan
-+ keyword whole pjtoppm cyan
-+ keyword whole rawtoppm cyan
-+ keyword whole rgb3toppm cyan
-+ keyword whole winicontoppm cyan
-+ keyword whole xpmtoppm cyan
-+ keyword whole xvminitoppm cyan
-+
-+ keyword whole gpg red
-+ keyword whole md5sum red
-+ keyword whole openssl red
-+ keyword whole ssh red
-+ keyword whole scp red
-+
-+ keyword whole gettext.sh magenta
-+ keyword whole TEXTDOMAINDIR magenta
-+ keyword whole TEXTDOMAIN magenta
-+ keyword whole VERSION magenta
-+
-+ keyword whole /dev/audio brightblue
-+ keyword whole /dev/dsp brightblue
-+ keyword whole /dev/null brightblue
-+ keyword whole /dev/mixed brightblue
-+ keyword whole /dev/stdin brightblue
-+ keyword whole /dev/stdout brightblue
-+ keyword whole /dev/stderr brightblue
-+ keyword whole /dev/zero brightblue
Deleted: trunk/debian/patches/22_main.c.patch
===================================================================
--- trunk/debian/patches/22_main.c.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/22_main.c.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,50 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/src/main.c mc-4.6.2~pre1.patched/src/main.c
---- mc-4.6.2~pre1/src/main.c 2006-09-22 17:14:58.000000000 +0200
-+++ mc-4.6.2~pre1/src/main.c 2008-01-25 00:20:36.000000000 +0100
-@@ -1601,21 +1601,43 @@
- }
- }
-
--/* Show current directory in the xterm title */
-+/* Show hostname and current directory in the xterm title */
- void
- update_xterm_title_path (void)
- {
- char *p, *s;
-+ char *pvp;
-+ size_t pvlen;
-+ int pvresult;
-
- if (xterm_flag && xterm_title) {
-+ //current path
- p = s = g_strdup (strip_home_and_password (current_panel->cwd));
-+ // hostname
-+ pvlen = strlen(p);
-+ pvp = g_malloc (pvlen + 64); //approach - max hostname length
-+ pvresult = gethostname(pvp, 63);
-+ if (pvresult) { // print just current path
-+ g_free (pvp);
-+ pvp = p;
-+ } else {
-+ s = pvp;
-+ do { // merge hostname with path
-+ if (!is_printable (*s))
-+ *s = '?';
-+ } while (*++s!=0x00);
-+ *s++=':';
-+ strcpy (s, p);
-+ g_free (p);
-+ }
- do {
- if (!is_printable ((unsigned char) *s))
- *s = '?';
- } while (*++s);
-- fprintf (stdout, "\33]0;mc - %s\7", p);
-+// fprintf (stdout, "\33]0;mc - %s\7", p);
-+ fprintf (stdout, "\33]0;mc - %s\7", pvp);
- fflush (stdout);
-- g_free (p);
-+ g_free (pvp);
- }
- }
-
Deleted: trunk/debian/patches/28_mc-ctype.patch
===================================================================
--- trunk/debian/patches/28_mc-ctype.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/28_mc-ctype.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,10 +0,0 @@
---- ./edit/editcmd.c.orig 2007-05-02 13:22:01.000000000 +0200
-+++ ./edit/editcmd.c 2008-01-25 07:44:38.000000000 +0100
-@@ -26,7 +26,6 @@
- #include <config.h>
-
- #include <assert.h>
--#include <ctype.h>
-
- #include <stdio.h>
- #include <stdarg.h>
Deleted: trunk/debian/patches/28_mc-dontrewrite.patch
===================================================================
--- trunk/debian/patches/28_mc-dontrewrite.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/28_mc-dontrewrite.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,12 +0,0 @@
-diff -Nurwd ./mc-4.6.2~pre1/edit/editcmd.c ./mc-4.6.2~pre1.patched/edit/editcmd.c
---- ./mc-4.6.2~pre1/edit/editcmd.c 2008-02-12 19:58:24.000000000 +0100
-+++ ./mc-4.6.2~pre1.patched/edit/editcmd.c 2008-02-12 19:57:11.000000000 +0100
-@@ -243,7 +243,7 @@
- this_save_mode = option_save_mode;
- if (this_save_mode != EDIT_QUICK_SAVE) {
- if (!vfs_file_is_local (filename) ||
-- (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) {
-+ (fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
- /*
- * The file does not exists yet, so no safe save or
- * backup are necessary.
Deleted: trunk/debian/patches/32_c-vs-cxx.patch
===================================================================
--- trunk/debian/patches/32_c-vs-cxx.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/32_c-vs-cxx.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,66 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/syntax/c.syntax mc-4.6.2~pre1.patched/syntax/c.syntax
---- mc-4.6.2~pre1/syntax/c.syntax 2006-06-22 14:49:24.000000000 +0200
-+++ mc-4.6.2~pre1/syntax/c.syntax 2008-01-25 08:19:52.000000000 +0100
-@@ -33,34 +33,7 @@
- keyword whole volatile yellow
- keyword whole while yellow
- keyword whole asm yellow
-- keyword whole catch yellow
-- keyword whole class yellow
-- keyword whole friend yellow
-- keyword whole delete yellow
- keyword whole inline yellow
-- keyword whole new yellow
-- keyword whole operator yellow
-- keyword whole private yellow
-- keyword whole protected yellow
-- keyword whole public yellow
-- keyword whole this yellow
-- keyword whole throw yellow
-- keyword whole template yellow
-- keyword whole try yellow
-- keyword whole virtual yellow
-- keyword whole bool yellow
-- keyword whole const_cast yellow
-- keyword whole dynamic_cast yellow
-- keyword whole explicit yellow
-- keyword whole false yellow
-- keyword whole mutable yellow
-- keyword whole namespace yellow
-- keyword whole reinterpret_cast yellow
-- keyword whole static_cast yellow
-- keyword whole true yellow
-- keyword whole typeid yellow
-- keyword whole typename yellow
-- keyword whole using yellow
- keyword whole wchar_t yellow
- keyword whole ... yellow
- keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
-diff -Nurwd mc-4.6.2~pre1/syntax/Makefile.am mc-4.6.2~pre1.patched/syntax/Makefile.am
---- mc-4.6.2~pre1/syntax/Makefile.am 2007-08-27 08:56:47.000000000 +0200
-+++ mc-4.6.2~pre1/syntax/Makefile.am 2008-01-25 08:19:52.000000000 +0100
-@@ -3,6 +3,7 @@
- ada95.syntax \
- aspx.syntax \
- assembler.syntax \
-+ cxx.syntax \
- c.syntax \
- changelog.syntax \
- cs.syntax \
-diff -Nurwd mc-4.6.2~pre1/syntax/Syntax mc-4.6.2~pre1.patched/syntax/Syntax
---- mc-4.6.2~pre1/syntax/Syntax 2007-08-27 08:56:47.000000000 +0200
-+++ mc-4.6.2~pre1/syntax/Syntax 2008-01-25 08:19:52.000000000 +0100
-@@ -76,9 +76,12 @@
- file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
- include texinfo.syntax
-
--file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
-+file ..\*\\.c$ C\sProgram
- include c.syntax
-
-+file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
-+include cxx.syntax
-+
- file ..\*\\.d$ D\sProgram
- include d.syntax
-
Deleted: trunk/debian/patches/45_ftpfs_symlink2.patch
===================================================================
--- trunk/debian/patches/45_ftpfs_symlink2.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/45_ftpfs_symlink2.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,32 +0,0 @@
---- vfs/direntry.c 22 Feb 2005 18:35:23 -0000 1.116
-+++ vfs/direntry.c 6 Apr 2005 14:04:54 -0000
-@@ -251,7 +251,13 @@ vfs_s_find_entry_tree (struct vfs_class
- char * const pathref = g_strdup (a_path);
- char *path = pathref;
-
-- canonicalize_pathname (path);
-+ if (strncmp(me->name, "ftpfs", 5) != 0)
-+ canonicalize_pathname (path);
-+ else {
-+ char *p = path + strlen (path) - 1;
-+ while (p > path && *p == PATH_SEP)
-+ *p-- = 0;
-+ }
-
- while (root) {
- while (*path == PATH_SEP) /* Strip leading '/' */
-@@ -324,7 +330,13 @@ vfs_s_find_entry_linear (struct vfs_clas
- if (root->super->root != root)
- vfs_die ("We have to use _real_ root. Always. Sorry.");
-
-- canonicalize_pathname (path);
-+ if (strncmp (me->name, "ftpfs", 5) != 0)
-+ canonicalize_pathname (path);
-+ else {
-+ char *p = path + strlen (path) - 1;
-+ while (p > path && *p == PATH_SEP)
-+ *p-- = 0;
-+ }
-
- if (!(flags & FL_DIR)) {
- char *dirname, *name, *save;
Deleted: trunk/debian/patches/47_mc.menu.patch
===================================================================
--- trunk/debian/patches/47_mc.menu.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/47_mc.menu.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,32 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1/lib/mc.menu mc-4.6.2~pre1.patched/lib/mc.menu
---- mc-4.6.2~pre1/lib/mc.menu 2005-09-06 08:01:07.000000000 +0200
-+++ mc-4.6.2~pre1.patched/lib/mc.menu 2008-01-25 10:06:19.000000000 +0100
-@@ -15,7 +15,7 @@
-
- 0 Edit a bug report and send it to root
- I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
-- ${EDITOR-vi} $I
-+ ${EDITOR-editor} $I
- test -r $I && mail root < $I
- rm -f $I
-
-@@ -330,3 +330,7 @@
- o Open next a free console
- open -s -- sh
-
-+=+ f \.dsc$ & t r
-+x Extract the contents of a Debian source package
-+ dpkg-source -x %f
-+
-diff -Nurwd mc-4.6.2~pre1/src/util.h mc-4.6.2~pre1.patched/src/util.h
---- mc-4.6.2~pre1/src/util.h 2006-02-03 18:04:17.000000000 +0100
-+++ mc-4.6.2~pre1.patched/src/util.h 2008-01-25 10:06:19.000000000 +0100
-@@ -222,7 +222,7 @@
- #define PATH_ENV_SEP ':'
- #define TMPDIR_DEFAULT "/tmp"
- #define SCRIPT_SUFFIX ""
--#define get_default_editor() "vi"
-+#define get_default_editor() "editor"
- #define OS_SORT_CASE_SENSITIVE_DEFAULT 1
- #define STRCOMP strcmp
- #define STRNCOMP strncmp
Deleted: trunk/debian/patches/48_utf8-slang2.patch
===================================================================
--- trunk/debian/patches/48_utf8-slang2.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/48_utf8-slang2.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,5360 +0,0 @@
---- mc-4.6.2-pre1/acinclude.m4
-+++ mc-4.6.2-pre1/acinclude.m4
-@@ -399,14 +399,14 @@
- fi
-
- 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 test x$with_screen = xslang; then
- AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
---- mc-4.6.2-pre1/edit/edit-widget.h
-+++ mc-4.6.2-pre1/edit/edit-widget.h
-@@ -30,6 +30,11 @@
- long command;
- } edit_key_map_type;
-
-+struct action {
-+ mc_wchar_t ch;
-+ long flags;
-+};
-+
- struct WEdit {
- Widget widget;
-
-@@ -42,8 +47,17 @@
- /* dynamic buffers and cursor position for editor: */
- long curs1; /* position of the cursor from the beginning of the file. */
- long curs2; /* position from the end of the file */
-+#ifndef UTF8
- unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
- unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
-+#else /* UTF8 */
-+ mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
-+ mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
-+
-+ unsigned char charbuf[MB_LEN_MAX];
-+ int charpoint;
-+#endif /* UTF8 */
-+
-
- /* search variables */
- long search_start; /* First character to start searching from */
-@@ -87,7 +101,7 @@
-
- /* undo stack and pointers */
- unsigned long stack_pointer;
-- long *undo_stack;
-+ struct action *undo_stack;
- unsigned long stack_size;
- unsigned long stack_size_mask;
- unsigned long stack_bottom;
---- mc-4.6.2-pre1/edit/edit.c
-+++ mc-4.6.2-pre1/edit/edit.c
-@@ -102,7 +102,11 @@
-
- static void user_menu (WEdit *edit);
-
-+#ifndef UTF8
- int edit_get_byte (WEdit * edit, long byte_index)
-+#else
-+mc_wchar_t edit_get_byte (WEdit * edit, long byte_index)
-+#endif
- {
- unsigned long p;
- if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
-@@ -131,7 +135,7 @@
-
- edit->curs1 = 0;
- edit->curs2 = 0;
-- edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- }
-
- /*
-@@ -156,7 +160,7 @@
- }
-
- if (!edit->buffers2[buf2])
-- edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
-
- mc_read (file,
- (char *) edit->buffers2[buf2] + EDIT_BUF_SIZE -
-@@ -166,7 +170,7 @@
- for (buf = buf2 - 1; buf >= 0; buf--) {
- /* edit->buffers2[0] is already allocated */
- if (!edit->buffers2[buf])
-- edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- mc_read (file, (char *) edit->buffers2[buf], EDIT_BUF_SIZE);
- }
-
-@@ -239,9 +243,44 @@
- {
- int c;
- long i = 0;
-- while ((c = fgetc (f)) >= 0) {
-+#ifndef UTF8
-+ while ((c = fgetc (f)) != EOF) {
- edit_insert (edit, c);
- i++;
-+#else /* UTF8 */
-+ unsigned char buf[MB_LEN_MAX];
-+ int charpos = 0;
-+ mbstate_t mbs;
-+
-+ while ((c = fgetc (f)) != EOF) {
-+ mc_wchar_t wc;
-+ int size;
-+ int j;
-+
-+ buf[charpos++] = c;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+ size = mbrtowc(&wc, (char *)buf, charpos, &mbs);
-+
-+ if (size == -2)
-+ continue; /* incomplete */
-+
-+ else if (size >= 0) {
-+ edit_insert (edit, wc);
-+ i++;
-+ charpos = 0;
-+ continue;
-+ }
-+ else {
-+
-+ /* invalid */
-+#ifdef __STDC_ISO_10646__
-+ for (j=0; j<charpos; j++)
-+ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[j]);
-+#endif
-+ charpos = 0;
-+ }
-+#endif /* UTF8 */
- }
- return i;
- }
-@@ -249,9 +288,32 @@
- long edit_write_stream (WEdit * edit, FILE * f)
- {
- long i;
-+#ifndef UTF8
- for (i = 0; i < edit->last_byte; i++)
- if (fputc (edit_get_byte (edit, i), f) < 0)
- break;
-+#else /* UTF8 */
-+ for (i = 0; i < edit->last_byte; i++) {
-+ mc_wchar_t wc = edit_get_byte (edit, i);
-+ int res;
-+ char tmpbuf[MB_LEN_MAX];
-+ mbstate_t mbs;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+
-+#ifdef __STDC_ISO_10646__
-+ if (wc >= BINARY_CHAR_OFFSET && wc < (BINARY_CHAR_OFFSET + 256)) {
-+ res = 1;
-+ tmpbuf[0] = (char) (wc - BINARY_CHAR_OFFSET);
-+ } else
-+#endif
-+ res = wcrtomb(tmpbuf, wc, &mbs);
-+ if (res > 0) {
-+ if (fwrite(tmpbuf, res, 1, f) != 1)
-+ break;
-+ }
-+ }
-+#endif /* UTF8 */
- return i;
- }
-
-@@ -290,12 +352,46 @@
- int i, file, blocklen;
- long current = edit->curs1;
- unsigned char *buf;
-+#ifdef UTF8
-+ mbstate_t mbs;
-+ int bufstart = 0;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+#endif /* UTF8 */
- if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1)
- return 0;
- buf = g_malloc (TEMP_BUF_LEN);
-+#ifndef UTF8
- while ((blocklen = mc_read (file, (char *) buf, TEMP_BUF_LEN)) > 0) {
- for (i = 0; i < blocklen; i++)
- edit_insert (edit, buf[i]);
-+#else /* UTF8 */
-+ while ((blocklen = mc_read (file, (char *) buf + bufstart, TEMP_BUF_LEN - bufstart)) > 0) {
-+ blocklen += bufstart;
-+ bufstart = 0;
-+ for (i = 0; i < blocklen; ) {
-+ mc_wchar_t wc;
-+ int j;
-+ int size = mbrtowc(&wc, (char *)buf + i, blocklen - i, &mbs);
-+ if (size == -2) { /*incomplete char*/
-+ bufstart = blocklen - i;
-+ memcpy(buf, buf+i, bufstart);
-+ i = blocklen;
-+ memset (&mbs, 0, sizeof (mbs));
-+ }
-+ else if (size <= 0) {
-+#ifdef __STDC_ISO_10646__
-+ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[i]);
-+#endif
-+ memset (&mbs, 0, sizeof (mbs));
-+ i++; /* skip broken char */
-+ }
-+ else {
-+ edit_insert (edit, wc);
-+ i+=size;
-+ }
-+ }
-+#endif /* UTF8 */
- }
- edit_cursor_move (edit, current - edit->curs1);
- g_free (buf);
-@@ -385,7 +481,11 @@
- static int
- edit_load_file (WEdit *edit)
- {
-+#ifndef UTF8
- int fast_load = 1;
-+#else /* UTF8 */
-+ int fast_load = 0; /* can't be used with multibyte characters */
-+#endif /* UTF8 */
-
- /* Cannot do fast load if a filter is used */
- if (edit_find_filter (edit->filename) >= 0)
-@@ -451,6 +551,7 @@
- edit->prev_col = column;
- edit_move_to_prev_col (edit, edit_bol (edit, edit->curs1));
- edit_move_display (edit, line - (edit->num_widget_lines / 2));
-+ edit->charpoint = 0;
- }
-
- /* Save cursor position in the file */
-@@ -534,7 +635,7 @@
- edit_set_filename (edit, filename);
- edit->stack_size = START_STACK_SIZE;
- edit->stack_size_mask = START_STACK_SIZE - 1;
-- edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (long));
-+ edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (struct action));
- if (edit_load_file (edit)) {
- /* edit_load_file already gives an error message */
- if (to_free)
-@@ -689,14 +790,23 @@
- {
- unsigned long sp = edit->stack_pointer;
- unsigned long spm1;
-- long *t;
-+
-+ struct action *t;
-+ mc_wchar_t ch = 0;
-+
-+ if (c == CHAR_INSERT || c == CHAR_INSERT_AHEAD) {
-+ va_list ap;
-+ va_start (ap, c);
-+ ch = va_arg (ap, mc_wint_t);
-+ va_end (ap);
-+ }
-
- /* first enlarge the stack if necessary */
- if (sp > edit->stack_size - 10) { /* say */
- if (option_max_undo < 256)
- option_max_undo = 256;
- if (edit->stack_size < (unsigned long) option_max_undo) {
-- t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (long));
-+ t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (struct action));
- if (t) {
- edit->undo_stack = t;
- edit->stack_size <<= 1;
-@@ -711,7 +821,7 @@
- #ifdef FAST_MOVE_CURSOR
- if (c == CURS_LEFT_LOTS || c == CURS_RIGHT_LOTS) {
- va_list ap;
-- edit->undo_stack[sp] = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
-+ edit->undo_stack[sp].flags = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
- edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
- va_start (ap, c);
- c = -(va_arg (ap, int));
-@@ -722,12 +832,14 @@
- && spm1 != edit->stack_bottom
- && ((sp - 2) & edit->stack_size_mask) != edit->stack_bottom) {
- int d;
-- if (edit->undo_stack[spm1] < 0) {
-- d = edit->undo_stack[(sp - 2) & edit->stack_size_mask];
-- if (d == c) {
-- if (edit->undo_stack[spm1] > -1000000000) {
-+ mc_wchar_t d_ch;
-+ if (edit->undo_stack[spm1].flags < 0) {
-+ d = edit->undo_stack[(sp - 2) & edit->stack_size_mask].flags;
-+ d_ch = edit->undo_stack[(sp - 2) & edit->stack_size_mask].ch;
-+ if (d == c && d_ch == ch) {
-+ if (edit->undo_stack[spm1].flags > -1000000000) {
- if (c < KEY_PRESS) /* --> no need to push multiple do-nothings */
-- edit->undo_stack[spm1]--;
-+ edit->undo_stack[spm1].flags--;
- return;
- }
- }
-@@ -735,19 +847,20 @@
- #ifndef NO_STACK_CURSMOVE_ANIHILATION
- else if ((c == CURS_LEFT && d == CURS_RIGHT)
- || (c == CURS_RIGHT && d == CURS_LEFT)) { /* a left then a right anihilate each other */
-- if (edit->undo_stack[spm1] == -2)
-+ if (edit->undo_stack[spm1].flags == -2)
- edit->stack_pointer = spm1;
- else
-- edit->undo_stack[spm1]++;
-+ edit->undo_stack[spm1].flags++;
- return;
- }
- #endif
- } else {
-- d = edit->undo_stack[spm1];
-- if (d == c) {
-+ d = edit->undo_stack[spm1].flags;
-+ d_ch = edit->undo_stack[spm1].ch;
-+ if (d == c && d_ch == ch) {
- if (c >= KEY_PRESS)
- return; /* --> no need to push multiple do-nothings */
-- edit->undo_stack[sp] = -2;
-+ edit->undo_stack[sp].flags = -2;
- goto check_bottom;
- }
- #ifndef NO_STACK_CURSMOVE_ANIHILATION
-@@ -759,7 +872,9 @@
- #endif
- }
- }
-- edit->undo_stack[sp] = c;
-+ edit->undo_stack[sp].flags = c;
-+ edit->undo_stack[sp].ch = ch;
-+
- check_bottom:
-
- edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
-@@ -772,10 +887,10 @@
- (((unsigned long) c + 1) & edit->stack_size_mask) == edit->stack_bottom)
- do {
- edit->stack_bottom = (edit->stack_bottom + 1) & edit->stack_size_mask;
-- } while (edit->undo_stack[edit->stack_bottom] < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
-+ } while (edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
-
- /*If a single key produced enough pushes to wrap all the way round then we would notice that the [stack_bottom] does not contain KEY_PRESS. The stack is then initialised: */
-- if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom] < KEY_PRESS)
-+ if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS)
- edit->stack_bottom = edit->stack_pointer = 0;
- }
-
-@@ -784,30 +899,30 @@
- then the file should be as it was when he loaded up. Then set edit->modified to 0.
- */
- static long
--pop_action (WEdit * edit)
-+pop_action (WEdit * edit, struct action *c)
- {
-- long c;
- unsigned long sp = edit->stack_pointer;
- if (sp == edit->stack_bottom) {
-- return STACK_BOTTOM;
-+ c->flags = STACK_BOTTOM;
-+ return c->flags;
- }
- sp = (sp - 1) & edit->stack_size_mask;
-- if ((c = edit->undo_stack[sp]) >= 0) {
--/* edit->undo_stack[sp] = '@'; */
-+ *c = edit->undo_stack[sp];
-+ if (edit->undo_stack[sp].flags >= 0) {
- edit->stack_pointer = (edit->stack_pointer - 1) & edit->stack_size_mask;
-- return c;
-+ return c->flags;
- }
- if (sp == edit->stack_bottom) {
- return STACK_BOTTOM;
- }
-- c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
-- if (edit->undo_stack[sp] == -2) {
--/* edit->undo_stack[sp] = '@'; */
-+ *c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
-+
-+ if (edit->undo_stack[sp].flags == -2) {
- edit->stack_pointer = sp;
- } else
-- edit->undo_stack[sp]++;
-+ edit->undo_stack[sp].flags++;
-
-- return c;
-+ return c->flags;
- }
-
- /* is called whenever a modification is made by one of the four routines below */
-@@ -828,7 +943,7 @@
- */
-
- void
--edit_insert (WEdit *edit, int c)
-+edit_insert (WEdit *edit, mc_wchar_t c)
- {
- /* check if file has grown to large */
- if (edit->last_byte >= SIZE_LIMIT)
-@@ -866,12 +981,11 @@
- /* add a new buffer if we've reached the end of the last one */
- if (!(edit->curs1 & M_EDIT_BUF_SIZE))
- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] =
-- g_malloc (EDIT_BUF_SIZE);
-+ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
-
- /* perform the insertion */
-- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->
-- curs1 & M_EDIT_BUF_SIZE]
-- = (unsigned char) c;
-+ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE]
-+ [edit->curs1 & M_EDIT_BUF_SIZE] = c;
-
- /* update file length */
- edit->last_byte++;
-@@ -882,7 +996,7 @@
-
-
- /* same as edit_insert and move left */
--void edit_insert_ahead (WEdit * edit, int c)
-+void edit_insert_ahead (WEdit * edit, mc_wchar_t c)
- {
- if (edit->last_byte >= SIZE_LIMIT)
- return;
-@@ -905,7 +1019,7 @@
- edit->last_get_rule += (edit->last_get_rule >= edit->curs1);
-
- if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
-- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
-
- edit->last_byte++;
-@@ -915,7 +1029,7 @@
-
- int edit_delete (WEdit * edit)
- {
-- int p;
-+ mc_wint_t p;
- if (!edit->curs2)
- return 0;
-
-@@ -939,7 +1053,7 @@
- edit->total_lines--;
- edit->force |= REDRAW_AFTER_CURSOR;
- }
-- edit_push_action (edit, p + 256);
-+ edit_push_action (edit, CHAR_INSERT_AHEAD, p);
- if (edit->curs1 < edit->start_display) {
- edit->start_display--;
- if (p == '\n')
-@@ -953,7 +1067,7 @@
- static int
- edit_backspace (WEdit * edit)
- {
-- int p;
-+ mc_wint_t p;
- if (!edit->curs1)
- return 0;
-
-@@ -977,7 +1091,7 @@
- edit->total_lines--;
- edit->force |= REDRAW_AFTER_CURSOR;
- }
-- edit_push_action (edit, p);
-+ edit_push_action (edit, CHAR_INSERT, p);
-
- if (edit->curs1 < edit->start_display) {
- edit->start_display--;
-@@ -990,10 +1104,18 @@
-
- #ifdef FAST_MOVE_CURSOR
-
--static void memqcpy (WEdit * edit, unsigned char *dest, unsigned char *src, int n)
-+static void memqcpy (WEdit * edit, mc_wchar_t *dest, mc_wchar_t *src, int n)
- {
- unsigned long next;
-+#ifndef UTF8
- while ((next = (unsigned long) memccpy (dest, src, '\n', n))) {
-+#else /* UTF8 */
-+ while (n) {
-+ next = 0;
-+ while (next < n && src[next]!='\n') next++;
-+ if (next < n) next++;
-+ wmemcpy (dest, src, next)
-+#endif /* UTF8 */
- edit->curs_line--;
- next -= (unsigned long) dest;
- n -= next;
-@@ -1006,7 +1128,7 @@
- edit_move_backward_lots (WEdit *edit, long increment)
- {
- int r, s, t;
-- unsigned char *p;
-+ mc_wchar_t *p;
-
- if (increment > edit->curs1)
- increment = edit->curs1;
-@@ -1046,7 +1168,7 @@
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
- else
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
-- g_malloc (EDIT_BUF_SIZE);
-+ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- } else {
- g_free (p);
- }
-@@ -1084,7 +1206,7 @@
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
- else
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
-- g_malloc (EDIT_BUF_SIZE);
-+ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- } else {
- g_free (p);
- }
-@@ -1116,7 +1238,7 @@
-
- c = edit_get_byte (edit, edit->curs1 - 1);
- if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
-- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
- edit->curs2++;
- c = edit->buffers1[(edit->curs1 - 1) >> S_EDIT_BUF_SIZE][(edit->curs1 - 1) & M_EDIT_BUF_SIZE];
-@@ -1141,7 +1263,7 @@
-
- c = edit_get_byte (edit, edit->curs1);
- if (!(edit->curs1 & M_EDIT_BUF_SIZE))
-- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
-+ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->curs1 & M_EDIT_BUF_SIZE] = c;
- edit->curs1++;
- c = edit->buffers2[(edit->curs2 - 1) >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - ((edit->curs2 - 1) & M_EDIT_BUF_SIZE) - 1];
-@@ -1248,7 +1370,7 @@
- q = edit->last_byte + 2;
-
- for (col = 0, p = current; p < q; p++) {
-- int c;
-+ mc_wchar_t c;
- if (cols != -10) {
- if (col == cols)
- return p;
-@@ -1266,7 +1388,7 @@
- } else if (c < 32 || c == 127)
- col += 2; /* Caret notation for control characters */
- else
-- col++;
-+ col += wcwidth(c);
- }
- return col;
- }
-@@ -1399,12 +1521,16 @@
- is_blank (WEdit *edit, long offset)
- {
- long s, f;
-- int c;
-+ mc_wchar_t c;
- s = edit_bol (edit, offset);
- f = edit_eol (edit, offset) - 1;
- while (s <= f) {
- c = edit_get_byte (edit, s++);
-+#ifndef UTF8
- if (!isspace (c))
-+#else
-+ if (!iswspace (c))
-+#endif /* UTF8 */
- return 0;
- }
- return 1;
-@@ -1659,6 +1785,7 @@
- return 2;
- return 0x80000000UL;
- }
-+#ifndef UTF8
- if (isupper (c))
- c = 'A';
- else if (islower (c))
-@@ -1669,6 +1796,18 @@
- c = '0';
- else if (isspace (c))
- c = ' ';
-+#else
-+ if (iswupper (c))
-+ c = 'A';
-+ else if (iswlower (c))
-+ c = 'a';
-+ else if (iswalpha (c))
-+ c = 'a';
-+ else if (iswdigit (c))
-+ c = '0';
-+ else if (iswspace (c))
-+ c = ' ';
-+#endif /* UTF8 */
- q = strchr (option_chars_move_whole_word, c);
- if (!q)
- return 0xFFFFFFFFUL;
-@@ -1693,10 +1832,18 @@
- c2 = edit_get_byte (edit, edit->curs1);
- if (!(my_type_of (c1) & my_type_of (c2)))
- break;
-+#ifndef UTF8
- if (isspace (c1) && !isspace (c2))
-+#else
-+ if (iswspace (c1) && !iswspace (c2))
-+#endif /* UTF8 */
- break;
- if (s)
-+#ifndef UTF8
- if (!isspace (c1) && isspace (c2))
-+#else
-+ if (!iswspace (c1) && iswspace (c2))
-+#endif /* UTF8 */
- break;
- }
- }
-@@ -1719,10 +1866,18 @@
- c2 = edit_get_byte (edit, edit->curs1);
- if (!(my_type_of (c1) & my_type_of (c2)))
- break;
-+#ifndef UTF8
- if (isspace (c1) && !isspace (c2))
-+#else
-+ if (iswspace (c1) && !iswspace (c2))
-+#endif /* UTF8 */
- break;
- if (s)
-+#ifndef UTF8
- if (!isspace (c1) && isspace (c2))
-+#else
-+ if (!iswspace (c1) && iswspace (c2))
-+#endif /* UTF8 */
- break;
- }
- }
-@@ -1742,7 +1897,11 @@
- break;
- c1 = edit_delete (edit);
- c2 = edit_get_byte (edit, edit->curs1);
-+#ifndef UTF8
- if ((isspace (c1) == 0) != (isspace (c2) == 0))
-+#else
-+ if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
-+#endif /* UTF8 */
- break;
- if (!(my_type_of (c1) & my_type_of (c2)))
- break;
-@@ -1757,7 +1916,11 @@
- break;
- c1 = edit_backspace (edit);
- c2 = edit_get_byte (edit, edit->curs1 - 1);
-+#ifndef UTF8
- if ((isspace (c1) == 0) != (isspace (c2) == 0))
-+#else
-+ if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
-+#endif /* UTF8 */
- break;
- if (!(my_type_of (c1) & my_type_of (c2)))
- break;
-@@ -1771,13 +1934,13 @@
- static void
- edit_do_undo (WEdit * edit)
- {
-- long ac;
-+ struct action ac;
- long count = 0;
-
- edit->stack_disable = 1; /* don't record undo's onto undo stack! */
-
-- while ((ac = pop_action (edit)) < KEY_PRESS) {
-- switch ((int) ac) {
-+ while (pop_action (edit, &ac) < KEY_PRESS) {
-+ switch ((int) ac.flags) {
- case STACK_BOTTOM:
- goto done_undo;
- case CURS_RIGHT:
-@@ -1798,31 +1961,33 @@
- case COLUMN_OFF:
- column_highlighting = 0;
- break;
-+ case CHAR_INSERT:
-+ edit_insert (edit, ac.ch);
-+ break;
-+ case CHAR_INSERT_AHEAD:
-+ edit_insert_ahead (edit, ac.ch);
-+ break;
- }
-- if (ac >= 256 && ac < 512)
-- edit_insert_ahead (edit, ac - 256);
-- if (ac >= 0 && ac < 256)
-- edit_insert (edit, ac);
-
-- if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) {
-- edit->mark1 = ac - MARK_1;
-+ if (ac.flags >= MARK_1 - 2 && ac.flags < MARK_2 - 2) {
-+ edit->mark1 = ac.flags - MARK_1;
- edit->column1 = edit_move_forward3 (edit, edit_bol (edit, edit->mark1), 0, edit->mark1);
-- } else if (ac >= MARK_2 - 2 && ac < KEY_PRESS) {
-- edit->mark2 = ac - MARK_2;
-+ } else if (ac.flags >= MARK_2 - 2 && ac.flags < KEY_PRESS) {
-+ edit->mark2 = ac.flags - MARK_2;
- edit->column2 = edit_move_forward3 (edit, edit_bol (edit, edit->mark2), 0, edit->mark2);
- }
- if (count++)
- edit->force |= REDRAW_PAGE; /* more than one pop usually means something big */
- }
-
-- if (edit->start_display > ac - KEY_PRESS) {
-- edit->start_line -= edit_count_lines (edit, ac - KEY_PRESS, edit->start_display);
-+ if (edit->start_display > ac.flags - KEY_PRESS) {
-+ edit->start_line -= edit_count_lines (edit, ac.flags - KEY_PRESS, edit->start_display);
- edit->force |= REDRAW_PAGE;
-- } else if (edit->start_display < ac - KEY_PRESS) {
-- edit->start_line += edit_count_lines (edit, edit->start_display, ac - KEY_PRESS);
-+ } else if (edit->start_display < ac.flags - KEY_PRESS) {
-+ edit->start_line += edit_count_lines (edit, edit->start_display, ac.flags - KEY_PRESS);
- edit->force |= REDRAW_PAGE;
- }
-- edit->start_display = ac - KEY_PRESS; /* see push and pop above */
-+ edit->start_display = ac.flags - KEY_PRESS; /* see push and pop above */
- edit_update_curs_row (edit);
-
- done_undo:;
-@@ -2102,7 +2267,7 @@
- * passed as -1. Commands are executed, and char_for_insertion is
- * inserted at the cursor.
- */
--void edit_execute_key_command (WEdit *edit, int command, int char_for_insertion)
-+void edit_execute_key_command (WEdit *edit, int command, mc_wint_t char_for_insertion)
- {
- if (command == CK_Begin_Record_Macro) {
- edit->macro_i = 0;
-@@ -2137,7 +2302,7 @@
- all of them. It also does not check for the Undo command.
- */
- void
--edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
-+edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion)
- {
- edit->force |= REDRAW_LINE;
-
-@@ -2170,7 +2335,7 @@
- }
-
- /* An ordinary key press */
-- if (char_for_insertion >= 0) {
-+ if (char_for_insertion != (mc_wint_t) -1) {
- if (edit->overwrite) {
- if (edit_get_byte (edit, edit->curs1) != '\n')
- edit_delete (edit);
---- mc-4.6.2-pre1/edit/edit.h
-+++ mc-4.6.2-pre1/edit/edit.h
-@@ -25,6 +25,27 @@
-
- #include <stdio.h>
-
-+#include "src/tty.h"
-+
-+#ifdef UTF8
-+#include <wchar.h>
-+#include <wctype.h>
-+
-+#define mc_wchar_t wchar_t
-+#define mc_wint_t wint_t
-+
-+#else
-+
-+#define mc_wchar_t unsigned char
-+#define mc_wint_t int
-+
-+#endif
-+
-+
-+/* unicode private use area */
-+#define BINARY_CHAR_OFFSET 0xFFE00
-+
-+
- #define N_menus 5
-
- #define SEARCH_DIALOG_OPTION_NO_SCANF (1 << 0)
-@@ -86,6 +107,8 @@
- #define START_STACK_SIZE 32
-
- /* Some codes that may be pushed onto or returned from the undo stack */
-+#define CHAR_INSERT 65
-+#define CHAR_INSERT_AHEAD 66
- #define CURS_LEFT 601
- #define CURS_RIGHT 602
- #define DELCHAR 603
-@@ -105,7 +128,7 @@
-
- struct macro {
- short command;
-- short ch;
-+ mc_wchar_t ch;
- };
-
- struct WEdit;
-@@ -120,8 +143,12 @@
- void menu_save_mode_cmd (void);
- int edit_raw_key_query (const char *heading, const char *query, int cancel);
- int edit_file (const char *_file, int line);
--int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch);
-+int edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch);
-+#ifndef UTF8
- int edit_get_byte (WEdit * edit, long byte_index);
-+#else /* UTF8 */
-+mc_wchar_t edit_get_byte (WEdit * edit, long byte_index);
-+#endif /* UTF8 */
- int edit_count_lines (WEdit * edit, long current, int upto);
- long edit_move_forward (WEdit * edit, long current, int lines, long upto);
- long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
-@@ -148,11 +175,11 @@
- void edit_delete_line (WEdit * edit);
-
- int edit_delete (WEdit * edit);
--void edit_insert (WEdit * edit, int c);
-+void edit_insert (WEdit * edit, mc_wchar_t c);
- int edit_cursor_move (WEdit * edit, long increment);
- void edit_push_action (WEdit * edit, long c, ...);
- void edit_push_key_press (WEdit * edit);
--void edit_insert_ahead (WEdit * edit, int c);
-+void edit_insert_ahead (WEdit * edit, mc_wchar_t c);
- long edit_write_stream (WEdit * edit, FILE * f);
- char *edit_get_write_filter (const char *writename, const char *filename);
- int edit_save_confirm_cmd (WEdit * edit);
-@@ -183,7 +210,7 @@
- int eval_marks (WEdit * edit, long *start_mark, long *end_mark);
- void edit_status (WEdit * edit);
- void edit_execute_key_command (WEdit *edit, int command,
-- int char_for_insertion);
-+ mc_wint_t char_for_insertion);
- void edit_update_screen (WEdit * edit);
- int edit_print_string (WEdit * e, const char *s);
- void edit_move_to_line (WEdit * e, long line);
-@@ -233,7 +260,7 @@
- void format_paragraph (WEdit *edit, int force);
-
- /* either command or char_for_insertion must be passed as -1 */
--void edit_execute_cmd (WEdit *edit, int command, int char_for_insertion);
-+void edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion);
-
- #define get_sys_error(s) (s)
-
---- mc-4.6.2-pre1/edit/editcmd.c
-+++ mc-4.6.2-pre1/edit/editcmd.c
-@@ -61,7 +61,7 @@
- #define edit_get_save_file(f,h) input_expand_dialog (h, _(" Enter file name: "), f)
-
- struct selection {
-- unsigned char * text;
-+ mc_wchar_t *text;
- int len;
- };
-
-@@ -84,12 +84,16 @@
- #define MAX_REPL_LEN 1024
-
- static int edit_save_cmd (WEdit *edit);
--static unsigned char *edit_get_block (WEdit *edit, long start,
-+static mc_wchar_t *edit_get_block (WEdit *edit, long start,
- long finish, int *l);
-
--static inline int my_lower_case (int c)
-+static inline mc_wchar_t my_lower_case (mc_wchar_t c)
- {
-+#ifndef UTF8
- return tolower(c & 0xFF);
-+#else
-+ return towlower(c);
-+#endif
- }
-
- static const char *
-@@ -124,11 +128,11 @@
- #endif /* !HAVE_MEMMOVE */
-
- /* #define itoa MY_itoa <---- this line is now in edit.h */
--static char *
-+static mc_wchar_t *
- MY_itoa (int i)
- {
-- static char t[14];
-- char *s = t + 13;
-+ static mc_wchar_t t[14];
-+ mc_wchar_t *s = t + 13;
- int j = i;
- *s-- = 0;
- do {
-@@ -213,6 +217,48 @@
- doupdate();
- }
-
-+#ifdef UTF8
-+
-+static size_t
-+wchar_write(int fd, mc_wchar_t *buf, size_t len)
-+{
-+ char *tmpbuf = g_malloc(len + MB_LEN_MAX);
-+ mbstate_t mbs;
-+ size_t i;
-+ size_t outlen = 0;
-+ size_t res;
-+
-+ for (i = 0; i < len; i++) {
-+ if (outlen >= len) {
-+ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
-+ g_free(tmpbuf);
-+ return -1;
-+ }
-+ outlen = 0;
-+ }
-+ memset (&mbs, 0, sizeof (mbs));
-+#ifdef __STDC_ISO_10646__
-+ if (buf[i] >= BINARY_CHAR_OFFSET && buf[i] < (BINARY_CHAR_OFFSET + 256)) {
-+ res = 1;
-+ tmpbuf[outlen] = (char) (buf[i] - BINARY_CHAR_OFFSET);
-+
-+ } else
-+#endif
-+ res = wcrtomb(tmpbuf + outlen, buf[i], &mbs);
-+ if (res > 0) {
-+ outlen += res;
-+ }
-+ }
-+ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
-+ g_free(tmpbuf);
-+ return -1;
-+ }
-+ g_free(tmpbuf);
-+ return len;
-+}
-+
-+#endif /* UTF8 */
-+
- /* If 0 (quick save) then a) create/truncate <filename> file,
- b) save to <filename>;
- if 1 (safe save) then a) save to <tempnam>,
-@@ -360,32 +406,48 @@
- buf = 0;
- filelen = edit->last_byte;
- while (buf <= (edit->curs1 >> S_EDIT_BUF_SIZE) - 1) {
-+#ifndef UTF8
- if (mc_write (fd, (char *) edit->buffers1[buf], EDIT_BUF_SIZE)
-+#else /* UTF8 */
-+ if (wchar_write (fd, edit->buffers1[buf], EDIT_BUF_SIZE)
-+#endif /* UTF8 */
- != EDIT_BUF_SIZE) {
- mc_close (fd);
- goto error_save;
- }
- buf++;
- }
-+#ifndef UTF8
- if (mc_write
- (fd, (char *) edit->buffers1[buf],
-+#else /* UTF8 */
-+ if (wchar_write
-+ (fd, edit->buffers1[buf],
-+#endif /* UTF8 */
- edit->curs1 & M_EDIT_BUF_SIZE) !=
- (edit->curs1 & M_EDIT_BUF_SIZE)) {
- filelen = -1;
- } else if (edit->curs2) {
- edit->curs2--;
- buf = (edit->curs2 >> S_EDIT_BUF_SIZE);
-- if (mc_write
-- (fd,
-- (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
-+#ifndef UTF8
-+ if (mc_write(fd, (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
-+#else /* UTF8 */
-+ if (wchar_write(fd, edit->buffers2[buf] + EDIT_BUF_SIZE -
-+#endif /* UTF8 */
- (edit->curs2 & M_EDIT_BUF_SIZE) - 1,
- 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) !=
- 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) {
- filelen = -1;
- } else {
- while (--buf >= 0) {
-+#ifndef UTF8
- if (mc_write
- (fd, (char *) edit->buffers2[buf],
-+#else /* UTF8 */
-+ if (wchar_write
-+ (fd, edit->buffers2[buf],
-+#endif /* UTF8 */
- EDIT_BUF_SIZE) != EDIT_BUF_SIZE) {
- filelen = -1;
- break;
-@@ -705,13 +767,21 @@
- if (!n || n == EOF)
- break;
- n = 0;
-+#ifndef UTF8
- while (fscanf (f, "%hd %hd, ", ¯o[n].command, ¯o[n].ch))
-+#else /* UTF8 */
-+ while (fscanf (f, "%hd %lu, ", ¯o[n].command, ¯o[n].ch))
-+#endif /* UTF8 */
- n++;
- fscanf (f, ";\n");
- if (s != k) {
- fprintf (g, ("key '%d 0': "), s);
- for (i = 0; i < n; i++)
-+#ifndef UTF8
- fprintf (g, "%hd %hd, ", macro[i].command, macro[i].ch);
-+#else /* UTF8 */
-+ fprintf (g, "%hd %lu, ", macro[i].command, macro[i].ch);
-+#endif /* UTF8 */
- fprintf (g, ";\n");
- }
- }
-@@ -744,7 +814,11 @@
- if (f) {
- fprintf (f, ("key '%d 0': "), s);
- for (i = 0; i < n; i++)
-+#ifndef UTF8
- fprintf (f, "%hd %hd, ", macro[i].command, macro[i].ch);
-+#else /* UTF8 */
-+ fprintf (f, "%hd %lu, ", macro[i].command, macro[i].ch);
-+#endif /* UTF8 */
- fprintf (f, ";\n");
- fclose (f);
- if (saved_macros_loaded) {
-@@ -794,10 +868,18 @@
- saved_macro[i++] = s;
- if (!found) {
- *n = 0;
-+#ifndef UTF8
- while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %hd, ", ¯o[*n].command, ¯o[*n].ch))
-+#else /* UTF8 */
-+ while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %lu, ", ¯o[*n].command, ¯o[*n].ch))
-+#endif /* UTF8 */
- (*n)++;
- } else {
-+#ifndef UTF8
- while (2 == fscanf (f, "%hd %hd, ", &dummy.command, &dummy.ch));
-+#else /* UTF8 */
-+ while (2 == fscanf (f, "%hd %lu, ", &dummy.command, &dummy.ch));
-+#endif /* UTF8 */
- }
- fscanf (f, ";\n");
- if (s == k)
-@@ -944,7 +1026,7 @@
- #define space_width 1
-
- static void
--edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width)
-+edit_insert_column_of_text (WEdit * edit, mc_wchar_t *data, int size, int width)
- {
- long cursor;
- int i, col;
-@@ -992,7 +1074,7 @@
- {
- long start_mark, end_mark, current = edit->curs1;
- int size;
-- unsigned char *copy_buf;
-+ mc_wchar_t *copy_buf;
-
- edit_update_curs_col (edit);
- if (eval_marks (edit, &start_mark, &end_mark))
-@@ -1032,7 +1114,7 @@
- {
- long count;
- long current;
-- unsigned char *copy_buf;
-+ mc_wchar_t *copy_buf;
- long start_mark, end_mark;
- int deleted = 0;
- int x = 0;
-@@ -1093,7 +1175,7 @@
- edit_push_action (edit, COLUMN_ON);
- column_highlighting = 0;
- } else {
-- copy_buf = g_malloc (end_mark - start_mark);
-+ copy_buf = g_malloc ((end_mark - start_mark) * sizeof(mc_wchar_t));
- edit_cursor_move (edit, start_mark - edit->curs1);
- edit_scroll_screen_over_cursor (edit);
- count = start_mark;
-@@ -1432,7 +1514,11 @@
- /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */
- /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */
- static int
-+#ifndef UTF8
- string_regexp_search (char *pattern, char *string, int match_type,
-+#else /* UTF8 */
-+string_regexp_search (char *pattern, mc_wchar_t *wstring, int match_type,
-+#endif /* UTF8 */
- int match_bol, int icase, int *found_len, void *d)
- {
- static regex_t r;
-@@ -1441,6 +1527,11 @@
- regmatch_t *pmatch;
- static regmatch_t s[1];
-
-+#ifdef UTF8
-+ char *string;
-+ int i;
-+#endif /* UTF8 */
-+
- pmatch = (regmatch_t *) d;
- if (!pmatch)
- pmatch = s;
-@@ -1460,13 +1551,51 @@
- old_type = match_type;
- old_icase = icase;
- }
-+
-+#ifdef UTF8
-+ string = wchar_to_mbstr(wstring);
-+ if (string == NULL)
-+ return -1;
-+#endif /* UTF8 */
-+
- if (regexec
- (&r, string, d ? NUM_REPL_ARGS : 1, pmatch,
- ((match_bol
- || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) {
- *found_len = 0;
-+
-+#ifdef UTF8
-+ g_free(string);
-+#endif /* UTF8 */
-+
- return -1;
- }
-+
-+#ifdef UTF8
-+ for (i = 0; i < (d ? NUM_REPL_ARGS : 1); i++) {
-+ char tmp;
-+ int new_o;
-+
-+ if (pmatch[i].rm_so < 0)
-+ continue;
-+ tmp = string[pmatch[i].rm_so];
-+ string[pmatch[i].rm_so] = 0;
-+ new_o = mbstrlen(string);
-+ string[pmatch[i].rm_so] = tmp;
-+ pmatch[i].rm_so = new_o;
-+
-+ if (pmatch[i].rm_eo < 0)
-+ continue;
-+ tmp = string[pmatch[i].rm_eo];
-+ string[pmatch[i].rm_eo] = 0;
-+ new_o = mbstrlen(string);
-+ string[pmatch[i].rm_eo] = tmp;
-+ pmatch[i].rm_eo = new_o;
-+ }
-+
-+ g_free(string);
-+#endif /* UTF8 */
-+
- *found_len = pmatch[0].rm_eo - pmatch[0].rm_so;
- return (pmatch[0].rm_so);
- }
-@@ -1474,13 +1603,29 @@
- /* thanks to Liviu Daia <daia at stoilow.imar.ro> for getting this
- (and the above) routines to work properly - paul */
-
-+#ifndef UTF8
- typedef int (*edit_getbyte_fn) (WEdit *, long);
-+#else /* UTF8 */
-+typedef mc_wchar_t (*edit_getbyte_fn) (WEdit *, long);
-+#endif /* UTF8 */
-
- static long
-+#ifndef UTF8
- edit_find_string (long start, unsigned char *exp, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d)
-+#else /* UTF8 */
-+edit_find_string (long start, unsigned char *exp_mb, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d)
-+#endif /* UTF8 */
- {
- long p, q = 0;
-- long l = strlen ((char *) exp), f = 0;
-+ long f = 0;
-+
-+#ifndef UTF8
-+ long l = strlen ((char *) exp);
-+#else /* UTF8 */
-+ mc_wchar_t *exp = mbstr_to_wchar((char *)exp_mb);
-+ mc_wchar_t *exp_backup = exp;
-+ long l = wcslen(exp);
-+#endif /* UTF8 */
- int n = 0;
-
- for (p = 0; p < l; p++) /* count conversions... */
-@@ -1489,19 +1634,22 @@
- n++;
-
- if (replace_scanf || replace_regexp) {
-- int c;
-- unsigned char *buf;
-- unsigned char mbuf[MAX_REPL_LEN * 2 + 3];
-+ mc_wint_t c;
-+ mc_wchar_t *buf;
-+ mc_wchar_t mbuf[MAX_REPL_LEN * 2 + 3];
-
- replace_scanf = (!replace_regexp); /* can't have both */
-
- buf = mbuf;
-
- if (replace_scanf) {
-- unsigned char e[MAX_REPL_LEN];
-- if (n >= NUM_REPL_ARGS)
-- return -3;
--
-+ mc_wchar_t e[MAX_REPL_LEN];
-+ if (n >= NUM_REPL_ARGS) {
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
-+ return -3;
-+ }
- if (replace_case) {
- for (p = start; p < last_byte && p < start + MAX_REPL_LEN; p++)
- buf[p - start] = (*get_byte) (data, p);
-@@ -1515,20 +1663,36 @@
- }
-
- buf[(q = p - start)] = 0;
-+#ifndef UTF8
- strcpy ((char *) e, (char *) exp);
- strcat ((char *) e, "%n");
-+#else /* UTF8 */
-+ wcscpy (e, exp);
-+ wcscat (e, L"%n");
-+#endif /* UTF8 */
- exp = e;
-
- while (q) {
- *((int *) sargs[n]) = 0; /* --> here was the problem - now fixed: good */
-+#ifndef UTF8
- if (n == sscanf ((char *) buf, (char *) exp, SCANF_ARGS)) {
-+#else /* UTF8 */
-+ if (n == swscanf (buf, exp, SCANF_ARGS)) {
-+#endif /* UTF8 */
- if (*((int *) sargs[n])) {
- *len = *((int *) sargs[n]);
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
- return start;
- }
- }
-- if (once_only)
-+ if (once_only) {
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
- return -2;
-+ }
- if (q + start < last_byte) {
- if (replace_case) {
- buf[q] = (*get_byte) (data, q + start);
-@@ -1542,7 +1706,11 @@
- start++;
- buf++; /* move the window along */
- if (buf == mbuf + MAX_REPL_LEN) { /* the window is about to go past the end of array, so... */
-+#ifndef UTF8
- memmove (mbuf, buf, strlen ((char *) buf) + 1); /* reset it */
-+#else /* UTF8 */
-+ wmemmove (mbuf, buf, (wcslen (buf) + 1)); /* reset it */
-+#endif /* UTF8 */
- buf = mbuf;
- }
- q--;
-@@ -1569,10 +1737,16 @@
-
- buf = mbuf;
- while (q) {
-+#ifndef UTF8
- found_start = string_regexp_search ((char *) exp, (char *) buf, match_normal, match_bol, !replace_case, len, d);
--
-+#else /* UTF8 */
-+ found_start = string_regexp_search ((char *) exp_mb, buf, match_normal, match_bol, !replace_case, len, d);
-+#endif /* UTF8 */
- if (found_start <= -2) { /* regcomp/regexec error */
- *len = 0;
-+#ifdef UTF8
-+ g_free (exp_backup);
-+#endif /* UTF8 */
- return -3;
- }
- else if (found_start == -1) /* not found: try next line */
-@@ -1583,15 +1757,27 @@
- match_bol = 0;
- continue;
- }
-- else /* found */
-+ else { /* found */
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
- return (start + offset - q + found_start);
-+ }
- }
-- if (once_only)
-+ if (once_only) {
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
- return -2;
-+ }
-
- if (buf[q - 1] != '\n') { /* incomplete line: try to recover */
- buf = mbuf + MAX_REPL_LEN / 2;
-+#ifndef UTF8
- q = strlen ((const char *) buf);
-+#else /* UTF8 */
-+ q = wcslen (buf);
-+#endif /* UTF8 */
- memmove (mbuf, buf, q);
- p = start + q;
- move_win = 1;
-@@ -1601,36 +1787,59 @@
- }
- }
- } else {
-+#ifndef UTF8
- *len = strlen ((const char *) exp);
-+#else /* UTF8 */
-+ *len = wcslen (exp);
-+#endif /* UTF8 */
- if (replace_case) {
- for (p = start; p <= last_byte - l; p++) {
-- if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */
-+ if ((*get_byte) (data, p) == exp[0]) { /* check if first char matches */
- for (f = 0, q = 0; q < l && f < 1; q++)
-- if ((*get_byte) (data, q + p) != (unsigned char)exp[q])
-+ if ((*get_byte) (data, q + p) != exp[q])
- f = 1;
-- if (f == 0)
-+ if (f == 0) {
-+#ifdef UTF8
-+ g_free (exp_backup);
-+#endif /* UTF8 */
- return p;
-+ }
- }
-- if (once_only)
-+ if (once_only) {
-+#ifdef UTF8
-+ g_free(exp_backup);
-+#endif /* UTF8 */
- return -2;
-+ }
- }
- } else {
- for (p = 0; exp[p] != 0; p++)
- exp[p] = my_lower_case (exp[p]);
-
- for (p = start; p <= last_byte - l; p++) {
-- if (my_lower_case ((*get_byte) (data, p)) == (unsigned char)exp[0]) {
-+ if (my_lower_case ((*get_byte) (data, p)) == exp[0]) {
- for (f = 0, q = 0; q < l && f < 1; q++)
-- if (my_lower_case ((*get_byte) (data, q + p)) != (unsigned char)exp[q])
-+ if (my_lower_case ((*get_byte) (data, q + p)) != exp[q])
- f = 1;
-- if (f == 0)
-+ if (f == 0) {
-+#ifdef UTF8
-+ g_free (exp_backup);
-+#endif /* UTF8 */
- return p;
-+ }
- }
-- if (once_only)
-+ if (once_only) {
-+#ifdef UTF8
-+ g_free (exp_backup);
-+#endif /* UTF8 */
- return -2;
-+ }
- }
- }
- }
-+#ifdef UTF8
-+ g_free (exp_backup);
-+#endif /* UTF8 */
- return -2;
- }
-
-@@ -1644,9 +1853,14 @@
-
- while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) {
- if (replace_whole) {
-+#ifndef UTF8
- /*If the bordering chars are not in option_whole_chars_search then word is whole */
- if (!strcasechr (option_whole_chars_search, (*get_byte) (data, p - 1))
- && !strcasechr (option_whole_chars_search, (*get_byte) (data, p + *len)))
-+#else /* UTF8 */
-+ if (!iswalnum((*get_byte) (data, p - 1))
-+ && !iswalnum((*get_byte) (data, p + *len)))
-+#endif /* UTF8 */
- return p;
- if (once_only)
- return -2;
-@@ -1678,6 +1892,7 @@
-
- #define is_digit(x) ((x) >= '0' && (x) <= '9')
-
-+#ifndef UTF8
- #define snprint(v) { \
- *p1++ = *p++; \
- *p1 = '\0'; \
-@@ -1685,33 +1900,48 @@
- if (n >= (size_t) (e - s)) goto nospc; \
- s += n; \
- }
-+#else /* UTF8 */
-+#define snprint(v) { \
-+ *p1++ = *p++; \
-+ *p1 = '\0'; \
-+ n = swprintf(s, e-s, q1,v); \
-+ if (n >= (size_t) (e - s)) goto nospc; \
-+ s += n; \
-+ }
-+#endif /* UTF8 */
-
- /* this function uses the sprintf command to do a vprintf */
- /* it takes pointers to arguments instead of the arguments themselves */
- /* The return value is the number of bytes written excluding '\0'
- if successfull, -1 if the resulting string would be too long and
- -2 if the format string is errorneous. */
--static int snprintf_p (char *str, size_t size, const char *fmt,...)
-- __attribute__ ((format (printf, 3, 4)));
--
--static int snprintf_p (char *str, size_t size, const char *fmt,...)
-+static int snprintf_p (mc_wchar_t *str, size_t size, const mc_wchar_t *fmt,...)
- {
- va_list ap;
- size_t n;
-- const char *q, *p;
-- char *s = str, *e = str + size;
-- char q1[40];
-- char *p1;
-+ const mc_wchar_t *q, *p;
-+ mc_wchar_t *s = str, *e = str + size;
-+ mc_wchar_t q1[40];
-+
-+ mc_wchar_t *p1;
- int nargs = 0;
-
- va_start (ap, fmt);
- p = q = fmt;
-
-+#ifndef UTF8
- while ((p = strchr (p, '%'))) {
-+#else /* UTF8 */
-+ while ((p = wcschr (p, L'%'))) {
-+#endif /* UTF8 */
- n = p - q;
- if (n >= (size_t) (e - s))
- goto nospc;
-+#ifndef UTF8
- memcpy (s, q, n); /* copy stuff between format specifiers */
-+#else /* UTF8 */
-+ wmemcpy (s, q, n); /* copy stuff between format specifiers */
-+#endif /* UTF8 */
- s += n;
- q = p;
- p1 = q1;
-@@ -1739,45 +1969,78 @@
- *p1++ = *p++;
- if (*p == '*') {
- p++;
-+#ifndef UTF8
- strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
- p1 += strlen (p1);
-+#else /* UTF8 */
-+ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
-+ p1 += wcslen (p1);
-+#endif /* UTF8 */
- } else {
-- while (is_digit (*p) && p1 < q1 + 20)
-+#ifndef UTF8
-+ while (is_digit (*p)
-+#else /* UTF8 */
-+ while (iswdigit (*p)
-+#endif /* UTF8 */
-+ && p1 < q1 + 20)
- *p1++ = *p++;
-- if (is_digit (*p))
-+#ifndef UTF8
-+ if (is_digit (*p))
-+#else /* UTF8 */
-+ if (iswdigit (*p))
-+#endif /* UTF8 */
- goto err;
- }
- if (*p == '.')
- *p1++ = *p++;
- if (*p == '*') {
- p++;
-+#ifndef UTF8
- strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
- p1 += strlen (p1);
-+#else /* UTF8 */
-+ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
-+ p1 += wcslen (p1);
-+#endif /* UTF8 */
- } else {
-- while (is_digit (*p) && p1 < q1 + 32)
-+#ifndef UTF8
-+ while (is_digit (*p)
-+#else /* UTF8 */
-+ while (iswdigit (*p)
-+#endif /* UTF8 */
-+ && p1 < q1 + 32)
- *p1++ = *p++;
-- if (is_digit (*p))
-+#ifndef UTF8
-+ if (is_digit (*p))
-+#else /* UTF8 */
-+ if (iswdigit (*p))
-+#endif /* UTF8 */
- goto err;
- }
- /* flags done, now get argument */
- if (*p == 's') {
-+#ifndef UTF8
- snprint (va_arg (ap, char *));
-+#else /* UTF8 */
-+ *p1++ = 'l';
-+ snprint (va_arg (ap, mc_wchar_t *));
-+#endif /* UTF8 */
- } else if (*p == 'h') {
-- if (strchr ("diouxX", *p))
-+ if (*p < 128 && strchr ("diouxX", *p))
- snprint (*va_arg (ap, short *));
- } else if (*p == 'l') {
- *p1++ = *p++;
-- if (strchr ("diouxX", *p))
-+ if (*p < 128 && strchr ("diouxX", *p))
- snprint (*va_arg (ap, long *));
-- } else if (strchr ("cdiouxX", *p)) {
-+ } else if (*p < 128 && strchr ("cdiouxX", *p)) {
- snprint (*va_arg (ap, int *));
- } else if (*p == 'L') {
- *p1++ = *p++;
-- if (strchr ("EefgG", *p))
-+ if (*p < 128 && strchr ("EefgG", *p))
- snprint (*va_arg (ap, double *)); /* should be long double */
-- } else if (strchr ("EefgG", *p)) {
-+ } else if (*p < 128 && strchr ("EefgG", *p)) {
- snprint (*va_arg (ap, double *));
-- } else if (strchr ("DOU", *p)) {
-+ } else if (*p < 128 && strchr ("DOU", *p)) {
- snprint (*va_arg (ap, long *));
- } else if (*p == 'p') {
- snprint (*va_arg (ap, void **));
-@@ -1786,10 +2049,17 @@
- q = p;
- }
- va_end (ap);
-+#ifndef UTF8
- n = strlen (q);
- if (n >= (size_t) (e - s))
- return -1;
- memcpy (s, q, n + 1);
-+#else /* UTF8 */
-+ n = wcslen (q);
-+ if (n >= (size_t) (e - s))
-+ return -1;
-+ wmemcpy (s, q, n + 1);
-+#endif /* UTF8 */
- return s + n - str;
- nospc:
- va_end (ap);
-@@ -1968,8 +2238,11 @@
- }
- }
- if (replace_yes) { /* delete then insert new */
-+#ifdef UTF8
-+ mc_wchar_t *winput2 = mbstr_to_wchar(input2);
-+#endif /* UTF8 */
- if (replace_scanf) {
-- char repl_str[MAX_REPL_LEN + 2];
-+ mc_wchar_t repl_str[MAX_REPL_LEN + 2];
- int ret = 0;
-
- /* we need to fill in sargs just like with scanf */
-@@ -1978,17 +2251,25 @@
- for (k = 1;
- k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0;
- k++) {
-+#ifndef UTF8
- unsigned char *t;
-+#else /* UTF8 */
-+ mc_wchar_t *t;
-+#endif
-
- if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) {
- ret = -1;
- break;
- }
-+#ifndef UTF8
- t = (unsigned char *) &sargs[k - 1][0];
-+#else /* UTF8 */
-+ t = (mc_wchar_t *) &sargs[k - 1][0];
-+#endif /* UTF8 */
- for (j = 0;
- j < pmatch[k].rm_eo - pmatch[k].rm_so
- && j < 255; j++, t++)
-- *t = (unsigned char) edit_get_byte (edit,
-+ *t = edit_get_byte (edit,
- edit->
- search_start
- -
-@@ -2006,14 +2287,23 @@
- }
- if (!ret)
- ret =
-+#ifndef UTF8
- snprintf_p (repl_str, MAX_REPL_LEN + 2, input2,
-+#else /* UTF8 */
-+ snprintf_p (repl_str, MAX_REPL_LEN + 2, winput2,
-+#endif /* UTF8 */
- PRINTF_ARGS);
- if (ret >= 0) {
- times_replaced++;
- while (i--)
- edit_delete (edit);
-+#ifndef UTF8
- while (repl_str[++i])
- edit_insert (edit, repl_str[i]);
-+#else /* UTF8 */
-+ while (winput2[++i])
-+ edit_insert (edit, winput2[i]);
-+#endif /* UTF8 */
- } else {
- edit_error_dialog (_(" Replace "),
- ret ==
-@@ -2027,10 +2317,18 @@
- times_replaced++;
- while (i--)
- edit_delete (edit);
-+#ifndef UTF8
- while (input2[++i])
- edit_insert (edit, input2[i]);
-+#else /* UTF8 */
-+ while (winput2[++i])
-+ edit_insert (edit, winput2[i]);
-+#endif /* UTF8 */
- }
- edit->found_len = i;
-+#ifdef UTF8
-+ g_free (winput2);
-+#endif /* UTF8 */
- }
- /* so that we don't find the same string again */
- if (replace_backwards) {
-@@ -2203,16 +2501,17 @@
- #define TEMP_BUF_LEN 1024
-
- /* Return a null terminated length of text. Result must be g_free'd */
--static unsigned char *
-+static mc_wchar_t *
- edit_get_block (WEdit *edit, long start, long finish, int *l)
- {
-- unsigned char *s, *r;
-- r = s = g_malloc (finish - start + 1);
-+ mc_wchar_t *s, *r;
-+ r = s = g_malloc ((finish - start + 1) * sizeof(mc_wchar_t));
- if (column_highlighting) {
- *l = 0;
- /* copy from buffer, excluding chars that are out of the column 'margins' */
- while (start < finish) {
-- int c, x;
-+ mc_wchar_t c;
-+ int x;
- x = edit_move_forward3 (edit, edit_bol (edit, start), 0,
- start);
- c = edit_get_byte (edit, start);
-@@ -2245,11 +2544,15 @@
- return 0;
-
- if (column_highlighting) {
-- unsigned char *block, *p;
-+ mc_wchar_t *block, *p;
- int r;
- p = block = edit_get_block (edit, start, finish, &len);
- while (len) {
-+#ifndef UTF8
- r = mc_write (file, p, len);
-+#else /* UTF8 */
-+ r = wchar_write (file, p, len);
-+#endif /* UTF8 */
- if (r < 0)
- break;
- p += r;
-@@ -2257,15 +2560,19 @@
- }
- g_free (block);
- } else {
-- unsigned char *buf;
-+ mc_wchar_t *buf;
- int i = start, end;
- len = finish - start;
-- buf = g_malloc (TEMP_BUF_LEN);
-+ buf = g_malloc (TEMP_BUF_LEN * sizeof(mc_wchar_t));
- while (start != finish) {
- end = min (finish, start + TEMP_BUF_LEN);
- for (; i < end; i++)
- buf[i - start] = edit_get_byte (edit, i);
-+#ifndef UTF8
- len -= mc_write (file, (char *) buf, end - start);
-+#else /* UTF8 */
-+ len -= wchar_write (file, buf, end - start);
-+#endif /* UTF8 */
- start = end;
- }
- g_free (buf);
-@@ -2603,17 +2910,20 @@
-
- /* prints at the cursor */
- /* returns the number of chars printed */
-+#ifndef UTF8
- int edit_print_string (WEdit * e, const char *s)
-+#else /* UTF8 */
-+int edit_print_wstring (WEdit * e, mc_wchar_t *s)
-+#endif /* UTF8 */
- {
- int i = 0;
- while (s[i])
-- edit_execute_cmd (e, -1, (unsigned char) s[i++]);
-+ edit_execute_cmd (e, -1, s[i++]);
- e->force |= REDRAW_COMPLETELY;
- edit_update_screen (e);
- return i;
- }
-
--
- static void pipe_mail (WEdit *edit, char *to, char *subject, char *cc)
- {
- FILE *p = 0;
-@@ -2707,15 +3017,20 @@
- /* find first character of current word */
- static int edit_find_word_start (WEdit *edit, long *word_start, int *word_len)
- {
-- int i, c, last;
-+ int i;
-+ mc_wint_t c, last;
-
- /* return if at begin of file */
- if (edit->curs1 <= 0)
- return 0;
-
-- c = (unsigned char) edit_get_byte (edit, edit->curs1 - 1);
-+ c = edit_get_byte (edit, edit->curs1 - 1);
- /* return if not at end or in word */
-+#ifndef UTF8
- if (isspace (c) || !(isalnum (c) || c == '_'))
-+#else /* UTF8 */
-+ if (iswspace (c) || !(iswalnum (c) || c == '_'))
-+#endif /* UTF8 */
- return 0;
-
- /* search start of word to be completed */
-@@ -2725,11 +3040,19 @@
- return 0;
-
- last = c;
-- c = (unsigned char) edit_get_byte (edit, edit->curs1 - i);
-+ c = edit_get_byte (edit, edit->curs1 - i);
-
-+#ifndef UTF8
- if (!(isalnum (c) || c == '_')) {
-+#else /* UTF8 */
-+ if (!(iswalnum (c) || c == '_')) {
-+#endif /* UTF8 */
- /* return if word starts with digit */
-+#ifndef UTF8
- if (isdigit (last))
-+#else /* UTF8 */
-+ if (iswdigit (last))
-+#endif /* UTF8 */
- return 0;
-
- *word_start = edit->curs1 - (i - 1); /* start found */
-@@ -2762,7 +3085,7 @@
- int *num)
- {
- int len, max_len = 0, i, skip;
-- unsigned char *bufpos;
-+ mc_wchar_t *bufpos;
-
- /* collect max MAX_WORD_COMPLETIONS completions */
- while (*num < MAX_WORD_COMPLETIONS) {
-@@ -2781,11 +3104,16 @@
- buffers1[start >> S_EDIT_BUF_SIZE][start & M_EDIT_BUF_SIZE];
- skip = 0;
- for (i = 0; i < *num; i++) {
-+#ifndef UTF8
- if (strncmp
- ((char *) &compl[i].text[word_len],
-- (char *) &bufpos[word_len], max (len,
-- compl[i].len) -
-- word_len) == 0) {
-+ (char *) &bufpos[word_len],
-+#else /* UTF8 */
-+ if (wcsncmp
-+ ((wchar_t *) &compl[i].text[word_len],
-+ (wchar_t *) &bufpos[word_len],
-+#endif /* UTF8 */
-+ max (len, compl[i].len) - word_len) == 0) {
- skip = 1;
- break; /* skip it, already added */
- }
-@@ -2793,7 +3121,7 @@
- if (skip)
- continue;
-
-- compl[*num].text = g_malloc (len + 1);
-+ compl[*num].text = g_malloc ((len + 1) * sizeof(mc_wchar_t));
- compl[*num].len = len;
- for (i = 0; i < len; i++)
- compl[*num].text[i] = *(bufpos + i);
-@@ -2807,6 +3135,18 @@
- return max_len;
- }
-
-+#ifdef UTF8
-+int edit_print_string (WEdit * e, const char *s)
-+{
-+ int i;
-+ mc_wchar_t *ws = mbstr_to_wchar(s);
-+ i = edit_print_wstring (e, ws);
-+ g_free(ws);
-+ return i;
-+}
-+
-+#endif /* UTF8 */
-+
-
- /* let the user select its preferred completion */
- static void
-@@ -2819,6 +3159,9 @@
- WListbox *compl_list;
- int compl_dlg_h; /* completion dialog height */
- int compl_dlg_w; /* completion dialog width */
-+#ifdef UTF8
-+ char *mbtext;
-+#endif /* UTF8 */
-
- /* calculate the dialog metrics */
- compl_dlg_h = num_compl + 2;
-@@ -2854,9 +3197,18 @@
- add_widget (compl_dlg, compl_list);
-
- /* fill the listbox with the completions */
-+#ifndef UTF8
- for (i = 0; i < num_compl; i++)
- listbox_add_item (compl_list, LISTBOX_APPEND_AT_END, 0,
- (char *) compl[i].text, NULL);
-+#else /* UTF8 */
-+ for (i = 0; i < num_compl; i++) {
-+ mbtext = wchar_to_mbstr(compl[i].text);
-+ listbox_add_item (compl_list, LISTBOX_APPEND_AT_END, 0,
-+ mbtext, NULL);
-+ g_free(mbtext);
-+ }
-+#endif /* UTF8 */
-
- /* pop up the dialog */
- run_dlg (compl_dlg);
-@@ -2864,9 +3216,17 @@
- /* apply the choosen completion */
- if (compl_dlg->ret_value == B_ENTER) {
- listbox_get_current (compl_list, &curr, NULL);
-- if (curr)
-+ if (curr){
-+#ifndef UTF8
- for (curr += word_len; *curr; curr++)
- edit_insert (edit, *curr);
-+#else /* UTF8 */
-+ mc_wchar_t *wc, *wccurr = mbstr_to_wchar(curr);
-+ for (wc = wccurr + word_len; *wc; wc++)
-+ edit_insert (edit, *wc);
-+ g_free(wccurr);
-+#endif /* UTF8 */
-+ }
- }
-
- /* destroy dialog before return */
-@@ -2883,8 +3243,9 @@
- {
- int word_len = 0, i, num_compl = 0, max_len;
- long word_start = 0;
-- unsigned char *bufpos;
-- char *match_expr;
-+ mc_wchar_t *bufpos;
-+ mc_wchar_t *match_expr;
-+ char *mbmatch_expr;
- struct selection compl[MAX_WORD_COMPLETIONS]; /* completions */
-
- /* don't want to disturb another search */
-@@ -2901,16 +3262,32 @@
- /* prepare match expression */
- bufpos = &edit->buffers1[word_start >> S_EDIT_BUF_SIZE]
- [word_start & M_EDIT_BUF_SIZE];
-+
-+ match_expr = g_malloc((word_len + 14) * sizeof(mc_wchar_t));
-+#ifndef UTF8
- match_expr = g_strdup_printf ("%.*s[a-zA-Z_0-9]+", word_len, bufpos);
-+#else /* UTF8 */
-+ wcsncpy (match_expr, bufpos, word_len);
-+ match_expr[word_len] = '\0';
-+ wcscat (match_expr, L"[a-zA-Z_0-9]+");
-+#endif /* UTF8 */
-
- /* init search: backward, regexp, whole word, case sensitive */
- edit_set_search_parameters (0, 1, 1, 1, 1);
-
- /* collect the possible completions */
- /* start search from curs1 down to begin of file */
-+#ifndef UTF8
- max_len =
- edit_collect_completions (edit, word_start, word_len, match_expr,
- (struct selection *) &compl, &num_compl);
-+#else /* UTF8 */
-+ mbmatch_expr = wchar_to_mbstr(match_expr);
-+ max_len =
-+ edit_collect_completions (edit, word_start, word_len, mbmatch_expr,
-+ (struct selection *) &compl, &num_compl);
-+ g_free(mbmatch_expr);
-+#endif /* UTF8 */
-
- if (num_compl > 0) {
- /* insert completed word if there is only one match */
---- mc-4.6.2-pre1/edit/editdraw.c
-+++ mc-4.6.2-pre1/edit/editdraw.c
-@@ -70,11 +70,16 @@
- * 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>");
- }
-@@ -206,11 +211,16 @@
- #define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color))
- #endif
-
-+struct line_s {
-+ mc_wchar_t ch;
-+ unsigned int style;
-+};
-+
- static void
- print_to_widget (WEdit *edit, long row, int start_col, int start_col_real,
-- long end_col, unsigned int line[])
-+ long end_col, struct line_s line[])
- {
-- unsigned int *p;
-+ struct line_s *p;
-
- int x = start_col_real + EDIT_TEXT_HORIZONTAL_OFFSET;
- int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET;
-@@ -224,9 +234,9 @@
- edit_move (x1 + FONT_OFFSET_X, y + FONT_OFFSET_Y);
- p = line;
-
-- while (*p) {
-+ while (p->ch) {
- int style;
-- int textchar;
-+ mc_wchar_t textchar;
- int color;
-
- if (cols_to_skip) {
-@@ -235,9 +245,9 @@
- continue;
- }
-
-- style = *p & 0xFF00;
-- textchar = *p & 0xFF;
-- color = *p >> 16;
-+ style = p->style & 0xFF00;
-+ textchar = p->ch;
-+ color = p->style >> 16;
-
- if (style & MOD_ABNORMAL) {
- /* Non-printable - use black background */
-@@ -266,8 +276,11 @@
- lowlevel_set_color (color);
- }
- }
--
-+#ifdef UTF8
-+ SLsmg_write_nwchars(&textchar, 1);
-+#else
- addch (textchar);
-+#endif
- p++;
- }
- }
-@@ -279,11 +292,11 @@
- edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
- long end_col)
- {
-- static unsigned int line[MAX_LINE_LEN];
-- unsigned int *p = line;
-+ struct line_s line[MAX_LINE_LEN];
-+ struct line_s *p = line;
- long m1 = 0, m2 = 0, q, c1, c2, tws;
- int col, start_col_real;
-- unsigned int c;
-+ mc_wint_t c;
- int color;
- int i;
-
-@@ -307,62 +320,89 @@
- }
-
- while (col <= end_col - edit->start_col) {
-- *p = 0;
-+ p->ch = 0;
-+ p->style = 0;
- if (q == edit->curs1)
-- *p |= MOD_CURSOR;
-+ p->style |= MOD_CURSOR;
- if (q >= m1 && q < m2) {
- if (column_highlighting) {
- int x;
- x = edit_move_forward3 (edit, b, 0, q);
- if (x >= c1 && x < c2)
-- *p |= MOD_MARKED;
-+ p->style |= MOD_MARKED;
- } else
-- *p |= MOD_MARKED;
-+ p->style |= MOD_MARKED;
- }
- if (q == edit->bracket)
-- *p |= MOD_BOLD;
-+ p->style |= MOD_BOLD;
- if (q >= edit->found_start
- && q < edit->found_start + edit->found_len)
-- *p |= MOD_BOLD;
-+ p->style |= MOD_BOLD;
- c = edit_get_byte (edit, q);
- /* we don't use bg for mc - fg contains both */
- edit_get_syntax_color (edit, q, &color);
-- *p |= color << 16;
-+ p->style |= color << 16;
- switch (c) {
- case '\n':
- col = end_col - edit->start_col + 1; /* quit */
-- *(p++) |= ' ';
-+ p->ch = ' ';
-+ p++;
- break;
- case '\t':
- i = TAB_SIZE - ((int) col % TAB_SIZE);
- col += i;
- if (use_colors && visible_tabs) {
-- c = (*p & ~MOD_CURSOR) | MOD_WHITESPACE;
-+ c = (p->style & ~MOD_CURSOR) | MOD_WHITESPACE;
- if (i > 2) {
-- *(p++) |= '<' | MOD_WHITESPACE;
-- while (--i > 1)
-- *(p++) = c | '-';
-- *(p++) = c | '>';
-+ p->ch = '<';
-+ p->style |= MOD_WHITESPACE;
-+ p++;
-+ while (--i > 1) {
-+ p->style = c;
-+ p->ch = '-';
-+ p++;
-+ }
-+ p->style = c;
-+ p->ch = '>';
-+ p++;
- } else if (i > 1) {
-- *(p++) |= '<' | MOD_WHITESPACE;
-- *(p++) = c | '>';
-- } else
-- *(p++) |= '>' | MOD_WHITESPACE;
-+ p->style |= MOD_WHITESPACE;
-+ p->ch = '<';
-+ p++;
-+ p->style = c;
-+ p->ch = '>';
-+ p++;
-+ } else {
-+ p->style |= MOD_WHITESPACE;
-+ p->ch = '>';
-+ p++;
-+ }
- } else if (use_colors && visible_tws && q >= tws) {
-- *p |= '.' | MOD_WHITESPACE;
-- c = *(p++) & ~MOD_CURSOR;
-- while (--i)
-- *(p++) = c;
-+ p->style |= MOD_WHITESPACE;
-+ p->ch = '.';
-+ p++;
-+ c = p->style & ~MOD_CURSOR;
-+ while (--i) {
-+ p->style = c;
-+ p->ch = ' ';
-+ p++;
-+ }
- } else {
-- *p |= ' ';
-- c = *(p++) & ~MOD_CURSOR;
-- while (--i)
-- *(p++) = c;
-+ p->ch |= ' ';
-+ c = p->style & ~MOD_CURSOR;
-+ p++;
-+ while (--i) {
-+ p->style = c;
-+ p->ch = ' ';
-+ p++;
-+ }
- }
- break;
- case ' ':
- if (use_colors && visible_tws && q >= tws) {
-- *(p++) |= '.' | MOD_WHITESPACE;
-+ p->ch = '.';
-+ p->style |= MOD_WHITESPACE;
-+ p++;
- col++;
- break;
- }
-@@ -372,22 +412,47 @@
-
- /* Caret notation for control characters */
- if (c < 32) {
-- *(p++) = '^' | MOD_ABNORMAL;
-- *(p++) = (c + 0x40) | MOD_ABNORMAL;
-+ p->ch = '^';
-+ p->style = MOD_ABNORMAL;
-+ p++;
-+ p->ch = c + 0x40;
-+ p->style = MOD_ABNORMAL;
- col += 2;
- break;
- }
- if (c == 127) {
-- *(p++) = '^' | MOD_ABNORMAL;
-- *(p++) = '?' | MOD_ABNORMAL;
-+ p->ch = '^';
-+ p->style = MOD_ABNORMAL;
-+ p++;
-+ p->ch = '?';
-+ p->style = MOD_ABNORMAL;
-+ p++;
- col += 2;
- break;
- }
-
-- if (is_printable (c)) {
-- *(p++) |= c;
-+#ifndef UTF8
-+ if (is_printable (c)
-+#else /* UTF8 */
-+ if (iswprint (c)
-+#ifdef __STDC_ISO_10646__
-+ && (c < BINARY_CHAR_OFFSET || c >= (BINARY_CHAR_OFFSET + 256))
-+#endif
-+#endif /* UTF8 */
-+ ) {
-+ p->ch = c;
-+ p++;
-+
-+#ifdef UTF8
-+ i = wcwidth(c);
-+ if (i > 1) {
-+ col += i - 1;
-+ }
-+#endif /* UTF8 */
- } else {
-- *(p++) = '.' | MOD_ABNORMAL;
-+ p->ch = '.';
-+ p->style = MOD_ABNORMAL;
-+ p++;
- }
- col++;
- break;
-@@ -398,7 +463,7 @@
- } else {
- start_col_real = start_col = 0;
- }
-- *p = 0;
-+ p->ch = 0;
-
- print_to_widget (edit, row, start_col, start_col_real, end_col, line);
- }
---- mc-4.6.2-pre1/edit/editkeys.c
-+++ mc-4.6.2-pre1/edit/editkeys.c
-@@ -182,10 +182,10 @@
- * 'command' is one of the editor commands from editcmddef.h.
- */
- int
--edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch)
-+edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch)
- {
- int command = CK_Insert_Char;
-- int char_for_insertion = -1;
-+ mc_wint_t char_for_insertion = -1;
- int i = 0;
- int extmod = 0;
- const edit_key_map_type *key_map = NULL;
-@@ -242,9 +242,30 @@
- /* an ordinary insertable character */
- if (x_key < 256 && !extmod) {
- int c = convert_from_input_c (x_key);
--
-+#ifdef UTF8
-+ mbstate_t mbs;
-+ int res;
-+ mc_wchar_t wc;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+
-+ if (edit->charpoint >= MB_CUR_MAX) edit->charpoint = 0;
-+
-+ edit->charbuf[edit->charpoint++] = c;
-+
-+ res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs);
-+ if (res < 0) {
-+ if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */
-+ return 0;
-+ }
-+ edit->charpoint = 0;
-+
-+ if (iswprint (wc)) {
-+ char_for_insertion = wc;
-+#else
- if (is_printable (c)) {
- char_for_insertion = c;
-+#endif /* UTF8 */
- goto fin;
- }
- }
-@@ -283,7 +304,7 @@
- *cmd = command;
- *ch = char_for_insertion;
-
-- if (command == CK_Insert_Char && char_for_insertion == -1) {
-+ if (command == CK_Insert_Char && char_for_insertion == (mc_wint_t)-1) {
- /* unchanged, key has no function here */
- return 0;
- }
---- mc-4.6.2-pre1/edit/editwidget.c
-+++ mc-4.6.2-pre1/edit/editwidget.c
-@@ -331,7 +331,8 @@
-
- case WIDGET_KEY:
- {
-- int cmd, ch;
-+ int cmd;
-+ mc_wint_t ch;
-
- /* The user may override the access-keys for the menu bar. */
- if (edit_translate_key (e, parm, &cmd, &ch)) {
---- mc-4.6.2-pre1/edit/wordproc.c
-+++ mc-4.6.2-pre1/edit/wordproc.c
-@@ -40,7 +40,12 @@
-
- #define tab_width option_tab_spacing
-
-+#ifndef UTF8
- #define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
-+#else /* UTF8 */
-+#define NO_FORMAT_CHARS_START L"-+*\\,.;:&>"
-+#endif /* UTF8 */
-+
- #define FONT_MEAN_WIDTH 1
-
- static long
-@@ -57,14 +62,21 @@
- p = edit_move_forward (edit, p, line - l, 0);
-
- p = edit_bol (edit, p);
-+
-+#ifndef UTF8
- while (strchr ("\t ", edit_get_byte (edit, p)))
-+#else /* UTF8 */
-+ while (wcschr (L"\t ", edit_get_byte (edit, p)))
-+#endif /* UTF8 */
-+
- p++;
- return p;
- }
-
- static int bad_line_start (WEdit * edit, long p)
- {
-- int c;
-+ mc_wint_t c;
-+
- c = edit_get_byte (edit, p);
- if (c == '.') { /* `...' is acceptable */
- if (edit_get_byte (edit, p + 1) == '.')
-@@ -78,7 +90,13 @@
- return 0; /* `---' is acceptable */
- return 1;
- }
-+
-+#ifndef UTF8
- if (strchr (NO_FORMAT_CHARS_START, c))
-+#else /* UTF8 */
-+ if (wcschr (NO_FORMAT_CHARS_START, c))
-+#endif /* UTF8 */
-+
- return 1;
- return 0;
- }
-@@ -131,33 +149,37 @@
- i - edit->curs_line, 0));
- }
-
--static unsigned char *
-+static mc_wchar_t *
- get_paragraph (WEdit *edit, long p, long q, int indent, int *size)
- {
-- unsigned char *s, *t;
-+ mc_wchar_t *s, *t;
- #if 0
-- t = g_malloc ((q - p) + 2 * (q - p) / option_word_wrap_line_length +
-- 10);
-+ t = g_malloc (((q - p) + 2 * (q - p) / option_word_wrap_line_length +
-+ 10) * sizeof(mc_wchar_t));
- #else
-- t = g_malloc (2 * (q - p) + 100);
-+ t = g_malloc ((2 * (q - p) + 100) * sizeof(mc_wchar_t));
- #endif
- if (!t)
- return 0;
- for (s = t; p < q; p++, s++) {
- if (indent)
- if (edit_get_byte (edit, p - 1) == '\n')
-+#ifndef UTF8
- while (strchr ("\t ", edit_get_byte (edit, p)))
-+#else /* UTF8 */
-+ while (wcschr (L"\t ", edit_get_byte (edit, p)))
-+#endif /* UTF8 */
- p++;
- *s = edit_get_byte (edit, p);
- }
-- *size = (unsigned long) s - (unsigned long) t;
-+ *size = s - t;
- t[*size] = '\n';
- return t;
- }
-
--static void strip_newlines (unsigned char *t, int size)
-+static void strip_newlines (mc_wchar_t *t, int size)
- {
-- unsigned char *p = t;
-+ mc_wchar_t *p = t;
- while (size--) {
- *p = *p == '\n' ? ' ' : *p;
- p++;
-@@ -174,7 +196,7 @@
- {
- return x += tab_width - x % tab_width;
- }
--static int line_pixel_length (unsigned char *t, long b, int l)
-+static int line_pixel_length (mc_wchar_t *t, long b, int l)
- {
- int x = 0, c, xn = 0;
- for (;;) {
-@@ -198,7 +220,7 @@
- }
-
- static int
--next_word_start (unsigned char *t, int q, int size)
-+next_word_start (mc_wchar_t *t, int q, int size)
- {
- int i;
- int saw_ws = 0;
-@@ -222,7 +244,7 @@
-
- /* find the start of a word */
- static int
--word_start (unsigned char *t, int q, int size)
-+word_start (mc_wchar_t *t, int q, int size)
- {
- int i = q;
- if (t[q] == ' ' || t[q] == '\t')
-@@ -241,7 +263,7 @@
- }
-
- /* replaces ' ' with '\n' to properly format a paragraph */
--static void format_this (unsigned char *t, int size, int indent)
-+static void format_this (mc_wchar_t *t, int size, int indent)
- {
- int q = 0, ww;
- strip_newlines (t, size);
-@@ -269,7 +291,7 @@
- }
- }
-
--static void replace_at (WEdit * edit, long q, int c)
-+static void replace_at (WEdit * edit, long q, mc_wint_t c)
- {
- edit_cursor_move (edit, q - edit->curs1);
- edit_delete (edit);
-@@ -278,18 +300,27 @@
-
- /* replaces a block of text */
- static void
--put_paragraph (WEdit * edit, unsigned char *t, long p, int indent, int size)
-+put_paragraph (WEdit * edit, mc_wchar_t *t, long p, int indent, int size)
- {
- long cursor;
-- int i, c = 0;
-+ int i;
-+ mc_wchar_t c = 0;
- cursor = edit->curs1;
- if (indent)
-+#ifndef UTF8
- while (strchr ("\t ", edit_get_byte (edit, p)))
-+#else /* UTF8 */
-+ while (wcschr (L"\t ", edit_get_byte (edit, p)))
-+#endif /* UTF8 */
- p++;
- for (i = 0; i < size; i++, p++) {
- if (i && indent) {
- if (t[i - 1] == '\n' && c == '\n') {
-+#ifndef UTF8
- while (strchr ("\t ", edit_get_byte (edit, p)))
-+#else /* UTF8 */
-+ while (wcschr (L"\t ", edit_get_byte (edit, p)))
-+#endif /* UTF8 */
- p++;
- } else if (t[i - 1] == '\n') {
- long curs;
-@@ -301,7 +332,11 @@
- p = edit->curs1;
- } else if (c == '\n') {
- edit_cursor_move (edit, p - edit->curs1);
-+#ifndef UTF8
- while (strchr ("\t ", edit_get_byte (edit, p))) {
-+#else /* UTF8 */
-+ while (wcschr (L"\t ", edit_get_byte (edit, p))) {
-+#endif /* UTF8 */
- edit_delete (edit);
- if (cursor > edit->curs1)
- cursor--;
-@@ -334,7 +369,7 @@
- {
- long p, q;
- int size;
-- unsigned char *t;
-+ mc_wchar_t *t;
- int indent = 0;
- if (option_word_wrap_line_length < 2)
- return;
-@@ -344,17 +379,25 @@
- q = end_paragraph (edit, force);
- indent = test_indent (edit, p, q);
- t = get_paragraph (edit, p, q, indent, &size);
-- if (!t)
-+ if (!t)
- return;
- if (!force) {
- int i;
-+#ifndef UTF8
- if (strchr (NO_FORMAT_CHARS_START, *t)) {
-+#else /* UTF8 */
-+ if (wcschr (NO_FORMAT_CHARS_START, *t)) {
-+#endif /* UTF8 */
- g_free (t);
- return;
- }
- for (i = 0; i < size - 1; i++) {
- if (t[i] == '\n') {
-+#ifndef UTF8
- if (strchr (NO_FORMAT_CHARS_START "\t ", t[i + 1])) {
-+#else /* UTF8 */
-+ if (wcschr (NO_FORMAT_CHARS_START "\t", t[i + 1])) {
-+#endif /* UTF8 */
- g_free (t);
- return;
- }
---- mc-4.6.2-pre1/src/achown.c
-+++ mc-4.6.2-pre1/src/achown.c
-@@ -584,6 +584,12 @@
- b_att[2] = button_new (XTRACT (6));
- b_user = button_new (XTRACT (5));
- b_group = button_new (XTRACT (4));
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ b_user->text = g_realloc (b_user->text, MB_CUR_MAX * 15 + 1);
-+ b_group->text = g_realloc (b_group->text, MB_CUR_MAX * 15 + 1);
-+ }
-+#endif
-
- add_widget (ch_dlg, b_group);
- add_widget (ch_dlg, b_user);
---- mc-4.6.2-pre1/src/boxes.c
-+++ mc-4.6.2-pre1/src/boxes.c
-@@ -153,23 +153,23 @@
- display_title = _(display_title);
- for (i = 0; i < LIST_TYPES; i++) {
- displays[i] = _(displays[i]);
-- if ((l = strlen (displays[i])) > maxlen)
-+ if ((l = mbstrlen (displays[i])) > maxlen)
- maxlen = l;
- }
-
-- i = strlen (ok_button) + 5;
-- l = strlen (cancel_button) + 3;
-+ i = mbstrlen (ok_button) + 5;
-+ l = mbstrlen (cancel_button) + 3;
- l = max (i, l);
-
- i = maxlen + l + 16;
- if (i > DISPLAY_X)
- DISPLAY_X = i;
-
-- i = strlen (user_mini_status) + 13;
-+ i = mbstrlen (user_mini_status) + 13;
- if (i > DISPLAY_X)
- DISPLAY_X = i;
-
-- i = strlen (display_title) + 10;
-+ i = mbstrlen (display_title) + 10;
- if (i > DISPLAY_X)
- DISPLAY_X = i;
-
-@@ -288,20 +288,20 @@
- int maxlen = 0;
- for (i = SORT_TYPES - 1; i >= 0; i--) {
- sort_orders_names[i] = _(sort_orders[i].sort_name);
-- r = strlen (sort_orders_names[i]);
-+ r = mbstrlen (sort_orders_names[i]);
- if (r > maxlen)
- maxlen = r;
- }
-
- check_pos = maxlen + 9;
-
-- r = strlen (reverse_label) + 4;
-- i = strlen (case_label) + 4;
-+ r = mbstrlen (reverse_label) + 4;
-+ i = mbstrlen (case_label) + 4;
- if (i > r)
- r = i;
-
-- l = strlen (ok_button) + 6;
-- i = strlen (cancel_button) + 4;
-+ l = mbstrlen (ok_button) + 6;
-+ i = mbstrlen (cancel_button) + 4;
- if (i > l)
- l = i;
-
-@@ -310,7 +310,7 @@
- if (i > SORT_X)
- SORT_X = i;
-
-- i = strlen (sort_title) + 6;
-+ i = mbstrlen (sort_title) + 6;
- if (i > SORT_X)
- SORT_X = i;
-
-@@ -408,7 +408,7 @@
- while (i--)
- {
- conf_widgets [i].text = _(conf_widgets [i].text);
-- l1 = strlen (conf_widgets [i].text) + 3;
-+ l1 = mbstrlen (conf_widgets [i].text) + 3;
- if (l1 > maxlen)
- maxlen = l1;
- }
-@@ -423,8 +423,8 @@
- * And this for the case when buttons with some space to the right
- * do not fit within 2/6
- */
-- l1 = strlen (conf_widgets [0].text) + 3;
-- i = strlen (conf_widgets [1].text) + 5;
-+ l1 = mbstrlen (conf_widgets [0].text) + 3;
-+ i = mbstrlen (conf_widgets [1].text) + 5;
- if (i > l1)
- l1 = i;
-
-@@ -497,11 +497,11 @@
- {
- display_widgets [i].text = _(display_widgets[i].text);
- display_bits_str [i] = _(display_bits_str [i]);
-- l1 = strlen (display_bits_str [i]);
-+ l1 = mbstrlen (display_bits_str [i]);
- if (l1 > maxlen)
- maxlen = l1;
- }
-- l1 = strlen (display_widgets [2].text);
-+ l1 = mbstrlen (display_widgets [2].text);
- if (l1 > maxlen)
- maxlen = l1;
-
-@@ -509,8 +509,8 @@
- display_bits.xlen = (maxlen + 5) * 6 / 4;
-
- /* See above confirm_box */
-- l1 = strlen (display_widgets [0].text) + 3;
-- i = strlen (display_widgets [1].text) + 5;
-+ l1 = mbstrlen (display_widgets [0].text) + 3;
-+ i = mbstrlen (display_widgets [1].text) + 5;
- if (i > l1)
- l1 = i;
-
-@@ -605,7 +605,7 @@
-
- cpname = _("&Select");
- add_widget (dbits_dlg,
-- button_new (4, DISPX - 8 - strlen (cpname), B_USER,
-+ button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER,
- NORMAL_BUTTON, cpname, sel_charset_button));
-
- return dbits_dlg;
-@@ -816,7 +816,7 @@
- quick_widgets [1].y_divisions =
- quick_widgets [0].y_divisions = Quick_input.ylen = 5;
-
-- len = strlen (quick_widgets [1].text);
-+ len = mbstrlen (quick_widgets [1].text);
-
- quick_widgets [0].relative_x =
- quick_widgets [1].relative_x + len + 1;
-@@ -975,7 +975,7 @@
- {
- job_buttons [i].name = _(job_buttons [i].name);
-
-- len = strlen (job_buttons [i].name) + 4;
-+ len = mbstrlen (job_buttons [i].name) + 4;
- JOBS_X = max (JOBS_X, startx + len + 3);
-
- job_buttons [i].xpos = startx;
-@@ -984,7 +984,7 @@
-
- /* Last button - Ok a.k.a. Cancel :) */
- job_buttons [n_buttons - 1].xpos =
-- JOBS_X - strlen (job_buttons [n_buttons - 1].name) - 7;
-+ JOBS_X - mbstrlen (job_buttons [n_buttons - 1].name) - 7;
-
- i18n_flag = 1;
- }
-@@ -1042,7 +1042,7 @@
-
- while (i--)
- {
-- l1 = strlen (labs [i] = _(labs [i]));
-+ l1 = mbstrlen (labs [i] = _(labs [i]));
- if (l1 > maxlen)
- maxlen = l1;
- }
-@@ -1052,7 +1052,7 @@
-
- for (i = sizeof(buts)/sizeof(buts[0]), l1 = 0; i--; )
- {
-- l1 += strlen (buts [i] = _(buts [i]));
-+ l1 += mbstrlen (buts [i] = _(buts [i]));
- }
- l1 += 15;
- if (l1 > dialog_x)
-@@ -1061,7 +1061,7 @@
- ilen = dialog_x - 7 - maxlen; /* for the case of very long buttons :) */
- istart = dialog_x - 3 - ilen;
-
-- b2 = dialog_x - (strlen(buts[1]) + 6);
-+ b2 = dialog_x - (mbstrlen(buts[1]) + 6);
-
- i18n_flag = 1;
- }
---- mc-4.6.2-pre1/src/dialog.c
-+++ mc-4.6.2-pre1/src/dialog.c
-@@ -166,7 +166,7 @@
-
- if (h->title) {
- attrset (DLG_HOT_NORMALC (h));
-- dlg_move (h, space, (h->cols - strlen (h->title)) / 2);
-+ dlg_move (h, space, (h->cols - mbstrlen (h->title)) / 2);
- addstr (h->title);
- }
- }
---- mc-4.6.2-pre1/src/file.c
-+++ mc-4.6.2-pre1/src/file.c
-@@ -161,15 +161,20 @@
- do_transform_source (FileOpContext *ctx, const char *source)
- {
- size_t j, k, l, len;
-- const char *fnsource = x_basename (source);
-+ char *fnsource = g_strdup (x_basename (source));
- int next_reg;
- enum CaseConvs case_conv = NO_CONV;
- static char fntarget[MC_MAXPATHLEN];
-
-+#ifdef UTF8
-+ fix_utf8(fnsource);
-+#endif
-+
- len = strlen (fnsource);
- j = re_match (&ctx->rx, fnsource, len, 0, &ctx->regs);
- if (j != len) {
- transform_error = FILE_SKIP;
-+ g_free (fnsource);
- return NULL;
- }
- for (next_reg = 1, j = 0, k = 0; j < strlen (ctx->dest_mask); j++) {
-@@ -213,6 +218,7 @@
- || ctx->regs.start[next_reg] < 0) {
- message (1, MSG_ERROR, _(" Invalid target mask "));
- transform_error = FILE_ABORT;
-+ g_free(fnsource);
- return NULL;
- }
- for (l = (size_t) ctx->regs.start[next_reg];
-@@ -227,6 +233,7 @@
- }
- }
- fntarget[k] = 0;
-+ g_free(fnsource);
- return fntarget;
- }
-
-@@ -1688,13 +1695,13 @@
- *dp = '\0';
-
- if (single_source) {
-- i = fmd_xlen - strlen (format_string) - 4;
-+ i = fmd_xlen - mbstrlen (format_string) - 4;
- g_snprintf (cmd_buf, sizeof (cmd_buf), format_string,
- name_trunc (single_source, i));
- } else {
- g_snprintf (cmd_buf, sizeof (cmd_buf), format_string,
- panel->marked);
-- i = strlen (cmd_buf) + 6 - fmd_xlen;
-+ i = mbstrlen (cmd_buf) + 6 - fmd_xlen;
- if (i > 0) {
- fmd_xlen += i;
- fmd_init_i18n (TRUE); /* to recalculate positions of child widgets */
---- mc-4.6.2-pre1/src/filegui.c
-+++ mc-4.6.2-pre1/src/filegui.c
-@@ -65,6 +65,7 @@
- #include "filegui.h"
- #include "key.h" /* get_event */
- #include "util.h" /* strip_password() */
-+#include "tty.h"
-
- /* }}} */
-
-@@ -563,8 +564,8 @@
- * longest of "Overwrite..." labels
- * (assume "Target date..." are short enough)
- */
-- l1 = max (strlen (rd_widgets[6].text),
-- strlen (rd_widgets[11].text));
-+ l1 = max (mbstrlen (rd_widgets[6].text),
-+ mbstrlen (rd_widgets[11].text));
-
- /* longest of button rows */
- i = sizeof (rd_widgets) / sizeof (rd_widgets[0]);
-@@ -575,7 +576,7 @@
- l2 = max (l2, l);
- l = 0;
- }
-- l += strlen (rd_widgets[i].text) + 4;
-+ l += mbstrlen (rd_widgets[i].text) + 4;
- }
- }
- l2 = max (l2, l); /* last row */
-@@ -593,12 +594,12 @@
- l = l1;
- }
- rd_widgets[i].xpos = l;
-- l += strlen (rd_widgets[i].text) + 4;
-+ l += mbstrlen (rd_widgets[i].text) + 4;
- }
- }
- /* Abort button is centered */
- rd_widgets[1].xpos =
-- (rd_xlen - strlen (rd_widgets[1].text) - 3) / 2;
-+ (rd_xlen - mbstrlen (rd_widgets[1].text) - 3) / 2;
- }
- #endif /* ENABLE_NLS */
-
-@@ -617,7 +618,7 @@
-
- ADD_RD_LABEL (ui, 0,
- name_trunc (ui->replace_filename,
-- rd_trunc - strlen (rd_widgets[0].text)), 0);
-+ rd_trunc - mbstrlen (rd_widgets[0].text)), 0);
- ADD_RD_BUTTON (1);
-
- ADD_RD_BUTTON (2);
-@@ -804,36 +805,36 @@
- if (fmd_widgets[i].text[0] != '\0')
- fmd_widgets[i].text = _(fmd_widgets[i].text);
-
-- len = strlen (fmd_widgets[FMCB11].text)
-- + strlen (fmd_widgets[FMCB21].text) + 15;
-+ len = mbstrlen (fmd_widgets[FMCB11].text)
-+ + mbstrlen (fmd_widgets[FMCB21].text) + 15;
- fmd_xlen = max (fmd_xlen, len);
-
-- len = strlen (fmd_widgets[FMCB12].text)
-- + strlen (fmd_widgets[FMCB22].text) + 15;
-+ len = mbstrlen (fmd_widgets[FMCB12].text)
-+ + mbstrlen (fmd_widgets[FMCB22].text) + 15;
- fmd_xlen = max (fmd_xlen, len);
-
-- len = strlen (fmd_widgets[FMBRGT].text)
-- + strlen (fmd_widgets[FMBLFT].text) + 11;
-+ len = mbstrlen (fmd_widgets[FMBRGT].text)
-+ + mbstrlen (fmd_widgets[FMBLFT].text) + 11;
-
- #ifdef FMBMID
-- len += strlen (fmd_widgets[FMBMID].text) + 6;
-+ len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
- #endif
-
- fmd_xlen = max (fmd_xlen, len + 4);
-
- len = (fmd_xlen - (len + 6)) / 2;
- i = fmd_widgets[FMBLFT].relative_x = len + 3;
-- i += strlen (fmd_widgets[FMBLFT].text) + 8;
-+ i += mbstrlen (fmd_widgets[FMBLFT].text) + 8;
-
- #ifdef FMBMID
- fmd_widgets[FMBMID].relative_x = i;
-- i += strlen (fmd_widgets[FMBMID].text) + 6;
-+ i += mbstrlen (fmd_widgets[FMBMID].text) + 6;
- #endif
-
- fmd_widgets[FMBRGT].relative_x = i;
-
- #define chkbox_xpos(i) \
-- fmd_widgets [i].relative_x = fmd_xlen - strlen (fmd_widgets [i].text) - 6
-+ fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6
-
- chkbox_xpos (FMCB0);
- chkbox_xpos (FMCB21);
-@@ -855,7 +856,7 @@
-
- char *
- file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
-- const char *def_text, int only_one, int *do_background)
-+ const char *def_text_orig, int only_one, int *do_background)
- {
- int source_easy_patterns = easy_patterns;
- char *source_mask, *orig_mask, *dest_dir, *tmpdest;
-@@ -864,12 +865,20 @@
- struct stat buf;
- int val;
- QuickDialog Quick_input;
--
-+ char *def_text;
- g_return_val_if_fail (ctx != NULL, NULL);
-+
-+ def_text = g_strdup(def_text_orig);
-+
- #if 0
- message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text,
- def_text);
- #endif
-+
-+#ifdef UTF8
-+ fix_utf8(def_text);
-+#endif
-+
- fmd_init_i18n (FALSE);
-
- /* Set up the result pointers */
-@@ -928,6 +937,7 @@
- orig_mask = source_mask;
- if (!dest_dir || !*dest_dir) {
- g_free (source_mask);
-+ g_free(def_text);
- return dest_dir;
- }
- if (source_easy_patterns) {
-@@ -981,5 +991,6 @@
- }
- if (val == B_USER)
- *do_background = 1;
-+ g_free(def_text);
- return dest_dir;
- }
---- mc-4.6.2-pre1/src/find.c
-+++ mc-4.6.2-pre1/src/find.c
-@@ -217,7 +217,7 @@
- int l1, maxlen = 0;
-
- while (i--) {
-- l1 = strlen (labs[i] = _(labs[i]));
-+ l1 = mbstrlen (labs[i] = _(labs[i]));
- if (l1 > maxlen)
- maxlen = l1;
- }
-@@ -226,7 +226,7 @@
- FIND_X = i;
-
- for (i = sizeof (buts) / sizeof (buts[0]), l1 = 0; i--;) {
-- l1 += strlen (buts[i] = _(buts[i]));
-+ l1 += mbstrlen (buts[i] = _(buts[i]));
- }
- l1 += 21;
- if (l1 > FIND_X)
-@@ -235,8 +235,8 @@
- ilen = FIND_X - 7 - maxlen; /* for the case of very long buttons :) */
- istart = FIND_X - 3 - ilen;
-
-- b1 = b0 + strlen (buts[0]) + 7;
-- b2 = FIND_X - (strlen (buts[2]) + 6);
-+ b1 = b0 + mbstrlen (buts[0]) + 7;
-+ b2 = FIND_X - (mbstrlen (buts[2]) + 6);
-
- i18n_flag = 1;
- case_label = _(case_label);
-@@ -863,7 +863,7 @@
- if (!i18n_flag) {
- register int i = sizeof (fbuts) / sizeof (fbuts[0]);
- while (i--)
-- fbuts[i].len = strlen (fbuts[i].text = _(fbuts[i].text)) + 3;
-+ fbuts[i].len = mbstrlen (fbuts[i].text = _(fbuts[i].text)) + 3;
- fbuts[2].len += 2; /* DEFPUSH_BUTTON */
- i18n_flag = 1;
- }
-@@ -1028,7 +1028,7 @@
-
- if (!next_free) /* first turn i.e clean old list */
- panel_clean_dir (current_panel);
-- list->list[next_free].fnamelen = strlen (name);
-+ list->list[next_free].fnamelen = mbstrlen (name);
- list->list[next_free].fname = name;
- list->list[next_free].f.marked = 0;
- list->list[next_free].f.link_to_dir = link_to_dir;
---- mc-4.6.2-pre1/src/help.c
-+++ mc-4.6.2-pre1/src/help.c
-@@ -447,10 +447,28 @@
- #ifndef HAVE_SLANG
- addch (acs_map [c]);
- #else
-+#if defined(UTF8) && SLANG_VERSION < 20000
-+ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, acs_map [c]);
-+#else
- SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
-+#endif /* UTF8 */
- #endif
-+ } else {
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ int len;
-+ mbstate_t mbs;
-+ wchar_t wc;
-+ memset (&mbs, 0, sizeof (mbs));
-+ len = mbrtowc(&wc, p, MB_CUR_MAX, &mbs);
-+ if (len <= 0) len = 1; /* skip broken multibyte chars */
-+
-+ SLsmg_write_nwchars(&wc, 1);
-+ p += len - 1;
- } else
-+#endif
- addch (c);
-+ }
- col++;
- break;
- }
-@@ -803,6 +821,12 @@
- message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile,
- unix_error_string (errno));
- }
-+ else
-+ {
-+ char *conv = utf8_to_local(data);
-+ g_free(data);
-+ data = conv;
-+ }
-
- if (!filename)
- g_free (hlpfile);
---- mc-4.6.2-pre1/src/hotlist.c
-+++ mc-4.6.2-pre1/src/hotlist.c
-@@ -563,7 +563,7 @@
-
- row = hotlist_but [i].y;
- ++count [row];
-- len [row] += strlen (hotlist_but [i].text) + 5;
-+ len [row] += mbstrlen (hotlist_but [i].text) + 5;
- if (hotlist_but [i].flags == DEFPUSH_BUTTON)
- len [row] += 2;
- }
-@@ -588,12 +588,12 @@
- /* not first int the row */
- if (!strcmp (hotlist_but [i].text, cancel_but))
- hotlist_but [i].x =
-- cols - strlen (hotlist_but [i].text) - 13;
-+ cols - mbstrlen (hotlist_but [i].text) - 13;
- else
- hotlist_but [i].x = cur_x [row];
- }
-
-- cur_x [row] += strlen (hotlist_but [i].text) + 2
-+ cur_x [row] += mbstrlen (hotlist_but [i].text) + 2
- + (hotlist_but [i].flags == DEFPUSH_BUTTON ? 5 : 3);
- }
- }
-@@ -834,7 +834,7 @@
- for (i = 0; i < 3; i++)
- {
- qw [i].text = _(qw [i].text);
-- l[i] = strlen (qw [i].text) + 3;
-+ l[i] = mbstrlen (qw [i].text) + 3;
- }
- space = (len - 4 - l[0] - l[1] - l[2]) / 4;
-
-@@ -883,7 +883,7 @@
-
- msglen(text1, &lines1, &cols1);
- msglen(text2, &lines2, &cols2);
-- len = max ((int) strlen (header), cols1);
-+ len = max ((int) mbstrlen (header), cols1);
- len = max (len, cols2) + 4;
- len = max (len, 64);
-
-@@ -979,7 +979,7 @@
- #endif /* ENABLE_NLS */
-
- msglen (label, &lines, &cols);
-- len = max ((int) strlen (header), cols) + 4;
-+ len = max ((int) mbstrlen (header), cols) + 4;
- len = max (len, 64);
-
- #ifdef ENABLE_NLS
-@@ -1035,7 +1035,7 @@
- {
- char *prompt, *label;
- const char *cp = _("Label for \"%s\":");
-- int l = strlen (cp);
-+ int l = mbstrlen (cp);
- char *label_string = g_strdup (current_panel->cwd);
-
- strip_password (label_string, 1);
---- mc-4.6.2-pre1/src/layout.c
-+++ mc-4.6.2-pre1/src/layout.c
-@@ -366,36 +366,36 @@
-
- while (i--) {
- s_split_direction[i] = _(s_split_direction[i]);
-- l1 = strlen (s_split_direction[i]) + 7;
-+ l1 = mbstrlen (s_split_direction[i]) + 7;
- if (l1 > first_width)
- first_width = l1;
- }
-
- for (i = 0; i <= 8; i++) {
- check_options[i].text = _(check_options[i].text);
-- l1 = strlen (check_options[i].text) + 7;
-+ l1 = mbstrlen (check_options[i].text) + 7;
- if (l1 > first_width)
- first_width = l1;
- }
-
-- l1 = strlen (title1) + 1;
-+ l1 = mbstrlen (title1) + 1;
- if (l1 > first_width)
- first_width = l1;
-
-- l1 = strlen (title2) + 1;
-+ l1 = mbstrlen (title2) + 1;
- if (l1 > first_width)
- first_width = l1;
-
-
-- second_width = strlen (title3) + 1;
-+ second_width = mbstrlen (title3) + 1;
- for (i = 0; i < 6; i++) {
- check_options[i].text = _(check_options[i].text);
-- l1 = strlen (check_options[i].text) + 7;
-+ l1 = mbstrlen (check_options[i].text) + 7;
- if (l1 > second_width)
- second_width = l1;
- }
- if (console_flag) {
-- l1 = strlen (output_lines_label) + 13;
-+ l1 = mbstrlen (output_lines_label) + 13;
- if (l1 > second_width)
- second_width = l1;
- }
-@@ -409,14 +409,14 @@
- *
- * Now the last thing to do - properly space buttons...
- */
-- l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */
-- +strlen (save_button) /* notice: it is 3 char less because */
-- +strlen (cancel_button); /* of '&' char in button text */
-+ l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */
-+ +mbstrlen (save_button) /* notice: it is 3 char less because */
-+ +mbstrlen (cancel_button); /* of '&' char in button text */
-
- i = (first_width + second_width - l1) / 4;
- b1 = 5 + i;
-- b2 = b1 + strlen (ok_button) + i + 6;
-- b3 = b2 + strlen (save_button) + i + 4;
-+ b2 = b1 + mbstrlen (ok_button) + i + 6;
-+ b3 = b2 + mbstrlen (save_button) + i + 4;
-
- i18n_layt_flag = 1;
- }
-@@ -684,7 +684,7 @@
- panel_do_cols (0);
- panel_do_cols (1);
-
-- promptl = strlen (prompt);
-+ promptl = mbstrlen (prompt);
-
- widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
-
---- mc-4.6.2-pre1/src/learn.c
-+++ mc-4.6.2-pre1/src/learn.c
-@@ -237,7 +237,7 @@
- learn_but[0].x = 78 / 2 + 4;
-
- learn_but[1].text = _(learn_but[1].text);
-- learn_but[1].x = 78 / 2 - (strlen (learn_but[1].text) + 9);
-+ learn_but[1].x = 78 / 2 - (mbstrlen (learn_but[1].text) + 9);
-
- learn_title = _(learn_title);
- i18n_flag = 1;
---- mc-4.6.2-pre1/src/main.c
-+++ mc-4.6.2-pre1/src/main.c
-@@ -704,7 +704,7 @@
- int prompt_len;
-
- tmp_prompt = strip_ctrl_codes (subshell_prompt);
-- prompt_len = strlen (tmp_prompt);
-+ prompt_len = mbstrlen (tmp_prompt);
-
- /* Check for prompts too big */
- if (COLS > 8 && prompt_len > COLS - 8) {
-@@ -1610,7 +1610,11 @@
- if (xterm_flag && xterm_title) {
- p = s = g_strdup (strip_home_and_password (current_panel->cwd));
- do {
-+#ifndef UTF8
- if (!is_printable ((unsigned char) *s))
-+#else /* UTF8 */
-+ if (*(unsigned char *)s < ' ')
-+#endif /* UTF8 */
- *s = '?';
- } while (*++s);
- fprintf (stdout, "\33]0;mc - %s\7", p);
---- mc-4.6.2-pre1/src/menu.c
-+++ mc-4.6.2-pre1/src/menu.c
-@@ -22,6 +22,7 @@
- #include <string.h>
-
- #include <sys/types.h>
-+#include <wchar.h>
-
- #include "global.h"
- #include "tty.h"
-@@ -53,35 +54,95 @@
- {
- Menu *menu;
- const char *cp;
-+ int wlen = 0;
-+ mbstate_t s;
-
- menu = (Menu *) g_malloc (sizeof (*menu));
- menu->count = count;
- menu->max_entry_len = 20;
- menu->entries = entries;
-+ menu->name = g_strdup (name);
-+ menu_scan_hotkey (menu);
-+#ifdef UTF8
-+ menu->wentries = NULL;
-+ menu->wname = NULL;
-+ if (SLsmg_Is_Unicode) {
-+ const char *str = menu->name;
-+ memset (&s, 0, sizeof (s));
-+ wlen = mbsrtowcs (NULL, &str, -1, &s);
-+ if (wlen > 0)
-+ ++wlen;
-+ else {
-+ wlen = 0;
-+ memset (&s, 0, sizeof (s));
-+ }
-+ }
-+#endif
-
- if (entries != (menu_entry*) NULL) {
- register menu_entry* mp;
- for (mp = entries; count--; mp++) {
- if (mp->text[0] != '\0') {
-+ int len;
- #ifdef ENABLE_NLS
- mp->text = _(mp->text);
- #endif /* ENABLE_NLS */
- cp = strchr (mp->text,'&');
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ len = mbstrlen(mp->text) + 1;
-+ wlen += len;
-+ menu->max_entry_len = max (len - 1, menu->max_entry_len);
-+ } else
-+#endif
-+ len = strlen (mp->text);
-
- if (cp != NULL && *(cp+1) != '\0') {
- mp->hot_key = tolower ((unsigned char) *(cp+1));
-- menu->max_entry_len = max ((int) (strlen (mp->text) - 1),
-- menu->max_entry_len);
-+ menu->max_entry_len = max (len - 1, menu->max_entry_len);
- } else {
-- menu->max_entry_len = max ((int) strlen (mp->text),
-- menu->max_entry_len);
-+ menu->max_entry_len = max (len, menu->max_entry_len);
- }
- }
- }
- }
-
-- menu->name = g_strdup (name);
-- menu_scan_hotkey(menu);
-+#ifdef UTF8
-+ if (wlen) {
-+ wchar_t *wp;
-+ const char *str;
-+ int len;
-+
-+ menu->wentries = (wchar_t **)
-+ g_malloc (sizeof (wchar_t *) * menu->count
-+ + wlen * sizeof (wchar_t));
-+ wp = (wchar_t *) (menu->wentries + menu->count);
-+ str = menu->name;
-+ len = mbsrtowcs (wp, &str, wlen, &s);
-+ if (len > 0) {
-+ menu->wname = wp;
-+ wlen -= len + 1;
-+ wp += len + 1;
-+ } else
-+ memset (&s, 0, sizeof (s));
-+ if (menu->entries != NULL)
-+ for (count = 0; count < menu->count; ++count)
-+ if (menu->entries[count].text[0] != '\0') {
-+ str = menu->entries[count].text;
-+ menu->wentries[count] = wp;
-+ len = mbsrtowcs (wp, &str, wlen, &s);
-+ if (len > 0) {
-+ wlen -= len + 1;
-+ wp += len + 1;
-+ } else {
-+ memset (&s, 0, sizeof (s));
-+ *wp++ = L'\0';
-+ --wlen;
-+ }
-+ }
-+ }
-+#endif
-+
- menu->start_x = 0;
- menu->help_node = g_strdup (help_node);
- return menu;
-@@ -112,8 +173,26 @@
- const char *text;
-
- addch((unsigned char)menu->entries [idx].first_letter);
-- for (text = menu->entries [idx].text; *text; text++)
-- {
-+#ifdef UTF8
-+ if (menu->wentries) {
-+ wchar_t *wtext, *wp;
-+
-+ for (wtext = wp = menu->wentries [idx]; *wtext; wtext++) {
-+ if (*wtext == L'&') {
-+ if (wtext > wp)
-+ SLsmg_write_nwchars (wp, wtext - wp);
-+ attrset (color == MENU_SELECTED_COLOR ?
-+ MENU_HOTSEL_COLOR : MENU_HOT_COLOR);
-+ SLsmg_write_nwchars (++wtext, 1);
-+ attrset (color);
-+ wp = wtext + 1;
-+ }
-+ }
-+ if (wtext > wp)
-+ SLsmg_write_nwchars (wp, wtext - wp);
-+ } else
-+#endif
-+ for (text = menu->entries [idx].text; *text; text++) {
- if (*text != '&')
- addch(*text);
- else {
-@@ -122,7 +201,7 @@
- addch(*(++text));
- attrset(color);
- }
-- }
-+ }
- }
- widget_move (&menubar->widget, y, x + 1);
- }
-@@ -168,6 +247,12 @@
- if (menubar->active)
- attrset(i == menubar->selected?MENU_SELECTED_COLOR:SELECTED_COLOR);
- widget_move (&menubar->widget, 0, menubar->menu [i]->start_x);
-+#ifdef UTF8
-+ if (menubar->menu [i]->wname)
-+ SLsmg_write_nwchars (menubar->menu [i]->wname,
-+ wcslen (menubar->menu [i]->wname));
-+ else
-+#endif
- tty_printf ("%s", menubar->menu [i]->name);
- }
-
-@@ -493,7 +578,13 @@
-
- for (i = 0; i < items; i++)
- {
-- int len = strlen(menubar->menu[i]->name);
-+ int len;
-+#ifdef UTF8
-+ if (menubar->menu[i]->wname)
-+ len = wcslen (menubar->menu[i]->wname);
-+ else
-+#endif
-+ len = strlen(menubar->menu[i]->name);
- menubar->menu[i]->start_x = start_x;
- start_x += len + gap;
- }
-@@ -506,7 +597,13 @@
- for (i = 0; i < items; i++)
- {
- /* preserve length here, to be used below */
-- gap -= (menubar->menu[i]->start_x = strlen(menubar->menu[i]->name));
-+#ifdef UTF8
-+ if (menubar->menu[i]->wname)
-+ menubar->menu[i]->start_x = wcslen (menubar->menu[i]->wname);
-+ else
-+#endif
-+ menubar->menu[i]->start_x = strlen (menubar->menu[i]->name);
-+ gap -= menubar->menu[i]->start_x;
- }
-
- gap /= (items - 1);
-@@ -530,6 +627,9 @@
- void
- destroy_menu (Menu *menu)
- {
-+#ifdef UTF8
-+ g_free (menu->wentries);
-+#endif
- g_free (menu->name);
- g_free (menu->help_node);
- g_free (menu);
---- mc-4.6.2-pre1/src/menu.h
-+++ mc-4.6.2-pre1/src/menu.h
-@@ -21,6 +21,8 @@
- menu_entry *entries;
- int start_x; /* position relative to menubar start */
- char *help_node;
-+ wchar_t **wentries;
-+ wchar_t *wname;
- } Menu;
-
- extern int menubar_visible;
---- mc-4.6.2-pre1/src/myslang.h
-+++ mc-4.6.2-pre1/src/myslang.h
-@@ -11,6 +11,16 @@
- #endif /* HAVE_SLANG_SLANG_H */
- #endif
-
-+#if SLANG_VERSION >= 20000
-+#define UTF8 1
-+#define SLsmg_Is_Unicode SLsmg_is_utf8_mode()
-+void SLsmg_write_nwchars(wchar_t *s, size_t n);
-+#endif
-+
-+#ifdef UTF8
-+# include <wchar.h>
-+#endif
-+
- enum {
- KEY_BACKSPACE = 400,
- KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
---- mc-4.6.2-pre1/src/option.c
-+++ mc-4.6.2-pre1/src/option.c
-@@ -123,12 +123,12 @@
- title2 = _(" Pause after run... ");
- title3 = _(" Other options ");
-
-- first_width = strlen (title1) + 1;
-- second_width = strlen (title3) + 1;
-+ first_width = mbstrlen (title1) + 1;
-+ second_width = mbstrlen (title3) + 1;
-
- for (i = 0; check_options[i].text; i++) {
- check_options[i].text = _(check_options[i].text);
-- l1 = strlen (check_options[i].text) + 7;
-+ l1 = mbstrlen (check_options[i].text) + 7;
- if (i >= OTHER_OPTIONS) {
- if (l1 > first_width)
- first_width = l1;
-@@ -141,23 +141,23 @@
- i = PAUSE_OPTIONS;
- while (i--) {
- pause_options[i] = _(pause_options[i]);
-- l1 = strlen (pause_options[i]) + 7;
-+ l1 = mbstrlen (pause_options[i]) + 7;
- if (l1 > first_width)
- first_width = l1;
- }
-
-- l1 = strlen (title2) + 1;
-+ l1 = mbstrlen (title2) + 1;
- if (l1 > first_width)
- first_width = l1;
-
-- l1 = 11 + strlen (ok_button)
-- + strlen (save_button)
-- + strlen (cancel_button);
-+ l1 = 11 + mbstrlen (ok_button)
-+ + mbstrlen (save_button)
-+ + mbstrlen (cancel_button);
-
- i = (first_width + second_width - l1) / 4;
- b1 = 5 + i;
-- b2 = b1 + strlen (ok_button) + i + 6;
-- b3 = b2 + strlen (save_button) + i + 4;
-+ b2 = b1 + mbstrlen (ok_button) + i + 6;
-+ b3 = b2 + mbstrlen (save_button) + i + 4;
-
- i18n_config_flag = 1;
- }
---- mc-4.6.2-pre1/src/panelize.c
-+++ mc-4.6.2-pre1/src/panelize.c
-@@ -127,7 +127,7 @@
- i = sizeof (panelize_but) / sizeof (panelize_but[0]);
- while (i--) {
- panelize_but[i].text = _(panelize_but[i].text);
-- maxlen += strlen (panelize_but[i].text) + 5;
-+ maxlen += mbstrlen (panelize_but[i].text) + 5;
- }
- maxlen += 10;
-
-@@ -136,11 +136,11 @@
- panelize_cols = max (panelize_cols, maxlen);
-
- panelize_but[2].x =
-- panelize_but[3].x + strlen (panelize_but[3].text) + 7;
-+ panelize_but[3].x + mbstrlen (panelize_but[3].text) + 7;
- panelize_but[1].x =
-- panelize_but[2].x + strlen (panelize_but[2].text) + 5;
-+ panelize_but[2].x + mbstrlen (panelize_but[2].text) + 5;
- panelize_but[0].x =
-- panelize_cols - strlen (panelize_but[0].text) - 8 - BX;
-+ panelize_cols - mbstrlen (panelize_but[0].text) - 8 - BX;
-
- #endif /* ENABLE_NLS */
-
---- mc-4.6.2-pre1/src/screen.c
-+++ mc-4.6.2-pre1/src/screen.c
-@@ -171,21 +171,56 @@
- static const char *
- string_file_name (file_entry *fe, int len)
- {
-- static char buffer [MC_MAXPATHLEN + 1];
- size_t i;
-
-- for (i = 0; i < sizeof(buffer) - 1; i++) {
-- char c;
-+#ifdef UTF8
-+ static char buffer [BUF_SMALL * 4];
-+ mbstate_t s;
-+ int mbmax = MB_CUR_MAX;
-+ const char *str = fe->fname;
-
-- c = fe->fname[i];
-+ memset (&s, 0, sizeof (s));
-+#else
-+ static char buffer [BUF_SMALL];
-+#endif
-
-- if (!c)
-- break;
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode)
-+ for (i = 0; i < sizeof (buffer) - 1; i++) {
-+ wchar_t wc;
-+ int len;
-
-- if (!is_printable(c))
-- c = '?';
-+ len = mbrtowc (&wc, str, mbmax, &s);
-+ if (!len)
-+ break;
-+ if (len < 0) {
-+ memset (&s, 0, sizeof (s));
-+ buffer[i] = '?';
-+ str++;
-+ continue;
-+ }
-+ if (!is_printable (wc)) {
-+ buffer[i] = '?';
-+ str++;
-+ continue;
-+ }
-+ if (i >= sizeof (buffer) - len)
-+ break;
-+ memcpy (buffer + i, str, len);
-+ i += len - 1;
-+ str += len;
-+ } else
-+#endif
-+ for (i = 0; i < sizeof(buffer) - 1; i++) {
-+ char c;
-+
-+ c = fe->fname[i];
-
-- buffer[i] = c;
-+ if (!c) break;
-+
-+ if (!is_printable(c)) c = '?';
-+
-+ buffer[i] = c;
- }
-
- buffer[i] = 0;
-@@ -450,42 +485,6 @@
- { "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL },
- };
-
--static char *
--to_buffer (char *dest, int just_mode, int len, const char *txt)
--{
-- int txtlen = strlen (txt);
-- int still, over;
--
-- /* Fill buffer with spaces */
-- memset (dest, ' ', len);
--
-- still = (over=(txtlen > len)) ? (txtlen - len) : (len - txtlen);
--
-- switch (HIDE_FIT(just_mode)){
-- case J_LEFT:
-- still = 0;
-- break;
-- case J_CENTER:
-- still /= 2;
-- break;
-- case J_RIGHT:
-- default:
-- break;
-- }
--
-- if (over){
-- if (IS_FIT(just_mode))
-- strcpy (dest, name_trunc(txt, len));
-- else
-- strncpy (dest, txt+still, len);
-- } else
-- strncpy (dest+still, txt, txtlen);
--
-- dest[len] = '\0';
--
-- return (dest + len);
--}
--
- static int
- file_compute_color (int attr, file_entry *fe)
- {
-@@ -539,14 +538,18 @@
-
- /* Formats the file number file_index of panel in the buffer dest */
- static void
--format_file (char *dest, int limit, WPanel *panel, int file_index, int width, int attr, int isstatus)
-+format_file (WPanel *panel, int file_index, int width, int attr, int isstatus)
- {
- int color, length, empty_line;
- const char *txt;
-- char *old_pos;
-- char *cdest = dest;
- format_e *format, *home;
- file_entry *fe;
-+#ifdef UTF8
-+ char buffer[BUF_MEDIUM * sizeof (wchar_t)];
-+#else
-+ char buffer[BUF_MEDIUM];
-+#endif
-+ int txtwidth = 0;
-
- length = 0;
- empty_line = (file_index >= panel->count);
-@@ -564,34 +567,137 @@
- break;
-
- if (format->string_fn){
-- int len;
-+ int len, still, over, perm, txtlen, wide;
-
- if (empty_line)
- txt = " ";
- else
- txt = (*format->string_fn)(fe, format->field_len);
-
-- old_pos = cdest;
--
- len = format->field_len;
- if (len + length > width)
- len = width - length;
-- if (len + (cdest - dest) > limit)
-- len = limit - (cdest - dest);
-+ if (len >= BUF_MEDIUM)
-+ len = BUF_MEDIUM - 1;
- if (len <= 0)
- break;
-- cdest = to_buffer (cdest, format->just_mode, len, txt);
-- length += len;
-
-- attrset (color);
-+ perm = 0;
-+ if (permission_mode) {
-+ if (!strcmp(format->id, "perm"))
-+ perm = 1;
-+ else if (!strcmp(format->id, "mode"))
-+ perm = 2;
-+ }
-
-- if (permission_mode && !strcmp(format->id, "perm"))
-- add_permission_string (old_pos, format->field_len, fe, attr, color, 0);
-- else if (permission_mode && !strcmp(format->id, "mode"))
-- add_permission_string (old_pos, format->field_len, fe, attr, color, 1);
-- else
-- addstr (old_pos);
-+ wide = 0;
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode && !empty_line && !perm) {
-+ mbstate_t s;
-+ const char *str = txt;
-+
-+ memset (&s, 0, sizeof (s));
-+ txtlen = mbsrtowcs ((wchar_t *) buffer, &str,
-+ sizeof (buffer) / sizeof (wchar_t), &s);
-+ if (txtlen < 0) {
-+ txt = " ";
-+ txtlen = 1;
-+ } else {
-+ wide = 1;
-+ txtwidth = wcswidth((wchar_t*)buffer, txtlen);
-+ }
-+ } else
-+#endif
-+ {
-+ txtlen = mbstrlen (txt);
-+ txtwidth = txtlen;
-+ }
-+
-+ over = txtwidth > len;
-+ still = over ? txtlen - len : len - txtlen;
-+
-+ switch (HIDE_FIT(format->just_mode)) {
-+ case J_LEFT:
-+ still = 0;
-+ break;
-+ case J_CENTER:
-+ still /= 2;
-+ break;
-+ case J_RIGHT:
-+ default:
-+ break;
-+ }
-+
-+ attrset (color);
-+
-+ if (wide) {
-+#ifdef UTF8
-+ if (over) {
-+ if (IS_FIT (format->just_mode)) {
-+ int n1 = 0;
-+ int width1 = 0;
-+ int n2 = 0;
-+ int width2 = 0;
-+ int len1 = len / 2;
-+ int len2;
-+
-+ while (1) {
-+ int w = wcwidth(((wchar_t *) buffer)[n1]);
-+ if (width1 + w <= len1) {
-+ width1 += w;
-+ n1++;
-+ }
-+ else
-+ break;
-+ }
-+ len2 = len - width1 - 1;
-+
-+ while (1) {
-+ int w = wcwidth(((wchar_t *) buffer)[txtlen - n2 - 1]);
-+ if (width2 + w <= len2) {
-+ width2 += w;
-+ n2++;
-+ }
-+ else
-+ break;
-+ }
-+
-+
-+ SLsmg_write_nwchars ((wchar_t *) buffer, n1);
-+ SLsmg_write_nwchars (L"~", 1);
-+ printw ("%*s", len - width1 - width2 - 1, "");
-+ SLsmg_write_nwchars (((wchar_t *) buffer)
-+ + txtlen - n2, n2);
-+ } else
-+ SLsmg_write_nwchars ((wchar_t *) buffer, len);
-+ } else {
-+ printw ("%*s", still, "");
-+ SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
-+ printw ("%*s", len - txtwidth - still, "");
-+ }
-+#endif
-+ } else {
-+ if (over) {
-+ if (IS_FIT (format->just_mode))
-+ strcpy (buffer, name_trunc(txt, len));
-+ else
-+ memcpy (buffer, txt + still, len);
-+ } else {
-+ memset (buffer, ' ', still);
-+ memcpy (buffer + still, txt, txtlen);
-+ memset (buffer + still + txtlen, ' ',
-+ len - txtlen - still);
-+ }
-+ buffer[len] = '\0';
-
-+ if (perm)
-+ add_permission_string (buffer, format->field_len, fe,
-+ attr, color, perm - 1);
-+ else
-+ addstr (buffer);
-+ }
-+
-+ length += len;
- } else {
- if (attr == SELECTED || attr == MARKED_SELECTED)
- attrset (SELECTED_COLOR);
-@@ -614,7 +720,6 @@
- {
- int second_column = 0;
- int width, offset;
-- char buffer [BUF_MEDIUM];
-
- offset = 0;
- if (!isstatus && panel->split){
-@@ -643,7 +748,7 @@
- widget_move (&panel->widget, file_index - panel->top_file + 2, 1);
- }
-
-- format_file (buffer, sizeof(buffer), panel, file_index, width, attr, isstatus);
-+ format_file (panel, file_index, width, attr, isstatus);
-
- if (!isstatus && panel->split){
- if (second_column)
-@@ -692,7 +797,7 @@
- ngettext("%s in %d file", "%s in %d files", panel->marked),
- b_bytes, panel->marked);
-
-- if ((int) strlen (buffer) > cols-2){
-+ if ((int) mbstrlen (buffer) > cols-2){
- buffer [cols] = 0;
- p += 2;
- } else
-@@ -1104,6 +1209,12 @@
- int side, width;
-
- const char *txt;
-+#ifdef UTF8
-+ char buffer[30 * sizeof (wchar_t)];
-+ mbstate_t s;
-+
-+ memset (&s, 0, sizeof (s));
-+#endif
- if (!panel->split)
- adjust_top_file (panel);
-
-@@ -1128,16 +1239,38 @@
- if (format->string_fn){
- txt = format->title;
-
-- header_len = strlen (txt);
-+ attrset (MARKED_COLOR);
-+ width -= format->field_len;
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ const char *str = txt;
-+ header_len = mbsrtowcs ((wchar_t *) buffer, &str,
-+ sizeof (buffer) / sizeof (wchar_t),
-+ &s);
-+ if (header_len < 0) {
-+ memset (&s, 0, sizeof (s));
-+ printw ("%*s", format->field_len, "");
-+ continue;
-+ }
-+ if (header_len > format->field_len)
-+ header_len = format->field_len;
-+ spaces = (format->field_len - header_len) / 2;
-+ extra = (format->field_len - header_len) % 2;
-+ printw ("%*s", spaces, "");
-+ SLsmg_write_nwchars ((wchar_t *) buffer, header_len);
-+ printw ("%*s", spaces + extra, "");
-+ continue;
-+ }
-+#endif
-+
-+ header_len = mbstrlen (txt);
- if (header_len > format->field_len)
- header_len = format->field_len;
-
-- attrset (MARKED_COLOR);
- spaces = (format->field_len - header_len) / 2;
- extra = (format->field_len - header_len) % 2;
- tty_printf ("%*s%.*s%*s", spaces, "",
- header_len, txt, spaces+extra, "");
-- width -= 2 * spaces + extra + header_len;
- } else {
- attrset (NORMAL_COLOR);
- one_vline ();
-@@ -1894,11 +2027,24 @@
- int i;
- int wrapped = 0;
- int found;
-+ int prevpos, pos;
-+ int j;
-+ mbstate_t mbs;
-
- l = strlen (panel->search_buffer);
- if (c_code == KEY_BACKSPACE) {
-- if (l)
-- panel->search_buffer[--l] = '\0';
-+ if (l) {
-+ prevpos = pos = 0;
-+ memset (&mbs, 0, sizeof (mbs));
-+ while (pos < l) {
-+ prevpos = pos;
-+ j = mbrlen (panel->search_buffer + pos, l - pos, &mbs);
-+ if (j <= 0) break;
-+ pos += j;
-+ }
-+ --l;
-+ panel->search_buffer[prevpos] = 0;
-+ }
- } else {
- if (c_code && l < sizeof (panel->search_buffer)) {
- panel->search_buffer[l] = c_code;
-@@ -1907,6 +2053,14 @@
- }
- }
-
-+ prevpos = pos = 0;
-+ memset (&mbs, 0, sizeof (mbs));
-+ while (pos < l) {
-+ prevpos = pos;
-+ j = mbrlen (panel->search_buffer + pos, l - pos, &mbs);
-+ if (j <= 0) break;
-+ pos += j;
-+ }
- found = 0;
- for (i = panel->selected; !wrapped || i != panel->selected; i++) {
- if (i >= panel->count) {
-@@ -1917,9 +2071,9 @@
- }
- if (panel->
- case_sensitive
-- ? (strncmp (panel->dir.list[i].fname, panel->search_buffer, l)
-+ ? (strncmp (panel->dir.list[i].fname, panel->search_buffer, pos)
- == 0) : (g_strncasecmp (panel->dir.list[i].fname,
-- panel->search_buffer, l) == 0)) {
-+ panel->search_buffer, pos) == 0)) {
- unselect_item (panel);
- panel->selected = i;
- select_item (panel);
-@@ -1928,7 +2082,7 @@
- }
- }
- if (!found)
-- panel->search_buffer[--l] = 0;
-+ panel->search_buffer[prevpos] = 0;
-
- paint_panel (panel);
- }
---- mc-4.6.2-pre1/src/slint.c
-+++ mc-4.6.2-pre1/src/slint.c
-@@ -141,7 +141,9 @@
- slang_init (void)
- {
- SLtt_get_terminfo ();
--
-+#if SLANG_VERSION >= 20000
-+ SLutf8_enable (-1);
-+#endif
- /*
- * If the terminal in not in terminfo but begins with a well-known
- * string such as "linux" or "xterm" S-Lang will go on, but the
---- mc-4.6.2-pre1/src/tty.c
-+++ mc-4.6.2-pre1/src/tty.c
-@@ -134,10 +134,12 @@
- * defined or not. Congratulations! At least, they left the API call
- * for SLsmg_write_nchars as it has always been.
- */
-- char ch;
--
-- ch = c;
-- SLsmg_write_nchars(&ch, 1);
-+
-+ /* The above comment is a nonsense, SLsmg_write_char(c) works pretty
-+ * good for me. So please don't mess with Red Hat people.
-+ * Jindrich Novy (jnovy at redhat.com)
-+ */
-+ SLsmg_write_char(c);
- #else
- addch(c);
- #endif
---- mc-4.6.2-pre1/src/tty.h
-+++ mc-4.6.2-pre1/src/tty.h
-@@ -8,6 +8,8 @@
- of ifdefs in the other files small.
- */
-
-+#include <glib.h> /* gboolean is used here */
-+
- #ifdef HAVE_SLANG
- # include "myslang.h"
- #endif
---- mc-4.6.2-pre1/src/util.c
-+++ mc-4.6.2-pre1/src/util.c
-@@ -33,7 +33,11 @@
- #include <sys/types.h>
- #include <sys/stat.h>
- #include <unistd.h>
-+#include <iconv.h>
-+#include <langinfo.h>
-+#include <errno.h>
-
-+#include "tty.h"
- #include "global.h"
- #include "profile.h"
- #include "main.h" /* mc_home */
-@@ -45,9 +49,39 @@
- #include "charsets.h"
- #endif
-
-+#ifdef UTF8
-+#include <wctype.h>
-+#endif
-+
- static const char app_text [] = "Midnight-Commander";
- int easy_patterns = 1;
-
-+#if SLANG_VERSION >= 20000
-+void SLsmg_write_nwchars(wchar_t *s, size_t n)
-+{
-+ if (SLsmg_is_utf8_mode()) { /* slang can handle it directly */
-+ while(n-- && *s)
-+ SLsmg_write_char(*s++);
-+ }
-+ else { /* convert wchars back to 8bit encoding */
-+ mbstate_t mbs;
-+ memset (&mbs, 0, sizeof (mbs));
-+ while (n-- && *s) {
-+ char buf[MB_LEN_MAX + 1]; /* should use 1 char, but to be sure */
-+ if (*s < 0x80) {
-+ SLsmg_write_char(*s++); /* ASCII */
-+ }
-+ else {
-+ if (wcrtomb(buf, *s++, &mbs) == 1)
-+ SLsmg_write_char((wchar_t)(buf[0]));
-+ else
-+ SLsmg_write_char('?'); /* should not happen */
-+ }
-+ }
-+ }
-+}
-+#endif
-+
- extern void str_replace(char *s, char from, char to)
- {
- for (; *s != '\0'; s++) {
-@@ -78,9 +112,106 @@
- return (c > 31 && c != 127 && c != 155);
- }
-
-+size_t
-+mbstrlen (const char *str)
-+{
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ size_t width = 0;
-+
-+ for (; *str; str++) {
-+ wchar_t c;
-+ size_t len;
-+
-+ len = mbrtowc (&c, str, MB_CUR_MAX, NULL);
-+
-+ if (len == (size_t)(-1) || len == (size_t)(-2)) break;
-+
-+ if (len > 0) {
-+ int wcsize = wcwidth(c);
-+ width += wcsize > 0 ? wcsize : 0;
-+ str += len-1;
-+ }
-+ }
-+
-+ return width;
-+ } else
-+#endif
-+ return strlen (str);
-+}
-+
-+#ifdef UTF8
-+
-+void
-+fix_utf8(char *str)
-+{
-+ mbstate_t mbs;
-+
-+ char *p = str;
-+
-+ while (*p) {
-+ int len;
-+ memset (&mbs, 0, sizeof (mbs));
-+ len = mbrlen(p, MB_CUR_MAX, &mbs);
-+ if (len == -1) {
-+ *p = '?';
-+ p++;
-+ } else if (len > 0) {
-+ p += len;
-+ } else {
-+ p++;
-+ }
-+ }
-+}
-+#endif
-+
-+
-+
-+#ifdef UTF8
-+wchar_t *
-+mbstr_to_wchar (const char *str)
-+{
-+ int len = mbstrlen(str);
-+ wchar_t *buf = g_malloc((len+1) * sizeof(wchar_t));
-+ mbstate_t mbs;
-+ memset (&mbs, 0, sizeof (mbs));
-+ mbsrtowcs (buf, &str, len, &mbs);
-+ buf[len] = 0;
-+ return buf;
-+}
-+
-+char *
-+wchar_to_mbstr (const wchar_t *wstr)
-+{
-+ mbstate_t mbs;
-+ const wchar_t *wstr2;
-+ char * string;
-+ int len;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+ wstr2 = wstr;
-+ len = wcsrtombs(NULL, &wstr2, 0, &mbs);
-+ if (len <= 0)
-+ return NULL;
-+
-+ string = g_malloc(len + 1);
-+
-+ wstr2 = wstr;
-+ wcsrtombs(string, &wstr2, len, &mbs);
-+ string[len] = 0;
-+ return string;
-+}
-+#endif
-+
-+
-+
- int
- is_printable (int c)
- {
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode)
-+ return iswprint (c);
-+#endif
- c &= 0xff;
-
- #ifdef HAVE_CHARSET
-@@ -98,7 +229,7 @@
- #endif /* !HAVE_CHARSET */
- }
-
--/* Calculates the message dimensions (lines and columns) */
-+/* Calculates the message dimension in columns and lines. */
- void
- msglen (const char *text, int *lines, int *columns)
- {
-@@ -111,8 +242,21 @@
- nlines++;
- colindex = 0;
- } else {
-+#ifndef UTF8
- colindex++;
- if (colindex > ncolumns)
-+#else /* UTF8 */
-+ size_t len;
-+ wchar_t c;
-+
-+ len = mbrtowc (&c, text, MB_CUR_MAX, NULL);
-+ if (len > 0 && len != (size_t)(-1) && len != (size_t)(-2)) {
-+ int wcsize = wcwidth(c);
-+ colindex += wcsize > 0 ? wcsize-1 : -1;
-+ text += len-1;
-+ }
-+ if (++colindex > ncolumns)
-+#endif /* UTF8 */
- ncolumns = colindex;
- }
- }
-@@ -206,7 +350,24 @@
- *d++ = '\\';
- break;
- }
-+#ifndef UTF8
- *d = *s;
-+#else /* UTF8 */
-+ {
-+ mbstate_t mbs;
-+ int len;
-+ memset (&mbs, 0, sizeof (mbs));
-+ len = mbrlen(s, MB_CUR_MAX, &mbs);
-+ if (len > 0) {
-+ while (len-- > 1)
-+ *d++ = *s++;
-+ *d = *s;
-+ } else {
-+ *d = '?';
-+ }
-+
-+ }
-+#endif /* UTF8 */
- }
- *d = '\0';
- return ret;
-@@ -228,25 +389,90 @@
- name_trunc (const char *txt, int trunc_len)
- {
- static char x[MC_MAXPATHLEN + MC_MAXPATHLEN];
-- int txt_len;
-+ int txt_len, first, skip;
- char *p;
-+ const char *str;
-
- if ((size_t) trunc_len > sizeof (x) - 1) {
- trunc_len = sizeof (x) - 1;
- }
-- txt_len = strlen (txt);
-- if (txt_len <= trunc_len) {
-- strcpy (x, txt);
-- } else {
-- int y = (trunc_len / 2) + (trunc_len % 2);
-- strncpy (x, txt, y);
-- strncpy (x + y, txt + txt_len - (trunc_len / 2), trunc_len / 2);
-- x[y] = '~';
-- }
-- x[trunc_len] = 0;
-- for (p = x; *p; p++)
-- if (!is_printable (*p))
-- *p = '?';
-+ txt_len = mbstrlen (txt);
-+ first = 0;
-+ skip = 0;
-+ if (txt_len > trunc_len) {
-+ first = trunc_len / 2;
-+ skip = txt_len - trunc_len + 1;
-+ }
-+
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ mbstate_t s;
-+ int mbmax;
-+
-+ str = txt;
-+ memset (&s, 0, sizeof (s));
-+ mbmax = MB_CUR_MAX;
-+ p = x;
-+ while (p < x + sizeof (x) - 1 && trunc_len) {
-+ wchar_t wc;
-+ int len;
-+
-+ len = mbrtowc (&wc, str, mbmax, &s);
-+ if (!len)
-+ break;
-+ if (len < 0) {
-+ memset (&s, 0, sizeof (s));
-+ *p = '?';
-+ len = 1;
-+ str++;
-+ } else if (!is_printable (wc)) {
-+ *p = '?';
-+ str += len;
-+ len = 1;
-+ } else if (p >= x + sizeof (x) - len)
-+ break;
-+ else {
-+ memcpy (p, str, len);
-+ str += len;
-+ }
-+ if (first) {
-+ --trunc_len;
-+ --first;
-+ p += len;
-+ if (!first && p < x + sizeof (x) - 1 && trunc_len) {
-+ *p++ = '~';
-+ --trunc_len;
-+ }
-+ } else if (skip)
-+ --skip;
-+ else {
-+ --trunc_len;
-+ p += len;
-+ }
-+ }
-+ } else
-+#endif
-+ {
-+ str = txt;
-+ p = x;
-+ while (p < x + sizeof (x) - 1) {
-+ if (*str == '\0')
-+ break;
-+ else if (!is_printable (*str))
-+ *p++ = '?';
-+ else
-+ *p++ = *str;
-+ ++str;
-+ if (first) {
-+ --first;
-+ if (!first) {
-+ *p++ = '~';
-+ str += skip;
-+ }
-+ }
-+ }
-+ }
-+ *p = '\0';
- return x;
- }
-
-@@ -678,11 +904,61 @@
- }
-
- char *
-+utf8_to_local(char *str)
-+{
-+ iconv_t cd;
-+ size_t buflen = strlen(str);
-+ char *output;
-+ int retry = 1;
-+
-+ cd = iconv_open (nl_langinfo(CODESET), "UTF-8");
-+ if (cd == (iconv_t) -1) {
-+ return g_strdup(str);
-+ }
-+
-+ output = g_malloc(buflen + 1);
-+
-+ while (retry)
-+ {
-+ char *wrptr = output;
-+ char *inptr = str;
-+ size_t insize = buflen;
-+ size_t avail = buflen;
-+ size_t nconv;
-+
-+ nconv = iconv (cd, &inptr, &insize, &wrptr, &avail);
-+ if (nconv == (size_t) -1)
-+ {
-+ if (errno == E2BIG)
-+ {
-+ buflen *= 2;
-+ g_free(output);
-+ output = g_malloc(buflen + 1);
-+ }
-+ else
-+ {
-+ g_free(output);
-+ return g_strdup(str);
-+ }
-+ }
-+ else {
-+ retry = 0;
-+ *wrptr = 0;
-+ }
-+ }
-+
-+ iconv_close (cd);
-+
-+ return output;
-+}
-+
-+char *
- load_mc_home_file (const char *filename, char **allocated_filename)
- {
- char *hintfile_base, *hintfile;
- char *lang;
- char *data;
-+ char *conv_data;
-
- hintfile_base = concat_dir_and_file (mc_home, filename);
- lang = guess_message_value ();
-@@ -715,7 +991,10 @@
- else
- g_free (hintfile);
-
-- return data;
-+ conv_data = utf8_to_local(data);
-+ g_free(data);
-+
-+ return conv_data;
- }
-
- /* Check strftime() results. Some systems (i.e. Solaris) have different
-@@ -724,12 +1003,14 @@
- i18n_checktimelength (void)
- {
- size_t length, a, b;
-- char buf [MAX_I18NTIMELENGTH + 1];
-+ char buf [4 * MAX_I18NTIMELENGTH + 1];
- time_t testtime = time (NULL);
-
-- a = strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
-- b = strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
--
-+ strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
-+ a = mbstrlen (buf);
-+ strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
-+ b = mbstrlen (buf);
-+
- length = max (a, b);
-
- /* Don't handle big differences. Use standard value (email bug, please) */
-@@ -742,15 +1023,12 @@
- const char *
- file_date (time_t when)
- {
-- static char timebuf [MAX_I18NTIMELENGTH + 1];
-+ static char timebuf [4 * MAX_I18NTIMELENGTH + 1];
- time_t current_time = time ((time_t) 0);
-- static size_t i18n_timelength = 0;
- static const char *fmtyear, *fmttime;
- const char *fmt;
-
-- if (i18n_timelength == 0){
-- i18n_timelength = i18n_checktimelength() + 1;
--
-+ if (fmtyear == NULL) {
- /* strftime() format string for old dates */
- fmtyear = _("%b %e %Y");
- /* strftime() format string for recent dates */
-@@ -770,7 +1048,7 @@
- else
- fmt = fmttime;
-
-- strftime (timebuf, i18n_timelength, fmt, localtime(&when));
-+ strftime (timebuf, sizeof (timebuf) - 1, fmt, localtime(&when));
- return timebuf;
- }
-
-@@ -900,10 +1178,27 @@
- r++;
- continue;
- }
--
-+#ifndef UTF8
- if (is_printable(*r))
- *w++ = *r;
- ++r;
-+#else /* UTF8 */
-+ {
-+ mbstate_t mbs;
-+ int len;
-+ memset (&mbs, 0, sizeof (mbs));
-+ len = mbrlen(r, MB_CUR_MAX, &mbs);
-+
-+ if (len > 0 && (unsigned char)*r >= ' ')
-+ while (len--)
-+ *w++ = *r++;
-+ else {
-+ if (len == -1)
-+ *w++ = '?';
-+ r++;
-+ }
-+ }
-+#endif /* UTF8 */
- }
- *w = 0;
- return s;
---- mc-4.6.2-pre1/src/util.h
-+++ mc-4.6.2-pre1/src/util.h
-@@ -103,6 +103,13 @@
- char *get_group (int);
- char *get_owner (int);
-
-+void fix_utf8(char *str);
-+size_t mbstrlen (const char *);
-+wchar_t *mbstr_to_wchar (const char *);
-+char *wchar_to_mbstr (const wchar_t *);
-+char *utf8_to_local(char *str);
-+
-+
- #define MAX_I18NTIMELENGTH 14
- #define MIN_I18NTIMELENGTH 10
- #define STD_I18NTIMELENGTH 12
---- mc-4.6.2-pre1/src/view.c
-+++ mc-4.6.2-pre1/src/view.c
-@@ -43,6 +43,10 @@
- #include <sys/stat.h>
- #include <unistd.h>
-
-+#ifdef UTF8
-+#include <wctype.h>
-+#endif /* UTF8 */
-+
- #include "global.h"
- #include "tty.h"
- #include "cmd.h" /* For view_other_cmd */
-@@ -1642,7 +1646,7 @@
- hline (' ', width);
-
- file_label = _("File: %s");
-- file_label_width = strlen (file_label) - 2;
-+ file_label_width = mbstrlen (file_label) - 2;
- file_name = view->filename ? view->filename
- : view->command ? view->command
- : "";
-@@ -1910,6 +1914,12 @@
- offset_type from;
- int c;
- struct hexedit_change_node *curr = view->change_list;
-+#ifdef UTF8
-+ mbstate_t mbs;
-+ char mbbuf[MB_LEN_MAX];
-+ int mblen;
-+ wchar_t wc;
-+#endif /* UTF8 */
-
- view_display_clean (view);
- view_display_ruler (view);
-@@ -1922,8 +1932,37 @@
-
- tty_setcolor (NORMAL_COLOR);
- for (row = 0, col = 0; row < height && (c = get_byte (view, from)) != -1; from++) {
--
-+#ifndef UTF8
- if (view->text_nroff_mode && c == '\b') {
-+#else /* UTF8 */
-+ mblen = 1;
-+ mbbuf[0] = convert_to_display_c (c);
-+
-+ while (mblen < MB_LEN_MAX) {
-+ int res;
-+ memset (&mbs, 0, sizeof (mbs));
-+ res = mbrtowc (&wc, mbbuf, mblen, &mbs);
-+ if (res <= 0 && res != -2) {
-+ wc = '.';
-+ mblen = 1;
-+ break;
-+ }
-+ if (res == mblen)
-+ break;
-+
-+ mbbuf[mblen] = convert_to_display_c (get_byte (view, from + mblen));
-+ mblen++;
-+ }
-+
-+ if (mblen == MB_LEN_MAX) {
-+ wc = '.';
-+ mblen = 1;
-+ }
-+
-+ from += mblen - 1;
-+
-+ if (view->text_nroff_mode && wc == '\b') {
-+#endif /* UTF8 */
- int c_prev;
- int c_next;
-
-@@ -1988,10 +2027,17 @@
- if (col >= view->dpy_text_column
- && col - view->dpy_text_column < width) {
- widget_move (view, top + row, left + (col - view->dpy_text_column));
-+#ifndef UTF8
- c = convert_to_display_c (c);
- if (!is_printable (c))
- c = '.';
- tty_print_char (c);
-+#else
-+ wc = convert_to_display_c (wc);
-+ if (!iswprint (wc))
-+ wc = '.';
-+ tty_print_char (wc);
-+#endif
- }
- col++;
- tty_setcolor (NORMAL_COLOR);
---- mc-4.6.2-pre1/src/widget.c
-+++ mc-4.6.2-pre1/src/widget.c
-@@ -36,6 +36,9 @@
-
- #include "global.h"
- #include "tty.h"
-+#ifdef UTF8
-+#include <wctype.h>
-+#endif /* UTF8 */
- #include "color.h"
- #include "mouse.h"
- #include "dialog.h"
-@@ -182,6 +185,11 @@
- if (b->hotpos >= 0) {
- widget_selectcolor (w, b->selected, TRUE);
- widget_move (w, 0, b->hotpos + off);
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode)
-+ SLsmg_write_nwchars (&b->hotwc, 1);
-+ else
-+#endif
- addch ((unsigned char) b->text[b->hotpos]);
- }
- return MSG_HANDLED;
-@@ -215,7 +223,7 @@
- static int
- button_len (const char *text, unsigned int flags)
- {
-- int ret = strlen (text);
-+ int ret = mbstrlen (text);
- switch (flags){
- case DEFPUSH_BUTTON:
- ret += 6;
-@@ -238,14 +246,36 @@
- * the button text is g_malloc()ed, we can safely change and shorten it.
- */
- static void
--button_scan_hotkey (WButton *b)
-+scan_hotkey (char *text, int *hotposp, int *hotkeyp, wchar_t *hotwcp)
- {
-- char *cp = strchr (b->text, '&');
-+ char *cp = strchr (text, '&');
-
- if (cp != NULL && cp[1] != '\0') {
-- g_strlcpy (cp, cp + 1, strlen (cp));
-- b->hotkey = tolower ((unsigned char) *cp);
-- b->hotpos = cp - b->text;
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ mbstate_t s;
-+ int len;
-+
-+ *cp = '\0';
-+ memset (&s, 0, sizeof (s));
-+ len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s);
-+ if (len > 0) {
-+ *hotposp = mbstrlen (text);
-+ if (*hotposp < 0) {
-+ *hotposp = -1;
-+ } else {
-+ /* FIXME */
-+ *hotkeyp = tolower (*hotwcp);
-+ }
-+ }
-+ } else
-+#endif
-+ {
-+ *hotkeyp = tolower (cp[1]);
-+ *hotposp = cp - text;
-+ }
-+
-+ memmove (cp, cp + 1, strlen (cp + 1) + 1);
- }
- }
-
-@@ -266,8 +296,9 @@
- widget_want_hotkey (b->widget, 1);
- b->hotkey = 0;
- b->hotpos = -1;
-+ b->hotwc = L'\0';
-
-- button_scan_hotkey(b);
-+ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
- return b;
- }
-
-@@ -280,14 +311,13 @@
- void
- button_set_text (WButton *b, const char *text)
- {
-- g_free (b->text);
-+ g_free (b->text);
- b->text = g_strdup (text);
- b->widget.cols = button_len (text, b->flags);
-- button_scan_hotkey(b);
-+ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
- dlg_redraw (b->widget.parent);
- }
-
--
- /* Radio button widget */
- static int radio_event (Gpm_Event *event, void *);
-
-@@ -362,14 +392,35 @@
- widget_move (&r->widget, i, 0);
-
- tty_printf ("(%c) ", (r->sel == i) ? '*' : ' ');
-- for (cp = r->texts[i]; *cp; cp++) {
-- if (*cp == '&') {
-- widget_selectcolor (w, focused, TRUE);
-+ cp = strchr (r->texts[i], '&');
-+ if (cp != NULL) {
-+#ifdef UTF8
-+ mbstate_t s;
-+ wchar_t wc;
-+ int len;
-+#endif
-+ tty_printf ("%.*s", (int) ((char *) cp - r->texts[i]),
-+ r->texts[i]);
-+ widget_selectcolor (w, focused, TRUE);
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode) {
-+ memset (&s, 0, sizeof (s));
-+ len = mbrtowc (&wc, cp + 1, MB_CUR_MAX, &s);
-+ ++cp;
-+ if (len > 0) {
-+ tty_printf ("%.*s", len, cp);
-+ cp += len;
-+ }
-+ } else
-+#endif
-+ {
- addch (*++cp);
-- widget_selectcolor (w, focused, FALSE);
-- } else
-- addch (*cp);
-- }
-+ ++cp;
-+ }
-+ widget_selectcolor (w, focused, FALSE);
-+ } else
-+ cp = r->texts[i];
-+ addstr ((char *) cp);
- }
- return MSG_HANDLED;
-
-@@ -408,7 +459,7 @@
- /* Compute the longest string */
- max = 0;
- for (i = 0; i < count; i++){
-- m = strlen (texts [i]);
-+ m = mbstrlen (texts [i]);
- if (m > max)
- max = m;
- }
-@@ -468,6 +519,11 @@
- if (c->hotpos >= 0) {
- widget_selectcolor (w, msg == WIDGET_FOCUS, TRUE);
- widget_move (&c->widget, 0, +c->hotpos + 4);
-+#ifdef UTF8
-+ if (SLsmg_Is_Unicode)
-+ SLsmg_write_nwchars (&c->hotwc, 1);
-+ else
-+#endif
- addch ((unsigned char) c->text[c->hotpos]);
- }
- return MSG_HANDLED;
-@@ -505,35 +561,20 @@
- check_new (int y, int x, int state, const char *text)
- {
- WCheck *c = g_new (WCheck, 1);
-- const char *s;
-- char *t;
--
-- init_widget (&c->widget, y, x, 1, strlen (text),
-+
-+ init_widget (&c->widget, y, x, 1, mbstrlen (text),
- check_callback, check_event);
- c->state = state ? C_BOOL : 0;
- c->text = g_strdup (text);
- c->hotkey = 0;
- c->hotpos = -1;
-+ c->hotwc = L'\0';
- widget_want_hotkey (c->widget, 1);
-
-- /* Scan for the hotkey */
-- for (s = text, t = c->text; *s; s++, t++){
-- if (*s != '&'){
-- *t = *s;
-- continue;
-- }
-- s++;
-- if (*s){
-- c->hotkey = tolower ((unsigned char) *s);
-- c->hotpos = t - c->text;
-- }
-- *t = *s;
-- }
-- *t = 0;
-+ scan_hotkey (c->text, &c->hotpos, &c->hotkey, &c->hotwc);
- return c;
- }
-
--
- /* Label widget */
-
- static cb_ret_t
-@@ -572,7 +613,7 @@
- }
- widget_move (&l->widget, y, 0);
- tty_printf ("%s", p);
-- xlen = l->widget.cols - strlen (p);
-+ xlen = l->widget.cols - mbstrlen (p);
- if (xlen > 0)
- tty_printf ("%*s", xlen, " ");
- if (!q)
-@@ -606,7 +647,7 @@
- if (text){
- label->text = g_strdup (text);
- if (label->auto_adjust_cols) {
-- newcols = strlen (text);
-+ newcols = mbstrlen (text);
- if (newcols > label->widget.cols)
- label->widget.cols = newcols;
- }
-@@ -630,7 +671,7 @@
- if (!text || strchr(text, '\n'))
- width = 1;
- else
-- width = strlen (text);
-+ width = mbstrlen (text);
-
- l = g_new (WLabel, 1);
- init_widget (&l->widget, y, x, 1, width, label_callback, NULL);
-@@ -778,13 +819,69 @@
- /* Pointer to killed data */
- static char *kill_buffer = 0;
-
-+#ifdef UTF8
-+static int
-+charpos(WInput *in, int idx)
-+{
-+ int i, pos, l, len;
-+ mbstate_t mbs;
-+ memset (&mbs, 0, sizeof (mbs));
-+ i = 0;
-+ pos = 0;
-+ len = strlen(in->buffer);
-+
-+ while (in->buffer[pos]) {
-+ if (i == idx)
-+ return pos;
-+ l = mbrlen(in->buffer + pos, len - pos, &mbs);
-+ if (l <= 0)
-+ return pos;
-+ pos+=l;
-+ i++;
-+ };
-+ return pos;
-+}
-+
-+static int
-+charcolumn(WInput *in, int idx)
-+{
-+ int i, pos, l, width, len;
-+ mbstate_t mbs;
-+ memset (&mbs, 0, sizeof (mbs));
-+ i = 0;
-+ pos = 0; width = 0;
-+ len = strlen(in->buffer);
-+
-+ while (in->buffer[pos]) {
-+ wchar_t wc;
-+ if (i == idx)
-+ return width;
-+ l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs);
-+ if (l <= 0)
-+ return width;
-+ pos += l; width += wcwidth(wc);
-+ i++;
-+ };
-+ return width;
-+}
-+#else
-+#define charpos(in, idx) (idx)
-+#define charcolumn(in, idx) (idx)
-+#endif /* UTF8 */
-+
- void
- update_input (WInput *in, int clear_first)
- {
- int has_history = 0;
- int i, j;
-- unsigned char c;
-- int buf_len = strlen (in->buffer);
-+ int buf_len = mbstrlen (in->buffer);
-+#ifndef UTF8
-+ unsigned char c;
-+#else /* UTF8 */
-+ wchar_t c;
-+ mbstate_t mbs;
-+ memset (&mbs, 0, sizeof (mbs));
-+#endif /* UTF8 */
-
- if (should_show_history_button (in))
- has_history = HISTORY_BUTTON_WIDTH;
-@@ -794,7 +891,7 @@
-
- /* Make the point visible */
- if ((in->point < in->first_shown) ||
-- (in->point >= in->first_shown+in->field_len - has_history)){
-+ (charcolumn(in, in->point) >= charcolumn(in, in->first_shown) + in->field_len - has_history)){
- in->first_shown = in->point - (in->field_len / 3);
- if (in->first_shown < 0)
- in->first_shown = 0;
-@@ -814,14 +911,29 @@
- addch (' ');
- widget_move (&in->widget, 0, 0);
-
-+#ifndef UTF8
- for (i = 0, j = in->first_shown; i < in->field_len - has_history && in->buffer [j]; i++){
- c = in->buffer [j++];
- c = is_printable (c) ? c : '.';
-- if (in->is_password)
-+#else /* UTF8 */
-+ for (i = 0, j = in->first_shown; (i < in->field_len - has_history) && (j < buf_len); i++,j++){
-+ char * chp = in->buffer + charpos(in,j);
-+ size_t res = mbrtowc(&c, chp, strlen(chp), &mbs);
-+ c = (res && iswprint (c)) ? 0 : '.';
-+#endif /* UTF8 */
-+ if (in->is_password)
- c = '*';
-+#ifndef UTF8
- addch (c);
-+#else /* UTF8 */
-+ if (c) {
-+ addch (c);
-+ }
-+ else
-+ SLsmg_write_nchars (chp, res);
-+#endif /* UTF8 */
- }
-- widget_move (&in->widget, 0, in->point - in->first_shown);
-+ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
-
- if (clear_first)
- in->first = 0;
-@@ -974,7 +1086,7 @@
- show_hist (GList *history, int widget_x, int widget_y)
- {
- GList *hi, *z;
-- size_t maxlen = strlen (i18n_htitle ()), i, count = 0;
-+ size_t maxlen = mbstrlen (i18n_htitle ()), i, count = 0;
- int x, y, w, h;
- char *q, *r = 0;
- Dlg_head *query_dlg;
-@@ -987,7 +1099,7 @@
- z = g_list_first (history);
- hi = z;
- while (hi) {
-- if ((i = strlen ((char *) hi->data)) > maxlen)
-+ if ((i = mbstrlen ((char *) hi->data)) > maxlen)
- maxlen = i;
- count++;
- hi = g_list_next (hi);
-@@ -1157,35 +1269,83 @@
- in->need_push = 1;
- in->buffer [0] = 0;
- in->point = 0;
-+ in->charpoint = 0;
- in->mark = 0;
- free_completions (in);
- update_input (in, 0);
- }
-
-+static void
-+move_buffer_backward (WInput *in, int point)
-+{
-+ int i, pos, len;
-+ int str_len = mbstrlen (in->buffer);
-+ if (point >= str_len) return;
-+
-+ pos = charpos(in,point);
-+ len = charpos(in,point + 1) - pos;
-+
-+ for (i = pos; in->buffer [i + len - 1]; i++)
-+ in->buffer [i] = in->buffer [i + len];
-+}
-+
- static cb_ret_t
- insert_char (WInput *in, int c_code)
- {
- size_t i;
-+#ifdef UTF8
-+ mbstate_t mbs;
-+ int res;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+#else
-+ in->charpoint = 0;
-+#endif /* UTF8 */
-
- if (c_code == -1)
- return MSG_NOT_HANDLED;
-
-+#ifdef UTF8
-+ if (in->charpoint >= MB_CUR_MAX) return 1;
-+
-+ in->charbuf[in->charpoint++] = c_code;
-+
-+ res = mbrlen((char *)in->charbuf, in->charpoint, &mbs);
-+ if (res < 0) {
-+ if (res != -2) in->charpoint = 0; /* broken multibyte char, skip */
-+ return 1;
-+ }
-+
-+#endif /* UTF8 */
- in->need_push = 1;
-- if (strlen (in->buffer)+1 == (size_t) in->current_max_len){
-+ if (strlen (in->buffer) + 1 + in->charpoint >= (size_t) in->current_max_len){
- /* Expand the buffer */
-- char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len);
-+ char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len + in->charpoint);
- if (narea){
- in->buffer = narea;
-- in->current_max_len += in->field_len;
-+ in->current_max_len += in->field_len + in->charpoint;
- }
- }
-+#ifndef UTF8
- if (strlen (in->buffer)+1 < (size_t) in->current_max_len){
- size_t l = strlen (&in->buffer [in->point]);
- for (i = l+1; i > 0; i--)
- in->buffer [in->point+i] = in->buffer [in->point+i-1];
- in->buffer [in->point] = c_code;
-+#else /* UTF8 */
-+ if (strlen (in->buffer) + in->charpoint < in->current_max_len){
-+ size_t ins_point = charpos(in,in->point); /* bytes from begin */
-+ /* move chars */
-+ size_t rest_bytes = strlen (in->buffer + ins_point);
-+
-+ for (i = rest_bytes + 1; i > 0; i--)
-+ in->buffer [ins_point + i + in->charpoint - 1] = in->buffer [ins_point + i - 1];
-+
-+ memcpy(in->buffer + ins_point, in->charbuf, in->charpoint);
-+#endif /* UTF8 */
- in->point++;
- }
-+ in->charpoint = 0;
- return MSG_HANDLED;
- }
-
-@@ -1193,12 +1353,14 @@
- beginning_of_line (WInput *in)
- {
- in->point = 0;
-+ in->charpoint = 0;
- }
-
- static void
- end_of_line (WInput *in)
- {
-- in->point = strlen (in->buffer);
-+ in->point = mbstrlen (in->buffer);
-+ in->charpoint = 0;
- }
-
- static void
-@@ -1206,18 +1368,21 @@
- {
- if (in->point)
- in->point--;
-+ in->charpoint = 0;
- }
-
- static void
- forward_char (WInput *in)
- {
-- if (in->buffer [in->point])
-+ if (in->buffer [charpos(in,in->point)])
- in->point++;
-+ in->charpoint = 0;
- }
-
- static void
- forward_word (WInput * in)
- {
-+#ifndef UTF8
- char *p = in->buffer + in->point;
-
- while (*p
-@@ -1227,11 +1392,39 @@
- while (*p && isalnum ((unsigned char) *p))
- p++;
- in->point = p - in->buffer;
-+#else /* UTF8 */
-+ mbstate_t mbs;
-+ int len = mbstrlen (in->buffer);
-+ memset (&mbs, 0, sizeof (mbs));
-+
-+ while (in->point < len) {
-+ wchar_t c;
-+ char *p = in->buffer + charpos(in,in->point);
-+ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
-+ if (res <= 0 || !(iswspace (c) || iswpunct (c)))
-+ break;
-+ in->point++;
-+ }
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+
-+ while (in->point < len) {
-+ wchar_t c;
-+ char *p = in->buffer + charpos(in,in->point);
-+ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
-+ if (res <= 0 || !iswalnum (c))
-+ break;
-+ in->point++;
-+ }
-+
-+ in->charpoint = 0;
-+#endif /* UTF8 */
- }
-
- static void
- backward_word (WInput *in)
- {
-+#ifndef UTF8
- char *p = in->buffer + in->point;
-
- while (p - 1 > in->buffer - 1 && (isspace ((unsigned char) *(p - 1))
-@@ -1241,6 +1434,32 @@
- while (p - 1 > in->buffer - 1 && isalnum ((unsigned char) *(p - 1)))
- p--;
- in->point = p - in->buffer;
-+#else /* UTF8 */
-+ mbstate_t mbs;
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+ while (in->point > 0) {
-+ wchar_t c;
-+ char *p = in->buffer + charpos(in,in->point);
-+ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
-+ if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c))))
-+ break;
-+ in->point--;
-+ }
-+
-+ memset (&mbs, 0, sizeof (mbs));
-+
-+ while (in->point > 0) {
-+ wchar_t c;
-+ char *p = in->buffer + charpos(in,in->point);
-+ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
-+ if (*p && (res <= 0 || !iswalnum (c)))
-+ break;
-+ in->point--;
-+ }
-+
-+ in->charpoint = 0;
-+#endif /* UTF8 */
- }
-
- static void
-@@ -1273,8 +1492,9 @@
-
- if (!in->point)
- return;
-- for (i = in->point; in->buffer [i-1]; i++)
-- in->buffer [i-1] = in->buffer [i];
-+
-+ move_buffer_backward(in, in->point - 1);
-+ in->charpoint = 0;
- in->need_push = 1;
- in->point--;
- }
-@@ -1282,10 +1502,8 @@
- static void
- delete_char (WInput *in)
- {
-- int i;
--
-- for (i = in->point; in->buffer [i]; i++)
-- in->buffer [i] = in->buffer [i+1];
-+ move_buffer_backward(in, in->point);
-+ in->charpoint = 0;
- in->need_push = 1;
- }
-
-@@ -1300,6 +1518,9 @@
-
- g_free (kill_buffer);
-
-+ first=charpos(in,first);
-+ last=charpos(in,last);
-+
- kill_buffer = g_strndup(in->buffer+first,last-first);
- }
-
-@@ -1308,11 +1529,13 @@
- {
- int first = min (x_first, x_last);
- int last = max (x_first, x_last);
-- size_t len = strlen (&in->buffer [last]) + 1;
-+ size_t len;
-
- in->point = first;
- in->mark = first;
-- memmove (&in->buffer [first], &in->buffer [last], len);
-+ len = strlen (&in->buffer [charpos(in,last)]) + 1;
-+ memmove (&in->buffer [charpos(in,first)], &in->buffer [charpos(in,last)], len);
-+ in->charpoint = 0;
- in->need_push = 1;
- }
-
-@@ -1329,6 +1552,8 @@
- copy_region (in, old_point, new_point);
- delete_region (in, old_point, new_point);
- in->need_push = 1;
-+ in->charpoint = 0;
-+ in->charpoint = 0;
- }
-
- static void
-@@ -1372,16 +1597,20 @@
-
- if (!kill_buffer)
- return;
-+ in->charpoint = 0;
- for (p = kill_buffer; *p; p++)
- insert_char (in, *p);
-+ in->charpoint = 0;
- }
-
- static void
- kill_line (WInput *in)
- {
-+ int chp = charpos(in,in->point);
- g_free (kill_buffer);
-- kill_buffer = g_strdup (&in->buffer [in->point]);
-- in->buffer [in->point] = 0;
-+ kill_buffer = g_strdup (&in->buffer [chp]);
-+ in->buffer [chp] = 0;
-+ in->charpoint = 0;
- }
-
- void
-@@ -1391,9 +1620,10 @@
- g_free (in->buffer);
- in->buffer = g_strdup (text); /* was in->buffer->text */
- in->current_max_len = strlen (in->buffer) + 1;
-- in->point = strlen (in->buffer);
-+ in->point = mbstrlen (in->buffer);
- in->mark = 0;
- in->need_push = 1;
-+ in->charpoint = 0;
- }
-
- static void
-@@ -1520,6 +1750,7 @@
- *in->buffer = 0;
- in->point = 0;
- in->first = 0;
-+ in->charpoint = 0;
- }
-
- cb_ret_t
-@@ -1548,7 +1779,11 @@
- }
- }
- if (!input_map [i].fn){
-+#ifndef UTF8
- if (c_code > 255 || !is_printable (c_code))
-+#else /* UTF8 */
-+ if (c_code > 255)
-+#endif /* UTF8 */
- return MSG_NOT_HANDLED;
- if (in->first){
- port_region_marked_for_delete (in);
-@@ -1581,6 +1816,9 @@
- if (pos != in->point)
- free_completions (in);
- in->point = pos;
-+#ifdef UTF8
-+ in->charpoint = 0;
-+#endif /* UTF8 */
- update_input (in, 1);
- }
-
-@@ -1621,7 +1859,7 @@
- return MSG_HANDLED;
-
- case WIDGET_CURSOR:
-- widget_move (&in->widget, 0, in->point - in->first_shown);
-+ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
- return MSG_HANDLED;
-
- case WIDGET_DESTROY:
-@@ -1645,7 +1883,7 @@
- && should_show_history_button (in)) {
- do_show_hist (in);
- } else {
-- in->point = strlen (in->buffer);
-+ in->point = mbstrlen (in->buffer);
- if (event->x - in->first_shown - 1 < in->point)
- in->point = event->x - in->first_shown - 1;
- if (in->point < 0)
-@@ -1702,7 +1940,8 @@
- in->is_password = 0;
-
- strcpy (in->buffer, def_text);
-- in->point = strlen (in->buffer);
-+ in->point = mbstrlen (in->buffer);
-+ in->charpoint = 0;
- return in;
- }
-
---- mc-4.6.2-pre1/src/widget.h
-+++ mc-4.6.2-pre1/src/widget.h
-@@ -22,6 +22,7 @@
- char *text; /* text of button */
- int hotkey; /* hot KEY */
- int hotpos; /* offset hot KEY char in text */
-+ wchar_t hotwc;
- bcback callback; /* Callback function */
- } WButton;
-
-@@ -42,6 +43,7 @@
- char *text; /* text of check button */
- int hotkey; /* hot KEY */
- int hotpos; /* offset hot KEY char in text */
-+ wchar_t hotwc;
- } WCheck;
-
- typedef struct WGauge {
-@@ -57,16 +59,20 @@
-
- typedef struct {
- Widget widget;
-- int point; /* cursor position in the input line */
-- int mark; /* The mark position */
-- int first_shown; /* Index of the first shown character */
-- int current_max_len; /* Maximum length of input line */
-- int field_len; /* Length of the editing field */
-+ int point; /* cursor position in the input line (mb chars) */
-+ int mark; /* The mark position (mb chars) */
-+ int first_shown; /* Index of the first shown character (mb chars) */
-+ int current_max_len; /* Maximum length of input line (bytes) */
-+ int field_len; /* Length of the editing field (mb chars) */
- int color; /* color used */
- int first; /* Is first keystroke? */
- int disable_update; /* Do we want to skip updates? */
- int is_password; /* Is this a password input line? */
- char *buffer; /* pointer to editing buffer */
-+#ifdef UTF8
-+ char charbuf[MB_LEN_MAX];
-+#endif /* UTF8 */
-+ int charpoint;
- GList *history; /* The history */
- int need_push; /* need to push the current Input on hist? */
- char **completions; /* Possible completions array */
---- mc-4.6.2-pre1/src/wtools.c
-+++ mc-4.6.2-pre1/src/wtools.c
-@@ -49,11 +49,11 @@
- /* Adjust sizes */
- lines = (lines > LINES - 6) ? LINES - 6 : lines;
-
-- if (title && (cols < (len = strlen (title) + 2)))
-+ if (title && (cols < (len = mbstrlen (title) + 2)))
- cols = len;
-
- /* no &, but 4 spaces around button for brackets and such */
-- if (cols < (len = strlen (cancel_string) + 3))
-+ if (cols < (len = mbstrlen (cancel_string) + 3))
- cols = len;
-
- cols = cols > COLS - 6 ? COLS - 6 : cols;
-@@ -124,7 +124,7 @@
- va_start (ap, count);
- for (i = 0; i < count; i++) {
- char *cp = va_arg (ap, char *);
-- win_len += strlen (cp) + 6;
-+ win_len += mbstrlen (cp) + 6;
- if (strchr (cp, '&') != NULL)
- win_len--;
- }
-@@ -133,7 +133,7 @@
-
- /* count coordinates */
- msglen (text, &lines, &cols);
-- cols = 6 + max (win_len, max ((int) strlen (header), cols));
-+ cols = 6 + max (win_len, max ((int) mbstrlen (header), cols));
- lines += 4 + (count > 0 ? 2 : 0);
- xpos = COLS / 2 - cols / 2;
- ypos = LINES / 3 - (lines - 3) / 2;
-@@ -148,7 +148,7 @@
- va_start (ap, count);
- for (i = 0; i < count; i++) {
- cur_name = va_arg (ap, char *);
-- xpos = strlen (cur_name) + 6;
-+ xpos = mbstrlen (cur_name) + 6;
- if (strchr (cur_name, '&') != NULL)
- xpos--;
-
-@@ -463,7 +463,7 @@
- quick_widgets[2].histname = histname;
-
- msglen (text, &lines, &cols);
-- len = max ((int) strlen (header), cols) + 4;
-+ len = max ((int) mbstrlen (header), cols) + 4;
- len = max (len, 64);
-
- /* The special value of def_text is used to identify password boxes
-@@ -485,7 +485,7 @@
- quick_widgets[1].text = _(quick_widgets[1].text);
- quick_widgets[0].relative_x = len / 2 + 4;
- quick_widgets[1].relative_x =
-- len / 2 - (strlen (quick_widgets[1].text) + 9);
-+ len / 2 - (mbstrlen (quick_widgets[1].text) + 9);
- quick_widgets[0].x_divisions = quick_widgets[1].x_divisions = len;
- #endif /* ENABLE_NLS */
-
Deleted: trunk/debian/patches/49_64bit.patch
===================================================================
--- trunk/debian/patches/49_64bit.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/49_64bit.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,54 +0,0 @@
---- mc-4.6.1a/src/mountlist.c.64bit 2005-02-08 23:33:52.000000000 +0100
-+++ mc-4.6.1a/src/mountlist.c 2005-05-10 17:09:24.122853504 +0200
-@@ -131,11 +131,19 @@ struct mount_entry
-
- struct fs_usage
- {
-+#ifndef HAVE_SYS_STATVFS_H
- long fsu_blocks; /* Total blocks. */
- long fsu_bfree; /* Free blocks available to superuser. */
- long fsu_bavail; /* Free blocks available to non-superuser. */
- long fsu_files; /* Total file nodes. */
- long fsu_ffree; /* Free file nodes. */
-+#else /* We have sys/statvfs.h, use proper data types when _FILE_OFFSET_BITS=64 */
-+ fsblkcnt_t fsu_blocks;
-+ fsblkcnt_t fsu_bfree;
-+ fsblkcnt_t fsu_bavail;
-+ fsblkcnt_t fsu_files;
-+ fsblkcnt_t fsu_ffree;
-+#endif /* HAVE_SYS_STATVFS_H */
- };
-
- static int get_fs_usage (char *path, struct fs_usage *fsp);
-@@ -665,6 +673,7 @@ my_statfs (struct my_statfs *myfs_stats,
- BLOCKS FROMSIZE-byte blocks, rounding away from zero.
- TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
-
-+#if !defined(HAVE_SYS_STATFS_H) || !defined(STAT_STATVFS)
- static long
- fs_adjust_blocks (long blocks, int fromsize, int tosize)
- {
-@@ -672,13 +681,21 @@ fs_adjust_blocks (long blocks, int froms
- abort ();
- if (fromsize <= 0)
- return -1;
--
-+#else
-+static fsblkcnt_t
-+fs_adjust_blocks (fsblkcnt_t blocks, unsigned long fromsize, unsigned long tosize)
-+{
-+ if (!tosize)
-+ abort ();
-+ if (!fromsize)
-+ return -1;
-+#endif
- if (fromsize == tosize) /* E.g., from 512 to 512. */
- return blocks;
- else if (fromsize > tosize) /* E.g., from 2048 to 512. */
- return blocks * (fromsize / tosize);
- else /* E.g., from 256 to 512. */
-- return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize);
-+ return (blocks + 1) / (tosize / fromsize);
- }
-
- #if defined(_AIX) && defined(_I386)
Deleted: trunk/debian/patches/50_ignore_ftp_chmod_error.patch
===================================================================
--- trunk/debian/patches/50_ignore_ftp_chmod_error.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/50_ignore_ftp_chmod_error.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,12 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/ftpfs.c mc-4.6.2~pre1/vfs/ftpfs.c
---- mc-4.6.2~pre1.orig/vfs/ftpfs.c 2008-02-13 16:10:32.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/ftpfs.c 2008-02-13 16:54:31.000000000 +0100
-@@ -1525,7 +1525,7 @@
- char buf[BUF_SMALL];
-
- g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
-- return ftpfs_send_command(me, path, buf, OPT_FLUSH);
-+ return ftpfs_send_command(me, path, buf, OPT_FLUSH | OPT_IGNORE_ERROR);
- }
-
- static int ftpfs_chown (struct vfs_class *me, const char *path, int owner, int group)
Deleted: trunk/debian/patches/51_html-syntax.patch
===================================================================
--- trunk/debian/patches/51_html-syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/51_html-syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,1278 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/html.syntax mc-4.6.2~pre1/syntax/html.syntax
---- mc-4.6.2~pre1.orig/syntax/html.syntax 2008-02-16 13:49:01.000000000 +0100
-+++ mc-4.6.2~pre1/syntax/html.syntax 2008-02-16 13:49:08.000000000 +0100
-@@ -1,20 +1,1264 @@
--# Syntax rules for the HyperText Markup Language
-+
-+# html highlighting with tags in caps always. if you want everything in lowercase
-+# use tr
-+
-+# i got upto IMG in the netscape comprehensive tags reference. thereafter will get
-+# done later - paul
-
- context default
-- keyword &\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]; brightgreen
-- keyword &#\{xX\}\[0123456789abcdefABCDEF\]; brightgreen
-- keyword &#\[0123456789\]; brightgreen
-+ keyword whole &*; brightgreen/16
- spellcheck
-
--context <!-- --> brown
-+ keyword </A> brightcyan/17
-+ keyword </ADDRESS> brightcyan/17
-+ keyword </APPLET> brightcyan/17
-+ keyword </AREA> brightcyan/17
-+ keyword </B> brightcyan/17
-+ keyword </BASE> brightcyan/17
-+ keyword </BASEFONT> brightcyan/17
-+ keyword </BIG> brightcyan/17
-+ keyword </BLOCKQUOTE> brightcyan/17
-+ keyword </BODY> brightcyan/17
-+ keyword </BR> brightcyan/17
-+ keyword </BUTTON> brightcyan/17
-+ keyword </CAPTION> brightcyan/17
-+ keyword </CENTER> brightcyan/17
-+ keyword </CITE> brightcyan/17
-+ keyword </CODE> brightcyan/17
-+ keyword </DD> brightcyan/17
-+ keyword </DIR> brightcyan/17
-+ keyword </DIV> brightcyan/17
-+ keyword </DL> brightcyan/17
-+ keyword </DT> brightcyan/17
-+ keyword </EM> brightcyan/17
-+ keyword </FONT> brightcyan/17
-+ keyword </FORM> brightcyan/17
-+ keyword </FRAME> brightcyan/17
-+ keyword </FRAMESET> brightcyan/17
-+ keyword </H1> brightcyan/17
-+ keyword </H2> brightcyan/17
-+ keyword </H3> brightcyan/17
-+ keyword </H4> brightcyan/17
-+ keyword </H5> brightcyan/17
-+ keyword </H6> brightcyan/17
-+ keyword </HEAD> brightcyan/17
-+ keyword </HR> brightcyan/17
-+ keyword </HTML> brightcyan/17
-+ keyword </I> brightcyan/17
-+ keyword </IMG> brightcyan/17
-+ keyword </PRE> brightcyan/17
-+ keyword </SMALL> brightcyan/17
-+ keyword </SCRIPT> brightcyan/17
-+ keyword </META> brightcyan/17
-+ keyword </P> brightcyan/17
-+ keyword </TABLE> brightcyan/17
-+ keyword </TD> brightcyan/17
-+ keyword </TITLE> brightcyan/17
-+ keyword </TR> brightcyan/17
-+ keyword </TT> brightcyan/17
-+ keyword </U> brightcyan/17
-+
-+
-+context <A > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword "http:*" magenta/22
-+ keyword "ftp:*" magenta/22
-+ keyword "news:*" magenta/22
-+ keyword "mailto:*" magenta/22
-+ keyword "gopher:*" magenta/22
-+ keyword "telnet:*" magenta/22
-+ keyword "file:*" magenta/22
-+ keyword "javascript:*" magenta/22
-+
-+ keyword "Alternate" magenta/22
-+ keyword "Stylesheet" magenta/22
-+ keyword "Start" magenta/22
-+ keyword "Next" magenta/22
-+ keyword "Prev" magenta/22
-+ keyword "Contents" magenta/22
-+ keyword "Index" magenta/22
-+ keyword "Glossary" magenta/22
-+ keyword "Copyright" magenta/22
-+ keyword "Chapter" magenta/22
-+ keyword "Section" magenta/22
-+ keyword "Subsection" magenta/22
-+ keyword "Appendix" magenta/22
-+ keyword "Help" magenta/22
-+ keyword "Bookmark" magenta/22
-+
-+ keyword "_blank" magenta/22
-+ keyword "_self" magenta/22
-+ keyword "_parent" magenta/22
-+ keyword "_top" magenta/22
-+
-+ keyword "*" cyan/5
-+
-+# keyword whole charset yellow/24
-+# keyword whole type yellow/24
-+ keyword whole name yellow/24
-+ keyword whole href yellow/24
-+# keyword whole hreflang yellow/24
-+# keyword whole rel yellow/24
-+# keyword whole rev yellow/24
-+ keyword whole shape yellow/24
-+ keyword whole coords yellow/24
-+# keyword whole tabindex yellow/24
-+# keyword whole selected yellow/24
-+ keyword whole target yellow/24
-+ keyword whole onblur yellow/24
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onfocus yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+
-+context <ADDRESS > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole dir yellow/24
-+ keyword whole title yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onblur yellow/24
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onfocus yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <APPLET > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword whole alt yellow/24
-+ keyword whole archive yellow/24
-+ keyword whole code yellow/24
-+ keyword whole codebase yellow/24
-+ keyword whole height yellow/24
-+ keyword whole hspace yellow/24
-+ keyword whole mayscript yellow/24
-+ keyword whole name yellow/24
-+ keyword whole object yellow/24
-+ keyword whole vspace yellow/24
-+ keyword whole width yellow/24
-+
-+ keyword "http:*" magenta/22
-+ keyword "ftp:*" magenta/22
-+ keyword "news:*" magenta/22
-+ keyword "mailto:*" magenta/22
-+ keyword "gopher:*" magenta/22
-+ keyword "telnet:*" magenta/22
-+ keyword "file:*" magenta/22
-+ keyword "javascript:*" magenta/22
-+ keyword "*.class" magenta/22
-+ keyword "*" cyan/5
-+
-+context <AREA > brightcyan/17
-+ keyword = brightred/18
-+
-+# keyword whole accesskey yellow/24
-+# keyword whole alt yellow/24
-+ keyword whole coords yellow/24
-+ keyword whole href yellow/24
-+ keyword whole nohref yellow/24
-+ keyword whole shape yellow/24
-+# keyword whole onfocus yellow/24
-+# keyword whole onblur yellow/24
-+ keyword whole target magenta/22
-+ keyword "_blank" magenta/22
-+ keyword "_self" magenta/22
-+ keyword "_parent" magenta/22
-+ keyword "_top" magenta/22
-+
-+ keyword "DEFAULT" magenta/22
-+ keyword "CIRCLE" magenta/22
-+ keyword "POLY" magenta/22
-+ keyword "POLYGON" magenta/22
-+ keyword "RECT" magenta/22
-+ keyword "RECTANGLE" magenta/22
-+
-+ keyword "http:*" magenta/22
-+ keyword "ftp:*" magenta/22
-+ keyword "news:*" magenta/22
-+ keyword "gopher:*" magenta/22
-+ keyword "telnet:*" magenta/22
-+ keyword "*" cyan/5
-+
-+context <B > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <BASE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole href yellow/24
-+ keyword whole target yellow/24
-+ keyword "_blank" magenta/22
-+ keyword "_self" magenta/22
-+ keyword "_parent" magenta/22
-+ keyword "_top" magenta/22
-+
-+ keyword "http:*" magenta/22
-+ keyword "ftp:*" magenta/22
-+ keyword "*" cyan/5
-+
-+context <BASEFONT > brightcyan/17
-+ keyword = brightred/18
-+ keyword " magenta/22
-+
-+ keyword whole id yellow/24
-+ keyword whole size yellow/24
-+ keyword whole color yellow/24
-+ keyword whole face yellow/24
-+ keyword "*" cyan/5
-+
-+context <BIG > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <BLOCKQUOTE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole cite yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <BODY > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole onload yellow/24
-+ keyword whole onunload yellow/24
-+
-+ keyword whole alink yellow/24
-+ keyword whole background yellow/24
-+
-+ keyword "*.gif" brightred/19
-+ keyword "*.jpg" brightred/19
-+ keyword "*.png" brightred/19
-+ keyword "*" cyan/5
-+
-+ keyword whole bgcolor yellow/24
-+ keyword whole link yellow/24
-+ keyword whole text yellow/24
-+ keyword whole vlink yellow/24
-+
-+context <BR > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <BUTTON > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <CAPTION > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword whole valign yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <CENTER > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <CITE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <CODE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <DD > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <DIR > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <DIV > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword whole "center" magenta/22
-+ keyword whole "justify" magenta/22
-+ keyword whole "left" magenta/22
-+ keyword whole "right" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <DL > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <DT > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <EM > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <DT > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <FONT > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole size yellow/24
-+ keyword whole color yellow/24
-+ keyword whole face yellow/24
-+ keyword "*" cyan/5
-+
-+context <FORM > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole action yellow/24
-+ keyword whole enctype yellow/24
-+ keyword whole method yellow/24
-+ keyword "GET" magenta/22
-+ keyword "POST" magenta/22
-+ keyword whole onreset yellow/24
-+ keyword whole onsubmit yellow/24
-+ keyword whole target yellow/24
-+ keyword "_blank" magenta/22
-+ keyword "_self" magenta/22
-+ keyword "_parent" magenta/22
-+ keyword "_top" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <FRAME > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole frameborder yellow/24
-+ keyword whole marginheight yellow/24
-+ keyword whole marginwidth yellow/24
-+ keyword whole name yellow/24
-+ keyword whole noresize yellow/24
-+ keyword whole scrolling yellow/24
-+ keyword "YES" magenta/22
-+ keyword "NO" magenta/22
-+ keyword "AUTO" magenta/22
-+ keyword whole src yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <FRAMESET > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole border yellow/24
-+ keyword whole bordercolor yellow/24
-+ keyword whole cols yellow/24
-+ keyword whole onload yellow/24
-+ keyword whole onunload yellow/24
-+ keyword whole rows yellow/24
-+
-+
-+context <H1 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "CENTRE" magenta/22
-+ keyword "LEFT" magenta/22
-+ keyword "RIGHT" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <H2 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "CENTRE" magenta/22
-+ keyword "LEFT" magenta/22
-+ keyword "RIGHT" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <H3 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "CENTRE" magenta/22
-+ keyword "LEFT" magenta/22
-+ keyword "RIGHT" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <H4 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "CENTRE" magenta/22
-+ keyword "LEFT" magenta/22
-+ keyword "RIGHT" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <H5 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "centre" magenta/22
-+ keyword "left" magenta/22
-+ keyword "right" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <H6 > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "centre" magenta/22
-+ keyword "left" magenta/22
-+ keyword "right" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <HEAD > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <HR > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+ keyword whole color yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "centre" magenta/22
-+ keyword "left" magenta/22
-+ keyword "right" magenta/22
-+ keyword whole align yellow/24
-+ keyword whole noshade yellow/24
-+ keyword whole size yellow/24
-+ keyword whole width yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <HTML > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <IMG > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole alt yellow/24
-+ keyword whole border yellow/24
-+ keyword whole height yellow/24
-+ keyword whole hspace yellow/24
-+ keyword whole ismap yellow/24
-+ keyword whole src yellow/24
-+ keyword "*.gif" brightred/19
-+ keyword "*.jpg" brightred/19
-+ keyword "*.png" brightred/19
-+ keyword "*" cyan/5
-+ keyword whole usemap yellow/24
-+ keyword whole vspace yellow/24
-+ keyword whole width yellow/24
-+ keyword "*" cyan/5
-+
-+context <I > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+
-+context <LINK > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole type yellow/24
-+
-+ keyword "text/css" magenta/22
-+ keyword "text/javascript" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <META > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole content yellow/24
-+ keyword whole http-equiv yellow/24
-+ keyword whole name yellow/24
-+ keyword "*" cyan/5
-+
-+context <P > brightcyan/17
-+
-+
-+context <TITLE > brightcyan/17
-+ keyword = brightred/18
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+ keyword "*" cyan/5
-+
-+context <SCRIPT > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole language yellow/24
-+ keyword whole src yellow/24
-+
-+ keyword "JavaScript" magenta/22
-+ keyword "JavaScript1.2" magenta/22
-+ keyword "JavaScript1.1" magenta/22
-+ keyword "*" cyan/5
-+
-+context <TABLE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword whole bgcolor yellow/24
-+ keyword whole border yellow/24
-+ keyword whole width yellow/24
-+ keyword whole cellspacing yellow/24
-+ keyword whole cellpadding yellow/24
-+ keyword "right" magenta/22
-+ keyword "left" magenta/22
-+ keyword "*" cyan/5
-+
-+
-+context <SMALL > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+ keyword "*" cyan/5
-+
-+context <TD > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole colspan yellow/24
-+ keyword whole rowspan yellow/24
-+ keyword whole align yellow/24
-+ keyword "centre" magenta/22
-+ keyword "char" magenta/22
-+ keyword "justify" magenta/22
-+ keyword "left" magenta/22
-+ keyword "right" magenta/22
-+ keyword whole bgcolor yellow/24
-+ keyword whole valign yellow/24
-+ keyword "baseline" magenta/22
-+ keyword "bottom" magenta/22
-+ keyword "middle" magenta/22
-+ keyword "top" magenta/22
-+ keyword whole colorspan yellow/24
-+ keyword whole height yellow/24
-+ keyword whole nowrap yellow/24
-+ keyword whole rowspan yellow/24
-+ keyword whole width yellow/24
-+
-+ keyword "*" cyan/5
-+
-+
-+context <TR > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+ keyword whole onclick yellow/24
-+ keyword whole ondblclick yellow/24
-+ keyword whole onkeydown yellow/24
-+ keyword whole onkeypress yellow/24
-+ keyword whole onkeyup yellow/24
-+ keyword whole onmousedown yellow/24
-+ keyword whole onmousemove yellow/24
-+ keyword whole onmouseout yellow/24
-+ keyword whole onmouseover yellow/24
-+ keyword whole onmouseup yellow/24
-+
-+ keyword whole align yellow/24
-+ keyword "centre" magenta/22
-+ keyword "char" magenta/22
-+ keyword "justify" magenta/22
-+ keyword "left" magenta/22
-+ keyword "right" magenta/22
-+
-+ keyword whole bgcolor yellow/24
-+ keyword whole valign yellow/24
-+ keyword "baseline" magenta/22
-+ keyword "bottom" magenta/22
-+ keyword "middle" magenta/22
-+ keyword "top" magenta/22
-+
-+ keyword "*" cyan/5
-+
-+context <TT > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+context <U > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+context <PRE > brightcyan/17
-+ keyword = brightred/18
-+
-+ keyword whole class yellow/24
-+ keyword whole id yellow/24
-+ keyword whole style yellow/24
-+ keyword whole title yellow/24
-+
-+ keyword whole dir yellow/24
-+ keyword whole lang yellow/24
-+
-+context <!-- --> brown/22
- spellcheck
-
- context <! > brightred/orange
- spellcheck
-
--context </ > brightcyan
-+context < > cyan/15
-
--context < > brightcyan
-- keyword "*" green
-- keyword '*' green
-- keyword = yellow
Deleted: trunk/debian/patches/52_debian_dsc.patch
===================================================================
--- trunk/debian/patches/52_debian_dsc.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/52_debian_dsc.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,31 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/debian-description.syntax mc-4.6.2~pre1/syntax/debian-description.syntax
---- mc-4.6.2~pre1.orig/syntax/debian-description.syntax 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/syntax/debian-description.syntax 2008-02-16 13:52:35.000000000 +0100
-@@ -0,0 +1,15 @@
-+context default
-+ keyword linestart Format green
-+ keyword linestart Source brightmagenta
-+ keyword linestart Version yellow
-+ keyword linestart Binary brightgreen
-+ keyword linestart Maintainer brightmagenta
-+ keyword <*@*> brightred
-+ keyword linestart Architecture cyan
-+ keyword linestart Standards-Version brightmagenta
-+ keyword linestart Build-Depends green
-+ keyword linestart Files green
-+
-+context --- \n brightred
-+ spellcheck
-+
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/Syntax mc-4.6.2~pre1/syntax/Syntax
---- mc-4.6.2~pre1.orig/syntax/Syntax 2008-02-16 13:52:09.000000000 +0100
-+++ mc-4.6.2~pre1/syntax/Syntax 2008-02-16 13:53:42.000000000 +0100
-@@ -148,5 +148,8 @@
- file Don_t_match_me Mail\sfolder ^From\s
- include mail.syntax
-
-+file .\*\\.dsc$ Debian\sdescriptiom\sfile
-+include debian-description.syntax
-+
- file .\* unknown
- include unknown.syntax
Deleted: trunk/debian/patches/53_strace_syntax.patch
===================================================================
--- trunk/debian/patches/53_strace_syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/53_strace_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,59 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/strace.syntax mc-4.6.2~pre1/syntax/strace.syntax
---- mc-4.6.2~pre1.orig/syntax/strace.syntax 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/syntax/strace.syntax 2008-02-16 14:00:30.000000000 +0100
-@@ -0,0 +1,43 @@
-+context default
-+ keyword access(*) green
-+ keyword execve(*) brightgreen
-+ keyword uname(*) brightblue
-+
-+ keyword open(*) cyan
-+ keyword close(*) cyan
-+
-+ keyword read(*) magenta
-+ keyword select(*) magenta
-+ keyword write(*) magenta
-+
-+ keyword readv(*) brightmagenta
-+ keyword writev(*) brightmagenta
-+
-+ keyword fcntl64(*) white
-+ keyword fstat64(*) white
-+ keyword stat64(*) white
-+
-+ keyword old_mmap(*) red
-+ keyword mmap2(*) red
-+ keyword munmap(*) red
-+
-+ keyword exit_group(*) brightred
-+ keyword kill(*) brightred
-+ keyword wait4(*) brightred
-+ keyword statfs(*) brightred
-+ keyword ioctl(*) brightred
-+ keyword rt_sigaction(*) brightred
-+ keyword rt_sigprocmask(*) brightred
-+ keyword alarm(*) brightred
-+ keyword brk(*) brightred
-+
-+ keyword chown32(*) yellow
-+ keyword chmod(*) yellow
-+ keyword geteuid32(*) yellow
-+ keyword getegid32(*) yellow
-+ keyword getuid32(*) yellow
-+ keyword getgid32(*) yellow
-+ keyword setresuid32(*) yellow
-+ keyword setresgid32(*) yellow
-+ keyword gettimeofday(*) yellow
-+
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/Syntax mc-4.6.2~pre1/syntax/Syntax
---- mc-4.6.2~pre1.orig/syntax/Syntax 2008-02-16 14:01:20.000000000 +0100
-+++ mc-4.6.2~pre1/syntax/Syntax 2008-02-16 14:01:49.000000000 +0100
-@@ -151,5 +151,8 @@
- file .\*\\.dsc$ Debian\sdescriptiom\sfile
- include debian-description.syntax
-
-+file .\*\\.strace$ Strace\sdebug\soutput
-+include strace.syntax
-+
- file .\* unknown
- include unknown.syntax
Deleted: trunk/debian/patches/54_named_syntax.patch
===================================================================
--- trunk/debian/patches/54_named_syntax.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/54_named_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,194 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/named.syntax mc-4.6.2~pre1/syntax/named.syntax
---- mc-4.6.2~pre1.orig/syntax/named.syntax 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/syntax/named.syntax 2008-02-16 16:50:52.000000000 +0100
-@@ -0,0 +1,178 @@
-+wholechars abcdefghijklmnopqrstuvwxyz0123456789-
-+
-+context default
-+ keyword whole acl yellow
-+ keyword whole additional-from-auth yellow
-+ keyword whole additional-from-cache yellow
-+ keyword whole algorithm yellow
-+ keyword whole allow-notify yellow
-+ keyword whole allow-query yellow
-+ keyword whole allow-recursion yellow
-+ keyword whole allow-transfer yellow
-+ keyword whole allow-update-forwarding yellow
-+ keyword whole allow-v6-synthesis yellow
-+ keyword whole allow yellow
-+ keyword whole also-notify yellow
-+ keyword whole auth-nxdomain yellow
-+ keyword whole blackhole yellow
-+ keyword whole bogus yellow
-+ keyword whole cache-file yellow
-+ keyword whole category yellow
-+ keyword whole channel yellow
-+ keyword whole check-names yellow
-+ keyword whole class yellow
-+ keyword whole cleaning-interval yellow
-+ keyword whole controls yellow
-+ keyword whole coresize yellow
-+ keyword whole database yellow
-+ keyword whole datasize yellow
-+ keyword whole deallocate-on-exit yellow
-+ keyword whole delegation-only yellow
-+ keyword whole deny yellow
-+ keyword whole dialup yellow
-+ keyword whole directory yellow
-+ keyword whole dump-file yellow
-+ keyword whole edns yellow
-+ keyword whole exclude yellow
-+ keyword whole fake-iquery yellow
-+ keyword whole fetch-glue yellow
-+ keyword whole files yellow
-+ keyword whole file yellow
-+ keyword whole forwarders yellow
-+ keyword whole forward yellow
-+ keyword whole grant yellow
-+ keyword whole has-old-clients yellow
-+ keyword whole heartbeat-interval yellow
-+ keyword whole host-statistics yellow
-+ keyword whole inet yellow
-+ keyword whole interface-interval yellow
-+ keyword whole keys yellow
-+ keyword whole key yellow
-+ keyword whole lame-ttl yellow
-+ keyword whole listen-on-v6 yellow
-+ keyword whole listen-on yellow
-+ keyword whole logging yellow
-+ keyword whole lwres yellow
-+ keyword whole maintain-ixfr-base yellow
-+ keyword whole masters yellow
-+ keyword whole match-clients yellow
-+ keyword whole match-destinations yellow
-+ keyword whole match-mapped-addresses yellow
-+ keyword whole match-recursive-only yellow
-+ keyword whole max-cache-size yellow
-+ keyword whole max-cache-ttl yellow
-+ keyword whole max-ixfr-log-size yellow
-+ keyword whole max-ncache-ttl yellow
-+ keyword whole max-refresh-time yellow
-+ keyword whole max-retry-time yellow
-+ keyword whole max-transfer-idle-in yellow
-+ keyword whole max-transfer-idle-out yellow
-+ keyword whole max-transfer-time-in yellow
-+ keyword whole max-transfer-time-out yellow
-+ keyword whole memstatistics-file yellow
-+ keyword whole minimal-responses yellow
-+ keyword whole min-refresh-time yellow
-+ keyword whole min-retry-time yellow
-+ keyword whole min-roots yellow
-+ keyword whole multiple-cnames yellow
-+ keyword whole named-xfer yellow
-+ keyword whole name yellow
-+ keyword whole ndots yellow
-+ keyword whole notify-source-v6 yellow
-+ keyword whole notify-source yellow
-+ keyword whole notify yellow
-+ keyword whole options yellow
-+ keyword whole pid-file yellow
-+ keyword whole port yellow
-+ keyword whole print-category yellow
-+ keyword whole print-severity yellow
-+ keyword whole print-time yellow
-+ keyword whole provide-ixfr yellow
-+ keyword whole pubkey yellow
-+ keyword whole query-source-v6 yellow
-+ keyword whole query-source yellow
-+ keyword whole random-device yellow
-+ keyword whole recursion yellow
-+ keyword whole recursive-clients yellow
-+ keyword whole request-ixfr yellow
-+ keyword whole rfc2308-type1 yellow
-+ keyword whole root-delegation-only yellow
-+ keyword whole rrset-order yellow
-+ keyword whole search yellow
-+ keyword whole secret yellow
-+ keyword whole self yellow
-+ keyword whole serial-queries yellow
-+ keyword whole serial-query-rate yellow
-+ keyword whole server yellow
-+ keyword whole severity yellow
-+ keyword whole sig-validity-interval yellow
-+ keyword whole sortlist yellow
-+ keyword whole stacksize yellow
-+ keyword whole statistics-file yellow
-+ keyword whole statistics-interval yellow
-+ keyword whole subdomain yellow
-+ keyword whole support-ixfr yellow
-+ keyword whole suppress-initial-notify yellow
-+ keyword whole syslog yellow
-+ keyword whole tcp-clients yellow
-+ keyword whole tkey-dhkey yellow
-+ keyword whole tkey-domain yellow
-+ keyword whole tkey-gssapi-credential yellow
-+ keyword whole topology yellow
-+ keyword whole transfer-format yellow
-+ keyword whole transfers-in yellow
-+ keyword whole transfer-source-v6 yellow
-+ keyword whole transfer-source yellow
-+ keyword whole transfers-out yellow
-+ keyword whole transfers-per-ns yellow
-+ keyword whole transfers yellow
-+ keyword whole treat-cr-as-space yellow
-+ keyword whole trusted-keys yellow
-+ keyword whole type yellow
-+ keyword whole update-policy yellow
-+ keyword whole use-id-pool yellow
-+ keyword whole use-ixfr yellow
-+ keyword whole version yellow
-+ keyword whole view yellow
-+ keyword whole wildcard yellow
-+ keyword whole zone-statistics yellow
-+ keyword whole zone yellow
-+
-+ keyword whole any brightred
-+ keyword whole fail brightred
-+ keyword whole first brightred
-+ keyword whole hint brightred
-+ keyword whole ignore brightred
-+ keyword whole many-answers brightred
-+ keyword whole master brightred
-+ keyword whole none brightred
-+ keyword whole null brightred
-+ keyword whole one-answer brightred
-+ keyword whole only brightred
-+ keyword whole response brightred
-+ keyword whole slave brightred
-+ keyword whole stderr brightred
-+ keyword whole stub brightred
-+ keyword whole warn brightred
-+ keyword whole yes brightred
-+ keyword whole no brightred
-+
-+ keyword /\* brown
-+ keyword \*/ brown
-+ keyword // brown
-+ keyword # brown
-+ keyword { brightcyan
-+ keyword } brightcyan
-+ keyword ; brightmagenta
-+
-+context exclusive /\* \*/ brown
-+ spellcheck
-+
-+context exclusive // \n brown
-+ spellcheck
-+
-+context exclusive # \n brown
-+ spellcheck
-+
-+context " " green
-+ spellcheck
-diff -Nurwd mc-4.6.2~pre1.orig/syntax/Syntax mc-4.6.2~pre1/syntax/Syntax
---- mc-4.6.2~pre1.orig/syntax/Syntax 2008-02-16 16:52:06.000000000 +0100
-+++ mc-4.6.2~pre1/syntax/Syntax 2008-02-16 16:51:39.000000000 +0100
-@@ -154,5 +154,8 @@
- file .\*\\.strace$ Strace\sdebug\soutput
- include strace.syntax
-
-+file .\*named.conf$ Bind9\sconfiguration
-+include named.syntax
-+
- file .\* unknown
- include unknown.syntax
Deleted: trunk/debian/patches/60_recode.patch
===================================================================
--- trunk/debian/patches/60_recode.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/60_recode.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,1564 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/edit/editcmd.c mc-4.6.2~pre1/edit/editcmd.c
---- mc-4.6.2~pre1.orig/edit/editcmd.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/edit/editcmd.c 2008-02-13 21:02:16.000000000 +0100
-@@ -3321,7 +3321,7 @@
- edit_select_codepage_cmd (WEdit *edit)
- {
- #ifdef HAVE_CHARSET
-- do_select_codepage ();
-+ do_select_codepage (_(" Choose codepage "));
- edit->force = REDRAW_COMPLETELY;
- edit_refresh_cmd (edit);
- #endif
-diff -Nurwd mc-4.6.2~pre1.orig/edit/Makefile.in mc-4.6.2~pre1/edit/Makefile.in
---- mc-4.6.2~pre1.orig/edit/Makefile.in 2007-09-11 16:33:38.000000000 +0200
-+++ mc-4.6.2~pre1/edit/Makefile.in 2008-02-13 21:01:06.000000000 +0100
-@@ -14,6 +14,8 @@
-
- @SET_MAKE@
-
-+SOURCES = $(libedit_a_SOURCES)
-+
- srcdir = @srcdir@
- top_srcdir = @top_srcdir@
- VPATH = @srcdir@
-diff -Nurwd mc-4.6.2~pre1.orig/po/ru.po mc-4.6.2~pre1/po/ru.po
---- mc-4.6.2~pre1.orig/po/ru.po 2007-09-11 16:35:10.000000000 +0200
-+++ mc-4.6.2~pre1/po/ru.po 2008-02-13 21:01:06.000000000 +0100
-@@ -17,7 +17,7 @@
- "Project-Id-Version: ru\n"
- "Report-Msgid-Bugs-To: mc-devel at gnome.org\n"
- "POT-Creation-Date: 2007-09-11 17:35+0300\n"
--"PO-Revision-Date: 2005-09-09 14:37+0300\n"
-+"PO-Revision-Date: 2008-02-12 21:13+0100\n"
- "Last-Translator: Anton S. Chumak <nightfast at yahoo.co.uk>\n"
- "Language-Team: Russian ru at li.org\n"
- "MIME-Version: 1.0\n"
-@@ -3625,23 +3625,31 @@
- msgid "Changes to file lost"
- msgstr "éÚÍÅÎÅÎÉÑ ÄÌÑ ÆÁÊÌÁ ÐÏÔÅÒÑÎÙ"
-
--#~ msgid "&Type"
--#~ msgstr "&ôÉÐ"
-+#: messages for recode patch
-+msgid "Panel &codepage"
-+msgstr "ëÏÄÉÒÏ×ËÁ ÐÁÎÅÌÉ"
-
--#~ msgid "&Links"
--#~ msgstr "&óÓÙÌËÉ"
-+msgid " Choose codepage "
-+msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ"
-
--#~ msgid "N&GID"
--#~ msgstr "N&GID"
-+msgid " Choose panel codepage "
-+msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ ÐÁÎÅÌÉ "
-
--#~ msgid "N&UID"
--#~ msgstr "N&UID"
-+msgid " Choose default FTP codepage "
-+msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ FTP ÐÏ ÕÍÏÌÞÁÎÉÀ "
-
--#~ msgid "&Owner"
--#~ msgstr "&÷ÌÁÄÅÌÅÃ"
-+msgid "FTP default codepage:"
-+msgstr "ëÏÄÉÒÏ×ËÁ FTP ÐÏ ÕÍÏÌÞÁÎÉÀ:"
-
--#~ msgid "&Group"
--#~ msgstr "&çÒÕÐÐÁ"
-+msgid "Recode file names:"
-+msgstr "ðÅÒÅËÏÄÉÒÏ×ÁÔØ ÉÍÅÎÁ:"
-+
-+msgid "Recoding works only with COPY/MOVE operation"
-+msgstr "ðÅÒÅËÏÄÉÒÏ×ËÁ ÒÁÂÏÔÁÅÔ ÔÏÌØËÏ ÄÌÑ ÏÐÅÒÁÃÉÊ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ"
-+
-+msgid " Choose \"FROM\" codepage for COPY/MOVE operaion "
-+msgstr" ÷ÙÂÅÒÉÔÅ ÎÁÞÁÌØÎÕÀ ËÏÄÉÒÏ×ËÕ ÄÌÑ ÏÐÅÒÁÃÉÉ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ "
-+
-+msgid " Choose \"TO\" codepage for COPY/MOVE operaion "
-+msgstr" ÷ÙÂÅÒÉÔÅ ËÏÎÅÞÎÕÀ ËÏÄÉÒÏ×ËÕ ÄÌÑ ÏÐÅÒÁÃÉÉ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ "
-
--#~ msgid "%s bytes in %d files"
--#~ msgstr "%s ÂÁÊÔ × %d ÆÁÊÌÁÈ"
-diff -Nurwd mc-4.6.2~pre1.orig/src/boxes.c mc-4.6.2~pre1/src/boxes.c
---- mc-4.6.2~pre1.orig/src/boxes.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/boxes.c 2008-02-13 21:01:06.000000000 +0100
-@@ -52,6 +52,7 @@
- #ifdef HAVE_CHARSET
- #include "charsets.h"
- #include "selcodepage.h"
-+#include "recode.h"
- #endif
-
- #ifdef USE_NETCODE
-@@ -454,8 +455,8 @@
- }
- }
-
--#define DISPY 11
--#define DISPX 46
-+#define DISPY 13
-+#define DISPX 35
-
-
- #ifndef HAVE_CHARSET
-@@ -551,23 +552,58 @@
-
-
- static int new_display_codepage;
-+static int new_ftp_codepage;
-
--static WLabel *cplabel;
- static WCheck *inpcheck;
-
-+static WButton *cpbutton;
-+static WButton *cpbutton_ftp;
-+
- static int
- sel_charset_button (int action)
- {
- const char *cpname;
- char buf[64];
-- new_display_codepage = select_charset (new_display_codepage, 1);
-+ new_display_codepage = select_charset (new_display_codepage, 1, _(" Choose input codepage "));
- cpname = (new_display_codepage < 0)
- ? _("Other 8 bit")
- : codepages[new_display_codepage].name;
-
- /* avoid strange bug with label repainting */
-- g_snprintf (buf, sizeof (buf), "%-27s", cpname);
-- label_set_text (cplabel, buf);
-+ sprintf( buf, "%s", cpname );
-+ button_set_text (cpbutton, buf);
-+
-+ if(new_display_codepage<0) new_ftp_codepage=-1;
-+ cpname = (new_ftp_codepage < 0)
-+ ? _("Other 8 bit")
-+ : codepages[ new_ftp_codepage ].name;
-+ sprintf( buf, "%s", cpname );
-+ button_set_text (cpbutton_ftp, buf);
-+
-+ return 0;
-+}
-+
-+static int sel_charset_button_ftp(int action) {
-+ char *cpname, buf[64];
-+ if(new_display_codepage>0) {
-+ new_ftp_codepage = select_charset(new_ftp_codepage, 0, _(" Choose default FTP codepage "));
-+ cpname = (new_display_codepage < 0)
-+ ? _("Other 8 bit")
-+ : codepages[ new_display_codepage ].name;
-+ sprintf( buf, "%s", cpname );
-+ button_set_text( cpbutton, buf );
-+ cpname = (new_ftp_codepage < 0)
-+ ? _("Other 8 bit")
-+ : codepages[ new_ftp_codepage ].name;
-+ sprintf( buf, "%s", cpname );
-+ button_set_text( cpbutton_ftp, buf );
-+ }
-+ else {
-+ message( 1, _(" Warning "),
-+ _("To use this feature select your codepage in\n"
-+ "Setup / Display Bits dialog!\n"
-+ "Do not forget to save options." ));
-+ }
- return 0;
- }
-
-@@ -589,9 +625,6 @@
- cpname = (new_display_codepage < 0)
- ? _("Other 8 bit")
- : codepages[new_display_codepage].name;
-- cplabel = label_new (4, 4, cpname);
-- add_widget (dbits_dlg, cplabel);
--
- add_widget (dbits_dlg,
- button_new (DISPY - 3, DISPX / 2 + 3, B_CANCEL,
- NORMAL_BUTTON, _("&Cancel"), 0));
-@@ -600,13 +633,30 @@
- 0));
-
- inpcheck =
-- check_new (6, 4, !use_8th_bit_as_meta, _("F&ull 8 bits input"));
-+ check_new (8, 4, !use_8th_bit_as_meta, _("F&ull 8 bits input"));
- add_widget (dbits_dlg, inpcheck);
-
-- cpname = _("&Select");
-- add_widget (dbits_dlg,
-- button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER,
-- NORMAL_BUTTON, cpname, sel_charset_button));
-+
-+ add_widget( dbits_dlg, label_new( 5, 4, _("FTP default codepage:")));
-+ if(n_codepages>0) {
-+ cpname = (new_display_codepage < 0)
-+ ? _("Other 8 bit")
-+ : codepages[ new_display_codepage ].name;
-+ }
-+ else cpname= _("Other 8 bit");
-+ cpbutton=button_new(4, 5, B_USER,
-+ NORMAL_BUTTON, cpname, sel_charset_button);
-+
-+ if(n_codepages>0) {
-+ cpname = (new_ftp_codepage < 0)
-+ ? _("Other 8 bit")
-+ : codepages[ new_ftp_codepage ].name;
-+ }
-+ else cpname= _("Other 8 bit");
-+ cpbutton_ftp=button_new(6, 5, B_USER,
-+ NORMAL_BUTTON, cpname, sel_charset_button_ftp);
-+ add_widget( dbits_dlg, cpbutton_ftp);
-+ add_widget (dbits_dlg, cpbutton);
-
- return dbits_dlg;
- }
-@@ -616,6 +666,7 @@
- {
- Dlg_head *dbits_dlg;
- new_display_codepage = display_codepage;
-+ new_ftp_codepage = ftp_codepage;
-
- application_keypad_mode ();
- dbits_dlg = init_disp_bits_box ();
-@@ -636,6 +687,17 @@
- && display_codepage != 1) ? 128 : 160;
- #endif
- use_8th_bit_as_meta = !(inpcheck->state & C_BOOL);
-+
-+ ftp_codepage=new_ftp_codepage;
-+ if(display_codepage<=0) {
-+ panel_reset_codepage(left_panel);
-+ paint_dir(left_panel);
-+ display_mini_info(left_panel);
-+ panel_reset_codepage(right_panel);
-+ paint_dir(right_panel);
-+ display_mini_info(right_panel);
-+ }
-+
- }
- destroy_dlg (dbits_dlg);
- repaint_screen ();
-diff -Nurwd mc-4.6.2~pre1.orig/src/charsets.c mc-4.6.2~pre1/src/charsets.c
---- mc-4.6.2~pre1.orig/src/charsets.c 2005-05-27 05:35:15.000000000 +0200
-+++ mc-4.6.2~pre1/src/charsets.c 2008-02-13 21:01:06.000000000 +0100
-@@ -121,8 +121,6 @@
- }
- }
-
--#define OTHER_8BIT "Other_8_bit"
--
- const char *
- get_codepage_id (int n)
- {
-@@ -141,7 +139,7 @@
- return -1;
- }
-
--static char
-+char
- translate_character (iconv_t cd, char c)
- {
- char outbuf[4], *obuf;
-diff -Nurwd mc-4.6.2~pre1.orig/src/charsets.h mc-4.6.2~pre1/src/charsets.h
---- mc-4.6.2~pre1.orig/src/charsets.h 2004-12-03 20:17:47.000000000 +0100
-+++ mc-4.6.2~pre1/src/charsets.h 2008-02-13 21:01:06.000000000 +0100
-@@ -6,6 +6,7 @@
- #define UNKNCHAR '\001'
-
- #define CHARSETS_INDEX "mc.charsets"
-+#define OTHER_8BIT "Other_8_bit"
-
- extern int n_codepages;
-
-@@ -19,6 +20,10 @@
-
- extern struct codepage_desc *codepages;
-
-+#include <iconv.h>
-+extern char translate_character(iconv_t cd, char c);
-+extern char errbuf[255];
-+
- const char *get_codepage_id (int n);
- int get_codepage_index (const char *id);
- int load_codepages_list (void);
-diff -Nurwd mc-4.6.2~pre1.orig/src/cmd.c mc-4.6.2~pre1/src/cmd.c
---- mc-4.6.2~pre1.orig/src/cmd.c 2007-05-02 14:01:13.000000000 +0200
-+++ mc-4.6.2~pre1/src/cmd.c 2008-02-13 21:01:06.000000000 +0100
-@@ -70,6 +70,10 @@
- # include "../edit/edit.h"
- #endif
-
-+#ifdef HAVE_CHARSET
-+#include "recode.h"
-+#endif
-+
- /* If set and you don't have subshell support,then C-o will give you a shell */
- int output_starts_shell = 0;
-
-@@ -347,6 +351,9 @@
- mkdir_cmd (void)
- {
- char *dir, *absdir;
-+#ifdef HAVE_CHARSET
-+ char *recoded_dir;
-+#endif
-
- dir =
- input_expand_dialog (_("Create a new Directory"),
-@@ -356,8 +363,16 @@
-
- if (dir[0] == '/' || dir[0] == '~')
- absdir = g_strdup (dir);
-- else
-+ else {
-+#ifdef HAVE_CHARSET
-+ recoded_dir=g_strdup(dir);
-+ my_translate_string(dir,strlen(dir), recoded_dir,current_panel->tr_table_input);
-+ absdir = concat_dir_and_file (current_panel->cwd, recoded_dir);
-+ g_free(recoded_dir);
-+#else
- absdir = concat_dir_and_file (current_panel->cwd, dir);
-+#endif
-+ }
-
- save_cwds_stat ();
- if (my_mkdir (absdir, 0777) == 0) {
-diff -Nurwd mc-4.6.2~pre1.orig/src/file.c mc-4.6.2~pre1/src/file.c
---- mc-4.6.2~pre1.orig/src/file.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/file.c 2008-02-13 21:01:06.000000000 +0100
-@@ -73,6 +73,9 @@
- #include "../vfs/vfs-impl.h"
-
- /* }}} */
-+#ifdef HAVE_CHARSET
-+#include "recode.h"
-+#endif
-
- /* Hack: the vfs code should not rely on this */
- #define WITH_FULL_PATHS 1
-@@ -917,7 +920,11 @@
- }
- /* Dive into subdir if exists */
- if (toplevel && ctx->dive_into_subdirs) {
-+#ifdef HAVE_CHARSET
-+ dest_dir = concat_dir_and_recoded_fname(d, x_basename (s), ctx);
-+#else
- dest_dir = concat_dir_and_file (d, x_basename (s));
-+#endif
- } else {
- dest_dir = g_strdup (d);
- goto dont_mkdir;
-@@ -967,7 +974,11 @@
-
- (*ctx->stat_func) (path, &buf);
- if (S_ISDIR (buf.st_mode)) {
-+#ifdef HAVE_CHARSET
-+ mdpath = concat_dir_and_recoded_fname(dest_dir, next->d_name, ctx);
-+#else
- mdpath = concat_dir_and_file (dest_dir, next->d_name);
-+#endif
- /*
- * From here, we just intend to recursively copy subdirs, not
- * the double functionality of copying different when the target
-@@ -978,7 +989,11 @@
- parent_dirs, progress_count, progress_bytes);
- g_free (mdpath);
- } else {
-+#ifdef HAVE_CHARSET
-+ dest_file=concat_dir_and_recoded_fname(dest_dir, x_basename(path),ctx);
-+#else
- dest_file = concat_dir_and_file (dest_dir, x_basename (path));
-+#endif
- return_status = copy_file_file (ctx, path, dest_file, 1,
- progress_count, progress_bytes, 0);
- g_free (dest_file);
-@@ -1168,7 +1183,12 @@
- destdir = g_strdup (d);
- move_over = 1;
- } else
-+#ifdef HAVE_CHARSET
-+ destdir = concat_dir_and_recoded_fname(d, x_basename (s), ctx);
-+#else
- destdir = concat_dir_and_file (d, x_basename (s));
-+#endif
-+
-
- if (sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino) {
- int msize = COLS - 36;
-@@ -1873,7 +1893,12 @@
- if (temp == NULL) {
- value = transform_error;
- } else {
-+#ifdef HAVE_CHARSET
-+ char *temp2 = concat_dir_and_recoded_fname (dest, temp, ctx);
-+#else
- char *temp2 = concat_dir_and_file (dest, temp);
-+#endif
-+
- g_free (dest);
- dest = temp2;
- temp = NULL;
-@@ -1967,7 +1992,12 @@
- if (temp == NULL)
- value = transform_error;
- else {
-+#ifdef HAVE_CHARSET
-+ char *temp2 = concat_dir_and_recoded_fname(dest, temp, ctx);
-+#else
- char *temp2 = concat_dir_and_file (dest, temp);
-+#endif
-+
-
- switch (operation) {
- case OP_COPY:
-diff -Nurwd mc-4.6.2~pre1.orig/src/filegui.c mc-4.6.2~pre1/src/filegui.c
---- mc-4.6.2~pre1.orig/src/filegui.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/filegui.c 2008-02-13 21:01:06.000000000 +0100
-@@ -67,6 +67,10 @@
- #include "util.h" /* strip_password() */
- #include "tty.h"
-
-+#ifdef HAVE_CHARSET
-+#include "recode.h"
-+#endif
-+
- /* }}} */
-
- /* Hack: the vfs code should not rely on this */
-@@ -721,57 +725,79 @@
- }
- }
-
-+#ifdef HAVE_CHARSET
-+#define FMDY 15
-+#else
- #define FMDY 13
-+#endif
-+
- #define FMD_XLEN 64
- extern int fmd_xlen;
- static QuickWidget fmd_widgets[] = {
-
--#define FMCB0 FMDC
--#define FMCB12 0
--#define FMCB11 1
-- /* follow symlinks and preserve Attributes must be the first */
-- {quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"), 9, 0,
-- 0 /* &op_preserve */ , 0, NULL},
-- {quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"), 7, 0,
-- 0 /* &file_mask_op_follow_links */ , 0, NULL},
-- {quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, NULL},
-- {quick_checkbox, 37, 64, 4, FMDY, N_("&Using shell patterns"), 0, 0,
-- 0 /* &source_easy_patterns */ , 0, NULL},
-- {quick_input, 3, 64, 3, FMDY, "", 58,
-- 0, 0, 0, "input-def"},
--#define FMDI1 4
--#define FMDI2 5
--#define FMDC 3
-- {quick_input, 3, 64, 6, FMDY, "", 58, 0,
-- 0, 0, "input2"},
--#define FMDI0 6
-- {quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, NULL},
--#define FMBRGT 7
-- {quick_button, 42, 64, 9, FMDY, N_("&Cancel"), 0, B_CANCEL, 0, 0,
-- NULL},
--#undef SKIP
-+#ifdef HAVE_CHARSET
-+ #define Y_OK 12
-+#else
-+ #define Y_OK 9
-+#endif
-+
- #ifdef WITH_BACKGROUND
--# define SKIP 5
--# define FMCB21 11
--# define FMCB22 10
--# define FMBLFT 9
--# define FMBMID 8
-- {quick_button, 25, 64, 9, FMDY, N_("&Background"), 0, B_USER, 0, 0,
-- NULL},
--#else /* WITH_BACKGROUND */
--# define SKIP 4
--# define FMCB21 10
--# define FMCB22 9
--# define FMBLFT 8
--# undef FMBMID
-+ #define ADD 0
-+#else
-+ #define ADD -1
- #endif
-- {quick_button, 14, 64, 9, FMDY, N_("&OK"), 0, B_ENTER, 0, 0, NULL},
-- {quick_checkbox, 42, 64, 8, FMDY, N_("&Stable Symlinks"), 0, 0,
-- 0 /* &file_mask_stable_symlinks */ , 0, NULL},
-- {quick_checkbox, 31, 64, 7, FMDY, N_("&Dive into subdir if exists"), 0,
-- 0,
-- 0 /* &dive_into_subdirs */ , 0, NULL},
-- NULL_QuickWidget
-+
-+ #define FM_STAB_SYM 0
-+ #define FM_DIVE_INTO_SUBDIR 1
-+ #define FM_PRES_ATTR 2
-+ #define FM_FOLLOW_LINKS 3
-+ #define FM_DST_INPUT 4
-+ #define FM_DST_TITLE 5
-+ #define FM_USING_SHELL_PATT 6
-+ #define FM_SRC_INPUT 7
-+ #define FM_SRC_TITLE 8
-+ #define FM_CANCEL 9
-+#ifdef WITH_BACKGROUND
-+ #define FM_BKGND 10
-+#endif
-+ #define FM_OK 11+ADD
-+#ifdef HAVE_CHARSET
-+ #define FM_TO_CODEPAGE 12+ADD
-+ #define FM_FROM_CODEPAGE 13+ADD
-+ #define FM_RECODE_TITLE 14+ADD
-+ #define FM_RECODE_ARROW 15+ADD
-+#endif // HAVE_CHARSET
-+
-+
-+#ifdef HAVE_CHARSET
-+ #define SKIP 10
-+ #define B_FROM B_USER+1
-+ #define B_TO B_USER+2
-+#else
-+ #define SKIP 10
-+#endif
-+
-+ {quick_checkbox, 42,64, 8, FMDY, N_("&Stable Symlinks"),0,0,0,0,"stab-sym"},
-+ {quick_checkbox, 31,64, 7, FMDY, N_("&Dive into subdir if exists"),0,0,0,0,"dive"},
-+ {quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"),9,0,0,0,"preserve"},
-+ {quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"),7,0,0,0,"follow"},
-+ {quick_input, 3, 64, 6, FMDY, "", 58, 0, 0, 0, "input2"},
-+ {quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, "to"},
-+ {quick_checkbox, 37,64, 4, FMDY, N_("&Using shell patterns"),0,0, 0,0,"us-sh"},
-+ {quick_input, 3, 64, 3, FMDY, "", 58, 0, 0, 0, "input-def"},
-+ {quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, "ql"},
-+ {quick_button, 42,64, Y_OK, FMDY, N_("&Cancel"), 0, B_CANCEL, 0,0, "cancel"},
-+#ifdef WITH_BACKGROUND
-+ {quick_button, 25,64, Y_OK, FMDY, N_("&Background"), 0, B_USER, 0,0, "back"},
-+#endif
-+ {quick_button, 14,64, Y_OK, FMDY, N_("&OK"), 0, B_ENTER, 0, 0, "ok"},
-+#ifdef HAVE_CHARSET
-+ {quick_button, 46,64, 10, FMDY,"to codepage", 0, B_TO, 0, 0, "ql"},
-+ {quick_button, 25,64, 10, FMDY, "from codepage", 0, B_FROM, 0, 0, "ql"},
-+ {quick_label, 3, 64, 10, FMDY, N_("Recode file names:"), 0, 0, 0, 0, "ql"},
-+ {quick_label, 42,64, 10, FMDY, "->", 0, 0, 0, 0, "ql"},
-+#endif
-+ {0}
- };
-
- static int
-@@ -805,48 +831,48 @@
- if (fmd_widgets[i].text[0] != '\0')
- fmd_widgets[i].text = _(fmd_widgets[i].text);
-
-- len = mbstrlen (fmd_widgets[FMCB11].text)
-- + mbstrlen (fmd_widgets[FMCB21].text) + 15;
-+ len = mbstrlen (fmd_widgets[FM_FOLLOW_LINKS].text)
-+ + mbstrlen (fmd_widgets[FM_DIVE_INTO_SUBDIR].text) + 15;
- fmd_xlen = max (fmd_xlen, len);
-
-- len = mbstrlen (fmd_widgets[FMCB12].text)
-- + mbstrlen (fmd_widgets[FMCB22].text) + 15;
-+ len = mbstrlen (fmd_widgets[FM_PRES_ATTR].text)
-+ + mbstrlen (fmd_widgets[FM_STAB_SYM].text) + 15;
- fmd_xlen = max (fmd_xlen, len);
-
-- len = mbstrlen (fmd_widgets[FMBRGT].text)
-- + mbstrlen (fmd_widgets[FMBLFT].text) + 11;
-+ len = mbstrlen (fmd_widgets[FM_CANCEL].text)
-+ + mbstrlen (fmd_widgets[FM_OK].text) + 11;
-
--#ifdef FMBMID
-- len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
-+#ifdef FM_BKGND
-+ len += mbstrlen (fmd_widgets[FM_BKGND].text) + 6;
- #endif
-
- fmd_xlen = max (fmd_xlen, len + 4);
-
- len = (fmd_xlen - (len + 6)) / 2;
-- i = fmd_widgets[FMBLFT].relative_x = len + 3;
-- i += mbstrlen (fmd_widgets[FMBLFT].text) + 8;
-+ i = fmd_widgets[FM_OK].relative_x = len + 3;
-+ i += mbstrlen (fmd_widgets[FM_OK].text) + 8;
-
--#ifdef FMBMID
-- fmd_widgets[FMBMID].relative_x = i;
-- i += mbstrlen (fmd_widgets[FMBMID].text) + 6;
-+#ifdef FM_BKGND
-+ fmd_widgets[FM_BKGND].relative_x = i;
-+ i += mbstrlen (fmd_widgets[FM_BKGND].text) + 6;
- #endif
-
-- fmd_widgets[FMBRGT].relative_x = i;
-+ fmd_widgets[FM_CANCEL].relative_x = i;
-
- #define chkbox_xpos(i) \
- fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6
-
-- chkbox_xpos (FMCB0);
-- chkbox_xpos (FMCB21);
-- chkbox_xpos (FMCB22);
-+ chkbox_xpos (FM_USING_SHELL_PATT);
-+ chkbox_xpos (FM_DIVE_INTO_SUBDIR);
-+ chkbox_xpos (FM_STAB_SYM);
-
- if (fmd_xlen != FMD_XLEN) {
- i = sizeof (fmd_widgets) / sizeof (fmd_widgets[0]) - 1;
- while (i--)
- fmd_widgets[i].x_divisions = fmd_xlen;
-
-- fmd_widgets[FMDI1].hotkey_pos =
-- fmd_widgets[FMDI2].hotkey_pos = fmd_xlen - 6;
-+ fmd_widgets[FM_SRC_INPUT].hotkey_pos =
-+ fmd_widgets[FM_DST_INPUT].hotkey_pos = fmd_xlen - 6;
- }
- #undef chkbox_xpos
-
-@@ -866,6 +892,9 @@
- int val;
- QuickDialog Quick_input;
- char *def_text;
-+#ifdef HAVE_CHARSET
-+ char *errmsg;
-+#endif
- g_return_val_if_fail (ctx != NULL, NULL);
-
- def_text = g_strdup(def_text_orig);
-@@ -883,10 +912,11 @@
-
- /* Set up the result pointers */
-
-- fmd_widgets[FMCB12].result = &ctx->op_preserve;
-- fmd_widgets[FMCB11].result = &ctx->follow_links;
-- fmd_widgets[FMCB22].result = &ctx->stable_symlinks;
-- fmd_widgets[FMCB21].result = &ctx->dive_into_subdirs;
-+ fmd_widgets[FM_PRES_ATTR].result = &ctx->op_preserve;
-+ fmd_widgets[FM_FOLLOW_LINKS].result = &ctx->follow_links;
-+ fmd_widgets[FM_STAB_SYM].result = &ctx->stable_symlinks;
-+ fmd_widgets[FM_DIVE_INTO_SUBDIR].result = &ctx->dive_into_subdirs;
-+
-
- /* filter out a possible password from def_text */
- def_text_secure = strip_password (g_strdup (def_text), 1);
-@@ -894,8 +924,9 @@
- /* Create the dialog */
-
- ctx->stable_symlinks = 0;
-- fmd_widgets[FMDC].result = &source_easy_patterns;
-- fmd_widgets[FMDI1].text = easy_patterns ? "*" : "^\\(.*\\)$";
-+ fmd_widgets[FM_USING_SHELL_PATT].result = &source_easy_patterns;
-+ fmd_widgets[FM_SRC_INPUT].text = easy_patterns ? "*" : "^\\(.*\\)$";
-+
- Quick_input.xlen = fmd_xlen;
- Quick_input.xpos = -1;
- Quick_input.title = op_names[operation];
-@@ -903,19 +934,37 @@
- Quick_input.ylen = FMDY;
- Quick_input.i18n = 1;
- Quick_input.widgets = fmd_widgets;
-- fmd_widgets[FMDI0].text = text;
-- fmd_widgets[FMDI2].text = def_text_secure;
-- fmd_widgets[FMDI2].str_result = &dest_dir;
-- fmd_widgets[FMDI1].str_result = &source_mask;
-+ fmd_widgets[FM_SRC_TITLE].text = text;
-+ fmd_widgets[FM_DST_INPUT].text = def_text_secure;
-+ fmd_widgets[FM_DST_INPUT].str_result = &dest_dir;
-+ fmd_widgets[FM_SRC_INPUT].str_result = &source_mask;
-
- *do_background = 0;
-+
-+#ifdef HAVE_CHARSET
-+ ctx->from_codepage=current_panel->src_codepage;
-+ ctx->to_codepage=left_panel->src_codepage;
-+ if (left_panel) {
-+ ctx->to_codepage=left_panel->src_codepage;
-+ if( (current_panel==left_panel) && right_panel ) ctx->to_codepage=right_panel->src_codepage;
-+ }
-+#endif
-+
- ask_file_mask:
-
-+#ifdef HAVE_CHARSET
-+ if(operation!=OP_COPY && operation!=OP_MOVE) {
-+ ctx->from_codepage=-1;
-+ ctx->to_codepage=-1;
-+ }
-+ fmd_widgets[FM_FROM_CODEPAGE].text=get_codepage_id(ctx->from_codepage);
-+ fmd_widgets[FM_TO_CODEPAGE].text=get_codepage_id(ctx->to_codepage);
-+#endif
-+
- if ((val = quick_dialog_skip (&Quick_input, SKIP)) == B_CANCEL) {
- g_free (def_text_secure);
- return 0;
- }
-- g_free (def_text_secure);
-
- if (ctx->follow_links)
- ctx->stat_func = mc_stat;
-@@ -937,6 +986,7 @@
- orig_mask = source_mask;
- if (!dest_dir || !*dest_dir) {
- g_free (source_mask);
-+ g_free (def_text_secure);
- g_free(def_text);
- return dest_dir;
- }
-@@ -991,6 +1041,48 @@
- }
- if (val == B_USER)
- *do_background = 1;
-+#ifdef HAVE_CHARSET
-+ if(val == B_FROM) {
-+ if(operation==OP_COPY || operation==OP_MOVE) {
-+ if(display_codepage<=0) {
-+ message( 1, _(" Warning "),
-+ _("To use this feature select your codepage in\n"
-+ "Setup / Display Bits dialog!\n"
-+ "Do not forget to save options." ));
-+ goto ask_file_mask;
-+ }
-+ ctx->from_codepage=select_charset(ctx->from_codepage,0,
-+ _(" Choose \"FROM\" codepage for COPY/MOVE operaion "));
-+ }
-+ else
-+ message(1,"Warning",_("Recoding works only with COPY or MOVE operation"));
-+ goto ask_file_mask;
-+ }
-+ if(val == B_TO) {
-+ if(operation==OP_COPY || operation==OP_MOVE) {
-+ if(display_codepage<=0) {
-+ message( 1, _(" Warning "),
-+ _("To use this feature select your codepage in\n"
-+ "Setup / Display Bits dialog!\n"
-+ "Do not forget to save options." ));
-+ goto ask_file_mask;
-+ }
-+ ctx->to_codepage=select_charset(ctx->to_codepage,0,
-+ _(" Choose \"TO\" codepage for COPY/MOVE operaion "));
-+ }
-+ else
-+ message(1,"Warning",_("Recoding works only with COPY or MOVE operation"));
-+ goto ask_file_mask;
-+ }
-+
-+ errmsg=my_init_tt(ctx->to_codepage,ctx->from_codepage,ctx->tr_table);
-+ if(errmsg) {
-+ my_reset_tt(ctx->tr_table,256);
-+ message( 1, MSG_ERROR, "%s", errmsg);
-+ }
-+#endif
-+
-+ g_free(def_text_secure);
- g_free(def_text);
- return dest_dir;
- }
-diff -Nurwd mc-4.6.2~pre1.orig/src/fileopctx.c mc-4.6.2~pre1/src/fileopctx.c
---- mc-4.6.2~pre1.orig/src/fileopctx.c 2005-05-27 05:35:15.000000000 +0200
-+++ mc-4.6.2~pre1/src/fileopctx.c 2008-02-13 21:01:06.000000000 +0100
-@@ -25,8 +25,12 @@
- #include <unistd.h>
-
- #include "global.h"
--#include "fileopctx.h"
-
-+#ifdef HAVE_CHARSET
-+#include "recode.h"
-+#endif
-+
-+#include "fileopctx.h"
-
- /**
- * file_op_context_new:
-@@ -53,6 +57,12 @@
- ctx->umask_kill = 0777777;
- ctx->erase_at_end = TRUE;
-
-+#ifdef HAVE_CHARSET
-+ ctx->from_codepage=-1;
-+ ctx->to_codepage=-1;
-+ my_reset_tt(ctx->tr_table,256);
-+#endif
-+
- return ctx;
- }
-
-diff -Nurwd mc-4.6.2~pre1.orig/src/fileopctx.h mc-4.6.2~pre1/src/fileopctx.h
---- mc-4.6.2~pre1.orig/src/fileopctx.h 2004-10-06 20:06:26.000000000 +0200
-+++ mc-4.6.2~pre1/src/fileopctx.h 2008-02-13 21:01:06.000000000 +0100
-@@ -108,6 +108,14 @@
- /* User interface data goes here */
-
- void *ui;
-+
-+#ifdef HAVE_CHARSET
-+ /* Recode data */
-+ int from_codepage, to_codepage;
-+ unsigned char tr_table[256];
-+ unsigned char recode_buf[MC_MAXPATHLEN];
-+#endif
-+
- } FileOpContext;
-
-
-diff -Nurwd mc-4.6.2~pre1.orig/src/main.c mc-4.6.2~pre1/src/main.c
---- mc-4.6.2~pre1.orig/src/main.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/main.c 2008-02-13 21:01:06.000000000 +0100
-@@ -81,6 +81,7 @@
-
- #ifdef HAVE_CHARSET
- #include "charsets.h"
-+#include "recode.h"
- #endif /* HAVE_CHARSET */
-
- #ifdef USE_VFS
-@@ -97,6 +98,7 @@
- /* The structures for the panels */
- WPanel *left_panel = NULL;
- WPanel *right_panel = NULL;
-+WPanel* ret_panel=NULL;
-
- /* The pointer to the tree */
- WTree *the_tree = NULL;
-@@ -586,6 +588,7 @@
- }
- directory = *new_dir ? new_dir : home_dir;
-
-+ ret_panel=panel;
- if (mc_chdir (directory) == -1) {
- strcpy (panel->cwd, olddir);
- g_free (olddir);
-@@ -804,6 +807,10 @@
- {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
- {' ', N_("&Info C-x i"), 'I', info_cmd},
- {' ', N_("&Tree"), 'T', tree_cmd},
-+#ifdef HAVE_CHARSET
-+ {' ', "", ' ', 0},
-+ {' ', N_("Panel &codepage"), 'C', fnc_l_cmd},
-+#endif
- {' ', "", ' ', 0},
- {' ', N_("&Sort order..."), 'S', sort_cmd},
- {' ', "", ' ', 0},
-@@ -828,6 +835,10 @@
- {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
- {' ', N_("&Info C-x i"), 'I', info_cmd},
- {' ', N_("&Tree"), 'T', tree_cmd},
-+#ifdef HAVE_CHARSET
-+ {' ', "", ' ', 0},
-+ {' ', N_("Panel &codepage"), 'C', fnc_r_cmd},
-+#endif
- {' ', "", ' ', 0},
- {' ', N_("&Sort order..."), 'S', sort_cmd},
- {' ', "", ' ', 0},
-diff -Nurwd mc-4.6.2~pre1.orig/src/Makefile.am mc-4.6.2~pre1/src/Makefile.am
---- mc-4.6.2~pre1.orig/src/Makefile.am 2006-02-04 12:13:30.000000000 +0100
-+++ mc-4.6.2~pre1/src/Makefile.am 2008-02-13 21:01:06.000000000 +0100
-@@ -41,7 +41,8 @@
- mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
- $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV)
-
--CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
-+CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \
-+ recode.c recode.h
-
- SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \
- chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \
-@@ -58,8 +59,8 @@
- menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
- option.c option.h panel.h panelize.c panelize.h poptalloca.h \
- popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c \
-- profile.c profile.h regex.c rxvt.c screen.c setup.c setup.h \
-- slint.c subshell.c subshell.h textconf.c textconf.h \
-+ profile.c profile.h regex.c rxvt.c screen.c screen.h setup.c \
-+ setup.h slint.c subshell.c subshell.h textconf.c textconf.h \
- tree.c tree.h treestore.c treestore.h tty.c tty.h user.c user.h \
- util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
- widget.h win.c win.h wtools.c wtools.h unixcompat.h \
-diff -Nurwd mc-4.6.2~pre1.orig/src/Makefile.in mc-4.6.2~pre1/src/Makefile.in
---- mc-4.6.2~pre1.orig/src/Makefile.in 2007-09-11 16:33:39.000000000 +0200
-+++ mc-4.6.2~pre1/src/Makefile.in 2008-02-13 21:01:06.000000000 +0100
-@@ -95,12 +95,12 @@
- mountlist.c mountlist.h mouse.c mouse.h myslang.h option.c \
- option.h panel.h panelize.c panelize.h poptalloca.h popt.c \
- poptconfig.c popt.h popthelp.c poptint.h poptparse.c profile.c \
-- profile.h regex.c rxvt.c screen.c setup.c setup.h slint.c \
-+ profile.h regex.c rxvt.c screen.c screen.h setup.c setup.h slint.c \
- subshell.c subshell.h textconf.c textconf.h tree.c tree.h \
- treestore.c treestore.h tty.c tty.h user.c user.h util.c \
- util.h utilunix.c view.c view.h vfsdummy.h widget.c widget.h \
- win.c win.h wtools.c wtools.h unixcompat.h x11conn.h x11conn.c \
-- ecs.h ecs.c charsets.c charsets.h selcodepage.c selcodepage.h
-+ ecs.h ecs.c charsets.c charsets.h selcodepage.c selcodepage.h recode.c recode.h
- am__objects_1 = achown.$(OBJEXT) background.$(OBJEXT) boxes.$(OBJEXT) \
- chmod.$(OBJEXT) chown.$(OBJEXT) cmd.$(OBJEXT) color.$(OBJEXT) \
- command.$(OBJEXT) complete.$(OBJEXT) cons.handler.$(OBJEXT) \
-@@ -120,7 +120,7 @@
- tty.$(OBJEXT) user.$(OBJEXT) util.$(OBJEXT) utilunix.$(OBJEXT) \
- view.$(OBJEXT) widget.$(OBJEXT) win.$(OBJEXT) wtools.$(OBJEXT) \
- x11conn.$(OBJEXT) ecs.$(OBJEXT)
--am__objects_2 = charsets.$(OBJEXT) selcodepage.$(OBJEXT)
-+am__objects_2 = charsets.$(OBJEXT) selcodepage.$(OBJEXT) recode.$(OBJEXT)
- @CHARSET_FALSE at am_mc_OBJECTS = $(am__objects_1)
- @CHARSET_TRUE at am_mc_OBJECTS = $(am__objects_1) $(am__objects_2)
- mc_OBJECTS = $(am_mc_OBJECTS)
-@@ -329,7 +329,8 @@
- mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
- $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV)
-
--CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
-+CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \
-+ recode.c recode.h
- SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \
- chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \
- command.c command.h complete.c complete.h cons.handler.c \
-@@ -345,7 +346,7 @@
- menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
- option.c option.h panel.h panelize.c panelize.h poptalloca.h \
- popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c \
-- profile.c profile.h regex.c rxvt.c screen.c setup.c setup.h \
-+ profile.c profile.h regex.c rxvt.c screen.c screen.h setup.c setup.h \
- slint.c subshell.c subshell.h textconf.c textconf.h \
- tree.c tree.h treestore.c treestore.h tty.c tty.h user.c user.h \
- util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
-diff -Nurwd mc-4.6.2~pre1.orig/src/panel.h mc-4.6.2~pre1/src/panel.h
---- mc-4.6.2~pre1.orig/src/panel.h 2004-12-03 20:17:47.000000000 +0100
-+++ mc-4.6.2~pre1/src/panel.h 2008-02-13 21:01:06.000000000 +0100
-@@ -71,6 +71,19 @@
-
- int searching;
- char search_buffer [256];
-+
-+#ifdef HAVE_CHARSET
-+ int src_codepage;
-+ unsigned char tr_table[256], tr_table_input[256];
-+#endif
-+
-+#ifdef USE_VFS
-+ #ifdef HAVE_CHARSET
-+ int ret_codepage;
-+ #endif
-+ int is_return;
-+ char retdir[MC_MAXPATHLEN];
-+#endif
- } WPanel;
-
- WPanel *panel_new (const char *panel_name);
-@@ -96,6 +109,7 @@
- extern WPanel *left_panel;
- extern WPanel *right_panel;
- extern WPanel *current_panel;
-+extern WPanel* ret_panel;
-
- void try_to_select (WPanel *panel, const char *name);
-
-diff -Nurwd mc-4.6.2~pre1.orig/src/recode.c mc-4.6.2~pre1/src/recode.c
---- mc-4.6.2~pre1.orig/src/recode.c 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/src/recode.c 2008-02-13 21:01:06.000000000 +0100
-@@ -0,0 +1,153 @@
-+#include "recode.h"
-+#ifdef HAVE_CHARSET
-+
-+char *lang;
-+char lang_codepage_name[256];
-+int lang_codepage;
-+
-+int ftp_codepage=-1;
-+
-+// recode buffer for displaying file names
-+unsigned char recode_buf[MC_MAXPATHLEN];
-+
-+WPanel* recode_panel;
-+
-+//--- get codepage from $LANG
-+void get_locale_codepage() {
-+ char* a;
-+ char* b;
-+ int len;
-+
-+ lang=getenv("LANG");
-+ if(!lang) {
-+ strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
-+ lang_codepage=-1;
-+ return;
-+ }
-+
-+ a=strchr(lang,'.');
-+ if(!a) {
-+ strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
-+ lang_codepage=-1;
-+ return;
-+ }
-+ ++a;
-+
-+ b=strchr(lang,'@');
-+ if(!b) b=lang+strlen(lang);
-+
-+ len=b-a;
-+ if(len>=sizeof(lang_codepage_name)) len=sizeof(lang_codepage_name)-1;
-+
-+ memcpy(lang_codepage_name,a, len);
-+ lang_codepage_name[len]='\0';
-+ lang_codepage=get_codepage_index(lang_codepage_name);
-+ if(lang_codepage<0) strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
-+}
-+
-+//--- reset translation table
-+void my_reset_tt(unsigned char *table,int n) {
-+ int i;
-+ for(i=0;i<n;i++) table[i]=i;
-+}
-+
-+//--- reset panel codepage
-+void panel_reset_codepage(WPanel *p) {
-+ p->src_codepage=-1;
-+ my_reset_tt(p->tr_table,256);
-+ my_reset_tt(p->tr_table_input,256);
-+}
-+
-+//--- Initialize translation table
-+// i need this function because init_translation_table from
-+// charsets.c fills only fixed translation tables conv_displ and conv_input
-+//---
-+char* my_init_tt( int from, int to, unsigned char *table) {
-+ int i;
-+ iconv_t cd;
-+ char *cpfrom, *cpto;
-+
-+ if(from < 0 || to < 0 || from == to) {
-+ my_reset_tt(table,256);
-+ return NULL;
-+ }
-+ my_reset_tt(table,128);
-+ cpfrom=codepages[from ].id;
-+ cpto=codepages[to].id;
-+ cd=iconv_open(cpfrom, cpto);
-+ if(cd==(iconv_t)-1) {
-+ snprintf(errbuf, 255, _("Cannot translate from %s to %s"), cpfrom, cpto);
-+ return errbuf;
-+ }
-+ for(i=128; i<=255; ++i) table[i] = translate_character(cd, i);
-+ iconv_close(cd);
-+ return NULL;
-+}
-+
-+//--- Translate string from one codepage to another
-+void my_translate_string(unsigned char *s1,int l1, unsigned char *s2, unsigned char *table) {
-+ int i=0;
-+ if(!s1) return;
-+ while(i<l1) {
-+ s2[i]=table[s1[i]];
-+ i++;
-+ }
-+ s2[i]=0;
-+}
-+
-+//--- Recode filename and concat in to dir
-+char* concat_dir_and_recoded_fname(const char *dir, const char *fname, FileOpContext *ctx) {
-+ int i = strlen (dir);
-+
-+ my_translate_string((unsigned char*)fname,strlen(fname),ctx->recode_buf,ctx->tr_table);
-+ if (dir [i-1] == PATH_SEP)
-+ return g_strconcat (dir, ctx->recode_buf, NULL);
-+ else
-+ return g_strconcat (dir, PATH_SEP_STR, ctx->recode_buf, NULL);
-+ return 0;
-+}
-+
-+
-+//--- Internal handler for "Panel codepage"
-+static void fnc_cmd(WPanel *p) {
-+ char *errmsg;
-+ if(display_codepage > 0) {
-+ p->src_codepage=select_charset(p->src_codepage, 0, _(" Choose panel codepage "));
-+ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
-+ if(errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg);
-+ }
-+ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
-+ if (errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+ paint_dir(p);
-+ show_dir(p);
-+ display_mini_info(p);
-+ }
-+ else {
-+ message( 1, _(" Warning "),
-+ _("To use this feature select your codepage in\n"
-+ "Setup / Display Bits dialog!\n"
-+ "Do not forget to save options." ));
-+ }
-+}
-+
-+//--- Menu handlers for "Panel codepage" for left and right panel menu
-+
-+void fnc_l_cmd() {
-+ fnc_cmd(left_panel);
-+}
-+
-+void fnc_r_cmd() {
-+ fnc_cmd(right_panel);
-+}
-+
-+//--- screen handler for "Panel codepage"
-+void fnc_c_cmd(WPanel *panel) {
-+ fnc_cmd(current_panel);
-+}
-+
-+#endif //HAVE_CHARSET
-diff -Nurwd mc-4.6.2~pre1.orig/src/recode.h mc-4.6.2~pre1/src/recode.h
---- mc-4.6.2~pre1.orig/src/recode.h 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/src/recode.h 2008-02-13 21:01:06.000000000 +0100
-@@ -0,0 +1,48 @@
-+#ifndef __RECODE_H__
-+#define __RECODE_H__
-+#include <config.h>
-+#ifdef HAVE_CHARSET
-+
-+#include <stdio.h>
-+#include <locale.h>
-+#include <iconv.h>
-+
-+#include "global.h"
-+#include "wtools.h"
-+#include "panel.h"
-+#include "charsets.h"
-+#include "selcodepage.h"
-+#include "screen.h"
-+#include "main.h"
-+#include "fileopctx.h"
-+
-+extern char *lang;
-+extern char lang_codepage_name[256];
-+extern int lang_codepage;
-+
-+extern int ftp_codepage;
-+
-+// recode buffer for displaying file names
-+extern unsigned char recode_buf[MC_MAXPATHLEN];
-+extern WPanel* recode_panel;
-+
-+//--- get codepage from $LANG
-+extern void get_locale_codepage();
-+
-+//--- reset translation table
-+extern void my_reset_tt(unsigned char *table,int n);
-+//--- reset panel codepage
-+extern void panel_reset_codepage(WPanel *p);
-+//--- Initialize translation table
-+extern char* my_init_tt( int from, int to, unsigned char *table);
-+//--- Translate string from one codepage to another
-+extern void my_translate_string(unsigned char *s1,int l1, unsigned char *s2, unsigned char *table);
-+//--- Recode filename and concat in to dir
-+extern char* concat_dir_and_recoded_fname(const char *dir, const char *fname, FileOpContext *ctx);
-+//--- handlers for "Panel codepage"
-+extern void fnc_l_cmd();
-+extern void fnc_r_cmd();
-+extern void fnc_c_cmd(WPanel *panel);
-+
-+#endif // HAVE_CHARSET
-+#endif //__RECODE_H__
-diff -Nurwd mc-4.6.2~pre1.orig/src/screen.c mc-4.6.2~pre1/src/screen.c
---- mc-4.6.2~pre1.orig/src/screen.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/screen.c 2008-02-13 21:01:06.000000000 +0100
-@@ -50,6 +50,10 @@
- #include "main.h" /* the_menubar */
- #include "unixcompat.h"
-
-+#ifdef HAVE_CHARSET
-+#include "recode.h"
-+#endif
-+
- #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
-
- #define J_LEFT 1
-@@ -172,6 +176,7 @@
- string_file_name (file_entry *fe, int len)
- {
- size_t i;
-+ char* filename;
-
- #ifdef UTF8
- static char buffer [BUF_SMALL * 4];
-@@ -184,6 +189,13 @@
- static char buffer [BUF_SMALL];
- #endif
-
-+#ifdef HAVE_CHARSET
-+ my_translate_string(fe->fname,fe->fnamelen, recode_buf, recode_panel->tr_table);
-+ filename= recode_buf;
-+#else
-+ filename=fe->fname;
-+#endif
-+
- #ifdef UTF8
- if (SLsmg_Is_Unicode)
- for (i = 0; i < sizeof (buffer) - 1; i++) {
-@@ -214,7 +226,7 @@
- for (i = 0; i < sizeof(buffer) - 1; i++) {
- char c;
-
-- c = fe->fname[i];
-+ c = filename[i];
-
- if (!c) break;
-
-@@ -721,6 +733,10 @@
- int second_column = 0;
- int width, offset;
-
-+#ifdef HAVE_CHARSET
-+ recode_panel=panel;
-+#endif
-+
- offset = 0;
- if (!isstatus && panel->split){
-
-@@ -760,7 +776,7 @@
- }
- }
-
--static void
-+void
- display_mini_info (WPanel *panel)
- {
- if (!show_mini_info)
-@@ -830,7 +846,7 @@
- return;
- }
-
--static void
-+void
- paint_dir (WPanel *panel)
- {
- int i;
-@@ -868,7 +884,7 @@
- #endif /* !HAVE_SLANG */
- }
-
--static void
-+void
- show_dir (WPanel *panel)
- {
- char *tmp;
-@@ -897,8 +913,15 @@
- tmp = g_malloc (panel->widget.cols + 1);
- tmp[panel->widget.cols] = '\0';
-
-+#ifdef HAVE_CHARSET
-+ my_translate_string(panel->cwd,strlen(panel->cwd),recode_buf, panel->tr_table);
-+ trim (strip_home_and_password (recode_buf), tmp,
-+ min (max (panel->widget.cols - 7, 0), panel->widget.cols) );
-+ #else
- trim (strip_home_and_password (panel->cwd), tmp,
- max (panel->widget.cols - 9, 0));
-+#endif
-+
- addstr (tmp);
- g_free (tmp);
-
-@@ -1111,6 +1134,17 @@
- mc_get_current_wd (panel->cwd, sizeof (panel->cwd) - 2);
- strcpy (panel->lwd, ".");
-
-+#ifdef HAVE_CHARSET
-+ panel_reset_codepage(panel);
-+#endif
-+
-+#ifdef USE_VFS
-+ panel->is_return=0;
-+ #ifdef HAVE_CHARSET
-+ panel->ret_codepage=-1;
-+ #endif
-+#endif
-+
- panel->hist_name = g_strconcat ("Dir Hist ", panel_name, (char *) NULL);
- panel->dir_history = history_get (panel->hist_name);
- directory_history_add (panel, panel->cwd);
-@@ -2311,7 +2345,12 @@
- { XCTRL('n'), move_down }, /* C-n like emacs */
- { XCTRL('s'), start_search }, /* C-s like emacs */
- { ALT('s'), start_search }, /* M-s not like emacs */
-+#ifndef HAVE_CHARSET
- { XCTRL('t'), mark_file },
-+#endif
-+#ifdef HAVE_CHARSET
-+ { XCTRL('t'), mark_file }, /* was 'fnc_c_cmd' */
-+#endif
- { ALT('o'), chdir_other_panel },
- { ALT('i'), sync_other_panel },
- { ALT('l'), chdir_to_readlink },
-diff -Nurwd mc-4.6.2~pre1.orig/src/screen.h mc-4.6.2~pre1/src/screen.h
---- mc-4.6.2~pre1.orig/src/screen.h 1970-01-01 00:00:00.000000000 +0000
-+++ mc-4.6.2~pre1/src/screen.h 2008-02-13 21:01:06.000000000 +0100
-@@ -0,0 +1,11 @@
-+#ifndef __SCREEN_H__
-+#define __SCREEN_H__
-+#include <config.h>
-+
-+#include "global.h"
-+
-+extern void paint_dir (WPanel *panel);
-+extern void display_mini_info (WPanel *panel);
-+extern void show_dir(WPanel *panel);
-+#endif //__SCREEN_H__
-+
-diff -Nurwd mc-4.6.2~pre1.orig/src/selcodepage.c mc-4.6.2~pre1/src/selcodepage.c
---- mc-4.6.2~pre1.orig/src/selcodepage.c 2005-05-27 05:35:15.000000000 +0200
-+++ mc-4.6.2~pre1/src/selcodepage.c 2008-02-13 21:01:06.000000000 +0100
-@@ -45,14 +45,16 @@
- }
-
- int
--select_charset (int current_charset, int seldisplay)
-+select_charset (int current_charset, int seldisplay, const char *title)
- {
-+ int new_charset;
-+
- int i, menu_lines = n_codepages + 1;
- char buffer[255];
-
- /* Create listbox */
- Listbox *listbox = create_listbox_window (ENTRY_LEN + 2, menu_lines,
-- _(" Choose input codepage "),
-+ title,
- "[Codepages Translation]");
-
- if (!seldisplay)
-@@ -82,20 +84,26 @@
-
- i = run_listbox (listbox);
-
-- return (seldisplay) ? ((i >= n_codepages) ? -1 : i)
-- : (i - 1);
-+ if(i==-1)
-+ i = (seldisplay)
-+ ? ((current_charset < 0) ? n_codepages : current_charset)
-+ : (current_charset + 1);
-+
-+ new_charset =(seldisplay) ? ( (i >= n_codepages) ? -1 : i ) : ( i-1 );
-+ new_charset = (new_charset==-2) ? current_charset:new_charset;
-+ return new_charset;
- }
-
- /* Helper functions for codepages support */
-
-
- int
--do_select_codepage (void)
-+do_select_codepage (const char *title)
- {
- const char *errmsg;
-
- if (display_codepage > 0) {
-- source_codepage = select_charset (source_codepage, 0);
-+ source_codepage = select_charset (source_codepage, 0, title);
- errmsg =
- init_translation_table (source_codepage, display_codepage);
- if (errmsg) {
-diff -Nurwd mc-4.6.2~pre1.orig/src/selcodepage.h mc-4.6.2~pre1/src/selcodepage.h
---- mc-4.6.2~pre1.orig/src/selcodepage.h 2005-06-14 15:14:49.000000000 +0200
-+++ mc-4.6.2~pre1/src/selcodepage.h 2008-02-13 21:01:06.000000000 +0100
-@@ -2,8 +2,8 @@
- #define MC_SELCODEPAGE_H
-
- #ifdef HAVE_CHARSET
--int select_charset (int current_charset, int seldisplay);
--int do_select_codepage (void);
-+int select_charset (int current_charset, int seldisplay, const char *title);
-+int do_select_codepage (const char *title);
- #endif /* HAVE_CHARSET */
-
- #endif
-diff -Nurwd mc-4.6.2~pre1.orig/src/setup.c mc-4.6.2~pre1/src/setup.c
---- mc-4.6.2~pre1.orig/src/setup.c 2006-02-23 16:32:18.000000000 +0100
-+++ mc-4.6.2~pre1/src/setup.c 2008-02-13 21:01:06.000000000 +0100
-@@ -48,6 +48,8 @@
-
- #ifdef HAVE_CHARSET
- #include "charsets.h"
-+#include"recode.h"
-+#include "wtools.h"
- #endif
-
- #ifdef USE_NETCODE
-@@ -269,6 +271,11 @@
- g_snprintf (buffer, sizeof (buffer), "%d", panel->user_mini_status);
- save_string (section, "user_mini_status", buffer,
- profile_name);
-+
-+#ifdef HAVE_CHARSET
-+ // save panel codepage
-+ save_string(section, "panel_display_codepage", get_codepage_id(panel->src_codepage), profile_name);
-+#endif
- }
-
- void
-@@ -371,6 +378,7 @@
- #ifdef HAVE_CHARSET
- save_string( "Misc", "display_codepage",
- get_codepage_id( display_codepage ), profile_name );
-+ save_string( "Misc", "ftp_codepage", get_codepage_id(ftp_codepage), profile_name);
- #endif /* HAVE_CHARSET */
-
- g_free (profile);
-@@ -420,6 +428,31 @@
- panel->user_mini_status =
- load_int (section, "user_mini_status", 0);
-
-+#ifdef HAVE_CHARSET
-+//--- Loading panel codepage
-+ panel_reset_codepage(panel);
-+ if(load_codepages_list()>0) {
-+ char cpname[128];
-+ char *errmsg;
-+
-+
-+ if(display_codepage>=0) {
-+ load_string(section, "panel_display_codepage", "", cpname, sizeof(cpname));
-+ if(cpname[0]!='\0') panel->src_codepage = get_codepage_index(cpname);
-+ }
-+
-+ errmsg=my_init_tt(display_codepage,panel->src_codepage,panel->tr_table);
-+ if(errmsg) {
-+ panel_reset_codepage(panel);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+ errmsg=my_init_tt(panel->src_codepage,display_codepage,panel->tr_table_input);
-+ if(errmsg) {
-+ panel_reset_codepage(panel);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+ }
-+#endif
- }
-
- static void
-@@ -569,10 +602,16 @@
- #ifdef HAVE_CHARSET
- if ( load_codepages_list() > 0 ) {
- char cpname[128];
-- load_string( "Misc", "display_codepage", "",
-- cpname, sizeof(cpname) );
-- if ( cpname[0] != '\0' )
-- display_codepage = get_codepage_index( cpname );
-+ get_locale_codepage();
-+ load_string("Misc", "display_codepage", "", cpname, sizeof(cpname));
-+ if(cpname[0] != '\0') display_codepage=get_codepage_index(cpname);
-+ else display_codepage=lang_codepage;
-+
-+ ftp_codepage=-1;
-+ if(display_codepage >= 0) {
-+ load_string( "Misc", "ftp_codepage", "", cpname, sizeof(cpname));
-+ if(cpname[0] != '\0') ftp_codepage=get_codepage_index(cpname);
-+ }
- }
-
- init_translation_table( source_codepage, display_codepage );
-diff -Nurwd mc-4.6.2~pre1.orig/src/view.c mc-4.6.2~pre1/src/view.c
---- mc-4.6.2~pre1.orig/src/view.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/src/view.c 2008-02-13 21:01:06.000000000 +0100
-@@ -3232,7 +3232,7 @@
-
- #ifdef HAVE_CHARSET
- case XCTRL ('t'):
-- do_select_codepage ();
-+ do_select_codepage (_(" Choose codepage "));
- view->dirty++;
- view_update (view);
- return MSG_HANDLED;
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/vfs.c mc-4.6.2~pre1/vfs/vfs.c
---- mc-4.6.2~pre1.orig/vfs/vfs.c 2008-02-13 21:01:43.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/vfs.c 2008-02-13 21:01:06.000000000 +0100
-@@ -53,6 +53,11 @@
- #include "smbfs.h"
- #include "local.h"
-
-+#include "../src/panel.h"
-+#ifdef HAVE_CHARSET
-+#include "../src/recode.h"
-+#endif
-+
- /* They keep track of the current directory */
- static struct vfs_class *current_vfs;
- static char *current_dir;
-@@ -685,8 +690,66 @@
- vfsid old_vfsid;
- int result;
-
-+#ifdef HAVE_CHARSET
-+ char* errmsg;
-+#endif
-+ WPanel* p=ret_panel;
-+
- new_dir = vfs_canon (path);
- new_vfs = vfs_get_class (new_dir);
-+ old_vfsid = vfs_getid (current_vfs, current_dir);
-+ old_vfs = current_vfs;
-+
-+ if(p) {
-+
-+ // Change from localfs to ftpfs
-+ ret_panel=NULL;
-+ if( (strcmp(old_vfs->name,"localfs")==0) &&
-+ (strcmp(new_vfs->name,"ftpfs")==0)){
-+ p->is_return=1;
-+ strncpy(p->retdir,current_dir, MC_MAXPATHLEN);
-+#ifdef HAVE_CHARSET
-+ p->ret_codepage=p->src_codepage;
-+ p->src_codepage=ftp_codepage;
-+ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
-+ if(errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
-+ if(errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+#endif
-+ }
-+
-+ // Change from ftpfs to localfs
-+ if( (strcmp(old_vfs->name,"ftpfs")==0) &&
-+ (strcmp(new_vfs->name,"localfs")==0) &&
-+ p->is_return){
-+ p->is_return=0;
-+ g_free(new_dir);
-+ new_dir = vfs_canon (p->retdir);
-+ new_vfs = vfs_get_class (new_dir);
-+#ifdef HAVE_CHARSET
-+ p->src_codepage=p->ret_codepage;
-+ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
-+ if(errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
-+ if(errmsg) {
-+ panel_reset_codepage(p);
-+ message( 1, MSG_ERROR, "%s", errmsg );
-+ }
-+#endif
-+ }
-+ }
-+
-+
-+
- if (!new_vfs->chdir) {
- g_free (new_dir);
- return -1;
-@@ -700,9 +763,6 @@
- return -1;
- }
-
-- old_vfsid = vfs_getid (current_vfs, current_dir);
-- old_vfs = current_vfs;
--
- /* Actually change directory */
- g_free (current_dir);
- current_dir = new_dir;
Deleted: trunk/debian/patches/61_escaping.patch
===================================================================
--- trunk/debian/patches/61_escaping.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/61_escaping.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,166 +0,0 @@
-diff -u -w -r1.141 util.c
---- ./src/util.c 25 Sep 2007 15:33:37 -0000 1.141
-+++ ./src/util.c 27 Feb 2008 15:38:13 -0000
-@@ -1525,3 +1525,58 @@
- return (sep != NULL) ? sep + 1 : result;
- }
-
-+/* Unescape paths or other strings for e.g the internal cd */
-+char *
-+unescape_string ( const char * in ) {
-+ char * local = NULL;
-+ int i = 0;
-+ int j = 20;
-+ int k = 0;
-+
-+ local = g_malloc(j);
-+
-+ for (i=0;i<=strlen(in);i++) {
-+ if (i-k+1 >= j ) {
-+ j = j + 20;
-+ local = g_realloc(local,j);
-+ }
-+ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && ( strchr("\\",in[i-1])) ) {
-+ k++;
-+ local[i-k] = in[i];
-+ } else {
-+ local[i-k] = in[i];
-+ }
-+ }
-+ local[i-k] = '\0';
-+
-+ return local;
-+}
-+
-+/* To be compatible with the general posix command lines we have to escape *
-+ * strings for the command line */
-+char *
-+escape_string ( const char * in ) {
-+ char * local = NULL;
-+ int i = 0;
-+ int j = 20;
-+ int k = 0;
-+
-+ local = g_malloc(j);
-+
-+ for (i=0;i<strlen(in);i++) {
-+ if (i+k+1 >= j ) { //If 20 chars is too low for the path
-+ j = j + 20;
-+ local = g_realloc(local,j);
-+ }
-+ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && (! strchr("\\",in[i-1])) ) {
-+ local[i+k] = 92; // Ascii for "\"
-+ k = k+1;
-+ local[i+k] = in[i];
-+ } else {
-+ local[i+k] = in[i];
-+ }
-+ }
-+ local[i+k] = '\0';
-+
-+ return local;
-+}
-diff -u -w -r1.78 util.h
---- ./src/util.h 3 Feb 2006 17:04:17 -0000 1.78
-+++ ./src/util.h 27 Feb 2008 15:38:13 -0000
-@@ -14,6 +14,8 @@
- extern const char *cstrcasestr (const char *haystack, const char *needle);
- extern const char *cstrstr (const char *haystack, const char *needle);
-
-+char *unescape_string ( const char * in );
-+char *escape_string ( const char * in );
- void str_replace(char *s, char from, char to);
- int is_printable (int c);
- void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns);
-diff -u -w -r1.61 complete.c
---- ./src/complete.c 25 Sep 2007 15:33:36 -0000 1.61
-+++ ./src/complete.c 27 Feb 2008 15:38:14 -0000
-@@ -40,6 +40,7 @@
- #include "wtools.h"
- #include "complete.h"
- #include "main.h"
-+#include "util.h"
- #include "key.h" /* XCTRL and ALT macros */
-
- typedef char *CompletionFunction (char *, int);
-@@ -911,6 +912,7 @@
- static int
- complete_engine (WInput *in, int what_to_do)
- {
-+ char *complete = NULL;
- if (in->completions && in->point != end)
- free_completions (in);
- if (!in->completions){
-@@ -924,7 +926,8 @@
- }
- if (in->completions){
- if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
-- if (insert_text (in, in->completions [0], strlen (in->completions [0]))){
-+ complete = escape_string(in->completions [0]);
-+ if (insert_text (in, complete, strlen (complete))){
- if (in->completions [1])
- beep ();
- else
-@@ -940,9 +943,11 @@
- Dlg_head *query_dlg;
- WListbox *query_list;
-
-- for (p=in->completions + 1; *p; count++, p++)
-+ for (p=in->completions + 1; *p; count++, p++) {
-+ *p = escape_string(*p);
- if ((i = strlen (*p)) > maxlen)
- maxlen = i;
-+ }
- start_x = in->widget.x;
- start_y = in->widget.y;
- if (start_y - 2 >= count) {
-diff -u -w -r1.34 command.c
---- ./src/command.c 26 Sep 2007 10:22:25 -0000 1.34
-+++ ./src/command.c 27 Feb 2008 15:38:15 -0000
-@@ -64,6 +64,7 @@
- const char *t;
-
- /* Tilde expansion */
-+ path = unescape_string(path);
- path_tilde = tilde_expand (path);
-
- /* Leave space for further expansion */
-diff -u -w -r1.151 file.c
---- ./src/file.c 25 Sep 2007 15:33:36 -0000 1.151
-+++ ./src/file.c 5 Mar 2008 09:15:47 -0000
-@@ -63,6 +63,7 @@
- #include "widget.h"
- #include "wtools.h"
- #include "background.h" /* we_are_background */
-+#include "util.h"
-
- /* Needed for current_panel, other_panel and WTree */
- #include "dir.h"
-@@ -791,7 +807,7 @@
- }
- }
-
-- if (!appending) {
-+ if (!appending && ctx->preserve) {
- while (mc_chmod (dst_path, (src_mode & ctx->umask_kill))) {
- temp_status = file_error (
- _(" Cannot chmod target file \"%s\" \n %s "), dst_path);
-@@ -1872,6 +1890,8 @@
- dest = temp2;
- temp = NULL;
-
-+ source_with_path = unescape_string(source_with_path);
-+ dest = unescape_string(dest);
- switch (operation) {
- case OP_COPY:
- /*
-@@ -1963,6 +1983,9 @@
- else {
- char *temp2 = concat_dir_and_file (dest, temp);
-
-+ source_with_path = unescape_string(source_with_path);
-+ temp2 = unescape_string(temp2);
-+
- switch (operation) {
- case OP_COPY:
- /*
Deleted: trunk/debian/patches/62_dont_hang_on_errors.patch
===================================================================
--- trunk/debian/patches/62_dont_hang_on_errors.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/62_dont_hang_on_errors.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,34 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
---- mc-4.6.2~pre1.orig/vfs/fish.c 2008-02-27 16:52:15.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/fish.c 2008-02-27 16:56:23.000000000 +0100
-@@ -618,16 +618,28 @@
- g_free (name);
- name = quoted_name;
- fh->u.fish.append = 0;
-+
-+ /*
-+ * Check whether the remote file is readable by using `dd' to copy
-+ * a single byte from the remote file to /dev/null. If `dd' completes
-+ * with exit status of 0 use `cat' to send the file contents to the
-+ * standard output (i.e. over the network).
-+ */
- offset = fish_command (me, FH_SUPER, WANT_STRING,
- "#RETR /%s\n"
-+ "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
-+ "then\n"
- "ls -ln /%s 2>/dev/null | (\n"
- "read p l u g s r\n"
- "echo \"$s\"\n"
- ")\n"
- "echo '### 100'\n"
- "cat /%s\n"
-- "echo '### 200'\n",
-- name, name, name );
-+ "echo '### 200'\n"
-+ "else\n"
-+ "echo '### 500'\n"
-+ "fi\n",
-+ name, name, name, name );
- g_free (name);
- if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
- fh->linear = LS_LINEAR_OPEN;
Deleted: trunk/debian/patches/63_fix_whitespace_via_fish.patch
===================================================================
--- trunk/debian/patches/63_fix_whitespace_via_fish.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/63_fix_whitespace_via_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,187 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
---- mc-4.6.2~pre1.orig/vfs/fish.c 2008-02-27 20:08:15.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/fish.c 2008-02-27 20:07:51.000000000 +0100
-@@ -364,15 +364,15 @@
- dir->timestamp.tv_sec += fish_directory_timeout;
- quoted_path = name_quote (remote_path, 0);
- fish_command (me, super, NONE,
-- "#LIST /%s\n"
-- "ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
-+ "#LIST \"/%s\"\n"
-+ "ls -lQLan \"/%s\" 2>/dev/null | grep '^[^cbt]' | (\n"
- "while read p l u g s m d y n; do\n"
-- "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
-+ "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\" | sed 's#\\\"##g' \n"
- "done\n"
- ")\n"
-- "ls -lan /%s 2>/dev/null | grep '^[cb]' | (\n"
-+ "ls -Qlan \"/%s\" 2>/dev/null | grep '^[cb]' | (\n"
- "while read p l u g a i m d y n; do\n"
-- "echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
-+ "echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\" | sed 's#\\\"##g' \n"
- "done\n"
- ")\n"
- "echo '### 200'\n",
-@@ -516,16 +516,16 @@
- * instead of stderr. It makes impossible the use of "head || dd"
- * algorithm for file appending case, therefore just "dd" is used for it.
- */
--
-+ name = unescape_string(name);
- print_vfs_message(_("fish: store %s: sending command..."), name );
-- quoted_name = name_quote (name, 0);
-+ quoted_name = unescape_string (name_quote (name, 0));
-
- /* FIXME: File size is limited to ULONG_MAX */
- if (!fh->u.fish.append)
- n = fish_command (me, super, WAIT_REPLY,
-- "#STOR %lu /%s\n"
-+ "#STOR %lu \"/%s\"\n"
- "echo '### 001'\n"
-- "file=/%s\n"
-+ "file=\"/%s\"\n"
- "res=`exec 3>&1\n"
- "(\n"
- "head -c %lu -q - || echo DD >&3\n"
-@@ -547,10 +547,10 @@
- (unsigned long) s.st_size);
- else
- n = fish_command (me, super, WAIT_REPLY,
-- "#STOR %lu /%s\n"
-+ "#STOR %lu \"/%s\"\n"
- "echo '### 001'\n"
- "{\n"
-- "file=/%s\n"
-+ "file=\"/%s\"\n"
- "rest=%lu\n"
- "while [ $rest -gt 0 ]\n"
- "do\n"
-@@ -616,7 +616,7 @@
- return 0;
- quoted_name = name_quote (name, 0);
- g_free (name);
-- name = quoted_name;
-+ name = unescape_string(quoted_name);
- fh->u.fish.append = 0;
-
- /*
-@@ -626,15 +626,15 @@
- * standard output (i.e. over the network).
- */
- offset = fish_command (me, FH_SUPER, WANT_STRING,
-- "#RETR /%s\n"
-- "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
-+ "#RETR \"/%s\"\n"
-+ "if dd if=\"/%s\" of=/dev/null bs=1 count=1 2>/dev/null ;\n"
- "then\n"
-- "ls -ln /%s 2>/dev/null | (\n"
-+ "ls -ln \"/%s\" 2>/dev/null | (\n"
- "read p l u g s r\n"
- "echo \"$s\"\n"
- ")\n"
- "echo '### 100'\n"
-- "cat /%s\n"
-+ "cat \"//%s\"\n"
- "echo '### 200'\n"
- "else\n"
- "echo '### 500'\n"
-@@ -754,6 +754,7 @@
- return -1; \
- } \
- rpath = name_quote (crpath, 0); \
-+ rpath = unescape_string(rpath); \
- g_free (mpath);
-
- #define POSTFIX(flags) \
-@@ -764,7 +765,7 @@
- fish_chmod (struct vfs_class *me, const char *path, int mode)
- {
- PREFIX
-- g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o /%s\n"
-+ g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o \"/%s\"\n"
- "chmod %4.4o \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- mode & 07777, rpath,
-@@ -799,11 +800,11 @@
- }
-
- #define XTEST if (bucket1 != bucket2) { ERRNOR (EXDEV, -1); }
--FISH_OP(rename, XTEST, "#RENAME /%s /%s\n"
-- "mv /%s /%s 2>/dev/null\n"
-+FISH_OP(rename, XTEST, "#RENAME \"/%s\" \"/%s\"\n"
-+ "mv \"/%s\" \"/%s\" 2>/dev/null\n"
- "echo '### 000'" )
--FISH_OP(link, XTEST, "#LINK /%s /%s\n"
-- "ln /%s /%s 2>/dev/null\n"
-+FISH_OP(link, XTEST, "#LINK \"/%s\" \"/%s\"\n"
-+ "ln \"/%s\" \"/%s\" 2>/dev/null\n"
- "echo '### 000'" )
-
- static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
-@@ -812,8 +813,8 @@
- PREFIX
- qsetto = name_quote (setto, 0);
- g_snprintf(buf, sizeof(buf),
-- "#SYMLINK %s /%s\n"
-- "ln -s %s /%s 2>/dev/null\n"
-+ "#SYMLINK \"%s\" \"/%s\"\n"
-+ "ln -s \"%s\" \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- qsetto, rpath, qsetto, rpath);
- g_free (qsetto);
-@@ -838,16 +839,16 @@
- {
- PREFIX
- g_snprintf (buf, sizeof(buf),
-- "#CHOWN /%s /%s\n"
-- "chown %s /%s 2>/dev/null\n"
-+ "#CHOWN /%s \"/%s\"\n"
-+ "chown %s \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- sowner, rpath,
- sowner, rpath);
- fish_send_command (me, super, buf, OPT_FLUSH);
- /* FIXME: what should we report if chgrp succeeds but chown fails? */
- g_snprintf (buf, sizeof(buf),
-- "#CHGRP /%s /%s\n"
-- "chgrp %s /%s 2>/dev/null\n"
-+ "#CHGRP /%s \"/%s\"\n"
-+ "chgrp %s \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- sgroup, rpath,
- sgroup, rpath);
-@@ -860,8 +861,8 @@
- {
- PREFIX
- g_snprintf(buf, sizeof(buf),
-- "#DELE /%s\n"
-- "rm -f /%s 2>/dev/null\n"
-+ "#DELE \"/%s\"\n"
-+ "rm -f \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- rpath, rpath);
- POSTFIX(OPT_FLUSH);
-@@ -872,10 +873,9 @@
- PREFIX
-
- (void) mode;
--
- g_snprintf(buf, sizeof(buf),
-- "#MKD /%s\n"
-- "mkdir /%s 2>/dev/null\n"
-+ "#MKD \"/%s\"\n"
-+ "mkdir \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- rpath, rpath);
- POSTFIX(OPT_FLUSH);
-@@ -885,8 +885,8 @@
- {
- PREFIX
- g_snprintf(buf, sizeof(buf),
-- "#RMD /%s\n"
-- "rmdir /%s 2>/dev/null\n"
-+ "#RMD \"/%s\"\n"
-+ "rmdir \"/%s\" 2>/dev/null\n"
- "echo '### 000'\n",
- rpath, rpath);
- POSTFIX(OPT_FLUSH);
Deleted: trunk/debian/patches/64_visible_tabs.patch
===================================================================
--- trunk/debian/patches/64_visible_tabs.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/64_visible_tabs.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,23 +0,0 @@
---- src/setup.c 26 Sep 2007 10:22:25 -0000 1.93
-+++ src/setup.c 27 Feb 2008 18:48:37 -0000
-@@ -216,6 +216,8 @@
- { "editor_option_typewriter_wrap", &option_typewriter_wrap },
- { "editor_edit_confirm_save", &edit_confirm_save },
- { "editor_syntax_highlighting", &option_syntax_highlighting },
-+ { "editor_visible_tabs", &visible_tabs },
-+ { "editor_visible_spaces", &visible_tws },
- #endif /* USE_INTERNAL_EDIT */
-
- { "nice_rotating_dash", &nice_rotating_dash },
---- edit/edit.h 24 Sep 2007 09:28:35 -0000 1.88
-+++ edit/edit.h 27 Feb 2008 18:48:37 -0000
-@@ -298,6 +298,9 @@
- extern int edit_confirm_save;
- extern int column_highlighting;
-
-+extern int visible_tabs;
-+extern int visible_tws;
-+
- /* File names */
- #define EDIT_DIR ".mc" PATH_SEP_STR "cedit"
- #define SYNTAX_FILE EDIT_DIR PATH_SEP_STR "Syntax"
Deleted: trunk/debian/patches/65_error_on_copymove_over_fish.patch
===================================================================
--- trunk/debian/patches/65_error_on_copymove_over_fish.patch 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/patches/65_error_on_copymove_over_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,44 +0,0 @@
-diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
---- mc-4.6.2~pre1.orig/vfs/fish.c 2008-03-07 00:50:36.000000000 +0100
-+++ mc-4.6.2~pre1/vfs/fish.c 2008-03-07 00:50:20.000000000 +0100
-@@ -525,6 +525,7 @@
- n = fish_command (me, super, WAIT_REPLY,
- "#STOR %lu \"/%s\"\n"
- "echo '### 001'\n"
-+ "if dd if=/dev/zero of=\"/%s\" bs=1 count=1; then\n"
- "file=\"/%s\"\n"
- "res=`exec 3>&1\n"
- "(\n"
-@@ -541,14 +542,18 @@
- " n=`dd bs=256 count=$cnt | tee -a \"$file\" | wc -c`\n"
- " rest=`expr $rest - $n`\n"
- "done\n"
-- "}; echo '### 200'\n",
-- (unsigned long) s.st_size, name,
-+ "}; echo '### 200'\n"
-+ "else\n"
-+ "echo '### 500'\n"
-+ "fi\n",
-+ (unsigned long) s.st_size, name, name,
- quoted_name, (unsigned long) s.st_size,
- (unsigned long) s.st_size);
- else
- n = fish_command (me, super, WAIT_REPLY,
- "#STOR %lu \"/%s\"\n"
- "echo '### 001'\n"
-+ "if dd if=/dev/zero of=\"/%s\" bs=1 count=1; then\n"
- "{\n"
- "file=\"/%s\"\n"
- "rest=%lu\n"
-@@ -559,7 +564,10 @@
- " rest=`expr $rest - $n`\n"
- "done\n"
- "}; echo '### 200'\n",
-- (unsigned long) s.st_size, name,
-+ "else\n"
-+ "echo '### 500'\n"
-+ "fi\n",
-+ (unsigned long) s.st_size, name, name,
- quoted_name, (unsigned long) s.st_size);
-
- g_free (quoted_name);
Added: trunk/debian/patches/README
===================================================================
--- trunk/debian/patches/README (rev 0)
+++ trunk/debian/patches/README 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,4 @@
+Please note that this repository do _not_ held patches or changes from upstream.
+This repository is meant as basis for sharing the work on mc between several distributions.
+
+Furthermore our aim should be to provide patches which upstream can add to the official CVS.
Added: trunk/debian/patches/all.series
===================================================================
--- trunk/debian/patches/all.series (rev 0)
+++ trunk/debian/patches/all.series 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,42 @@
+bugs/28_mc-dontrewrite.patch
+bugs/61_escaping.patch
+bugs/64_visible_tabs.patch
+debian/01_correct_conffile_paths_in_man.patch
+debian/02_use_correct_smb_conf_path.patch
+debian/03_use_awk_first.patch
+debian/04_debian_menu_additions.patch
+mc.ext/01_tar_forgot_arg.patch
+mc.ext/02_use_arj.patch
+mc.ext/03_debian_packages.patch
+mc.ext/04_view_ascii.patch
+mc.ext/05_gimp_remote.patch
+mc.ext/06_use_several_text_browsers.patch
+mc.ext/07_add_antiword.patch
+mc.ext/08_several_additions_debian.patch
+mc.ext/09_several_additions_mandriva.patch
+po/09_de.po.patch
+po/10_it.po.patch
+syntax/01_debian_syntax.patch
+syntax/02_improving_nroff_filematch.patch
+syntax/03_cxx.syntax.patch
+syntax/04_sh_syntax.patch
+syntax/05_html-syntax.patch
+syntax/06_strace_syntax.patch
+syntax/07_named_syntax.patch
+syntax/08_c-vs-cxx.patch
+syntax/09_spec-syntax.patch
+syntax/10_vhdl-syntax.patch
+utf8/mc-utf8.patch
+utf8/mc-utf8-8bit-hex.patch
+utf8/mc-utf8-nlink.patch
+utf8/mc-utf8-look-and-feel.patch
+vfs/01_ftpfs_symlink.patch
+vfs/02_ignore_ftp_chmod_error.patch
+vfs/03_dont_hang_on_errors.patch
+vfs/03_fix_whitespace_via_fish.patch
+vfs/04_error_on_copymove_over_fish.patch
+vfs/05_add_lzma_support.patch
+vfs/06_remove_obsolete_rpm_tags.patch
+vfs/07_srpm_support.patch
+vfs/08_improved_u7z_support.patch
+vfs/09_choose_correct_urar.patch
Added: trunk/debian/patches/bugs/28_mc-dontrewrite.patch
===================================================================
--- trunk/debian/patches/bugs/28_mc-dontrewrite.patch (rev 0)
+++ trunk/debian/patches/bugs/28_mc-dontrewrite.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,12 @@
+diff -Nurwd ./mc-4.6.2~pre1/edit/editcmd.c ./mc-4.6.2~pre1.patched/edit/editcmd.c
+--- ./edit/editcmd.c 2008-02-12 19:58:24.000000000 +0100
++++ ./edit/editcmd.c 2008-02-12 19:57:11.000000000 +0100
+@@ -243,7 +243,7 @@
+ this_save_mode = option_save_mode;
+ if (this_save_mode != EDIT_QUICK_SAVE) {
+ if (!vfs_file_is_local (filename) ||
+- (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) {
++ (fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
+ /*
+ * The file does not exists yet, so no safe save or
+ * backup are necessary.
Added: trunk/debian/patches/bugs/61_escaping.patch
===================================================================
--- trunk/debian/patches/bugs/61_escaping.patch (rev 0)
+++ trunk/debian/patches/bugs/61_escaping.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,166 @@
+diff -u -w -r1.141 util.c
+--- ./src/util.c 25 Sep 2007 15:33:37 -0000 1.141
++++ ./src/util.c 27 Feb 2008 15:38:13 -0000
+@@ -1525,3 +1525,58 @@
+ return (sep != NULL) ? sep + 1 : result;
+ }
+
++/* Unescape paths or other strings for e.g the internal cd */
++char *
++unescape_string ( const char * in ) {
++ char * local = NULL;
++ int i = 0;
++ int j = 20;
++ int k = 0;
++
++ local = g_malloc(j);
++
++ for (i=0;i<=strlen(in);i++) {
++ if (i-k+1 >= j ) {
++ j = j + 20;
++ local = g_realloc(local,j);
++ }
++ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && ( strchr("\\",in[i-1])) ) {
++ k++;
++ local[i-k] = in[i];
++ } else {
++ local[i-k] = in[i];
++ }
++ }
++ local[i-k] = '\0';
++
++ return local;
++}
++
++/* To be compatible with the general posix command lines we have to escape *
++ * strings for the command line */
++char *
++escape_string ( const char * in ) {
++ char * local = NULL;
++ int i = 0;
++ int j = 20;
++ int k = 0;
++
++ local = g_malloc(j);
++
++ for (i=0;i<strlen(in);i++) {
++ if (i+k+1 >= j ) { //If 20 chars is too low for the path
++ j = j + 20;
++ local = g_realloc(local,j);
++ }
++ if ( (strchr(" \t*|;<>~#()?[]{}&",in[i])) && (! strchr("\\",in[i-1])) ) {
++ local[i+k] = 92; // Ascii for "\"
++ k = k+1;
++ local[i+k] = in[i];
++ } else {
++ local[i+k] = in[i];
++ }
++ }
++ local[i+k] = '\0';
++
++ return local;
++}
+diff -u -w -r1.78 util.h
+--- ./src/util.h 3 Feb 2006 17:04:17 -0000 1.78
++++ ./src/util.h 27 Feb 2008 15:38:13 -0000
+@@ -14,6 +14,8 @@
+ extern const char *cstrcasestr (const char *haystack, const char *needle);
+ extern const char *cstrstr (const char *haystack, const char *needle);
+
++char *unescape_string ( const char * in );
++char *escape_string ( const char * in );
+ void str_replace(char *s, char from, char to);
+ int is_printable (int c);
+ void msglen (const char *text, /*@out@*/ int *lines, /*@out@*/ int *columns);
+diff -u -w -r1.61 complete.c
+--- ./src/complete.c 25 Sep 2007 15:33:36 -0000 1.61
++++ ./src/complete.c 27 Feb 2008 15:38:14 -0000
+@@ -40,6 +40,7 @@
+ #include "wtools.h"
+ #include "complete.h"
+ #include "main.h"
++#include "util.h"
+ #include "key.h" /* XCTRL and ALT macros */
+
+ typedef char *CompletionFunction (char *, int);
+@@ -911,6 +912,7 @@
+ static int
+ complete_engine (WInput *in, int what_to_do)
+ {
++ char *complete = NULL;
+ if (in->completions && in->point != end)
+ free_completions (in);
+ if (!in->completions){
+@@ -924,7 +926,8 @@
+ }
+ if (in->completions){
+ if (what_to_do & DO_INSERTION || ((what_to_do & DO_QUERY) && !in->completions[1])) {
+- if (insert_text (in, in->completions [0], strlen (in->completions [0]))){
++ complete = escape_string(in->completions [0]);
++ if (insert_text (in, complete, strlen (complete))){
+ if (in->completions [1])
+ beep ();
+ else
+@@ -940,9 +943,11 @@
+ Dlg_head *query_dlg;
+ WListbox *query_list;
+
+- for (p=in->completions + 1; *p; count++, p++)
++ for (p=in->completions + 1; *p; count++, p++) {
++ *p = escape_string(*p);
+ if ((i = strlen (*p)) > maxlen)
+ maxlen = i;
++ }
+ start_x = in->widget.x;
+ start_y = in->widget.y;
+ if (start_y - 2 >= count) {
+diff -u -w -r1.34 command.c
+--- ./src/command.c 26 Sep 2007 10:22:25 -0000 1.34
++++ ./src/command.c 27 Feb 2008 15:38:15 -0000
+@@ -64,6 +64,7 @@
+ const char *t;
+
+ /* Tilde expansion */
++ path = unescape_string(path);
+ path_tilde = tilde_expand (path);
+
+ /* Leave space for further expansion */
+diff -u -w -r1.151 file.c
+--- ./src/file.c 25 Sep 2007 15:33:36 -0000 1.151
++++ ./src/file.c 5 Mar 2008 09:15:47 -0000
+@@ -63,6 +63,7 @@
+ #include "widget.h"
+ #include "wtools.h"
+ #include "background.h" /* we_are_background */
++#include "util.h"
+
+ /* Needed for current_panel, other_panel and WTree */
+ #include "dir.h"
+@@ -791,7 +807,7 @@
+ }
+ }
+
+- if (!appending) {
++ if (!appending && ctx->preserve) {
+ while (mc_chmod (dst_path, (src_mode & ctx->umask_kill))) {
+ temp_status = file_error (
+ _(" Cannot chmod target file \"%s\" \n %s "), dst_path);
+@@ -1872,6 +1890,8 @@
+ dest = temp2;
+ temp = NULL;
+
++ source_with_path = unescape_string(source_with_path);
++ dest = unescape_string(dest);
+ switch (operation) {
+ case OP_COPY:
+ /*
+@@ -1963,6 +1983,9 @@
+ else {
+ char *temp2 = concat_dir_and_file (dest, temp);
+
++ source_with_path = unescape_string(source_with_path);
++ temp2 = unescape_string(temp2);
++
+ switch (operation) {
+ case OP_COPY:
+ /*
Added: trunk/debian/patches/bugs/64_visible_tabs.patch
===================================================================
--- trunk/debian/patches/bugs/64_visible_tabs.patch (rev 0)
+++ trunk/debian/patches/bugs/64_visible_tabs.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,23 @@
+--- ./src/setup.c 26 Sep 2007 10:22:25 -0000 1.93
++++ ./src/setup.c 27 Feb 2008 18:48:37 -0000
+@@ -216,6 +216,8 @@
+ { "editor_option_typewriter_wrap", &option_typewriter_wrap },
+ { "editor_edit_confirm_save", &edit_confirm_save },
+ { "editor_syntax_highlighting", &option_syntax_highlighting },
++ { "editor_visible_tabs", &visible_tabs },
++ { "editor_visible_spaces", &visible_tws },
+ #endif /* USE_INTERNAL_EDIT */
+
+ { "nice_rotating_dash", &nice_rotating_dash },
+--- ./edit/edit.h 24 Sep 2007 09:28:35 -0000 1.88
++++ ./edit/edit.h 27 Feb 2008 18:48:37 -0000
+@@ -298,6 +298,9 @@
+ extern int edit_confirm_save;
+ extern int column_highlighting;
+
++extern int visible_tabs;
++extern int visible_tws;
++
+ /* File names */
+ #define EDIT_DIR ".mc" PATH_SEP_STR "cedit"
+ #define SYNTAX_FILE EDIT_DIR PATH_SEP_STR "Syntax"
Added: trunk/debian/patches/debian/01_correct_conffile_paths_in_man.patch
===================================================================
--- trunk/debian/patches/debian/01_correct_conffile_paths_in_man.patch (rev 0)
+++ trunk/debian/patches/debian/01_correct_conffile_paths_in_man.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,90 @@
+diff -Nurwd mc-4.6.2~pre1/doc/mc.1.in mc-4.6.2~pre1/doc/mc.1.in
+--- mc-4.6.2~pre1/doc/mc.1.in 2007-09-10 16:25:30.000000000 +0200
++++ mc-4.6.2~pre1/doc/mc.1.in 2008-01-24 23:04:13.000000000 +0100
+@@ -1396,7 +1396,7 @@
+ but only if it is owned by user or root and is not world-writable.
+ If no such file found, ~/.mc/menu is tried in the same way,
+ and otherwise mc uses the default system-wide menu
+- at prefix@/share/mc/mc.menu.
++/etc/mc/mc.menu.
+ .PP
+ The format of the menu file is very simple. Lines that start with
+ anything but space or tab are considered entries for the menu (in
+@@ -1923,7 +1923,7 @@
+ At startup the Midnight Commander will try to load initialization
+ information from the ~/.mc/ini file. If this file doesn't exist, it will
+ load the information from the system-wide configuration file, located in
+- at prefix@/share/mc/mc.ini. If the system-wide configuration file doesn't
++/etc/mc/mc.ini. If the system-wide configuration file doesn't
+ exist, MC uses the default settings.
+ .PP
+ The
+@@ -3251,7 +3251,7 @@
+ .IP
+ The help file for the program.
+ .PP
+-.I @prefix@/share/mc/mc.ext
++.I /etc/mc/mc.ext
+ .IP
+ The default system-wide extensions file.
+ .PP
+@@ -3260,12 +3260,12 @@
+ User's own extension, view configuration and edit configuration
+ file. They override the contents of the system wide files if present.
+ .PP
+-.I @prefix@/share/mc/mc.ini
++.I /etc/mc/mc.ini
+ .IP
+ The default system-wide setup for the Midnight Commander, used only if
+ the user doesn't have his own ~/.mc/ini file.
+ .PP
+-.I @prefix@/share/mc/mc.lib
++.I /etc/mc/mc.lib
+ .IP
+ Global settings for the Midnight Commander. Settings in this file
+ affect all users, whether they have ~/.mc/ini or not. Currently, only
+@@ -3283,7 +3283,7 @@
+ .IP
+ This file contains the hints displayed by the program.
+ .PP
+-.I @prefix@/share/mc/mc.menu
++.I /etc/mc/mc.menu
+ .IP
+ This file contains the default system-wide applications menu.
+ .PP
+diff -Nurwd mc-4.6.2~pre1/doc/mcedit.1.in mc-4.6.2~pre1/doc/mcedit.1.in
+--- mc-4.6.2~pre1/doc/mcedit.1.in 2003-03-04 11:34:28.000000000 +0100
++++ mc-4.6.2~pre1/doc/mcedit.1.in 2008-01-24 23:04:13.000000000 +0100
+@@ -464,12 +464,12 @@
+ .IP
+ The help file for the program.
+ .PP
+-.I @prefix@/share/mc/mc.ini
++.I /etc/mc/mc.ini
+ .IP
+ The default system-wide setup for GNU Midnight Commander, used only if
+ the user's own ~/.mc/ini file is missing.
+ .PP
+-.I @prefix@/share/mc/mc.lib
++.I /etc/mc/mc.lib
+ .IP
+ Global settings for the Midnight Commander. Settings in this file
+ affect all users, whether they have ~/.mc/ini or not.
+diff -Nurwd mc-4.6.2~pre1/doc/mcview.1.in mc-4.6.2~pre1/doc/mcview.1.in
+--- mc-4.6.2~pre1/doc/mcview.1.in 2003-01-20 15:08:22.000000000 +0100
++++ mc-4.6.2~pre1/doc/mcview.1.in 2008-01-24 23:04:13.000000000 +0100
+@@ -65,12 +65,12 @@
+ .IP
+ The help file for the program.
+ .PP
+-.I @prefix@/share/mc/mc.ini
++.I /etc/mc/mc.ini
+ .IP
+ The default system-wide setup for GNU Midnight Commander, used only if
+ the user's own ~/.mc/ini file is missing.
+ .PP
+-.I @prefix@/share/mc/mc.lib
++.I /etc/mc/mc.lib
+ .IP
+ Global settings for the Midnight Commander. Settings in this file
+ affect all users, whether they have ~/.mc/ini or not.
Added: trunk/debian/patches/debian/02_use_correct_smb_conf_path.patch
===================================================================
--- trunk/debian/patches/debian/02_use_correct_smb_conf_path.patch (rev 0)
+++ trunk/debian/patches/debian/02_use_correct_smb_conf_path.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,12 @@
+diff -Nurwd mc-4.6.2~pre1/vfs/smbfs.c mc-4.6.2~pre1.patched/vfs/smbfs.c
+--- mc-4.6.2~pre1/vfs/smbfs.c 2005-11-11 03:22:02.000000000 +0100
++++ mc-4.6.2~pre1/vfs/smbfs.c 2008-01-24 23:17:43.000000000 +0100
+@@ -294,7 +294,7 @@
+ static int
+ smbfs_init (struct vfs_class * me)
+ {
+- const char *servicesf = CONFIGDIR PATH_SEP_STR "smb.conf";
++ const char *servicesf = CONFIGDIR PATH_SEP_STR "samba/smb.conf";
+
+ /* DEBUGLEVEL = 4; */
+
Added: trunk/debian/patches/debian/03_use_awk_first.patch
===================================================================
--- trunk/debian/patches/debian/03_use_awk_first.patch (rev 0)
+++ trunk/debian/patches/debian/03_use_awk_first.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,12 @@
+diff -Nurwd mc-4.6.2~pre1/configure mc-4.6.2~pre1.patched/configure
+--- mc-4.6.2~pre1/configure 2007-09-11 16:33:32.000000000 +0200
++++ mc-4.6.2~pre1/configure 2008-01-24 23:37:34.000000000 +0100
+@@ -1562,7 +1562,7 @@
+ fi
+ fi
+
+-for ac_prog in gawk mawk nawk awk
++for ac_prog in awk gawk mawk nawk
+ do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+ set dummy $ac_prog; ac_word=$2
Added: trunk/debian/patches/debian/04_debian_menu_additions.patch
===================================================================
--- trunk/debian/patches/debian/04_debian_menu_additions.patch (rev 0)
+++ trunk/debian/patches/debian/04_debian_menu_additions.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,32 @@
+diff -Nurwd mc-4.6.2~pre1/lib/mc.menu mc-4.6.2~pre1.patched/lib/mc.menu
+--- mc-4.6.2~pre1/lib/mc.menu 2005-09-06 08:01:07.000000000 +0200
++++ mc-4.6.2~pre1.patched/lib/mc.menu 2008-01-25 10:06:19.000000000 +0100
+@@ -15,7 +15,7 @@
+
+ 0 Edit a bug report and send it to root
+ I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
+- ${EDITOR-vi} $I
++ ${EDITOR-editor} $I
+ test -r $I && mail root < $I
+ rm -f $I
+
+@@ -330,3 +330,7 @@
+ o Open next a free console
+ open -s -- sh
+
++=+ f \.dsc$ & t r
++x Extract the contents of a Debian source package
++ dpkg-source -x %f
++
+diff -Nurwd mc-4.6.2~pre1/src/util.h mc-4.6.2~pre1.patched/src/util.h
+--- mc-4.6.2~pre1/src/util.h 2006-02-03 18:04:17.000000000 +0100
++++ mc-4.6.2~pre1.patched/src/util.h 2008-01-25 10:06:19.000000000 +0100
+@@ -222,7 +222,7 @@
+ #define PATH_ENV_SEP ':'
+ #define TMPDIR_DEFAULT "/tmp"
+ #define SCRIPT_SUFFIX ""
+-#define get_default_editor() "vi"
++#define get_default_editor() "editor"
+ #define OS_SORT_CASE_SENSITIVE_DEFAULT 1
+ #define STRCOMP strcmp
+ #define STRNCOMP strncmp
Added: trunk/debian/patches/mc.ext/01_tar_forgot_arg.patch
===================================================================
--- trunk/debian/patches/mc.ext/01_tar_forgot_arg.patch (rev 0)
+++ trunk/debian/patches/mc.ext/01_tar_forgot_arg.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,13 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index af63f0e..6396bdf 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -132,7 +132,7 @@ regex/\.(qp[rk])$
+ # tar
+ regex/\.(tar|TAR)$
+ Open=%cd %p#utar
+- View=%view{ascii} tar tvvf %f
++ View=%view{ascii} tar tvvf - %f
+
+ # lha
+ type/^LHa\ .*archive
Added: trunk/debian/patches/mc.ext/02_use_arj.patch
===================================================================
--- trunk/debian/patches/mc.ext/02_use_arj.patch (rev 0)
+++ trunk/debian/patches/mc.ext/02_use_arj.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,13 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 6396bdf..9d74f57 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -142,7 +142,7 @@ type/^LHa\ .*archive
+ # arj
+ regex/\.a(rj|[0-9][0-9])$
+ Open=%cd %p#uarj
+- View=%view{ascii} unarj l %f
++ View=%view{ascii} arj l %f
+
+ # ha
+ regex/\.([Hh][Aa])$
Added: trunk/debian/patches/mc.ext/03_debian_packages.patch
===================================================================
--- trunk/debian/patches/mc.ext/03_debian_packages.patch (rev 0)
+++ trunk/debian/patches/mc.ext/03_debian_packages.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,20 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 9d74f57..1b9906f 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -201,6 +201,15 @@ regex/\.u?deb$
+ Open=%cd %p#deb
+ View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
+
++# dpkg
++shell/.debd
++ Open=%cd %p#debd
++ View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
++# apt
++shell/.deba
++ Open=%cd %p#deba
++ View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
++
+ # ISO9660
+ regex/\.iso$
+ Open=%cd %p#iso9660
Added: trunk/debian/patches/mc.ext/04_view_ascii.patch
===================================================================
--- trunk/debian/patches/mc.ext/04_view_ascii.patch (rev 0)
+++ trunk/debian/patches/mc.ext/04_view_ascii.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,12 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 1b9906f..12da5f5 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -314,6 +314,7 @@ type/^GIF
+ Include=image
+
+ type/^JPEG
++ View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f
+ Include=image
+
+ type/^PC\ bitmap
Added: trunk/debian/patches/mc.ext/05_gimp_remote.patch
===================================================================
--- trunk/debian/patches/mc.ext/05_gimp_remote.patch (rev 0)
+++ trunk/debian/patches/mc.ext/05_gimp_remote.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,13 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 12da5f5..c81aa71 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -339,7 +339,7 @@ type/^Netpbm
+ Include=image
+
+ shell/.xcf
+- Open=(gimp %f &)
++ Open=(gimp-remote %f &)
+
+ shell/.xbm
+ Open=bitmap %f
Added: trunk/debian/patches/mc.ext/06_use_several_text_browsers.patch
===================================================================
--- trunk/debian/patches/mc.ext/06_use_several_text_browsers.patch (rev 0)
+++ trunk/debian/patches/mc.ext/06_use_several_text_browsers.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,13 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index c81aa71..6335b69 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -446,7 +446,7 @@ type/^PDF
+ # html
+ regex/\.([hH][tT][mM][lL]?)$
+ Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
+- View=%view{ascii} lynx -dump -force_html %f
++ View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
+
+ # StarOffice 5.2
+ shell/.sdw
Added: trunk/debian/patches/mc.ext/07_add_antiword.patch
===================================================================
--- trunk/debian/patches/mc.ext/07_add_antiword.patch (rev 0)
+++ trunk/debian/patches/mc.ext/07_add_antiword.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,17 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 6335b69..9e95b74 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -464,10 +464,10 @@ shell/.abw
+ # Microsoft Word Document
+ regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
+ Open=(abiword %f >/dev/null 2>&1 &)
+- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
++ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
+ type/^Microsoft\ Word
+ Open=(abiword %f >/dev/null 2>&1 &)
+- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
++ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
+
+ # RTF document
+ regex/\.([rR][tT][fF])$
Added: trunk/debian/patches/mc.ext/08_several_additions_debian.patch
===================================================================
--- trunk/debian/patches/mc.ext/08_several_additions_debian.patch (rev 0)
+++ trunk/debian/patches/mc.ext/08_several_additions_debian.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,43 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 9e95b74..96b190f 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -523,6 +523,38 @@ regex/\.(rexx?|cmd)$
+ Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
+
+
++### Debian additions ###
++
++# view gzipped HTML
++regex/\.([hH][tT][mM][lL]?)\.([gG][zZ])$
++ Open=zcat %f|run-mailcap - &
++ View=zcat %f|%view{ascii} w3m -dump -T text/html 2>&1 ||zcat %f|%view{ascii} links -dump 2>&1 ||zcat %f|lynx -dump -force_html 2>&1
++
++# view bzipped HTML
++regex/\.([hH][tT][mM][lL]?)\.([bB][zZ])2$
++ Open=bzcat %f|run-mailcap - &
++ View=bzcat %f|%view{ascii} w3m -dump -T text/html 2>&1||zcat %f|%view{ascii} links -dump 2>&1||zcat %f|lynx -dump -force_html 2>&1
++
++# view gzipped (E)PS
++regex/\.(e|)ps\.gz$
++ Open=gv %f 2>&1 &
++ Icon=postscript.xpm
++ View with GhostView=gv %f 2>&1 &
++
++# compressed PDF
++shell/.pdf.gz
++ Open=zxpdf %f 2>&1 &
++ View=zxpdf %f 2>&1 &
++
++# compressed postscript
++shell/.ps.gz
++ Open=gv %f 2>&1 &
++ View=gv %f 2>&1 &
++
++# Gettext Catalogs
++shell/.mo
++ View=%view{ascii} msgunfmt %f || cat %f
++
+ ### Plain compressed files ###
+
+ # zip
Added: trunk/debian/patches/mc.ext/09_several_additions_mandriva.patch
===================================================================
--- trunk/debian/patches/mc.ext/09_several_additions_mandriva.patch (rev 0)
+++ trunk/debian/patches/mc.ext/09_several_additions_mandriva.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,61 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index 96b190f..63d0f83 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -162,23 +162,32 @@ regex/\.(alz|ALZ)$
+ # cpio
+ shell/.cpio.Z
+ Open=%cd %p#ucpio
+- View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null
++ View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
+
+ shell/.cpio.gz
+ Open=%cd %p#ucpio
+- View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null
++ View=%view{ascii} gzip -dc %f | cpio -itv 2>/dev/null
+
+ shell/.cpio
+ Open=%cd %p#ucpio
+- View=%view{ascii} cpio -itv <'%f' 2>/dev/null
++ View=%view{ascii} cpio -itv < %f 2>/dev/null
+
+ # ls-lR
+-regex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$
++regex/(^|\.)ls-?lR(\.gz|Z|bz2)$
+ Open=%cd %p#lslR
+
+ # patch
+-regex/\.(diff|patch)(\.(bz2|gz|Z))?$
+- Open=%cd %p#patchfs
++regex/\.(diff|patch)(\.bz2)$
++ Open=%cd %p#patchfs
++ View=%view{ascii} bzip2 -dc %f 2>/dev/null
++
++regex/\.(diff|patch)(\.(gz|Z))$
++ Open=%cd %p#patchfs
++ View=%view{ascii} gzip -dc %f 2>/dev/null
++
++regex/\.(diff|patch)$
++ Open=%cd %p#patchfs
++ View=%view{ascii} /bin/cat %f 2>/dev/null
+
+ # ar library
+ regex/\.s?a$
+@@ -572,11 +581,17 @@ type/^gzip
+ Open=gzip -dc %f | %var{PAGER:more}
+ View=%view{ascii} gzip -dc %f 2>/dev/null
+
++regex/\.(gz|Z)?$
++ View=%view{ascii} gzip -dc %f 2>/dev/null
++
+ # bzip2
+ type/^bzip2
+ Open=bzip2 -dc %f | %var{PAGER:more}
+ View=%view{ascii} bzip2 -dc %f 2>/dev/null
+
++regex/\.bz2?$
++ View=%view{ascii} bzip2 -dc %f 2>/dev/null
++
+ # bzip
+ type/^bzip
+ Open=bzip -dc %f | %var{PAGER:more}
Added: trunk/debian/patches/po/09_de.po.patch
===================================================================
--- trunk/debian/patches/po/09_de.po.patch (rev 0)
+++ trunk/debian/patches/po/09_de.po.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,57 @@
+diff -Nurwd mc-4.6.2~pre1/po/de.po mc-4.6.2~pre1.patched/po/de.po
+--- mc-4.6.2~pre1/po/de.po 2007-09-11 16:35:05.000000000 +0200
++++ mc-4.6.2~pre1/po/de.po 2008-01-24 23:42:24.000000000 +0100
+@@ -1147,7 +1147,7 @@
+
+ #, c-format
+ msgid " edit symlink: %s "
+-msgstr " symbolschen Link barbeiten: %s"
++msgstr " symbolschen Link bearbeiten: %s"
+
+ #, c-format
+ msgid "`%s' is not a symbolic link"
+@@ -1246,7 +1246,7 @@
+ " Cannot create temporary command file \n"
+ " %s "
+ msgstr ""
+-" Kann temporäre Befehlsdaei nicht anlegen \n"
++" Kann temporäre Befehlsdatei nicht anlegen \n"
+ " %s "
+
+ msgid " Parameter "
+@@ -1332,7 +1332,7 @@
+ " Cannot stat source file \"%s\" \n"
+ " %s "
+ msgstr ""
+-" Kann Quelldaei \"%s\" nicht untersuchen \n"
++" Kann Quelldatei \"%s\" nicht untersuchen \n"
+ " %s "
+
+ #, c-format
+@@ -2071,7 +2071,7 @@
+
+ #, c-format
+ msgid " You have entered \"%s\""
+-msgstr " Sie haben \"%s\" einggeben"
++msgstr " Sie haben \"%s\" eingegeben"
+
+ #. TRANSLATORS: This label appears near learned keys. Keep it short.
+ msgid "OK"
+@@ -2145,7 +2145,7 @@
+ msgstr "FT&P-Verbindung..."
+
+ msgid "S&hell link..."
+-msgstr "Shell-Verbindung..."
++msgstr "S&hell-Verbindung..."
+
+ msgid "SM&B link..."
+ msgstr "SM&B-Verbindung..."
+@@ -3383,7 +3383,7 @@
+
+ #, c-format
+ msgid "ftpfs: connection to server failed: %s"
+-msgstr "ftpfs: Verbindung zum Server fehlgeschlgen: %s"
++msgstr "ftpfs: Verbindung zum Server fehlgeschlagen: %s"
+
+ #, c-format
+ msgid "Waiting to retry... %d (Control-C to cancel)"
Added: trunk/debian/patches/po/10_it.po.patch
===================================================================
--- trunk/debian/patches/po/10_it.po.patch (rev 0)
+++ trunk/debian/patches/po/10_it.po.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,12 @@
+diff -Nurwd mc-4.6.2~pre1/po/it.po mc-4.6.2~pre1.patched/po/it.po
+--- mc-4.6.2~pre1/po/it.po 2007-09-11 16:35:06.000000000 +0200
++++ mc-4.6.2~pre1/po/it.po 2008-01-24 23:44:48.000000000 +0100
+@@ -1683,7 +1683,7 @@
+ msgstr "&Riprendi"
+
+ msgid "A&ppend"
+-msgstr "Atta&cca"
++msgstr "atta&Cca"
+
+ msgid "Overwrite this target?"
+ msgstr "Sovrascrivo questo file?"
Added: trunk/debian/patches/syntax/01_debian_syntax.patch
===================================================================
--- trunk/debian/patches/syntax/01_debian_syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/01_debian_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,137 @@
+diff --git a/syntax/Makefile.am b/syntax/Makefile.am
+index d99dc3a..49ee0a2 100644
+--- a/syntax/Makefile.am
++++ b/syntax/Makefile.am
+@@ -5,6 +5,10 @@ SYNTAXFILES = \
+ assembler.syntax \
+ c.syntax \
+ changelog.syntax \
++ debian-changelog.syntax \
++ debian-control.syntax \
++ debian-description \
++ debian-sources-list.syntax \
+ cs.syntax \
+ css.syntax \
+ d.syntax \
+diff --git a/syntax/Syntax b/syntax/Syntax
+index efdd50e..96df00e 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -148,5 +148,23 @@ include idl.syntax
+ file Don_t_match_me Mail\sfolder ^From\s
+ include mail.syntax
+
++file sources.list$ sources\slist
++include debian-sources-list.syntax
++
++file control$ Debian\scontrol\sfile
++include debian-control.syntax
++
++file (rules|rocks)$ Debian\srules
++include makefile.syntax
++
++file .\*changelog$ Debian\schangelog\sfile
++include debian-changelog.syntax
++
++file changelog.Debian$ Debian\schangelog\sfile
++include debian-changelog.syntax
++
++file .\*\\.dsc$ Debian\sdescriptiom\sfile
++include debian-description.syntax
++
+ file .\* unknown
+ include unknown.syntax
+diff --git a/syntax/debian-changelog.syntax b/syntax/debian-changelog.syntax
+new file mode 100644
+index 0000000..173b624
+--- /dev/null
++++ b/syntax/debian-changelog.syntax
+@@ -0,0 +1,20 @@
++context default
++
++ keyword linestart \s\s\* brightcyan/17
++ keyword linestart \s-- brightred/19
++ keyword linestart \s\s\s\s\+ cyan/17
++
++ keyword <*@*> brightred/19
++ keyword whole experimental; brightmagenta/magenta
++ keyword whole unstable; brightmagenta/magenta
++ keyword whole stable; brightmagenta/magenta
++ keyword whole urgency=low yellow/24
++ keyword whole urgency=medium brightgreen/6
++ keyword whole urgency=high white/25
++ keyword whole urgency=LOW yellow/24
++ keyword whole urgency=MEDIUM brightgreen/6
++ keyword whole urgency=HIGH white/25
++
++ keyword whole bug white/25
++ keyword whole Bug white/25
++ keyword whole BUG white/25
+diff --git a/syntax/debian-control.syntax b/syntax/debian-control.syntax
+new file mode 100644
+index 0000000..8778cdd
+--- /dev/null
++++ b/syntax/debian-control.syntax
+@@ -0,0 +1,23 @@
++context default
++ keyword linestart Source brightmagenta/20
++ keyword linestart Section brightmagenta/20
++ keyword linestart Priority brightmagenta/20
++ keyword linestart Maintainer brightmagenta/20
++ keyword linestart Standards-Version brightmagenta/20
++ keyword linestart Package green/6
++ keyword linestart Architecture green/6
++ keyword linestart Depends green/6
++ keyword linestart Recommends green/6
++ keyword linestart Suggests green/6
++ keyword linestart Conflicts green/6
++ keyword linestart Replaces green/6
++ keyword linestart Provides green/6
++ keyword linestart Pre-Depends green/6
++ keyword linestart Build-Depends green/6
++ keyword linestart Build-Depends-Indep green/6
++ keyword linestart Build-Conflicts green/6
++ keyword linestart Build-Conflicts-Indep green/6
++ keyword linestart Description green/6
++ keyword <*@*> brightred/19
++
++context linestart \s \n brown/22
+diff --git a/syntax/debian-description.syntax b/syntax/debian-description.syntax
+new file mode 100644
+index 0000000..2a4815f
+--- /dev/null
++++ b/syntax/debian-description.syntax
+@@ -0,0 +1,15 @@
++context default
++ keyword linestart Format green
++ keyword linestart Source brightmagenta
++ keyword linestart Version yellow
++ keyword linestart Binary brightgreen
++ keyword linestart Maintainer brightmagenta
++ keyword <*@*> brightred
++ keyword linestart Architecture cyan
++ keyword linestart Standards-Version brightmagenta
++ keyword linestart Build-Depends green
++ keyword linestart Files green
++
++context --- \n brightred
++ spellcheck
++
+diff --git a/syntax/debian-sources-list.syntax b/syntax/debian-sources-list.syntax
+new file mode 100644
+index 0000000..654fa8d
+--- /dev/null
++++ b/syntax/debian-sources-list.syntax
+@@ -0,0 +1,12 @@
++context default
++ keyword linestart deb-src brightmagenta/20
++ keyword linestart deb brightmagenta/20
++ keyword \$\(ARCH\) brightred/18
++
++context # \n brown/22
++context ftp\:\/\/ \s green/6
++context http\:\/\/ \s green/6
++context cdrom\:\/ \s yellow/24
++context file\:\/ \s brightcyan/14
++
++###############################################################################
Added: trunk/debian/patches/syntax/02_improving_nroff_filematch.patch
===================================================================
--- trunk/debian/patches/syntax/02_improving_nroff_filematch.patch (rev 0)
+++ trunk/debian/patches/syntax/02_improving_nroff_filematch.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,15 @@
+diff -Nurwd mc-4.6.2~pre1/syntax/Syntax mc-4.6.2~pre1.patched/syntax/Syntax
+--- mc-4.6.2~pre1/syntax/Syntax 2007-08-27 08:56:47.000000000 +0200
++++ mc-4.6.2~pre1.patched/syntax/Syntax 2008-01-24 23:52:28.000000000 +0100
+@@ -46,9 +46,10 @@
+ file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!.\*([\s/]ruby|@RUBY@)
+ include ruby.syntax
+
+-file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource
++file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
+ include nroff.syntax
+
++
+ file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile
+ include html.syntax
+
Added: trunk/debian/patches/syntax/03_cxx.syntax.patch
===================================================================
--- trunk/debian/patches/syntax/03_cxx.syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/03_cxx.syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,146 @@
+diff --git a/syntax/Makefile.am b/syntax/Makefile.am
+index 49ee0a2..ae706eb 100644
+--- a/syntax/Makefile.am
++++ b/syntax/Makefile.am
+@@ -11,6 +11,7 @@ SYNTAXFILES = \
+ debian-sources-list.syntax \
+ cs.syntax \
+ css.syntax \
++ cxx.syntax \
+ d.syntax \
+ diff.syntax \
+ dos.syntax \
+diff --git a/syntax/cxx.syntax b/syntax/cxx.syntax
+new file mode 100644
+index 0000000..7deef6d
+--- /dev/null
++++ b/syntax/cxx.syntax
+@@ -0,0 +1,128 @@
++context default
++ keyword whole auto yellow
++ keyword whole break yellow
++ keyword whole case yellow
++ keyword whole char yellow
++ keyword whole const yellow
++ keyword whole continue yellow
++ keyword whole default yellow
++ keyword whole do yellow
++ keyword whole double yellow
++ keyword whole else yellow
++ keyword whole enum yellow
++ keyword whole extern yellow
++ keyword whole float yellow
++ keyword whole for yellow
++ keyword whole goto yellow
++ keyword whole if yellow
++ keyword whole int yellow
++ keyword whole long yellow
++ keyword whole register yellow
++ keyword whole return yellow
++ keyword whole short yellow
++ keyword whole signed yellow
++ keyword whole sizeof yellow
++ keyword whole static yellow
++ keyword whole struct yellow
++ keyword whole switch yellow
++ keyword whole typedef yellow
++ keyword whole union yellow
++ keyword whole unsigned yellow
++ keyword whole void yellow
++ keyword whole volatile yellow
++ keyword whole while yellow
++ keyword whole asm yellow
++ keyword whole catch yellow
++ keyword whole class yellow
++ keyword whole friend yellow
++ keyword whole delete yellow
++ keyword whole inline yellow
++ keyword whole new yellow
++ keyword whole operator yellow
++ keyword whole private yellow
++ keyword whole protected yellow
++ keyword whole public yellow
++ keyword whole this yellow
++ keyword whole throw yellow
++ keyword whole template yellow
++ keyword whole try yellow
++ keyword whole virtual yellow
++ keyword whole bool yellow
++ keyword whole const_cast yellow
++ keyword whole dynamic_cast yellow
++ keyword whole explicit yellow
++ keyword whole false yellow
++ keyword whole mutable yellow
++ keyword whole namespace yellow
++ keyword whole reinterpret_cast yellow
++ keyword whole static_cast yellow
++ keyword whole true yellow
++ keyword whole typeid yellow
++ keyword whole typename yellow
++ keyword whole using yellow
++ keyword whole wchar_t yellow
++ keyword whole ... yellow
++ keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
++
++ keyword /\* brown
++ keyword \*/ brown
++ keyword // brown
++
++ keyword '\\\{"abtnvfr\}' brightgreen
++ keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
++ keyword '\\'' brightgreen
++ keyword '\\\\' brightgreen
++ keyword '\\0' brightgreen
++ keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen
++
++ keyword > yellow
++ keyword < yellow
++ keyword \+ yellow
++ keyword - yellow
++ keyword \* yellow
++ keyword / yellow
++ keyword % yellow
++ keyword = yellow
++ keyword != yellow
++ keyword == yellow
++ keyword { brightcyan
++ keyword } brightcyan
++ keyword ( brightcyan
++ keyword ) brightcyan
++ keyword [ brightcyan
++ keyword ] brightcyan
++ keyword , brightcyan
++ keyword : brightcyan
++ keyword ? brightcyan
++ keyword ; brightmagenta
++
++context exclusive /\* \*/ brown
++ spellcheck
++
++context exclusive // \n brown
++ spellcheck
++
++context linestart # \n brightred
++ keyword \\\n yellow
++ keyword /\**\*/ brown
++ keyword //*\n brown
++ keyword "+" red
++ keyword <+> red
++
++context " " green
++ spellcheck
++ keyword \\" brightgreen
++ keyword %% brightgreen
++ keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
++ keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
++ keyword %\[hl\]n brightgreen
++ keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
++ keyword %[*] brightgreen
++ keyword %c brightgreen
++ keyword %p brightgreen
++ keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
++ keyword \\\\ brightgreen
++ keyword \\' brightgreen
++ keyword \\\{abtnvfr\} brightgreen
++
++
Added: trunk/debian/patches/syntax/04_sh_syntax.patch
===================================================================
--- trunk/debian/patches/syntax/04_sh_syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/04_sh_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,2144 @@
+diff -Nurwd mc-4.6.2~pre1.orig/syntax/sh.syntax mc-4.6.2~pre1/syntax/sh.syntax
+--- mc-4.6.2~pre1.orig/syntax/sh.syntax 2008-02-16 13:55:35.000000000 +0100
++++ mc-4.6.2~pre1/syntax/sh.syntax 2008-02-16 13:57:21.000000000 +0100
+@@ -1,3 +1,8 @@
++# Since I regulary update ths file, please send any comments
++# to: Michelle Konzack <linux4michelle at freenet.de>
++# Last Update: Thu, 01 Jun 2006 22:10:07 +0200
++
++
+ context default
+ keyword ;; brightred
+ keyword \\@ brightred
+@@ -8,13 +13,13 @@
+ keyword \\` brightred
+ keyword ` brightred
+ keyword ; brightcyan
+- keyword $( brightcyan
+- keyword ( brightcyan
+- keyword ) brightcyan
++ keyword $(*) brightgreen
+ keyword ${*} brightgreen
+ keyword { brightcyan
+ keyword } brightcyan
+
++ keyword whole linestart #!\[\s\]*\n brightcyan black
++
+ keyword $\* brightred
+ keyword $@ brightred
+ keyword $# brightred
+@@ -22,7 +27,12 @@
+ keyword $- brightred
+ keyword $$ brightred
+ keyword $! brightred
+- keyword whole $_ brightred
++ keyword $_ brightred
++
++ keyword whole 2>&1 brightred
++ keyword whole 1>&2 brightred
++ keyword whole 2> brightred
++ keyword whole 1> brightred
+
+ keyword wholeright $\[0123456789\] brightred
+
+@@ -36,134 +46,1042 @@
+
+ wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._
+
+- keyword whole alias yellow
+- keyword whole bg yellow
+ keyword whole break yellow
+ keyword whole case yellow
++ keyword whole clear yellow
+ keyword whole continue yellow
++ keyword whole declare yellow
+ keyword whole done yellow
+ keyword whole do yellow
+ keyword whole elif yellow
+ keyword whole else yellow
+ keyword whole esac yellow
+- keyword whole eval yellow
+- keyword whole exec yellow
+ keyword whole exit yellow
+- keyword whole export yellow
+- keyword whole fg yellow
+ keyword whole fi yellow
+ keyword whole for yellow
++ keyword whole getopts yellow
+ keyword whole if yellow
+ keyword whole in yellow
+- keyword whole read yellow
+ keyword whole return yellow
+ keyword whole select yellow
+- keyword whole set yellow
+ keyword whole shift yellow
++ keyword whole source yellow
+ keyword whole then yellow
+ keyword whole trap yellow
+- keyword whole umask yellow
+- keyword whole unset yellow
+ keyword whole until yellow
+ keyword whole wait yellow
+ keyword whole while yellow
+
++ keyword whole accept cyan
++ keyword whole accessdb cyan
++ keyword whole activate cyan
++ keyword whole addgroup cyan
++ keyword whole add-shell cyan
++ keyword whole adduser cyan
++ keyword whole anytopnm cyan
++ keyword whole apropos cyan
++ keyword whole apt-cache cyan
++ keyword whole apt-cdrom cyan
++ keyword whole apt-config cyan
++ keyword whole apt-file cyan
++ keyword whole apt-ftparchive cyan
++ keyword whole apt-get cyan
++ keyword whole aptitude cyan
++ keyword whole apt-sortpkgs cyan
++ keyword whole apt-source cyan
++ keyword whole ar cyan
+ keyword whole arch cyan
++ keyword whole arp cyan
++ keyword whole as cyan
+ keyword whole ash cyan
++ keyword whole at cyan
++ keyword whole atd cyan
++ keyword whole atrun cyan
++ keyword whole atq cyan
++ keyword whole autoconf cyan
++ keyword whole autoheader cyan
++ keyword whole automake cyan
++ keyword whole autopoint cyan
++ keyword whole autoscan cyan
+ keyword whole awk cyan
++ keyword whole badblocks cyan
++ keyword whole base64-decode cyan
++ keyword whole base64-encode cyan
+ keyword whole basename cyan
+ keyword whole bash cyan
++ keyword whole batch cyan
++ keyword whole bc cyan
+ keyword whole bg_backup cyan
+ keyword whole bg_restore cyan
++ keyword whole blockdev cyan
++ keyword whole bootlogd cyan
++ keyword whole bsd-write cyan
+ keyword whole bsh cyan
++ keyword whole bunzip2 cyan
++ keyword whole bzcat cyan
++ keyword whole bzcmp cyan
++ keyword whole bzdiff cyan
++ keyword whole bzegrep cyan
++ keyword whole bzexe cyan
++ keyword whole bzfgrep cyan
++ keyword whole bzgrep cyan
++ keyword whole bzip cyan
++ keyword whole bzip2 cyan
++ keyword whole bzip2recover cyan
++ keyword whole bzless cyan
++ keyword whole bzmore cyan
++ keyword whole cabextract cyan
++ keyword whole cal cyan
++ keyword whole calendar cyan
++ keyword whole cam cyan
++ keyword whole cancel cyan
++ keyword whole captoinfo cyan
+ keyword whole cat cyan
++ keyword whole catchsegv cyan
++ keyword whole catman cyan
+ keyword whole cd cyan
++ keyword whole cdda2ogg cyan
++ keyword whole cdda2mp3 cyan
++ keyword whole cdda2wav cyan
++ keyword whole cdrecord cyan
++ keyword whole cfdisk cyan
++ keyword whole chage cyan
++ keyword whole charset cyan
++ keyword whole chattr cyan
++ keyword whole checkbashisms cyan
++ keyword whole chfn cyan
+ keyword whole chgrp cyan
++ keyword whole chkdupexe cyan
+ keyword whole chmod cyan
+ keyword whole chown cyan
++ keyword whole chpasswd cyan
++ keyword whole chroot cyan
++ keyword whole chsh cyan
++ keyword whole chvt cyan
++ keyword whole cksum cyan
++ keyword whole clear cyan
++ keyword whole cmp cyan
++ keyword whole codepage cyan
++ keyword whole col cyan
++ keyword whole colcrt cyan
++ keyword whole colrm cyan
++ keyword whole column cyan
++ keyword whole comm cyan
++ keyword whole compose cyan
++ keyword whole compress cyan
++ keyword whole consolechars cyan
+ keyword whole cp cyan
++ keyword whole cpan cyan
++ keyword whole cpgr cyan
+ keyword whole cpio cyan
++ keyword whole cpp cyan
++ keyword whole cramfsck cyan
++ keyword whole createdb cyan
++ keyword whole createlang cyan
++ keyword whole createuser cyan
++ keyword whole c_rehash cyan
++ keyword whole crontab cyan
+ keyword whole csh cyan
++ keyword whole csplit cyan
++ keyword whole cupsaccept cyan
++ keyword whole cupsaddsmb cyan
++ keyword whole cupsd cyan
++ keyword whole cupsreject cyan
++ keyword whole curl cyan
++ keyword whole cut cyan
+ keyword whole date cyan
++ keyword whole dash cyan
++ keyword whole dch cyan
+ keyword whole dd cyan
++ keyword whole deallocvt cyan
++ keyword whole debugfs cyan
++ keyword whole delgroup cyan
++ keyword whole deluser cyan
++ keyword whole depmod cyan
++ keyword whole devdump cyan
+ keyword whole df cyan
++ keyword whole dialog cyan
++ keyword whole diff cyan
++ keyword whole diff3 cyan
++ keyword whole dir cyan
++ keyword whole dircolors cyan
++ keyword whole directomatic cyan
++ keyword whole dirname cyan
++ keyword whole dirsplit cyan
++ keyword whole disable cyan
++ keyword whole diskd cyan
++ keyword whole diskseekd cyan
++ keyword whole disown cyan
+ keyword whole dmesg cyan
+ keyword whole dnsdomainname cyan
+ keyword whole doexec cyan
+ keyword whole domainname cyan
++ keyword whole dosfsck cyan
++ keyword whole dotextwrap cyan
++ keyword whole dotlockfile cyan
++ keyword whole dpasswd cyan
++ keyword whole dpkg cyan
++ keyword whole dpkg-architekture cyan
++ keyword whole dpkg-buildpackage cyan
++ keyword whole dpkg-deb cyan
++ keyword whole dpkg-name cyan
++ keyword whole dpkg-query cyan
++ keyword whole dpkg-reconfigure cyan
++ keyword whole dpkg-scanpackages cyan
++ keyword whole dpkg-scansources cyan
++ keyword whole dpkg-split cyan
++ keyword whole dpkg-source cyan
++ keyword whole dropdb cyan
++ keyword whole droplang cyan
++ keyword whole dropuser cyan
++ keyword whole dscverify cyan
++ keyword whole du cyan
++ keyword whole dumpe2fs cyan
++ keyword whole dumpkeys cyan
++ keyword whole dvipdf cyan
++ keyword whole e2fsck cyan
++ keyword whole e2image cyan
++ keyword whole e2label cyan
+ keyword whole echo cyan
+ keyword whole ed cyan
++ keyword whole edit cyan
++ keyword whole editor cyan
+ keyword whole egrep cyan
++ keyword whole eject cyan
++ keyword whole enable cyan
++ keyword whole env cyan
++ keyword whole envsubst cyan
++ keyword whole eqn cyan
++ keyword whole eval_gettext cyan
+ keyword whole ex cyan
++ keyword whole expand cyan
++ keyword whole expiry cyan
++ keyword whole expr cyan
++ keyword whole factor cyan
++ keyword whole fakeroot cyan
++ keyword whole faillog cyan
+ keyword whole false cyan
++ keyword whole fbset cyan
++ keyword whole fc-cache cyan
++ keyword whole fc-list cyan
++ keyword whole fc-match cyan
++ keyword whole fdformat cyan
++ keyword whole fdisk cyan
++ keyword whole fdlist cyan
++ keyword whole fdmount cyan
++ keyword whole fdmountd cyan
++ keyword whole fdrawcmd cyan
++ keyword whole fdumount cyan
++ keyword whole fetchmail cyan
++ keyword whole fgconsole cyan
+ keyword whole fgrep cyan
++ keyword whole file cyan
++ keyword whole filefrag cyan
+ keyword whole find cyan
++ keyword whole find2perl cyan
++ keyword whole findfs cyan
++ keyword whole fitstopnm cyan
++ keyword whole floppycontrol cyan
++ keyword whole floppymeter cyan
++ keyword whole fmt cyan
++ keyword whole fold cyan
++ keyword whole font2psf cyan
++ keyword whole formail cyan
++ keyword whole fping cyan
++ keyword whole fping6 cyan
++ keyword whole free cyan
++ keyword whole freeze cyan
++ keyword whole fribidi cyan
++ keyword whole from cyan
++ keyword whole fsck cyan
++ keyword whole fsck.cramfs cyan
++ keyword whole fsck.ext2 cyan
++ keyword whole fsck.ext3 cyan
++ keyword whole fsck.minix cyan
++ keyword whole fsck.msdos cyan
++ keyword whole fsck.nfs cyan
++ keyword whole fsck.vfat cyan
+ keyword whole fsconf cyan
++ keyword whole funzip cyan
++ keyword whole fuser cyan
++ keyword whole fvwm cyan
+ keyword whole gawk cyan
++ keyword whole gdb cyan
++ keyword whole gdbtui cyan
++ keyword whole gcc cyan
++ keyword whole gcov cyan
++ keyword whole genksyms cyan
++ keyword whole getconf cyan
++ keyword whole getent cyan
++ keyword whole getfdprm cyan
++ keyword whole getkeycodes cyan
++ keyword whole getopt cyan
++ keyword whole gettext cyan
++ keyword whole gettextize cyan
++ keyword whole getty cyan
++ keyword whole gpasswd cyan
++ keyword whole gpgsplit cyan
++ keyword whole gpgv cyan
++ keyword whole gprof cyan
+ keyword whole grep cyan
++ keyword whole groff cyan
++ keyword whole groupadd cyan
++ keyword whole groupdel cyan
++ keyword whole groupmod cyan
++ keyword whole groups cyan
++ keyword whole grpck cyan
++ keyword whole grpconv cyan
++ keyword whole grpunconv cyan
++ keyword whole gs cyan
++ keyword whole gsbj cyan
++ keyword whole gsdj cyan
++ keyword whole gsdj500 cyan
++ keyword whole gs-gpl cyan
++ keyword whole gslj cyan
++ keyword whole gslp cyan
++ keyword whole gsmctl cyan
++ keyword whole gsmpb cyan
++ keyword whole gsmsendsms cyan
++ keyword whole gsmsiectl cyan
++ keyword whole gsmsiexfer cyan
++ keyword whole gsmsmsd cyan
++ keyword whole gsmsmsstore cyan
++ keyword whole gsnd cyan
+ keyword whole gunzip cyan
++ keyword whole gzexe cyan
+ keyword whole gzip cyan
++ keyword whole ha cyan
++ keyword whole halt cyan
++ keyword whole hd cyan
++ keyword whole hdparm cyan
++ keyword whole hddtemp cyan
++ keyword whole head cyan
++ keyword whole hexdump cyan
++ keyword whole hman cyan
++ keyword whole host cyan
++ keyword whole hostid cyan
+ keyword whole hostname cyan
++ keyword whole hotkeys cyan
++ keyword whole html2text cyan
++ keyword whole hwclock cyan
++ keyword whole iconv cyan
++ keyword whole iconvconfig cyan
++ keyword whole id cyan
++ keyword whole ifconfig cyan
++ keyword whole ifdown cyan
++ keyword whole ifnames cyan
++ keyword whole ifup cyan
+ keyword whole igawk cyan
++ keyword whole info cyan
++ keyword whole infobrowser cyan
++ keyword whole infocmp cyan
++ keyword whole infokey cyan
++ keyword whole infotocap cyan
++ keyword whole init cyan
++ keyword whole insmod cyan
++ keyword whole install cyan
++ keyword whole installkernel cyan
++ keyword whole install-menu cyan
+ keyword whole ipcalc cyan
++ keyword whole ipcs cyan
++ keyword whole ipmaddr cyan
++ keyword whole ippool cyan
++ keyword whole iptables cyan
++ keyword whole iptunnel cyan
++ keyword whole isoinfo cyan
++ keyword whole join cyan
++ keyword whole kallsyms cyan
++ keyword whole kbdconfig cyan
++ keyword whole kbd_mode cyan
++ keyword whole kbdrate cyan
++ keyword whole klogd cyan
++ keyword whole kernelversion cyan
+ keyword whole kill cyan
++ keyword whole killall cyan
+ keyword whole ksh cyan
++ keyword whole ksyms cyan
++ keyword whole lame cyan
++ keyword whole last cyan
++ keyword whole lastb cyan
++ keyword whole lastlog cyan
++ keyword whole ld cyan
++ keyword whole ldconfig cyan
++ keyword whole ldd cyan
++ keyword whole less cyan
++ keyword whole lessecho cyan
++ keyword whole lessfile cyan
++ keyword whole lesskey cyan
++ keyword whole lesspipe cyan
++ keyword whole lharc cyan
++ keyword whole libtool cyan
++ keyword whole lilo cyan
++ keyword whole line cyan
++ keyword whole link cyan
++ keyword whole links2 cyan
++ keyword whole linux_logo cyan
+ keyword whole linuxconf cyan
++ keyword whole list_audio_tracks cyan
+ keyword whole ln cyan
++ keyword whole loadkeys cyan
++ keyword whole locale cyan
++ keyword whole localedef cyan
++ keyword whole locale-gen cyan
++ keyword whole locate cyan
++ keyword whole lockfile cyan
++ keyword whole logger cyan
+ keyword whole login cyan
++ keyword whole logname cyan
++ keyword whole logrotate cyan
++ keyword whole logsave cyan
++ keyword whole look cyan
++ keyword whole lorder cyan
++ keyword whole losetup cyan
++ keyword whole lp cyan
++ keyword whole lpadmin cyan
++ keyword whole lpc cyan
+ keyword whole lpdconf cyan
++ keyword whole lpdomatic cyan
++ keyword whole lpinfo cyan
++ keyword whole lpmove cyan
++ keyword whole lpoptions cyan
++ keyword whole lppasswd cyan
++ keyword whole lpq cyan
++ keyword whole lpr cyan
++ keyword whole lprm cyan
++ keyword whole lprsetup cyan
++ keyword whole lpstat cyan
+ keyword whole ls cyan
++ keyword whole lsattr cyan
++ keyword whole lsmod cyan
++ keyword whole lspci cyan
++ keyword whole lsusb cyan
++ keyword whole lynx cyan
++ keyword whole MAKEDEV cyan
++ keyword whole MAKEFLOPPIES cyan
+ keyword whole mail cyan
++ keyword whole mailq cyan
++ keyword whole mailstat cyan
++ keyword whole mailx cyan
++ keyword whole make cyan
++ keyword whole make-kpkg cyan
++ keyword whole man cyan
++ keyword whole man2html cyan
++ keyword whole manpath cyan
++ keyword whole mawk cyan
++ keyword whole mc cyan
++ keyword whole mcedit cyan
++ keyword whole mcookie cyan
++ keyword whole mcview cyan
++ keyword whole mcmfmt cyan
++ keyword whole memstat cyan
++ keyword whole mergechanges cyan
++ keyword whole mesg cyan
++ keyword whole mev cyan
++ keyword whole mkboot cyan
++ keyword whole mkfifo cyan
++ keyword whole mkhybrid cyan
++ keyword whole mkisofs cyan
++ keyword whole mk_modmap cyan
++ keyword whole mkpasswd cyan
++ keyword whole mii-tool cyan
++ keyword whole mimedecode cyan
++ keyword whole mkcramfs cyan
+ keyword whole mkdir cyan
++ keyword whole mkdirhier cyan
++ keyword whole mkfs cyan
++ keyword whole mkfs.cramfs cyan
++ keyword whole mkfs.ext2 cyan
++ keyword whole mkfs.ext3 cyan
++ keyword whole mkfs.minix cyan
++ keyword whole mkfs.msdos cyan
++ keyword whole mkfs.vfat cyan
++ keyword whole mke2fs cyan
++ keyword whole mkdosfs cyan
++ keyword whole mkinitrd cyan
+ keyword whole mknod cyan
++ keyword whole mkrescue cyan
++ keyword whole mkswap cyan
+ keyword whole mktemp cyan
++ keyword whole modconf cyan
++ keyword whole modinfo cyan
++ keyword whole modprobe cyan
+ keyword whole more cyan
+ keyword whole mount cyan
++ keyword whole mountpoint cyan
++ keyword whole mozilla cyan
++ keyword whole mp3info cyan
++ keyword whole mpexpand cyan
++ keyword whole munpack cyan
++ keyword whole msgattrib cyan
++ keyword whole msgcat cyan
++ keyword whole msgcmp cyan
++ keyword whole msgcomm cyan
++ keyword whole msgconv cyan
++ keyword whole msgen cyan
++ keyword whole msgexec cyan
++ keyword whole msgfilter cyan
++ keyword whole msgfmt cyan
++ keyword whole msggrep cyan
++ keyword whole msginit cyan
++ keyword whole msgmerge cyan
++ keyword whole msgunfmt cyan
++ keyword whole msguniq cyan
++ keyword whole msmtp cyan
+ keyword whole mt cyan
++ keyword whole mt-gnu cyan
++ keyword whole mtrace cyan
++ keyword whole mute cyan
++ keyword whole mutt cyan
+ keyword whole mv cyan
++ keyword whole nameif cyan
++ keyword whole namei cyan
++ keyword whole nano cyan
++ keyword whole nawk cyan
++ keyword whole ncal cyan
++ keyword whole neqn cyan
+ keyword whole netconf cyan
+ keyword whole netstat cyan
++ keyword whole newaliases cyan
++ keyword whole newgrp cyan
++ keyword whole newusers cyan
++ keyword whole nex cyan
++ keyword whole nfsstat cyan
++ keyword whole ngettext cyan
+ keyword whole nice cyan
+ keyword whole nisdomainname cyan
++ keyword whole nl cyan
++ keyword whole nm cyan
++ keyword whole nohup cyan
++ keyword whole nroff cyan
++ keyword whole nsmod cyan
++ keyword whole nvi cyan
++ keyword whole nview cyan
++ keyword whole objcopy cyan
++ keyword whole objdump cyan
++ keyword whole od cyan
++ keyword whole ogg123 cyan
++ keyword whole oggdec cyan
++ keyword whole oggenc cyan
++ keyword whole ogginfo cyan
++ keyword whole open cyan
++ keyword whole openvt cyan
++ keyword whole pager cyan
++ keyword whole pam_getenv cyan
++ keyword whole paperconf cyan
++ keyword whole par cyan
++ keyword whole passwd cyan
++ keyword whole paste cyan
++ keyword whole patch cyan
++ keyword whole pathchk cyan
++ keyword whole pcimodules cyan
++ keyword whole pcretest cyan
++ keyword whole pdfinfo cyan
++ keyword whole perl cyan
++ keyword whole perldoc cyan
++ keyword whole pg cyan
++ keyword whole pgrep cyan
++ keyword whole pic cyan
++ keyword whole pico cyan
++ keyword whole piconv cyan
++ keyword whole pidof cyan
++ keyword whole pinfo cyan
+ keyword whole ping cyan
++ keyword whole pkill cyan
++ keyword whole pmap cyan
++ keyword whole portmap cyan
++ keyword whole poweroff cyan
++ keyword whole pr cyan
++ keyword whole print cyan
++ keyword whole printenv cyan
++ keyword whole printf cyan
++ keyword whole procmail cyan
++ keyword whole prove cyan
+ keyword whole ps cyan
++ keyword whole psed cyan
++ keyword whole psql cyan
++ keyword whole pstree cyan
++ keyword whole pstruct cyan
++ keyword whole ptx cyan
++ keyword whole pwconv cyan
++ keyword whole pwck cyan
+ keyword whole pwd cyan
++ keyword whole pwunconv cyan
++ keyword whole ramsize cyan
++ keyword whole ranlib cyan
++ keyword whole rar cyan
++ keyword whole rarp cyan
++ keyword whole raw cyan
++ keyword whole rbash cyan
++ keyword whole rcp cyan
++ keyword whole rdev cyan
++ keyword whole readcd cyan
++ keyword whole readelf cyan
++ keyword whole readlink cyan
++ keyword whole readprofile cyan
++ keyword whole reboot cyan
+ keyword whole red cyan
++ keyword whole regcomp cyan
++ keyword whole reject cyan
+ keyword whole remadmin cyan
++ keyword whole remove-shell cyan
++ keyword whole rename cyan
++ keyword whole renice cyan
++ keyword whole reset cyan
++ keyword whole resize2fs cyan
++ keyword whole rev cyan
++ keyword whole revpath cyan
++ keyword whole rgrep cyan
++ keyword whole rlogin cyan
+ keyword whole rm cyan
+ keyword whole rmdir cyan
++ keyword whole rmmod cyan
++ keyword whole rmt cyan
++ keyword whole route cyan
++ keyword whole rpcgen cyan
++ keyword whole rpcinfo cyan
++ keyword whole rplay cyan
++ keyword whole rplayd cyan
++ keyword whole rplaydsp cyan
+ keyword whole rpm cyan
++ keyword whole rpm2cpio cyan
++ keyword whole rptp cyan
++ keyword whole rsh cyan
++ keyword whole rstartd cyan
++ keyword whole runlevel cyan
++ keyword whole run-mailcap cyan
++ keyword whole run-parts cyan
++ keyword whole savelog cyan
++ keyword whole scanimage cyan
++ keyword whole scanpci cyan
++ keyword whole screendump cyan
++ keyword whole script cyan
++ keyword whole scriptreplay cyan
++ keyword whole sdiff cyan
+ keyword whole sed cyan
++ keyword whole see cyan
++ keyword whole sendmail cyan
++ keyword whole seq cyan
+ keyword whole set cyan
++ keyword whole setfdprm cyan
++ keyword whole setkeycodes cyan
++ keyword whole setleds cyan
++ keyword whole setlogcons cyan
++ keyword whole setmetamode cyan
++ keyword whole setpci cyan
+ keyword whole setserial cyan
++ keyword whole setsid cyan
++ keyword whole setterm cyan
++ keyword whole setvesablank cyan
++ keyword whole setxkbmap cyan
++ keyword whole sfdisk cyan
++ keyword whole sftp cyan
++ keyword whole sg cyan
+ keyword whole sh cyan
++ keyword whole sha1sum cyan
++ keyword whole shadowconfig cyan
++ keyword whole showcfont cyan
++ keyword whole showkey cyan
++ keyword whole showmount cyan
++ keyword whole shred cyan
++ keyword whole shutdown cyan
++ keyword whole size cyan
++ keyword whole skill cyan
++ keyword whole slabtop cyan
++ keyword whole slattach cyan
+ keyword whole sleep cyan
++ keyword whole slogin cyan
++ keyword whole smime_keys cyan
++ keyword whole snice cyan
++ keyword whole soelim cyan
+ keyword whole sort cyan
++ keyword whole sa-learn cyan
++ keyword whole spamassassin cyan
++ keyword whole spamc cyan
++ keyword whole spamd cyan
++ keyword whole splain cyan
++ keyword whole split cyan
++ keyword whole ssh-add cyan
++ keyword whole ssh-copy-id cyan
++ keyword whole ssh-keygen cyan
++ keyword whole ssh-keyscan cyan
++ keyword whole ssmtp cyan
++ keyword whole start-stop-daemon cyan
++ keyword whole stat cyan
++ keyword whole strace cyan
++ keyword whole strings cyan
++ keyword whole strip cyan
+ keyword whole stty cyan
+ keyword whole su cyan
++ keyword whole sulogin cyan
++ keyword whole sum cyan
++ keyword whole superformat cyan
++ keyword whole su-to-root cyan
++ keyword whole svlc cyan
++ keyword whole swapoff cyan
++ keyword whole swapon cyan
+ keyword whole sync cyan
++ keyword whole sysctl cyan
++ keyword whole syslogd cyan
++ keyword whole syslogd-listfiles cyan
++ keyword whole syslog-facility cyan
++ keyword whole tac cyan
++ keyword whole tack cyan
++ keyword whole tail cyan
+ keyword whole taper cyan
+ keyword whole tar cyan
++ keyword whole tbl cyan
++ keyword whole tcpdchk cyan
++ keyword whole tcpdump cyan
++ keyword whole tclsh cyan
+ keyword whole tcsh cyan
++ keyword whole tdbox cyan
++ keyword whole tdcheckserver cyan
++ keyword whole tddebidate cyan
++ keyword whole tdfileview cyan
++ keyword whole tdfmlogstrip cyan
++ keyword whole tdformail cyan
++ keyword whole tdlinuxcounter cyan
++ keyword whole tdlinuxlogo cyan
++ keyword whole tdmailblacklist cyan
++ keyword whole tdmailbody cyan
++ keyword whole tdmailcopy cyan
++ keyword whole tdmaildirmake cyan
++ keyword whole tdmailsubject cyan
++ keyword whole tdmailwhitelist cyan
++ keyword whole tdnewmsg cyan
++ keyword whole tdsysbackup cyan
++ keyword whole tee cyan
++ keyword whole telinit cyan
++ keyword whole telnet cyan
+ keyword whole test cyan
++ keyword whole tempfile cyan
++ keyword whole tic cyan
+ keyword whole time cyan
++ keyword whole tload cyan
++ keyword whole tnef cyan
++ keyword whole toe cyan
++ keyword whole toolame cyan
++ keyword whole top cyan
+ keyword whole touch cyan
++ keyword whole tput cyan
++ keyword whole tr cyan
++ keyword whole troff cyan
+ keyword whole true cyan
++ keyword whole tset cyan
++ keyword whole tsort cyan
++ keyword whole tty cyan
++ keyword whole tunctl cyan
++ keyword whole tune2fs cyan
++ keyword whole tunelp cyan
++ keyword whole tzconfig cyan
++ keyword whole tzselect cyan
++ keyword whole tzsetup cyan
++ keyword whole ucf cyan
++ keyword whole ul cyan
+ keyword whole umount cyan
+ keyword whole uname cyan
++ keyword whole unarj cyan
++ keyword whole uncompress cyan
++ keyword whole unexpand cyan
++ keyword whole unicode_start cyan
++ keyword whole unicode_stop cyan
++ keyword whole unix_chkpwd cyan
++ keyword whole uniq cyan
++ keyword whole unlink cyan
++ keyword whole unzip cyan
++ keyword whole unzipsfx cyan
++ keyword whole updatedb cyan
++ keyword whole update-menus cyan
++ keyword whole update-modules cyan
++ keyword whole update-pciids cyan
++ keyword whole uprecords cyan
++ keyword whole uptime cyan
++ keyword whole urlview cyan
++ keyword whole usbmodules cyan
++ keyword whole uscan cyan
++ keyword whole useradd cyan
+ keyword whole userconf cyan
++ keyword whole userdel cyan
++ keyword whole usermod cyan
++ keyword whole users cyan
+ keyword whole usleep cyan
++ keyword whole uufilter cyan
++ keyword whole uuidgen cyan
++ keyword whole vacuumdb cyan
++ keyword whole validlocale cyan
++ keyword whole vcstime cyan
++ keyword whole vcut cyan
++ keyword whole vdir cyan
+ keyword whole vi cyan
++ keyword whole vidmode cyan
+ keyword whole view cyan
++ keyword whole vigr cyan
+ keyword whole vim cyan
++ keyword whole vipw cyan
++ keyword whole vlc cyan
++ keyword whole vmstat cyan
++ keyword whole volname cyan
++ keyword whole vorbiscomment cyan
++ keyword whole vt-is-UTF8 cyan
++ keyword whole w cyan
++ keyword whole wall cyan
++ keyword whole watch cyan
++ keyword whole wc cyan
++ keyword whole wget cyan
++ keyword whole whatis cyan
++ keyword whole whereis cyan
++ keyword whole which cyan
++ keyword whole whiptail cyan
++ keyword whole who cyan
++ keyword whole whoami cyan
++ keyword whole whois cyan
++ keyword whole wish cyan
++ keyword whole write cyan
++ keyword whole writevt cyan
++ keyword whole wvWare cyan
++ keyword whole wxvlc cyan
++ keyword whole xargs cyan
++ keyword whole xbmbrowser cyan
++ keyword whole xbindkeys cyan
+ keyword whole xconf cyan
++ keyword whole xdfcopy cyan
++ keyword whole xdfformat cyan
++ keyword whole Xdialog cyan
++ keyword whole xgettext cyan
++ keyword whole xloadimage cyan
++ keyword whole xmessage cyan
++ keyword whole xmodmap cyan
++ keyword whole xmms cyan
++ keyword whole xpmroot cyan
++ keyword whole xrdb cyan
++ keyword whole xset cyan
++ keyword whole xsetbg cyan
++ keyword whole xsetmode cyan
++ keyword whole xsetpointer cyan
++ keyword whole xsetroot cyan
++ keyword whole xterm cyan
++ keyword whole xview cyan
++ keyword whole xwd cyan
++ keyword whole xwud cyan
++ keyword whole xzgv cyan
++ keyword whole yes cyan
+ keyword whole ypdomainname cyan
++ keyword whole yydecode cyan
+ keyword whole zcat cyan
++ keyword whole zcmp cyan
++ keyword whole zdiff cyan
++ keyword whole zdump cyan
++ keyword whole zegrep cyan
++ keyword whole zfgrep cyan
++ keyword whole zforce cyan
++ keyword whole zgrep cyan
++ keyword whole zgv cyan
++ keyword whole zic cyan
++ keyword whole zip cyan
++ keyword whole zipcloak cyan
++ keyword whole zipgrep cyan
++ keyword whole zipinfo cyan
++ keyword whole zipnote cyan
++ keyword whole zipsplit cyan
++ keyword whole zless cyan
++ keyword whole zmore cyan
++ keyword whole znew cyan
++ keyword whole zoo cyan
+ keyword whole zsh cyan
++ keyword whole zsoelim cyan
++ keyword whole zxpdf cyan
+
+-wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
++ keyword whole pamcut cyan
++ keyword whole pamdeinterlace cyan
++ keyword whole pamdice cyan
++ keyword whole pamfile cyan
++ keyword whole pamoil cyan
++ keyword whole pamstack cyan
++ keyword whole pamstretch cyan
++ keyword whole pamstretch-gen cyan
+
+-context linestart #! \n brightcyan black
++ keyword whole pbmclean cyan
++ keyword whole pbmlife cyan
++ keyword whole pbmmake cyan
++ keyword whole pbmmask cyan
++ keyword whole pbmpage cyan
++ keyword whole pbmpscale cyan
++ keyword whole pbmreduce cyan
++ keyword whole pbmtext cyan
++ keyword whole pbmtextps cyan
++ keyword whole pbmupc cyan
++
++ keyword whole pbmtoascii cyan
++ keyword whole pbmtoepsi cyan
++ keyword whole pbmtog3 cyan
++ keyword whole pbmtoicon cyan
++ keyword whole pbmtolj cyan
++ keyword whole pbmtomacp cyan
++ keyword whole pbmtonokia cyan
++ keyword whole pbmtopgm cyan
++ keyword whole pbmtoplot cyan
++ keyword whole pbmtoppa cyan
++ keyword whole pbmtopsg3 cyan
++ keyword whole pbmtowbmp cyan
++ keyword whole pbmtoxbm cyan
++
++ keyword whole g3topbm cyan
++ keyword whole thinkjettopbm cyan
++ keyword whole wbmptopbm cyan
++ keyword whole xbmtopbm cyan
++
++ keyword whole pgmbentley cyan
++ keyword whole pgmcrater cyan
++ keyword whole pgmedge cyan
++ keyword whole pgmenhance cyan
++ keyword whole pgmhist cyan
++ keyword whole pgmkernel cyan
++ keyword whole pgmnoise cyan
++ keyword whole pgmnorm cyan
++ keyword whole pgmoil cyan
++ keyword whole pgmramp cyan
++ keyword whole pgmslice cyan
++ keyword whole pgmtexture cyan
++
++ keyword whole pgmtopbm cyan
++ keyword whole pgmtoppm cyan
++
++ keyword whole asciitopgm cyan
++ keyword whole bioradtopgm cyan
++ keyword whole icontopgm cyan
++ keyword whole jpegtopgm cyan
++ keyword whole macptopgm cyan
++ keyword whole rawtopgm cyan
++
++ keyword whole pnmalias cyan
++ keyword whole pnmarith cyan
++ keyword whole pnmcat cyan
++ keyword whole pnmcolormap cyan
++ keyword whole pnmcomp cyan
++ keyword whole pnmconvol cyan
++ keyword whole pnmcrop cyan
++ keyword whole pnmcut cyan
++ keyword whole pnmdepth cyan
++ keyword whole pnmenlarge cyan
++ keyword whole pnmfile cyan
++ keyword whole pnmflip cyan
++ keyword whole pnmgamma cyan
++ keyword whole pnmhisteq cyan
++ keyword whole pnmhistmap cyan
++ keyword whole pnmindex cyan
++ keyword whole pnminterp cyan
++ keyword whole pnminterp-gen cyan
++ keyword whole pnminvert cyan
++ keyword whole pnmmargin cyan
++ keyword whole pnmmontage cyan
++ keyword whole pnmnlfilt cyan
++ keyword whole pnmnoraw cyan
++ keyword whole pnmnorm cyan
++ keyword whole pnmpad cyan
++ keyword whole pnmpaste cyan
++ keyword whole pnmpsnr cyan
++ keyword whole pnmquant cyan
++ keyword whole pnmremap cyan
++ keyword whole pnmrotate cyan
++ keyword whole pnmscale cyan
++ keyword whole pnmscalefixed cyan
++ keyword whole pnmshear cyan
++ keyword whole pnmsmooth cyan
++ keyword whole pnmsplit cyan
++ keyword whole pnmtile cyan
++
++ keyword whole pnmtofits cyan
++ keyword whole pnmtojpeg cyan
++ keyword whole pnmtopalm cyan
++ keyword whole pnmtoplainpnm cyan
++ keyword whole pnmtopng cyan
++ keyword whole pnmtops cyan
++ keyword whole pnmtorle cyan
++ keyword whole pnmtotiff cyan
++ keyword whole pnmtoxwd cyan
++
++ keyword whole bpmtopnm cyan
++ keyword whole giftopnm cyan
++ keyword whole palmtopnm cyan
++ keyword whole pngtopnm cyan
++ keyword whole pstopnm cyan
++ keyword whole rletopnm cyan
++ keyword whole tifftopnm cyan
++ keyword whole xwdtopnm cyan
++
++ keyword whole ppm3d cyan
++ keyword whole ppmbrighten cyan
++ keyword whole ppmchange cyan
++ keyword whole ppmcie cyan
++ keyword whole ppmcolormask cyan
++ keyword whole ppmcolors cyan
++ keyword whole ppmdim cyan
++ keyword whole ppmdist cyan
++ keyword whole ppmdither cyan
++ keyword whole ppmfade cyan
++ keyword whole ppmflash cyan
++ keyword whole ppmforge cyan
++ keyword whole ppmhist cyan
++ keyword whole ppmlabel cyan
++ keyword whole ppmmake cyan
++ keyword whole ppmmix cyan
++ keyword whole ppmnorm cyan
++ keyword whole ppmntsc cyan
++ keyword whole ppmpat cyan
++ keyword whole ppmquant cyan
++ keyword whole ppmquantall cyan
++ keyword whole ppmqvgq cyan
++ keyword whole ppmrainbow cyan
++ keyword whole ppmrelief cyan
++ keyword whole ppmshadow cyan
++ keyword whole ppmshift cyan
++ keyword whole ppmspread cyan
++ keyword whole ppmtv cyan
++
++ keyword whole ppmtoacad cyan
++ keyword whole ppmtobmp cyan
++ keyword whole ppmtogif cyan
++ keyword whole ppmtojpeg cyan
++ keyword whole ppmtolj cyan
++ keyword whole ppmtomap cyan
++ keyword whole ppmtompeg cyan
++ keyword whole ppmtopcx cyan
++ keyword whole ppmtopgm cyan
++ keyword whole ppmtorgb3 cyan
++ keyword whole ppmtowinicon cyan
++ keyword whole ppmtoxpm cyan
++
++ keyword whole bpmtoppm cyan
++ keyword whole pcxtoppm cyan
++ keyword whole pdftoppm cyan
++ keyword whole pjtoppm cyan
++ keyword whole rawtoppm cyan
++ keyword whole rgb3toppm cyan
++ keyword whole winicontoppm cyan
++ keyword whole xpmtoppm cyan
++ keyword whole xvminitoppm cyan
++
++ keyword whole gpg red
++ keyword whole md5sum red
++ keyword whole openssl red
++ keyword whole ssh red
++ keyword whole scp red
++
++ keyword whole gettext.sh magenta
++ keyword whole TEXTDOMAINDIR magenta
++ keyword whole TEXTDOMAIN magenta
++ keyword whole VERSION magenta
++
++ keyword whole /dev/audio brightblue
++ keyword whole /dev/dsp brightblue
++ keyword whole /dev/null brightblue
++ keyword whole /dev/mixed brightblue
++ keyword whole /dev/stdin brightblue
++ keyword whole /dev/stdout brightblue
++ keyword whole /dev/stderr brightblue
++ keyword whole /dev/zero brightblue
++
++wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
+
+ context # \n brown
+ spellcheck
+@@ -215,6 +1133,10 @@
+ keyword $! brightred
+ keyword $_ brightred
+
++ keyword whole 2>&1 brightred
++ keyword whole 2> brightred
++ keyword whole 1> brightred
++
+ keyword wholeright $\[0123456789\] brightred
+
+ keyword wholeright $+ brightgreen
+@@ -225,7 +1147,9 @@
+
+ keyword whole break yellow
+ keyword whole case yellow
++ keyword whole clear yellow
+ keyword whole continue yellow
++ keyword whole declare yellow
+ keyword whole done yellow
+ keyword whole do yellow
+ keyword whole elif yellow
+@@ -234,105 +1158,1024 @@
+ keyword whole exit yellow
+ keyword whole fi yellow
+ keyword whole for yellow
++ keyword whole getopts yellow
+ keyword whole if yellow
+ keyword whole in yellow
+ keyword whole return yellow
+ keyword whole select yellow
+ keyword whole shift yellow
++ keyword whole source yellow
+ keyword whole then yellow
+ keyword whole trap yellow
+ keyword whole until yellow
++ keyword whole wait yellow
+ keyword whole while yellow
+
++ keyword whole accept cyan
++ keyword whole accessdb cyan
++ keyword whole activate cyan
++ keyword whole addgroup cyan
++ keyword whole add-shell cyan
++ keyword whole adduser cyan
++ keyword whole anytopnm cyan
++ keyword whole apropos cyan
++ keyword whole apt-cache cyan
++ keyword whole apt-cdrom cyan
++ keyword whole apt-config cyan
++ keyword whole apt-file cyan
++ keyword whole apt-ftparchive cyan
++ keyword whole apt-get cyan
++ keyword whole aptitude cyan
++ keyword whole apt-sortpkgs cyan
++ keyword whole apt-source cyan
++ keyword whole ar cyan
+ keyword whole arch cyan
++ keyword whole arp cyan
++ keyword whole as cyan
+ keyword whole ash cyan
++ keyword whole at cyan
++ keyword whole atd cyan
++ keyword whole atrun cyan
++ keyword whole atq cyan
++ keyword whole autoconf cyan
++ keyword whole autoheader cyan
++ keyword whole automake cyan
++ keyword whole autopoint cyan
++ keyword whole autoscan cyan
+ keyword whole awk cyan
++ keyword whole badblocks cyan
++ keyword whole base64-decode cyan
++ keyword whole base64-encode cyan
+ keyword whole basename cyan
+ keyword whole bash cyan
++ keyword whole batch cyan
++ keyword whole bc cyan
+ keyword whole bg_backup cyan
+ keyword whole bg_restore cyan
++ keyword whole blockdev cyan
++ keyword whole bootlogd cyan
++ keyword whole bsd-write cyan
+ keyword whole bsh cyan
++ keyword whole bunzip2 cyan
++ keyword whole bzcat cyan
++ keyword whole bzcmp cyan
++ keyword whole bzdiff cyan
++ keyword whole bzegrep cyan
++ keyword whole bzexe cyan
++ keyword whole bzfgrep cyan
++ keyword whole bzgrep cyan
++ keyword whole bzip cyan
++ keyword whole bzip2 cyan
++ keyword whole bzip2recover cyan
++ keyword whole bzless cyan
++ keyword whole bzmore cyan
++ keyword whole cabextract cyan
++ keyword whole cal cyan
++ keyword whole calendar cyan
++ keyword whole cam cyan
++ keyword whole cancel cyan
++ keyword whole captoinfo cyan
+ keyword whole cat cyan
++ keyword whole catchsegv cyan
++ keyword whole catman cyan
+ keyword whole cd cyan
++ keyword whole cdda2ogg cyan
++ keyword whole cdda2mp3 cyan
++ keyword whole cdda2wav cyan
++ keyword whole cdrecord cyan
++ keyword whole cfdisk cyan
++ keyword whole chage cyan
++ keyword whole charset cyan
++ keyword whole chattr cyan
++ keyword whole checkbashisms cyan
++ keyword whole chfn cyan
+ keyword whole chgrp cyan
++ keyword whole chkdupexe cyan
+ keyword whole chmod cyan
+ keyword whole chown cyan
++ keyword whole chpasswd cyan
++ keyword whole chroot cyan
++ keyword whole chsh cyan
++ keyword whole chvt cyan
++ keyword whole cksum cyan
++ keyword whole clear cyan
++ keyword whole cmp cyan
++ keyword whole codepage cyan
++ keyword whole col cyan
++ keyword whole colcrt cyan
++ keyword whole colrm cyan
++ keyword whole column cyan
++ keyword whole comm cyan
++ keyword whole compose cyan
++ keyword whole compress cyan
++ keyword whole consolechars cyan
+ keyword whole cp cyan
++ keyword whole cpan cyan
++ keyword whole cpgr cyan
+ keyword whole cpio cyan
++ keyword whole cpp cyan
++ keyword whole cramfsck cyan
++ keyword whole createdb cyan
++ keyword whole createlang cyan
++ keyword whole createuser cyan
++ keyword whole c_rehash cyan
++ keyword whole crontab cyan
+ keyword whole csh cyan
++ keyword whole csplit cyan
++ keyword whole cupsaccept cyan
++ keyword whole cupsaddsmb cyan
++ keyword whole cupsd cyan
++ keyword whole cupsreject cyan
++ keyword whole curl cyan
++ keyword whole cut cyan
+ keyword whole date cyan
++ keyword whole dash cyan
++ keyword whole dch cyan
+ keyword whole dd cyan
++ keyword whole deallocvt cyan
++ keyword whole debugfs cyan
++ keyword whole delgroup cyan
++ keyword whole deluser cyan
++ keyword whole depmod cyan
++ keyword whole devdump cyan
+ keyword whole df cyan
++ keyword whole dialog cyan
++ keyword whole diff cyan
++ keyword whole diff3 cyan
++ keyword whole dir cyan
++ keyword whole dircolors cyan
++ keyword whole directomatic cyan
++ keyword whole dirname cyan
++ keyword whole dirsplit cyan
++ keyword whole disable cyan
++ keyword whole diskd cyan
++ keyword whole diskseekd cyan
++ keyword whole disown cyan
+ keyword whole dmesg cyan
+ keyword whole dnsdomainname cyan
+ keyword whole doexec cyan
+ keyword whole domainname cyan
++ keyword whole dosfsck cyan
++ keyword whole dotextwrap cyan
++ keyword whole dotlockfile cyan
++ keyword whole dpasswd cyan
++ keyword whole dpkg cyan
++ keyword whole dpkg-architekture cyan
++ keyword whole dpkg-buildpackage cyan
++ keyword whole dpkg-deb cyan
++ keyword whole dpkg-name cyan
++ keyword whole dpkg-query cyan
++ keyword whole dpkg-reconfigure cyan
++ keyword whole dpkg-scanpackages cyan
++ keyword whole dpkg-scansources cyan
++ keyword whole dpkg-split cyan
++ keyword whole dpkg-source cyan
++ keyword whole dropdb cyan
++ keyword whole droplang cyan
++ keyword whole dropuser cyan
++ keyword whole dscverify cyan
++ keyword whole du cyan
++ keyword whole dumpe2fs cyan
++ keyword whole dumpkeys cyan
++ keyword whole dvipdf cyan
++ keyword whole e2fsck cyan
++ keyword whole e2image cyan
++ keyword whole e2label cyan
+ keyword whole echo cyan
+ keyword whole ed cyan
++ keyword whole edit cyan
++ keyword whole editor cyan
+ keyword whole egrep cyan
++ keyword whole eject cyan
++ keyword whole enable cyan
++ keyword whole env cyan
++ keyword whole envsubst cyan
++ keyword whole eqn cyan
++ keyword whole eval_gettext cyan
+ keyword whole ex cyan
++ keyword whole expand cyan
++ keyword whole expiry cyan
++ keyword whole expr cyan
++ keyword whole factor cyan
++ keyword whole fakeroot cyan
++ keyword whole faillog cyan
+ keyword whole false cyan
++ keyword whole fbset cyan
++ keyword whole fc-cache cyan
++ keyword whole fc-list cyan
++ keyword whole fc-match cyan
++ keyword whole fdformat cyan
++ keyword whole fdisk cyan
++ keyword whole fdlist cyan
++ keyword whole fdmount cyan
++ keyword whole fdmountd cyan
++ keyword whole fdrawcmd cyan
++ keyword whole fdumount cyan
++ keyword whole fetchmail cyan
++ keyword whole fgconsole cyan
+ keyword whole fgrep cyan
++ keyword whole file cyan
++ keyword whole filefrag cyan
+ keyword whole find cyan
++ keyword whole find2perl cyan
++ keyword whole findfs cyan
++ keyword whole fitstopnm cyan
++ keyword whole floppycontrol cyan
++ keyword whole floppymeter cyan
++ keyword whole fmt cyan
++ keyword whole fold cyan
++ keyword whole font2psf cyan
++ keyword whole formail cyan
++ keyword whole fping cyan
++ keyword whole fping6 cyan
++ keyword whole free cyan
++ keyword whole freeze cyan
++ keyword whole fribidi cyan
++ keyword whole from cyan
++ keyword whole fsck cyan
++ keyword whole fsck.cramfs cyan
++ keyword whole fsck.ext2 cyan
++ keyword whole fsck.ext3 cyan
++ keyword whole fsck.minix cyan
++ keyword whole fsck.msdos cyan
++ keyword whole fsck.nfs cyan
++ keyword whole fsck.vfat cyan
+ keyword whole fsconf cyan
++ keyword whole funzip cyan
++ keyword whole fuser cyan
++ keyword whole fvwm cyan
+ keyword whole gawk cyan
++ keyword whole gdb cyan
++ keyword whole gdbtui cyan
++ keyword whole gcc cyan
++ keyword whole gcov cyan
++ keyword whole genksyms cyan
++ keyword whole getconf cyan
++ keyword whole getent cyan
++ keyword whole getfdprm cyan
++ keyword whole getkeycodes cyan
++ keyword whole getopt cyan
++ keyword whole gettext cyan
++ keyword whole gettextize cyan
++ keyword whole getty cyan
++ keyword whole gpasswd cyan
++ keyword whole gpgsplit cyan
++ keyword whole gpgv cyan
++ keyword whole gprof cyan
+ keyword whole grep cyan
++ keyword whole groff cyan
++ keyword whole groupadd cyan
++ keyword whole groupdel cyan
++ keyword whole groupmod cyan
++ keyword whole groups cyan
++ keyword whole grpck cyan
++ keyword whole grpconv cyan
++ keyword whole grpunconv cyan
++ keyword whole gs cyan
++ keyword whole gsbj cyan
++ keyword whole gsdj cyan
++ keyword whole gsdj500 cyan
++ keyword whole gs-gpl cyan
++ keyword whole gslj cyan
++ keyword whole gslp cyan
++ keyword whole gsmctl cyan
++ keyword whole gsmpb cyan
++ keyword whole gsmsendsms cyan
++ keyword whole gsmsiectl cyan
++ keyword whole gsmsiexfer cyan
++ keyword whole gsmsmsd cyan
++ keyword whole gsmsmsstore cyan
++ keyword whole gsnd cyan
+ keyword whole gunzip cyan
++ keyword whole gzexe cyan
+ keyword whole gzip cyan
++ keyword whole ha cyan
++ keyword whole halt cyan
++ keyword whole hd cyan
++ keyword whole hdparm cyan
++ keyword whole hddtemp cyan
++ keyword whole head cyan
++ keyword whole hexdump cyan
++ keyword whole hman cyan
++ keyword whole host cyan
++ keyword whole hostid cyan
+ keyword whole hostname cyan
++ keyword whole hotkeys cyan
++ keyword whole html2text cyan
++ keyword whole hwclock cyan
++ keyword whole iconv cyan
++ keyword whole iconvconfig cyan
++ keyword whole id cyan
++ keyword whole ifconfig cyan
++ keyword whole ifdown cyan
++ keyword whole ifnames cyan
++ keyword whole ifup cyan
+ keyword whole igawk cyan
++ keyword whole info cyan
++ keyword whole infobrowser cyan
++ keyword whole infocmp cyan
++ keyword whole infokey cyan
++ keyword whole infotocap cyan
++ keyword whole init cyan
++ keyword whole insmod cyan
++ keyword whole install cyan
++ keyword whole installkernel cyan
++ keyword whole install-menu cyan
+ keyword whole ipcalc cyan
++ keyword whole ipcs cyan
++ keyword whole ipmaddr cyan
++ keyword whole ippool cyan
++ keyword whole iptables cyan
++ keyword whole iptunnel cyan
++ keyword whole isoinfo cyan
++ keyword whole join cyan
++ keyword whole kallsyms cyan
++ keyword whole kbdconfig cyan
++ keyword whole kbd_mode cyan
++ keyword whole kbdrate cyan
++ keyword whole klogd cyan
++ keyword whole kernelversion cyan
+ keyword whole kill cyan
++ keyword whole killall cyan
+ keyword whole ksh cyan
++ keyword whole ksyms cyan
++ keyword whole lame cyan
++ keyword whole last cyan
++ keyword whole lastb cyan
++ keyword whole lastlog cyan
++ keyword whole ld cyan
++ keyword whole ldconfig cyan
++ keyword whole ldd cyan
++ keyword whole less cyan
++ keyword whole lessecho cyan
++ keyword whole lessfile cyan
++ keyword whole lesskey cyan
++ keyword whole lesspipe cyan
++ keyword whole lharc cyan
++ keyword whole libtool cyan
++ keyword whole lilo cyan
++ keyword whole line cyan
++ keyword whole link cyan
++ keyword whole links2 cyan
++ keyword whole linux_logo cyan
+ keyword whole linuxconf cyan
++ keyword whole list_audio_tracks cyan
+ keyword whole ln cyan
++ keyword whole loadkeys cyan
++ keyword whole locale cyan
++ keyword whole localedef cyan
++ keyword whole locale-gen cyan
++ keyword whole locate cyan
++ keyword whole lockfile cyan
++ keyword whole logger cyan
+ keyword whole login cyan
++ keyword whole logname cyan
++ keyword whole logrotate cyan
++ keyword whole logsave cyan
++ keyword whole look cyan
++ keyword whole lorder cyan
++ keyword whole losetup cyan
++ keyword whole lp cyan
++ keyword whole lpadmin cyan
++ keyword whole lpc cyan
+ keyword whole lpdconf cyan
++ keyword whole lpdomatic cyan
++ keyword whole lpinfo cyan
++ keyword whole lpmove cyan
++ keyword whole lpoptions cyan
++ keyword whole lppasswd cyan
++ keyword whole lpq cyan
++ keyword whole lpr cyan
++ keyword whole lprm cyan
++ keyword whole lprsetup cyan
++ keyword whole lpstat cyan
+ keyword whole ls cyan
++ keyword whole lsattr cyan
++ keyword whole lsmod cyan
++ keyword whole lspci cyan
++ keyword whole lsusb cyan
++ keyword whole lynx cyan
++ keyword whole MAKEDEV cyan
++ keyword whole MAKEFLOPPIES cyan
+ keyword whole mail cyan
++ keyword whole mailq cyan
++ keyword whole mailstat cyan
++ keyword whole mailx cyan
++ keyword whole make cyan
++ keyword whole make-kpkg cyan
++ keyword whole man cyan
++ keyword whole man2html cyan
++ keyword whole manpath cyan
++ keyword whole mawk cyan
++ keyword whole mc cyan
++ keyword whole mcedit cyan
++ keyword whole mcookie cyan
++ keyword whole mcview cyan
++ keyword whole mcmfmt cyan
++ keyword whole memstat cyan
++ keyword whole mergechanges cyan
++ keyword whole mesg cyan
++ keyword whole mev cyan
++ keyword whole mkboot cyan
++ keyword whole mkfifo cyan
++ keyword whole mkhybrid cyan
++ keyword whole mkisofs cyan
++ keyword whole mk_modmap cyan
++ keyword whole mkpasswd cyan
++ keyword whole mii-tool cyan
++ keyword whole mimedecode cyan
++ keyword whole mkcramfs cyan
+ keyword whole mkdir cyan
++ keyword whole mkdirhier cyan
++ keyword whole mkfs cyan
++ keyword whole mkfs.cramfs cyan
++ keyword whole mkfs.ext2 cyan
++ keyword whole mkfs.ext3 cyan
++ keyword whole mkfs.minix cyan
++ keyword whole mkfs.msdos cyan
++ keyword whole mkfs.vfat cyan
++ keyword whole mke2fs cyan
++ keyword whole mkdosfs cyan
++ keyword whole mkinitrd cyan
+ keyword whole mknod cyan
++ keyword whole mkrescue cyan
++ keyword whole mkswap cyan
+ keyword whole mktemp cyan
++ keyword whole modconf cyan
++ keyword whole modinfo cyan
++ keyword whole modprobe cyan
+ keyword whole more cyan
+ keyword whole mount cyan
++ keyword whole mountpoint cyan
++ keyword whole mozilla cyan
++ keyword whole mp3info cyan
++ keyword whole mpexpand cyan
++ keyword whole munpack cyan
++ keyword whole msgattrib cyan
++ keyword whole msgcat cyan
++ keyword whole msgcmp cyan
++ keyword whole msgcomm cyan
++ keyword whole msgconv cyan
++ keyword whole msgen cyan
++ keyword whole msgexec cyan
++ keyword whole msgfilter cyan
++ keyword whole msgfmt cyan
++ keyword whole msggrep cyan
++ keyword whole msginit cyan
++ keyword whole msgmerge cyan
++ keyword whole msgunfmt cyan
++ keyword whole msguniq cyan
++ keyword whole msmtp cyan
+ keyword whole mt cyan
++ keyword whole mt-gnu cyan
++ keyword whole mtrace cyan
++ keyword whole mute cyan
++ keyword whole mutt cyan
+ keyword whole mv cyan
++ keyword whole nameif cyan
++ keyword whole namei cyan
++ keyword whole nano cyan
++ keyword whole nawk cyan
++ keyword whole ncal cyan
++ keyword whole neqn cyan
+ keyword whole netconf cyan
+ keyword whole netstat cyan
++ keyword whole newaliases cyan
++ keyword whole newgrp cyan
++ keyword whole newusers cyan
++ keyword whole nex cyan
++ keyword whole nfsstat cyan
++ keyword whole ngettext cyan
+ keyword whole nice cyan
+ keyword whole nisdomainname cyan
++ keyword whole nl cyan
++ keyword whole nm cyan
++ keyword whole nohup cyan
++ keyword whole nroff cyan
++ keyword whole nsmod cyan
++ keyword whole nvi cyan
++ keyword whole nview cyan
++ keyword whole objcopy cyan
++ keyword whole objdump cyan
++ keyword whole od cyan
++ keyword whole ogg123 cyan
++ keyword whole oggdec cyan
++ keyword whole oggenc cyan
++ keyword whole ogginfo cyan
++ keyword whole open cyan
++ keyword whole openvt cyan
++ keyword whole pager cyan
++ keyword whole pam_getenv cyan
++ keyword whole paperconf cyan
++ keyword whole par cyan
++ keyword whole passwd cyan
++ keyword whole paste cyan
++ keyword whole patch cyan
++ keyword whole pathchk cyan
++ keyword whole pcimodules cyan
++ keyword whole pcretest cyan
++ keyword whole pdfinfo cyan
++ keyword whole perl cyan
++ keyword whole perldoc cyan
++ keyword whole pg cyan
++ keyword whole pgrep cyan
++ keyword whole pic cyan
++ keyword whole pico cyan
++ keyword whole piconv cyan
++ keyword whole pidof cyan
++ keyword whole pinfo cyan
+ keyword whole ping cyan
++ keyword whole pkill cyan
++ keyword whole pmap cyan
++ keyword whole portmap cyan
++ keyword whole poweroff cyan
++ keyword whole pr cyan
++ keyword whole print cyan
++ keyword whole printenv cyan
++ keyword whole printf cyan
++ keyword whole procmail cyan
++ keyword whole prove cyan
+ keyword whole ps cyan
++ keyword whole psed cyan
++ keyword whole psql cyan
++ keyword whole pstree cyan
++ keyword whole pstruct cyan
++ keyword whole ptx cyan
++ keyword whole pwconv cyan
++ keyword whole pwck cyan
+ keyword whole pwd cyan
++ keyword whole pwunconv cyan
++ keyword whole ramsize cyan
++ keyword whole ranlib cyan
++ keyword whole rar cyan
++ keyword whole rarp cyan
++ keyword whole raw cyan
++ keyword whole rbash cyan
++ keyword whole rcp cyan
++ keyword whole rdev cyan
++ keyword whole readcd cyan
++ keyword whole readelf cyan
++ keyword whole readlink cyan
++ keyword whole readprofile cyan
++ keyword whole reboot cyan
+ keyword whole red cyan
++ keyword whole regcomp cyan
++ keyword whole reject cyan
+ keyword whole remadmin cyan
++ keyword whole remove-shell cyan
++ keyword whole rename cyan
++ keyword whole renice cyan
++ keyword whole reset cyan
++ keyword whole resize2fs cyan
++ keyword whole rev cyan
++ keyword whole revpath cyan
++ keyword whole rgrep cyan
++ keyword whole rlogin cyan
+ keyword whole rm cyan
+ keyword whole rmdir cyan
++ keyword whole rmmod cyan
++ keyword whole rmt cyan
++ keyword whole route cyan
++ keyword whole rpcgen cyan
++ keyword whole rpcinfo cyan
++ keyword whole rplay cyan
++ keyword whole rplayd cyan
++ keyword whole rplaydsp cyan
+ keyword whole rpm cyan
++ keyword whole rpm2cpio cyan
++ keyword whole rptp cyan
++ keyword whole rsh cyan
++ keyword whole rstartd cyan
++ keyword whole runlevel cyan
++ keyword whole run-mailcap cyan
++ keyword whole run-parts cyan
++ keyword whole savelog cyan
++ keyword whole scanimage cyan
++ keyword whole scanpci cyan
++ keyword whole screendump cyan
++ keyword whole script cyan
++ keyword whole scriptreplay cyan
++ keyword whole sdiff cyan
+ keyword whole sed cyan
++ keyword whole see cyan
++ keyword whole sendmail cyan
++ keyword whole seq cyan
+ keyword whole set cyan
++ keyword whole setfdprm cyan
++ keyword whole setkeycodes cyan
++ keyword whole setleds cyan
++ keyword whole setlogcons cyan
++ keyword whole setmetamode cyan
++ keyword whole setpci cyan
+ keyword whole setserial cyan
++ keyword whole setsid cyan
++ keyword whole setterm cyan
++ keyword whole setvesablank cyan
++ keyword whole setxkbmap cyan
++ keyword whole sfdisk cyan
++ keyword whole sftp cyan
++ keyword whole sg cyan
+ keyword whole sh cyan
++ keyword whole sha1sum cyan
++ keyword whole shadowconfig cyan
++ keyword whole showcfont cyan
++ keyword whole showkey cyan
++ keyword whole showmount cyan
++ keyword whole shred cyan
++ keyword whole shutdown cyan
++ keyword whole size cyan
++ keyword whole skill cyan
++ keyword whole slabtop cyan
++ keyword whole slattach cyan
+ keyword whole sleep cyan
++ keyword whole slogin cyan
++ keyword whole smime_keys cyan
++ keyword whole snice cyan
++ keyword whole soelim cyan
+ keyword whole sort cyan
++ keyword whole sa-learn cyan
++ keyword whole spamassassin cyan
++ keyword whole spamc cyan
++ keyword whole spamd cyan
++ keyword whole splain cyan
++ keyword whole split cyan
++ keyword whole ssh-add cyan
++ keyword whole ssh-copy-id cyan
++ keyword whole ssh-keygen cyan
++ keyword whole ssh-keyscan cyan
++ keyword whole ssmtp cyan
++ keyword whole start-stop-daemon cyan
++ keyword whole stat cyan
++ keyword whole strace cyan
++ keyword whole strings cyan
++ keyword whole strip cyan
+ keyword whole stty cyan
+ keyword whole su cyan
++ keyword whole sulogin cyan
++ keyword whole sum cyan
++ keyword whole superformat cyan
++ keyword whole su-to-root cyan
++ keyword whole svlc cyan
++ keyword whole swapoff cyan
++ keyword whole swapon cyan
+ keyword whole sync cyan
++ keyword whole sysctl cyan
++ keyword whole syslogd cyan
++ keyword whole syslogd-listfiles cyan
++ keyword whole syslog-facility cyan
++ keyword whole tac cyan
++ keyword whole tack cyan
++ keyword whole tail cyan
+ keyword whole taper cyan
+ keyword whole tar cyan
++ keyword whole tbl cyan
++ keyword whole tcpdchk cyan
++ keyword whole tcpdump cyan
++ keyword whole tclsh cyan
+ keyword whole tcsh cyan
++ keyword whole tdbox cyan
++ keyword whole tdcheckserver cyan
++ keyword whole tddebidate cyan
++ keyword whole tdfileview cyan
++ keyword whole tdfmlogstrip cyan
++ keyword whole tdformail cyan
++ keyword whole tdlinuxcounter cyan
++ keyword whole tdlinuxlogo cyan
++ keyword whole tdmailblacklist cyan
++ keyword whole tdmailbody cyan
++ keyword whole tdmailcopy cyan
++ keyword whole tdmaildirmake cyan
++ keyword whole tdmailsubject cyan
++ keyword whole tdmailwhitelist cyan
++ keyword whole tdnewmsg cyan
++ keyword whole tdsysbackup cyan
++ keyword whole tee cyan
++ keyword whole telinit cyan
++ keyword whole telnet cyan
+ keyword whole test cyan
++ keyword whole tempfile cyan
++ keyword whole tic cyan
+ keyword whole time cyan
++ keyword whole tload cyan
++ keyword whole tnef cyan
++ keyword whole toe cyan
++ keyword whole toolame cyan
++ keyword whole top cyan
+ keyword whole touch cyan
++ keyword whole tput cyan
++ keyword whole tr cyan
++ keyword whole troff cyan
+ keyword whole true cyan
++ keyword whole tset cyan
++ keyword whole tsort cyan
++ keyword whole tty cyan
++ keyword whole tunctl cyan
++ keyword whole tune2fs cyan
++ keyword whole tunelp cyan
++ keyword whole tzconfig cyan
++ keyword whole tzselect cyan
++ keyword whole tzsetup cyan
++ keyword whole ucf cyan
++ keyword whole ul cyan
+ keyword whole umount cyan
+ keyword whole uname cyan
++ keyword whole unarj cyan
++ keyword whole uncompress cyan
++ keyword whole unexpand cyan
++ keyword whole unicode_start cyan
++ keyword whole unicode_stop cyan
++ keyword whole unix_chkpwd cyan
++ keyword whole uniq cyan
++ keyword whole unlink cyan
++ keyword whole unzip cyan
++ keyword whole unzipsfx cyan
++ keyword whole updatedb cyan
++ keyword whole update-menus cyan
++ keyword whole update-modules cyan
++ keyword whole update-pciids cyan
++ keyword whole uprecords cyan
++ keyword whole uptime cyan
++ keyword whole urlview cyan
++ keyword whole usbmodules cyan
++ keyword whole uscan cyan
++ keyword whole useradd cyan
+ keyword whole userconf cyan
++ keyword whole userdel cyan
++ keyword whole usermod cyan
++ keyword whole users cyan
+ keyword whole usleep cyan
++ keyword whole uufilter cyan
++ keyword whole uuidgen cyan
++ keyword whole vacuumdb cyan
++ keyword whole validlocale cyan
++ keyword whole vcstime cyan
++ keyword whole vcut cyan
++ keyword whole vdir cyan
+ keyword whole vi cyan
++ keyword whole vidmode cyan
+ keyword whole view cyan
++ keyword whole vigr cyan
+ keyword whole vim cyan
++ keyword whole vipw cyan
++ keyword whole vlc cyan
++ keyword whole vmstat cyan
++ keyword whole volname cyan
++ keyword whole vorbiscomment cyan
++ keyword whole vt-is-UTF8 cyan
++ keyword whole w cyan
++ keyword whole wall cyan
++ keyword whole watch cyan
++ keyword whole wc cyan
++ keyword whole wget cyan
++ keyword whole whatis cyan
++ keyword whole whereis cyan
++ keyword whole which cyan
++ keyword whole whiptail cyan
++ keyword whole who cyan
++ keyword whole whoami cyan
++ keyword whole whois cyan
++ keyword whole wish cyan
++ keyword whole write cyan
++ keyword whole writevt cyan
++ keyword whole wvWare cyan
++ keyword whole wxvlc cyan
++ keyword whole xargs cyan
++ keyword whole xbmbrowser cyan
++ keyword whole xbindkeys cyan
+ keyword whole xconf cyan
++ keyword whole xdfcopy cyan
++ keyword whole xdfformat cyan
++ keyword whole Xdialog cyan
++ keyword whole xgettext cyan
++ keyword whole xloadimage cyan
++ keyword whole xmessage cyan
++ keyword whole xmodmap cyan
++ keyword whole xmms cyan
++ keyword whole xpmroot cyan
++ keyword whole xrdb cyan
++ keyword whole xset cyan
++ keyword whole xsetbg cyan
++ keyword whole xsetmode cyan
++ keyword whole xsetpointer cyan
++ keyword whole xsetroot cyan
++ keyword whole xterm cyan
++ keyword whole xview cyan
++ keyword whole xwd cyan
++ keyword whole xwud cyan
++ keyword whole xzgv cyan
++ keyword whole yes cyan
+ keyword whole ypdomainname cyan
++ keyword whole yydecode cyan
+ keyword whole zcat cyan
++ keyword whole zcmp cyan
++ keyword whole zdiff cyan
++ keyword whole zdump cyan
++ keyword whole zegrep cyan
++ keyword whole zfgrep cyan
++ keyword whole zforce cyan
++ keyword whole zgrep cyan
++ keyword whole zgv cyan
++ keyword whole zic cyan
++ keyword whole zip cyan
++ keyword whole zipcloak cyan
++ keyword whole zipgrep cyan
++ keyword whole zipinfo cyan
++ keyword whole zipnote cyan
++ keyword whole zipsplit cyan
++ keyword whole zless cyan
++ keyword whole zmore cyan
++ keyword whole znew cyan
++ keyword whole zoo cyan
+ keyword whole zsh cyan
++ keyword whole zsoelim cyan
++ keyword whole zxpdf cyan
++
++ keyword whole pamcut cyan
++ keyword whole pamdeinterlace cyan
++ keyword whole pamdice cyan
++ keyword whole pamfile cyan
++ keyword whole pamoil cyan
++ keyword whole pamstack cyan
++ keyword whole pamstretch cyan
++ keyword whole pamstretch-gen cyan
++
++ keyword whole pbmclean cyan
++ keyword whole pbmlife cyan
++ keyword whole pbmmake cyan
++ keyword whole pbmmask cyan
++ keyword whole pbmpage cyan
++ keyword whole pbmpscale cyan
++ keyword whole pbmreduce cyan
++ keyword whole pbmtext cyan
++ keyword whole pbmtextps cyan
++ keyword whole pbmupc cyan
++
++ keyword whole pbmtoascii cyan
++ keyword whole pbmtoepsi cyan
++ keyword whole pbmtog3 cyan
++ keyword whole pbmtoicon cyan
++ keyword whole pbmtolj cyan
++ keyword whole pbmtomacp cyan
++ keyword whole pbmtonokia cyan
++ keyword whole pbmtopgm cyan
++ keyword whole pbmtoplot cyan
++ keyword whole pbmtoppa cyan
++ keyword whole pbmtopsg3 cyan
++ keyword whole pbmtowbmp cyan
++ keyword whole pbmtoxbm cyan
++
++ keyword whole g3topbm cyan
++ keyword whole thinkjettopbm cyan
++ keyword whole wbmptopbm cyan
++ keyword whole xbmtopbm cyan
++
++ keyword whole pgmbentley cyan
++ keyword whole pgmcrater cyan
++ keyword whole pgmedge cyan
++ keyword whole pgmenhance cyan
++ keyword whole pgmhist cyan
++ keyword whole pgmkernel cyan
++ keyword whole pgmnoise cyan
++ keyword whole pgmnorm cyan
++ keyword whole pgmoil cyan
++ keyword whole pgmramp cyan
++ keyword whole pgmslice cyan
++ keyword whole pgmtexture cyan
++
++ keyword whole pgmtopbm cyan
++ keyword whole pgmtoppm cyan
++
++ keyword whole asciitopgm cyan
++ keyword whole bioradtopgm cyan
++ keyword whole icontopgm cyan
++ keyword whole jpegtopgm cyan
++ keyword whole macptopgm cyan
++ keyword whole rawtopgm cyan
++
++ keyword whole pnmalias cyan
++ keyword whole pnmarith cyan
++ keyword whole pnmcat cyan
++ keyword whole pnmcolormap cyan
++ keyword whole pnmcomp cyan
++ keyword whole pnmconvol cyan
++ keyword whole pnmcrop cyan
++ keyword whole pnmcut cyan
++ keyword whole pnmdepth cyan
++ keyword whole pnmenlarge cyan
++ keyword whole pnmfile cyan
++ keyword whole pnmflip cyan
++ keyword whole pnmgamma cyan
++ keyword whole pnmhisteq cyan
++ keyword whole pnmhistmap cyan
++ keyword whole pnmindex cyan
++ keyword whole pnminterp cyan
++ keyword whole pnminterp-gen cyan
++ keyword whole pnminvert cyan
++ keyword whole pnmmargin cyan
++ keyword whole pnmmontage cyan
++ keyword whole pnmnlfilt cyan
++ keyword whole pnmnoraw cyan
++ keyword whole pnmnorm cyan
++ keyword whole pnmpad cyan
++ keyword whole pnmpaste cyan
++ keyword whole pnmpsnr cyan
++ keyword whole pnmquant cyan
++ keyword whole pnmremap cyan
++ keyword whole pnmrotate cyan
++ keyword whole pnmscale cyan
++ keyword whole pnmscalefixed cyan
++ keyword whole pnmshear cyan
++ keyword whole pnmsmooth cyan
++ keyword whole pnmsplit cyan
++ keyword whole pnmtile cyan
++
++ keyword whole pnmtofits cyan
++ keyword whole pnmtojpeg cyan
++ keyword whole pnmtopalm cyan
++ keyword whole pnmtoplainpnm cyan
++ keyword whole pnmtopng cyan
++ keyword whole pnmtops cyan
++ keyword whole pnmtorle cyan
++ keyword whole pnmtotiff cyan
++ keyword whole pnmtoxwd cyan
++
++ keyword whole bpmtopnm cyan
++ keyword whole giftopnm cyan
++ keyword whole palmtopnm cyan
++ keyword whole pngtopnm cyan
++ keyword whole pstopnm cyan
++ keyword whole rletopnm cyan
++ keyword whole tifftopnm cyan
++ keyword whole xwdtopnm cyan
++
++ keyword whole ppm3d cyan
++ keyword whole ppmbrighten cyan
++ keyword whole ppmchange cyan
++ keyword whole ppmcie cyan
++ keyword whole ppmcolormask cyan
++ keyword whole ppmcolors cyan
++ keyword whole ppmdim cyan
++ keyword whole ppmdist cyan
++ keyword whole ppmdither cyan
++ keyword whole ppmfade cyan
++ keyword whole ppmflash cyan
++ keyword whole ppmforge cyan
++ keyword whole ppmhist cyan
++ keyword whole ppmlabel cyan
++ keyword whole ppmmake cyan
++ keyword whole ppmmix cyan
++ keyword whole ppmnorm cyan
++ keyword whole ppmntsc cyan
++ keyword whole ppmpat cyan
++ keyword whole ppmquant cyan
++ keyword whole ppmquantall cyan
++ keyword whole ppmqvgq cyan
++ keyword whole ppmrainbow cyan
++ keyword whole ppmrelief cyan
++ keyword whole ppmshadow cyan
++ keyword whole ppmshift cyan
++ keyword whole ppmspread cyan
++ keyword whole ppmtv cyan
++
++ keyword whole ppmtoacad cyan
++ keyword whole ppmtobmp cyan
++ keyword whole ppmtogif cyan
++ keyword whole ppmtojpeg cyan
++ keyword whole ppmtolj cyan
++ keyword whole ppmtomap cyan
++ keyword whole ppmtompeg cyan
++ keyword whole ppmtopcx cyan
++ keyword whole ppmtopgm cyan
++ keyword whole ppmtorgb3 cyan
++ keyword whole ppmtowinicon cyan
++ keyword whole ppmtoxpm cyan
++
++ keyword whole bpmtoppm cyan
++ keyword whole pcxtoppm cyan
++ keyword whole pdftoppm cyan
++ keyword whole pjtoppm cyan
++ keyword whole rawtoppm cyan
++ keyword whole rgb3toppm cyan
++ keyword whole winicontoppm cyan
++ keyword whole xpmtoppm cyan
++ keyword whole xvminitoppm cyan
++
++ keyword whole gpg red
++ keyword whole md5sum red
++ keyword whole openssl red
++ keyword whole ssh red
++ keyword whole scp red
++
++ keyword whole gettext.sh magenta
++ keyword whole TEXTDOMAINDIR magenta
++ keyword whole TEXTDOMAIN magenta
++ keyword whole VERSION magenta
++
++ keyword whole /dev/audio brightblue
++ keyword whole /dev/dsp brightblue
++ keyword whole /dev/null brightblue
++ keyword whole /dev/mixed brightblue
++ keyword whole /dev/stdin brightblue
++ keyword whole /dev/stdout brightblue
++ keyword whole /dev/stderr brightblue
++ keyword whole /dev/zero brightblue
Added: trunk/debian/patches/syntax/05_html-syntax.patch
===================================================================
--- trunk/debian/patches/syntax/05_html-syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/05_html-syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,1278 @@
+diff -Nurwd mc-4.6.2~pre1.orig/syntax/html.syntax mc-4.6.2~pre1/syntax/html.syntax
+--- mc-4.6.2~pre1.orig/syntax/html.syntax 2008-02-16 13:49:01.000000000 +0100
++++ mc-4.6.2~pre1/syntax/html.syntax 2008-02-16 13:49:08.000000000 +0100
+@@ -1,20 +1,1264 @@
+-# Syntax rules for the HyperText Markup Language
++
++# html highlighting with tags in caps always. if you want everything in lowercase
++# use tr
++
++# i got upto IMG in the netscape comprehensive tags reference. thereafter will get
++# done later - paul
+
+ context default
+- keyword &\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]; brightgreen
+- keyword &#\{xX\}\[0123456789abcdefABCDEF\]; brightgreen
+- keyword &#\[0123456789\]; brightgreen
++ keyword whole &*; brightgreen/16
+ spellcheck
+
+-context <!-- --> brown
++ keyword </A> brightcyan/17
++ keyword </ADDRESS> brightcyan/17
++ keyword </APPLET> brightcyan/17
++ keyword </AREA> brightcyan/17
++ keyword </B> brightcyan/17
++ keyword </BASE> brightcyan/17
++ keyword </BASEFONT> brightcyan/17
++ keyword </BIG> brightcyan/17
++ keyword </BLOCKQUOTE> brightcyan/17
++ keyword </BODY> brightcyan/17
++ keyword </BR> brightcyan/17
++ keyword </BUTTON> brightcyan/17
++ keyword </CAPTION> brightcyan/17
++ keyword </CENTER> brightcyan/17
++ keyword </CITE> brightcyan/17
++ keyword </CODE> brightcyan/17
++ keyword </DD> brightcyan/17
++ keyword </DIR> brightcyan/17
++ keyword </DIV> brightcyan/17
++ keyword </DL> brightcyan/17
++ keyword </DT> brightcyan/17
++ keyword </EM> brightcyan/17
++ keyword </FONT> brightcyan/17
++ keyword </FORM> brightcyan/17
++ keyword </FRAME> brightcyan/17
++ keyword </FRAMESET> brightcyan/17
++ keyword </H1> brightcyan/17
++ keyword </H2> brightcyan/17
++ keyword </H3> brightcyan/17
++ keyword </H4> brightcyan/17
++ keyword </H5> brightcyan/17
++ keyword </H6> brightcyan/17
++ keyword </HEAD> brightcyan/17
++ keyword </HR> brightcyan/17
++ keyword </HTML> brightcyan/17
++ keyword </I> brightcyan/17
++ keyword </IMG> brightcyan/17
++ keyword </PRE> brightcyan/17
++ keyword </SMALL> brightcyan/17
++ keyword </SCRIPT> brightcyan/17
++ keyword </META> brightcyan/17
++ keyword </P> brightcyan/17
++ keyword </TABLE> brightcyan/17
++ keyword </TD> brightcyan/17
++ keyword </TITLE> brightcyan/17
++ keyword </TR> brightcyan/17
++ keyword </TT> brightcyan/17
++ keyword </U> brightcyan/17
++
++
++context <A > brightcyan/17
++ keyword = brightred/18
++
++ keyword "http:*" magenta/22
++ keyword "ftp:*" magenta/22
++ keyword "news:*" magenta/22
++ keyword "mailto:*" magenta/22
++ keyword "gopher:*" magenta/22
++ keyword "telnet:*" magenta/22
++ keyword "file:*" magenta/22
++ keyword "javascript:*" magenta/22
++
++ keyword "Alternate" magenta/22
++ keyword "Stylesheet" magenta/22
++ keyword "Start" magenta/22
++ keyword "Next" magenta/22
++ keyword "Prev" magenta/22
++ keyword "Contents" magenta/22
++ keyword "Index" magenta/22
++ keyword "Glossary" magenta/22
++ keyword "Copyright" magenta/22
++ keyword "Chapter" magenta/22
++ keyword "Section" magenta/22
++ keyword "Subsection" magenta/22
++ keyword "Appendix" magenta/22
++ keyword "Help" magenta/22
++ keyword "Bookmark" magenta/22
++
++ keyword "_blank" magenta/22
++ keyword "_self" magenta/22
++ keyword "_parent" magenta/22
++ keyword "_top" magenta/22
++
++ keyword "*" cyan/5
++
++# keyword whole charset yellow/24
++# keyword whole type yellow/24
++ keyword whole name yellow/24
++ keyword whole href yellow/24
++# keyword whole hreflang yellow/24
++# keyword whole rel yellow/24
++# keyword whole rev yellow/24
++ keyword whole shape yellow/24
++ keyword whole coords yellow/24
++# keyword whole tabindex yellow/24
++# keyword whole selected yellow/24
++ keyword whole target yellow/24
++ keyword whole onblur yellow/24
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onfocus yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++
++context <ADDRESS > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole dir yellow/24
++ keyword whole title yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onblur yellow/24
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onfocus yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <APPLET > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole align yellow/24
++ keyword whole alt yellow/24
++ keyword whole archive yellow/24
++ keyword whole code yellow/24
++ keyword whole codebase yellow/24
++ keyword whole height yellow/24
++ keyword whole hspace yellow/24
++ keyword whole mayscript yellow/24
++ keyword whole name yellow/24
++ keyword whole object yellow/24
++ keyword whole vspace yellow/24
++ keyword whole width yellow/24
++
++ keyword "http:*" magenta/22
++ keyword "ftp:*" magenta/22
++ keyword "news:*" magenta/22
++ keyword "mailto:*" magenta/22
++ keyword "gopher:*" magenta/22
++ keyword "telnet:*" magenta/22
++ keyword "file:*" magenta/22
++ keyword "javascript:*" magenta/22
++ keyword "*.class" magenta/22
++ keyword "*" cyan/5
++
++context <AREA > brightcyan/17
++ keyword = brightred/18
++
++# keyword whole accesskey yellow/24
++# keyword whole alt yellow/24
++ keyword whole coords yellow/24
++ keyword whole href yellow/24
++ keyword whole nohref yellow/24
++ keyword whole shape yellow/24
++# keyword whole onfocus yellow/24
++# keyword whole onblur yellow/24
++ keyword whole target magenta/22
++ keyword "_blank" magenta/22
++ keyword "_self" magenta/22
++ keyword "_parent" magenta/22
++ keyword "_top" magenta/22
++
++ keyword "DEFAULT" magenta/22
++ keyword "CIRCLE" magenta/22
++ keyword "POLY" magenta/22
++ keyword "POLYGON" magenta/22
++ keyword "RECT" magenta/22
++ keyword "RECTANGLE" magenta/22
++
++ keyword "http:*" magenta/22
++ keyword "ftp:*" magenta/22
++ keyword "news:*" magenta/22
++ keyword "gopher:*" magenta/22
++ keyword "telnet:*" magenta/22
++ keyword "*" cyan/5
++
++context <B > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <BASE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole href yellow/24
++ keyword whole target yellow/24
++ keyword "_blank" magenta/22
++ keyword "_self" magenta/22
++ keyword "_parent" magenta/22
++ keyword "_top" magenta/22
++
++ keyword "http:*" magenta/22
++ keyword "ftp:*" magenta/22
++ keyword "*" cyan/5
++
++context <BASEFONT > brightcyan/17
++ keyword = brightred/18
++ keyword " magenta/22
++
++ keyword whole id yellow/24
++ keyword whole size yellow/24
++ keyword whole color yellow/24
++ keyword whole face yellow/24
++ keyword "*" cyan/5
++
++context <BIG > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <BLOCKQUOTE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole cite yellow/24
++ keyword "*" cyan/5
++
++
++context <BODY > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole onload yellow/24
++ keyword whole onunload yellow/24
++
++ keyword whole alink yellow/24
++ keyword whole background yellow/24
++
++ keyword "*.gif" brightred/19
++ keyword "*.jpg" brightred/19
++ keyword "*.png" brightred/19
++ keyword "*" cyan/5
++
++ keyword whole bgcolor yellow/24
++ keyword whole link yellow/24
++ keyword whole text yellow/24
++ keyword whole vlink yellow/24
++
++context <BR > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++ keyword "*" cyan/5
++
++
++context <BUTTON > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <CAPTION > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword whole valign yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <CENTER > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <CITE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <CODE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <DD > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <DIR > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <DIV > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword whole "center" magenta/22
++ keyword whole "justify" magenta/22
++ keyword whole "left" magenta/22
++ keyword whole "right" magenta/22
++ keyword "*" cyan/5
++
++
++context <DL > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <DT > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <EM > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <DT > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <FONT > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole size yellow/24
++ keyword whole color yellow/24
++ keyword whole face yellow/24
++ keyword "*" cyan/5
++
++context <FORM > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole action yellow/24
++ keyword whole enctype yellow/24
++ keyword whole method yellow/24
++ keyword "GET" magenta/22
++ keyword "POST" magenta/22
++ keyword whole onreset yellow/24
++ keyword whole onsubmit yellow/24
++ keyword whole target yellow/24
++ keyword "_blank" magenta/22
++ keyword "_self" magenta/22
++ keyword "_parent" magenta/22
++ keyword "_top" magenta/22
++ keyword "*" cyan/5
++
++
++context <FRAME > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole frameborder yellow/24
++ keyword whole marginheight yellow/24
++ keyword whole marginwidth yellow/24
++ keyword whole name yellow/24
++ keyword whole noresize yellow/24
++ keyword whole scrolling yellow/24
++ keyword "YES" magenta/22
++ keyword "NO" magenta/22
++ keyword "AUTO" magenta/22
++ keyword whole src yellow/24
++ keyword "*" cyan/5
++
++
++context <FRAMESET > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole border yellow/24
++ keyword whole bordercolor yellow/24
++ keyword whole cols yellow/24
++ keyword whole onload yellow/24
++ keyword whole onunload yellow/24
++ keyword whole rows yellow/24
++
++
++context <H1 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "CENTRE" magenta/22
++ keyword "LEFT" magenta/22
++ keyword "RIGHT" magenta/22
++ keyword "*" cyan/5
++
++
++context <H2 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "CENTRE" magenta/22
++ keyword "LEFT" magenta/22
++ keyword "RIGHT" magenta/22
++ keyword "*" cyan/5
++
++
++context <H3 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "CENTRE" magenta/22
++ keyword "LEFT" magenta/22
++ keyword "RIGHT" magenta/22
++ keyword "*" cyan/5
++
++
++context <H4 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "CENTRE" magenta/22
++ keyword "LEFT" magenta/22
++ keyword "RIGHT" magenta/22
++ keyword "*" cyan/5
++
++
++context <H5 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "centre" magenta/22
++ keyword "left" magenta/22
++ keyword "right" magenta/22
++ keyword "*" cyan/5
++
++
++context <H6 > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "centre" magenta/22
++ keyword "left" magenta/22
++ keyword "right" magenta/22
++ keyword "*" cyan/5
++
++
++context <HEAD > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++ keyword "*" cyan/5
++
++
++context <HR > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++ keyword whole color yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "centre" magenta/22
++ keyword "left" magenta/22
++ keyword "right" magenta/22
++ keyword whole align yellow/24
++ keyword whole noshade yellow/24
++ keyword whole size yellow/24
++ keyword whole width yellow/24
++ keyword "*" cyan/5
++
++
++context <HTML > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++ keyword "*" cyan/5
++
++
++context <IMG > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole alt yellow/24
++ keyword whole border yellow/24
++ keyword whole height yellow/24
++ keyword whole hspace yellow/24
++ keyword whole ismap yellow/24
++ keyword whole src yellow/24
++ keyword "*.gif" brightred/19
++ keyword "*.jpg" brightred/19
++ keyword "*.png" brightred/19
++ keyword "*" cyan/5
++ keyword whole usemap yellow/24
++ keyword whole vspace yellow/24
++ keyword whole width yellow/24
++ keyword "*" cyan/5
++
++context <I > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++
++context <LINK > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole type yellow/24
++
++ keyword "text/css" magenta/22
++ keyword "text/javascript" magenta/22
++ keyword "*" cyan/5
++
++
++context <META > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole content yellow/24
++ keyword whole http-equiv yellow/24
++ keyword whole name yellow/24
++ keyword "*" cyan/5
++
++context <P > brightcyan/17
++
++
++context <TITLE > brightcyan/17
++ keyword = brightred/18
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++ keyword "*" cyan/5
++
++context <SCRIPT > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole language yellow/24
++ keyword whole src yellow/24
++
++ keyword "JavaScript" magenta/22
++ keyword "JavaScript1.2" magenta/22
++ keyword "JavaScript1.1" magenta/22
++ keyword "*" cyan/5
++
++context <TABLE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword whole bgcolor yellow/24
++ keyword whole border yellow/24
++ keyword whole width yellow/24
++ keyword whole cellspacing yellow/24
++ keyword whole cellpadding yellow/24
++ keyword "right" magenta/22
++ keyword "left" magenta/22
++ keyword "*" cyan/5
++
++
++context <SMALL > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++ keyword "*" cyan/5
++
++context <TD > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole colspan yellow/24
++ keyword whole rowspan yellow/24
++ keyword whole align yellow/24
++ keyword "centre" magenta/22
++ keyword "char" magenta/22
++ keyword "justify" magenta/22
++ keyword "left" magenta/22
++ keyword "right" magenta/22
++ keyword whole bgcolor yellow/24
++ keyword whole valign yellow/24
++ keyword "baseline" magenta/22
++ keyword "bottom" magenta/22
++ keyword "middle" magenta/22
++ keyword "top" magenta/22
++ keyword whole colorspan yellow/24
++ keyword whole height yellow/24
++ keyword whole nowrap yellow/24
++ keyword whole rowspan yellow/24
++ keyword whole width yellow/24
++
++ keyword "*" cyan/5
++
++
++context <TR > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++ keyword whole onclick yellow/24
++ keyword whole ondblclick yellow/24
++ keyword whole onkeydown yellow/24
++ keyword whole onkeypress yellow/24
++ keyword whole onkeyup yellow/24
++ keyword whole onmousedown yellow/24
++ keyword whole onmousemove yellow/24
++ keyword whole onmouseout yellow/24
++ keyword whole onmouseover yellow/24
++ keyword whole onmouseup yellow/24
++
++ keyword whole align yellow/24
++ keyword "centre" magenta/22
++ keyword "char" magenta/22
++ keyword "justify" magenta/22
++ keyword "left" magenta/22
++ keyword "right" magenta/22
++
++ keyword whole bgcolor yellow/24
++ keyword whole valign yellow/24
++ keyword "baseline" magenta/22
++ keyword "bottom" magenta/22
++ keyword "middle" magenta/22
++ keyword "top" magenta/22
++
++ keyword "*" cyan/5
++
++context <TT > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++context <U > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++context <PRE > brightcyan/17
++ keyword = brightred/18
++
++ keyword whole class yellow/24
++ keyword whole id yellow/24
++ keyword whole style yellow/24
++ keyword whole title yellow/24
++
++ keyword whole dir yellow/24
++ keyword whole lang yellow/24
++
++context <!-- --> brown/22
+ spellcheck
+
+ context <! > brightred/orange
+ spellcheck
+
+-context </ > brightcyan
++context < > cyan/15
+
+-context < > brightcyan
+- keyword "*" green
+- keyword '*' green
+- keyword = yellow
Added: trunk/debian/patches/syntax/06_strace_syntax.patch
===================================================================
--- trunk/debian/patches/syntax/06_strace_syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/06_strace_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,62 @@
+diff --git a/syntax/Syntax b/syntax/Syntax
+index 0283ed9..e112248 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -167,5 +167,8 @@ include debian-changelog.syntax
+ file .\*\\.dsc$ Debian\sdescriptiom\sfile
+ include debian-description.syntax
+
++file .\*\\.strace$ Strace\sdebug\soutput
++include strace.syntax
++
+ file .\* unknown
+ include unknown.syntax
+diff --git a/syntax/strace.syntax b/syntax/strace.syntax
+new file mode 100644
+index 0000000..a6785d5
+--- /dev/null
++++ b/syntax/strace.syntax
+@@ -0,0 +1,43 @@
++context default
++ keyword access(*) green
++ keyword execve(*) brightgreen
++ keyword uname(*) brightblue
++
++ keyword open(*) cyan
++ keyword close(*) cyan
++
++ keyword read(*) magenta
++ keyword select(*) magenta
++ keyword write(*) magenta
++
++ keyword readv(*) brightmagenta
++ keyword writev(*) brightmagenta
++
++ keyword fcntl64(*) white
++ keyword fstat64(*) white
++ keyword stat64(*) white
++
++ keyword old_mmap(*) red
++ keyword mmap2(*) red
++ keyword munmap(*) red
++
++ keyword exit_group(*) brightred
++ keyword kill(*) brightred
++ keyword wait4(*) brightred
++ keyword statfs(*) brightred
++ keyword ioctl(*) brightred
++ keyword rt_sigaction(*) brightred
++ keyword rt_sigprocmask(*) brightred
++ keyword alarm(*) brightred
++ keyword brk(*) brightred
++
++ keyword chown32(*) yellow
++ keyword chmod(*) yellow
++ keyword geteuid32(*) yellow
++ keyword getegid32(*) yellow
++ keyword getuid32(*) yellow
++ keyword getgid32(*) yellow
++ keyword setresuid32(*) yellow
++ keyword setresgid32(*) yellow
++ keyword gettimeofday(*) yellow
++
Added: trunk/debian/patches/syntax/07_named_syntax.patch
===================================================================
--- trunk/debian/patches/syntax/07_named_syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/07_named_syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,197 @@
+diff --git a/syntax/Syntax b/syntax/Syntax
+index e112248..fa5c24c 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -170,5 +170,8 @@ include debian-description.syntax
+ file .\*\\.strace$ Strace\sdebug\soutput
+ include strace.syntax
+
++file .\*named.conf$ Bind9\sconfiguration
++include named.syntax
++
+ file .\* unknown
+ include unknown.syntax
+diff --git a/syntax/named.syntax b/syntax/named.syntax
+new file mode 100644
+index 0000000..34836e2
+--- /dev/null
++++ b/syntax/named.syntax
+@@ -0,0 +1,178 @@
++wholechars abcdefghijklmnopqrstuvwxyz0123456789-
++
++context default
++ keyword whole acl yellow
++ keyword whole additional-from-auth yellow
++ keyword whole additional-from-cache yellow
++ keyword whole algorithm yellow
++ keyword whole allow-notify yellow
++ keyword whole allow-query yellow
++ keyword whole allow-recursion yellow
++ keyword whole allow-transfer yellow
++ keyword whole allow-update-forwarding yellow
++ keyword whole allow-v6-synthesis yellow
++ keyword whole allow yellow
++ keyword whole also-notify yellow
++ keyword whole auth-nxdomain yellow
++ keyword whole blackhole yellow
++ keyword whole bogus yellow
++ keyword whole cache-file yellow
++ keyword whole category yellow
++ keyword whole channel yellow
++ keyword whole check-names yellow
++ keyword whole class yellow
++ keyword whole cleaning-interval yellow
++ keyword whole controls yellow
++ keyword whole coresize yellow
++ keyword whole database yellow
++ keyword whole datasize yellow
++ keyword whole deallocate-on-exit yellow
++ keyword whole delegation-only yellow
++ keyword whole deny yellow
++ keyword whole dialup yellow
++ keyword whole directory yellow
++ keyword whole dump-file yellow
++ keyword whole edns yellow
++ keyword whole exclude yellow
++ keyword whole fake-iquery yellow
++ keyword whole fetch-glue yellow
++ keyword whole files yellow
++ keyword whole file yellow
++ keyword whole forwarders yellow
++ keyword whole forward yellow
++ keyword whole grant yellow
++ keyword whole has-old-clients yellow
++ keyword whole heartbeat-interval yellow
++ keyword whole host-statistics yellow
++ keyword whole inet yellow
++ keyword whole interface-interval yellow
++ keyword whole keys yellow
++ keyword whole key yellow
++ keyword whole lame-ttl yellow
++ keyword whole listen-on-v6 yellow
++ keyword whole listen-on yellow
++ keyword whole logging yellow
++ keyword whole lwres yellow
++ keyword whole maintain-ixfr-base yellow
++ keyword whole masters yellow
++ keyword whole match-clients yellow
++ keyword whole match-destinations yellow
++ keyword whole match-mapped-addresses yellow
++ keyword whole match-recursive-only yellow
++ keyword whole max-cache-size yellow
++ keyword whole max-cache-ttl yellow
++ keyword whole max-ixfr-log-size yellow
++ keyword whole max-ncache-ttl yellow
++ keyword whole max-refresh-time yellow
++ keyword whole max-retry-time yellow
++ keyword whole max-transfer-idle-in yellow
++ keyword whole max-transfer-idle-out yellow
++ keyword whole max-transfer-time-in yellow
++ keyword whole max-transfer-time-out yellow
++ keyword whole memstatistics-file yellow
++ keyword whole minimal-responses yellow
++ keyword whole min-refresh-time yellow
++ keyword whole min-retry-time yellow
++ keyword whole min-roots yellow
++ keyword whole multiple-cnames yellow
++ keyword whole named-xfer yellow
++ keyword whole name yellow
++ keyword whole ndots yellow
++ keyword whole notify-source-v6 yellow
++ keyword whole notify-source yellow
++ keyword whole notify yellow
++ keyword whole options yellow
++ keyword whole pid-file yellow
++ keyword whole port yellow
++ keyword whole print-category yellow
++ keyword whole print-severity yellow
++ keyword whole print-time yellow
++ keyword whole provide-ixfr yellow
++ keyword whole pubkey yellow
++ keyword whole query-source-v6 yellow
++ keyword whole query-source yellow
++ keyword whole random-device yellow
++ keyword whole recursion yellow
++ keyword whole recursive-clients yellow
++ keyword whole request-ixfr yellow
++ keyword whole rfc2308-type1 yellow
++ keyword whole root-delegation-only yellow
++ keyword whole rrset-order yellow
++ keyword whole search yellow
++ keyword whole secret yellow
++ keyword whole self yellow
++ keyword whole serial-queries yellow
++ keyword whole serial-query-rate yellow
++ keyword whole server yellow
++ keyword whole severity yellow
++ keyword whole sig-validity-interval yellow
++ keyword whole sortlist yellow
++ keyword whole stacksize yellow
++ keyword whole statistics-file yellow
++ keyword whole statistics-interval yellow
++ keyword whole subdomain yellow
++ keyword whole support-ixfr yellow
++ keyword whole suppress-initial-notify yellow
++ keyword whole syslog yellow
++ keyword whole tcp-clients yellow
++ keyword whole tkey-dhkey yellow
++ keyword whole tkey-domain yellow
++ keyword whole tkey-gssapi-credential yellow
++ keyword whole topology yellow
++ keyword whole transfer-format yellow
++ keyword whole transfers-in yellow
++ keyword whole transfer-source-v6 yellow
++ keyword whole transfer-source yellow
++ keyword whole transfers-out yellow
++ keyword whole transfers-per-ns yellow
++ keyword whole transfers yellow
++ keyword whole treat-cr-as-space yellow
++ keyword whole trusted-keys yellow
++ keyword whole type yellow
++ keyword whole update-policy yellow
++ keyword whole use-id-pool yellow
++ keyword whole use-ixfr yellow
++ keyword whole version yellow
++ keyword whole view yellow
++ keyword whole wildcard yellow
++ keyword whole zone-statistics yellow
++ keyword whole zone yellow
++
++ keyword whole any brightred
++ keyword whole fail brightred
++ keyword whole first brightred
++ keyword whole hint brightred
++ keyword whole ignore brightred
++ keyword whole many-answers brightred
++ keyword whole master brightred
++ keyword whole none brightred
++ keyword whole null brightred
++ keyword whole one-answer brightred
++ keyword whole only brightred
++ keyword whole response brightred
++ keyword whole slave brightred
++ keyword whole stderr brightred
++ keyword whole stub brightred
++ keyword whole warn brightred
++ keyword whole yes brightred
++ keyword whole no brightred
++
++ keyword /\* brown
++ keyword \*/ brown
++ keyword // brown
++ keyword # brown
++ keyword { brightcyan
++ keyword } brightcyan
++ keyword ; brightmagenta
++
++context exclusive /\* \*/ brown
++ spellcheck
++
++context exclusive // \n brown
++ spellcheck
++
++context exclusive # \n brown
++ spellcheck
++
++context " " green
++ spellcheck
Added: trunk/debian/patches/syntax/08_c-vs-cxx.patch
===================================================================
--- trunk/debian/patches/syntax/08_c-vs-cxx.patch (rev 0)
+++ trunk/debian/patches/syntax/08_c-vs-cxx.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,69 @@
+diff --git a/syntax/Makefile.am b/syntax/Makefile.am
+index 49ee0a2..368cdf7 100644
+--- a/syntax/Makefile.am
++++ b/syntax/Makefile.am
+@@ -3,6 +3,7 @@ SYNTAXFILES = \
+ ada95.syntax \
+ aspx.syntax \
+ assembler.syntax \
++ cxx.syntax \
+ c.syntax \
+ changelog.syntax \
+ debian-changelog.syntax \
+diff --git a/syntax/Syntax b/syntax/Syntax
+index fa5c24c..57b749e 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -77,9 +77,12 @@ include latex.syntax
+ file ..\*\.(texi|texinfo|TEXI|TEXINFO)$ Texinfo\sDocument
+ include texinfo.syntax
+
+-file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|hpp|HPP|h\.in)$ C/C\+\+\sProgram
++file ..\*\\.c$ C\sProgram
+ include c.syntax
+
++file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
++include cxx.syntax
++
+ file ..\*\\.d$ D\sProgram
+ include d.syntax
+
+diff --git a/syntax/c.syntax b/syntax/c.syntax
+index 4c50f1c..91f070c 100644
+--- a/syntax/c.syntax
++++ b/syntax/c.syntax
+@@ -33,34 +33,7 @@ context default
+ keyword whole volatile yellow
+ keyword whole while yellow
+ keyword whole asm yellow
+- keyword whole catch yellow
+- keyword whole class yellow
+- keyword whole friend yellow
+- keyword whole delete yellow
+ keyword whole inline yellow
+- keyword whole new yellow
+- keyword whole operator yellow
+- keyword whole private yellow
+- keyword whole protected yellow
+- keyword whole public yellow
+- keyword whole this yellow
+- keyword whole throw yellow
+- keyword whole template yellow
+- keyword whole try yellow
+- keyword whole virtual yellow
+- keyword whole bool yellow
+- keyword whole const_cast yellow
+- keyword whole dynamic_cast yellow
+- keyword whole explicit yellow
+- keyword whole false yellow
+- keyword whole mutable yellow
+- keyword whole namespace yellow
+- keyword whole reinterpret_cast yellow
+- keyword whole static_cast yellow
+- keyword whole true yellow
+- keyword whole typeid yellow
+- keyword whole typename yellow
+- keyword whole using yellow
+ keyword whole wchar_t yellow
+ keyword whole ... yellow
+ keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
Added: trunk/debian/patches/syntax/09_spec-syntax.patch
===================================================================
--- trunk/debian/patches/syntax/09_spec-syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/09_spec-syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,242 @@
+--- mc/syntax/spec.syntax 2007-12-14 20:27:25.000000000 +0000
++++ mc/syntax/spec.syntax 2007-12-14 20:29:39.000000000 +0000
+@@ -3,6 +3,7 @@
+ keyword whole Auto\{Rr\}eq\{Pp\}rov: green
+ keyword whole Auto\{Rr\}eq: green
+ keyword whole Build\{Aa\}rch: green
++ keyword whole Build\{Cc\}onflicts: green
+ keyword whole Build\{Pp\}re\{Rr\}eq: green
+ keyword whole Build\{Rr\}oot: green
+ keyword whole Build\{Rr\}equires: green
+@@ -16,11 +17,10 @@
+ keyword whole Exclusive\{Aa\}rch: green
+ keyword whole Exclusive\{Oo\}\{Ss\}: green
+ keyword whole Group: green
+- keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]): green
+- keyword whole Group(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\]): green
+ keyword whole Icon: green
+ keyword whole License: green
+ keyword whole Name: green
++ keyword whole NoSource\[0123456789\]: green
+ keyword whole Obsoletes: green
+ keyword whole Packager: green
+ keyword whole Patch\[0123456789\]: green
+@@ -33,10 +33,8 @@
+ keyword whole Root: green
+ keyword whole Serial: white
+ keyword whole Source\[0123456789\]: green
++ keyword whole Suggests: green
+ keyword whole Summary: green
+- keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]): green
+- keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\]): green
+- keyword whole Summary(\[abcdefghijklmnopqrstuvwxyz\]_\[ABCDEFGHIJKLMNOPQRSTUVWXYZ\].\[ABCDEFGHIJKLMNOPQRSTUVWXYZ-1234567890\]): green
+ keyword whole Vendor: green
+ keyword whole Version: green
+ keyword whole U\{Rr\}\{Ll\}: green
+@@ -82,6 +80,7 @@
+ keyword wholeright $+ brightgreen
+ keyword ftp://+ brightgreen
+ keyword http://+ brightgreen
++ keyword cvs://+ brightgreen
+
+ keyword whole missingok brightcyan
+ keyword whole noreplace brightcyan
+@@ -89,6 +88,189 @@
+ keyword whole PATCH\[0123456789\] cyan
+ keyword whole SOURCE\[0123456789\] cyan
+
++context Group( ): green
++ keyword whole af yellow
++ keyword whole az yellow
++ keyword whole bg yellow
++ keyword whole br yellow
++ keyword whole ca yellow
++ keyword whole ca_ES yellow
++ keyword whole cs yellow
++ keyword whole cs_CZ yellow
++ keyword whole da yellow
++ keyword whole da_DK yellow
++ keyword whole de yellow
++ keyword whole de_AT yellow
++ keyword whole de_DE yellow
++ keyword whole el yellow
++ keyword whole el_GR yellow
++ keyword whole en yellow
++ keyword whole en_GB yellow
++ keyword whole eo yellow
++ keyword whole es yellow
++ keyword whole es_ES yellow
++ keyword whole et yellow
++ keyword whole et_EE yellow
++ keyword whole eu yellow
++ keyword whole fi yellow
++ keyword whole fi_FI yellow
++ keyword whole fr yellow
++ keyword whole fr_FR yellow
++ keyword whole gl yellow
++ keyword whole gl_ES yellow
++ keyword whole gr yellow
++ keyword whole he yellow
++ keyword whole he_IL yellow
++ keyword whole hi yellow
++ keyword whole hr yellow
++ keyword whole hr_HR yellow
++ keyword whole hu yellow
++ keyword whole hu_HU yellow
++ keyword whole id yellow
++ keyword whole is yellow
++ keyword whole is_IS yellow
++ keyword whole it yellow
++ keyword whole it_IT yellow
++ keyword whole ja yellow
++ keyword whole ja_JP yellow
++ keyword whole ja_JP.SJIS yellow
++ keyword whole ko yellow
++ keyword whole ko_KR yellow
++ keyword whole lt yellow
++ keyword whole lt_LT yellow
++ keyword whole lv yellow
++ keyword whole ms yellow
++ keyword whole nb yellow
++ keyword whole nl yellow
++ keyword whole nl_NL yellow
++ keyword whole nn yellow
++ keyword whole nn_NO yellow
++ keyword whole no yellow
++ keyword whole no_NO yellow
++ keyword whole pl yellow
++ keyword whole pl_PL yellow
++ keyword whole pt yellow
++ keyword whole pt_BR yellow
++ keyword whole pt_PT yellow
++ keyword whole ro yellow
++ keyword whole ro_RO yellow
++ keyword whole ru yellow
++ keyword whole ru_RU yellow
++ keyword whole sk yellow
++ keyword whole sk_SK yellow
++ keyword whole sl yellow
++ keyword whole sl_SI yellow
++ keyword whole sr yellow
++ keyword whole sv yellow
++ keyword whole sv_SE yellow
++ keyword whole ta yellow
++ keyword whole th_TH yellow
++ keyword whole tr yellow
++ keyword whole tr_TR yellow
++ keyword whole uk yellow
++ keyword whole vi yellow
++ keyword whole wa yellow
++ keyword whole zh yellow
++ keyword whole zh_CN yellow
++ keyword whole zh_CN.GB2312 yellow
++ keyword whole zh_TW yellow
++ keyword whole zh_TW.Big5 yellow
++
++context Requires( ): green
++ keyword whole post yellow
++ keyword whole pre yellow
++ keyword whole postun yellow
++ keyword whole preun yellow
++ keyword , lightgray
++
++context Summary( ): green
++ keyword whole af yellow
++ keyword whole az yellow
++ keyword whole bg yellow
++ keyword whole br yellow
++ keyword whole ca yellow
++ keyword whole ca_ES yellow
++ keyword whole cs yellow
++ keyword whole cs_CZ yellow
++ keyword whole da yellow
++ keyword whole da_DK yellow
++ keyword whole de yellow
++ keyword whole de_AT yellow
++ keyword whole de_DE yellow
++ keyword whole el yellow
++ keyword whole el_GR yellow
++ keyword whole en yellow
++ keyword whole en_GB yellow
++ keyword whole eo yellow
++ keyword whole es yellow
++ keyword whole es_ES yellow
++ keyword whole et yellow
++ keyword whole et_EE yellow
++ keyword whole eu yellow
++ keyword whole fi yellow
++ keyword whole fi_FI yellow
++ keyword whole fr yellow
++ keyword whole fr_FR yellow
++ keyword whole gl yellow
++ keyword whole gl_ES yellow
++ keyword whole gr yellow
++ keyword whole he yellow
++ keyword whole he_IL yellow
++ keyword whole hi yellow
++ keyword whole hr yellow
++ keyword whole hr_HR yellow
++ keyword whole hu yellow
++ keyword whole hu_HU yellow
++ keyword whole id yellow
++ keyword whole is yellow
++ keyword whole is_IS yellow
++ keyword whole it yellow
++ keyword whole it_IT yellow
++ keyword whole ja yellow
++ keyword whole ja_JP yellow
++ keyword whole ja_JP.SJIS yellow
++ keyword whole ko yellow
++ keyword whole ko_KR yellow
++ keyword whole lt yellow
++ keyword whole lt_LT yellow
++ keyword whole lv yellow
++ keyword whole ms yellow
++ keyword whole nb yellow
++ keyword whole nl yellow
++ keyword whole nl_NL yellow
++ keyword whole nn yellow
++ keyword whole nn_NO yellow
++ keyword whole no yellow
++ keyword whole no_NO yellow
++ keyword whole pl yellow
++ keyword whole pl_PL yellow
++ keyword whole pt yellow
++ keyword whole pt_BR yellow
++ keyword whole pt_PT yellow
++ keyword whole ro yellow
++ keyword whole ro_RO yellow
++ keyword whole ru yellow
++ keyword whole ru_RU yellow
++ keyword whole sk yellow
++ keyword whole sk_SK yellow
++ keyword whole sl yellow
++ keyword whole sl_SI yellow
++ keyword whole sr yellow
++ keyword whole sv yellow
++ keyword whole sv_SE yellow
++ keyword whole ta yellow
++ keyword whole th_TH yellow
++ keyword whole tr yellow
++ keyword whole tr_TR yellow
++ keyword whole uk yellow
++ keyword whole vi yellow
++ keyword whole wa yellow
++ keyword whole zh yellow
++ keyword whole zh_CN yellow
++ keyword whole zh_CN.GB2312 yellow
++ keyword whole zh_TW yellow
++ keyword whole zh_TW.Big5 yellow
++
+ context linestart # \n brown
+ context %( ) brightcyan
+
+@@ -97,7 +279,7 @@
+ keyword Revision*\n brightgreen
+ keyword \*\s\{MWTFS\}*\n brightgreen
+ keyword \s\s[*] brightgreen
+- keyword $Log*\n brightred
++ keyword $Log*$\n brightred
+
+ #sections
+ context exclusive linestart %build \n yellow
Added: trunk/debian/patches/syntax/10_vhdl-syntax.patch
===================================================================
--- trunk/debian/patches/syntax/10_vhdl-syntax.patch (rev 0)
+++ trunk/debian/patches/syntax/10_vhdl-syntax.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,181 @@
+diff --git a/syntax/Makefile.am b/syntax/Makefile.am
+index c3c83b1..8335ce5 100644
+--- a/syntax/Makefile.am
++++ b/syntax/Makefile.am
+@@ -48,6 +48,7 @@ SYNTAXFILES = \
+ syntax.syntax \
+ tcl.syntax \
+ texinfo.syntax \
++ vhdl.syntax \
+ unknown.syntax \
+ xml.syntax
+
+diff --git a/syntax/Syntax b/syntax/Syntax
+index 57b749e..617d1e5 100644
+--- a/syntax/Syntax
++++ b/syntax/Syntax
+@@ -176,5 +176,8 @@ include strace.syntax
+ file .\*named.conf$ Bind9\sconfiguration
+ include named.syntax
+
++file ..\*\\.(hdl|vhdl|HDL|VHDL)$ VHDL\sProgram
++include vhdl.syntax
++
+ file .\* unknown
+ include unknown.syntax
+diff --git a/syntax/vhdl.syntax b/syntax/vhdl.syntax
+new file mode 100644
+index 0000000..1229ec6
+--- /dev/null
++++ b/syntax/vhdl.syntax
+@@ -0,0 +1,150 @@
++# Adam Pribyl, based on ADA
++# missing
++# generate, disconnect, group, guarded, impure, inertial, linkage, literal, new, on, others, postponed, pure, register, reject, select, shared, sli, transport, unaffected, units
++
++
++#wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.\\[]{}
++
++#ignore case?!
++
++context default
++
++ keyword whole with yellow
++ keyword whole use yellow
++ keyword whole is yellow
++ keyword whole of yellow
++ keyword whole range yellow
++ keyword whole abs yellow
++ keyword whole delta yellow
++ keyword whole return yellow
++ keyword whole next yellow
++ keyword whole null yellow
++ keyword whole after yellow
++ keyword whole array yellow
++ keyword whole downto yellow
++ keyword whole to yellow
++
++# prevents - keyword from interfering with comment
++ keyword -- brown
++
++# expressions
++ keyword := brightgreen
++ keyword . brightgreen
++ keyword ; brightgreen
++ keyword .. brightgreen
++ keyword : brightgreen
++ keyword ( brightgreen
++ keyword ) brightgreen
++ keyword \+ brightgreen
++ keyword - brightgreen
++ keyword / brightgreen
++ keyword \* brightgreen
++ keyword \*\* brightgreen
++ keyword # brightgreen
++ keyword => brightgreen
++ keyword <= brightgreen
++ keyword >= brightgreen
++ keyword , brightgreen
++ keyword ' brightgreen
++ keyword = brightgreen
++ keyword /= brightgreen
++
++# operators
++ keyword whole sll green
++ keyword whole srl green
++ keyword whole sla green
++ keyword whole sra green
++ keyword whole rol green
++ keyword whole ror green
++ keyword whole rem green
++ keyword whole mod green
++ keyword whole not green
++ keyword whole and green
++ keyword whole nand green
++ keyword whole or green
++ keyword whole xor green
++ keyword whole nor green
++ keyword whole xnor green
++
++# sequential statements
++ keyword whole begin brightred
++ keyword whole end brightred
++ keyword whole exit brightred
++ keyword whole for brightred
++ keyword whole while brightred
++ keyword whole if brightred
++ keyword whole then brightred
++ keyword whole else brightred
++ keyword whole case brightred
++ keyword whole when brightred
++ keyword whole elsif brightred
++ keyword whole assert brightred
++ keyword whole wait brightred
++ keyword whole open brightred
++ keyword whole loop brightred
++ keyword whole until brightred
++
++# parallel statements
++ keyword whole block brightred
++
++# predefined types
++ keyword whole integer cyan
++ keyword whole natural cyan
++ keyword whole positive cyan
++ keyword whole string cyan
++ keyword whole character cyan
++ keyword whole boolean cyan
++ keyword whole real cyan
++ keyword whole bit cyan
++ keyword whole bit_vector cyan
++ keyword whole time cyan
++
++# declarations
++ keyword whole type brightcyan
++ keyword whole subtype brightcyan
++
++ keyword whole variable brightcyan
++ keyword whole signal brightcyan
++ keyword whole constant brightcyan
++ keyword whole file brightcyan
++
++ keyword whole port brightcyan
++ keyword whole map brightcyan
++ keyword whole label brightcyan
++ keyword whole record brightcyan
++ keyword whole generic brightcyan
++ keyword whole alias brightcyan
++ keyword whole attribute brightcyan
++
++
++ keyword whole in white
++ keyword whole out white
++ keyword whole inout white
++ keyword whole buffer white
++ keyword whole bus white
++
++# library units
++ keyword whole library magenta
++ keyword whole entity magenta
++ keyword whole architecture magenta
++ keyword whole package magenta
++ keyword whole body magenta
++ keyword whole procedure magenta
++ keyword whole function magenta
++ keyword whole configuration magenta
++ keyword whole component magenta
++ keyword whole generic magenta
++ keyword whole process magenta
++
++# reports
++ keyword whole report red
++ keyword whole severity red
++ keyword whole note red
++ keyword whole warning red
++ keyword whole error red
++ keyword whole failure red
++
++
++context exclusive -- \n brown
++context " " green/green
++
Added: trunk/debian/patches/utf8/mc-utf8-8bit-hex.patch
===================================================================
--- trunk/debian/patches/utf8/mc-utf8-8bit-hex.patch (rev 0)
+++ trunk/debian/patches/utf8/mc-utf8-8bit-hex.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,26 @@
+--- mc-2006-08-12-18/edit/editdraw.c.8bit-hex 2006-09-05 14:35:21.000000000 +0200
++++ mc-2006-08-12-18/edit/editdraw.c 2006-09-05 14:35:21.000000000 +0200
+@@ -70,12 +70,22 @@
+ */
+ if (edit->curs1 < edit->last_byte) {
+ mc_wchar_t cur_byte = edit_get_byte (edit, edit->curs1);
++ mc_wchar_t cur_byte2 = cur_byte;
+ #ifndef UTF8
+ g_snprintf (byte_str, sizeof (byte_str), "%c %3d 0x%02X",
+ is_printable (cur_byte) ? cur_byte : '.',
+ #else /* UTF8 */
++ /* In 8-bit locales show the byte itself instead of its Unicode value */
++ if (MB_CUR_MAX == 1) {
++ unsigned char cur_8bit_byte;
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++ if (wcrtomb(&cur_8bit_byte, cur_byte, &mbs) == 1) {
++ cur_byte = cur_8bit_byte;
++ }
++ }
+ g_snprintf (byte_str, sizeof(byte_str), "%lc %3d 0x%02X",
+- iswprint(cur_byte) ? cur_byte : '.',
++ iswprint(cur_byte2) ? cur_byte2 : '.',
+ #endif /* UTF8 */
+ (int) cur_byte,
+ (unsigned) cur_byte);
Added: trunk/debian/patches/utf8/mc-utf8-look-and-feel.patch
===================================================================
--- trunk/debian/patches/utf8/mc-utf8-look-and-feel.patch (rev 0)
+++ trunk/debian/patches/utf8/mc-utf8-look-and-feel.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,2480 @@
+Index: mc-4.6.2~git20080311/src/main.c
+===================================================================
+--- mc-4.6.2~git20080311.orig/src/main.c 2008-05-17 17:42:47.000000000 +0200
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,2292 +0,0 @@
+-/* Main program for the Midnight Commander
+- Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+- 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+-
+- Written by: 1994, 1995, 1996, 1997 Miguel de Icaza
+- 1994, 1995 Janne Kukonlehto
+- 1997 Norbert Warmuth
+-
+- This program is free software; you can redistribute it and/or modify
+- it under the terms of the GNU General Public License as published by
+- the Free Software Foundation; either version 2 of the License, or
+- (at your option) any later version.
+-
+- This program is distributed in the hope that it will be useful,
+- but WITHOUT ANY WARRANTY; without even the implied warranty of
+- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+- GNU General Public License for more details.
+-
+- You should have received a copy of the GNU General Public License
+- along with this program; if not, write to the Free Software
+- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+-
+-#include <config.h>
+-
+-#include <ctype.h>
+-#include <errno.h>
+-#include <locale.h>
+-#include <signal.h>
+-#include <stdio.h>
+-#include <stdlib.h>
+-#include <string.h>
+-
+-#include <sys/types.h>
+-#include <sys/stat.h>
+-#include <unistd.h>
+-
+-#include "global.h"
+-#include "tty.h"
+-#include "dir.h"
+-#include "color.h"
+-#include "dialog.h"
+-#include "menu.h"
+-#include "panel.h"
+-#include "main.h"
+-#include "win.h"
+-#include "mouse.h"
+-#include "option.h"
+-#include "tree.h"
+-#include "treestore.h"
+-#include "cons.saver.h"
+-#include "subshell.h"
+-#include "key.h" /* For init_key() and mi_getch() */
+-#include "setup.h" /* save_setup() */
+-#include "profile.h" /* free_profiles() */
+-#include "boxes.h" /* sort_box() */
+-#include "layout.h"
+-#include "cmd.h" /* Normal commands */
+-#include "hotlist.h"
+-#include "panelize.h"
+-#include "learn.h" /* learn_keys() */
+-#include "listmode.h"
+-#include "execute.h"
+-#include "ext.h" /* For flush_extension_file() */
+-
+-/* Listbox for the command history feature */
+-#include "widget.h"
+-#include "command.h"
+-#include "wtools.h"
+-#include "complete.h" /* For the free_completion */
+-
+-#include "chmod.h"
+-#include "chown.h"
+-#include "achown.h"
+-
+-#ifdef WITH_SMBFS
+-#include "../vfs/smbfs.h" /* smbfs_set_debug() */
+-#endif
+-
+-#ifdef USE_INTERNAL_EDIT
+-# include "../edit/edit.h"
+-#endif
+-
+-#ifdef HAVE_CHARSET
+-#include "charsets.h"
+-#endif /* HAVE_CHARSET */
+-
+-#ifdef USE_VFS
+-#include "../vfs/gc.h"
+-#endif
+-
+-#include "popt.h"
+-
+-/* When the modes are active, left_panel, right_panel and tree_panel */
+-/* Point to a proper data structure. You should check with the functions */
+-/* get_current_type and get_other_type the types of the panels before using */
+-/* This pointer variables */
+-
+-/* The structures for the panels */
+-WPanel *left_panel = NULL;
+-WPanel *right_panel = NULL;
+-
+-/* The pointer to the tree */
+-WTree *the_tree = NULL;
+-
+-/* The Menubar */
+-struct WMenu *the_menubar = NULL;
+-
+-/* Pointers to the selected and unselected panel */
+-WPanel *current_panel = NULL;
+-
+-/* Set if the command is being run from the "Right" menu */
+-int is_right = 0;
+-
+-/* Set when main loop should be terminated */
+-volatile int quit = 0;
+-
+-/* Set if you want the possible completions dialog for the first time */
+-int show_all_if_ambiguous = 0;
+-
+-/* Set when cd symlink following is desirable (bash mode) */
+-int cd_symlinks = 1;
+-
+-/* If set then dialogs just clean the screen when refreshing, else */
+-/* they do a complete refresh, refreshing all the parts of the program */
+-int fast_refresh = 0;
+-
+-/* If true, marking a files moves the cursor down */
+-int mark_moves_down = 1;
+-
+-/* If true, at startup the user-menu is invoked */
+-int auto_menu = 0;
+-
+-/* If true, use + and \ keys normally and select/unselect do if M-+ / M-\
+- and M-- and keypad + / - */
+-int alternate_plus_minus = 0;
+-
+-/* If true, then the +, - and \ keys have their special meaning only if the
+- * command line is emtpy, otherwise they behave like regular letters
+- */
+-int only_leading_plus_minus = 1;
+-
+-int pause_after_run = pause_on_dumb_terminals;
+-
+-/* It true saves the setup when quitting */
+-int auto_save_setup = 1;
+-
+-#ifndef HAVE_CHARSET
+-/* If true, allow characters in the range 160-255 */
+-int eight_bit_clean = 1;
+-
+-/*
+- * If true, also allow characters in the range 128-159.
+- * This is reported to break on many terminals (xterm, qansi-m).
+- */
+-int full_eight_bits = 0;
+-#endif /* !HAVE_CHARSET */
+-
+-/* If true use the internal viewer */
+-int use_internal_view = 1;
+-
+-/* Have we shown the fast-reload warning in the past? */
+-int fast_reload_w = 0;
+-
+-/* Move page/item? When clicking on the top or bottom of a panel */
+-int mouse_move_pages = 1;
+-
+-/* If true: l&r arrows are used to chdir if the input line is empty */
+-int navigate_with_arrows = 0;
+-
+-/* If true use +, -, | for line drawing */
+-int force_ugly_line_drawing = 0;
+-
+-/* If true program softkeys (HP terminals only) on startup and after every
+- command ran in the subshell to the description found in the termcap/terminfo
+- database */
+-int reset_hp_softkeys = 0;
+-
+-/* The prompt */
+-const char *prompt = NULL;
+-
+-/* The widget where we draw the prompt */
+-WLabel *the_prompt;
+-
+-/* The hint bar */
+-WLabel *the_hint;
+-
+-/* The button bar */
+-WButtonBar *the_bar;
+-
+-/* For slow terminals */
+-int slow_terminal = 0;
+-
+-/* Mouse type: GPM, xterm or none */
+-Mouse_Type use_mouse_p = MOUSE_NONE;
+-
+-/* If true, assume we are running on an xterm terminal */
+-static int force_xterm = 0;
+-
+-/* If on, default for "No" in delete operations */
+-int safe_delete = 0;
+-
+-/* Controls screen clearing before an exec */
+-int clear_before_exec = 1;
+-
+-/* Asks for confirmation before deleting a file */
+-int confirm_delete = 1;
+-
+-/* Asks for confirmation before deleting a hotlist entry */
+-int confirm_directory_hotlist_delete = 1;
+-
+-/* Asks for confirmation before overwriting a file */
+-int confirm_overwrite = 1;
+-
+-/* Asks for confirmation before executing a program by pressing enter */
+-int confirm_execute = 0;
+-
+-/* Asks for confirmation before leaving the program */
+-int confirm_exit = 1;
+-
+-/* Asks for confirmation when using F3 to view a directory and there
+- are tagged files */
+-int confirm_view_dir = 0;
+-
+-/* This flag indicates if the pull down menus by default drop down */
+-int drop_menus = 0;
+-
+-/* The dialog handle for the main program */
+-Dlg_head *midnight_dlg;
+-
+-/* Subshell: if set, then the prompt was not saved on CONSOLE_SAVE */
+-/* We need to paint it after CONSOLE_RESTORE, see: load_prompt */
+-int update_prompt = 0;
+-
+-/* The home directory */
+-const char *home_dir = NULL;
+-
+-/* The value of the other directory, only used when loading the setup */
+-char *other_dir = NULL;
+-
+-/* Only used at program boot */
+-int boot_current_is_left = 1;
+-
+-static char *this_dir = NULL;
+-
+-/* If this is true, then when browsing the tree the other window will
+- * automatically reload it's directory with the contents of the currently
+- * selected directory.
+- */
+-int xtree_mode = 0;
+-
+-/* If set, then print to the given file the last directory we were at */
+-static char *last_wd_file = NULL;
+-static char *last_wd_string = NULL;
+-/* Set to 1 to suppress printing the last directory */
+-static int print_last_revert = 0;
+-
+-/* Force colors, only used by Slang */
+-int force_colors = 0;
+-
+-/* colors specified on the command line: they override any other setting */
+-char *command_line_colors = NULL;
+-
+-/* File name to view if argument was supplied */
+-static const char *view_one_file = NULL;
+-
+-/* File name to edit if argument was supplied */
+-const char *edit_one_file = NULL;
+-
+-/* Line to start the editor on */
+-static int edit_one_file_start_line = 0;
+-
+-/* Used so that widgets know if they are being destroyed or
+- shut down */
+-int midnight_shutdown = 0;
+-
+-/* The user's shell */
+-const char *shell = NULL;
+-
+-/* mc_home: The home of MC */
+-char *mc_home = NULL;
+-
+-char cmd_buf[512];
+-
+-static void
+-reload_panelized (WPanel *panel)
+-{
+- int i, j;
+- dir_list *list = &panel->dir;
+-
+- if (panel != current_panel)
+- mc_chdir (panel->cwd);
+-
+- for (i = 0, j = 0; i < panel->count; i++) {
+- if (list->list[i].f.marked) {
+- /* Unmark the file in advance. In case the following mc_lstat
+- * fails we are done, else we have to mark the file again
+- * (Note: do_file_mark depends on a valid "list->list [i].buf").
+- * IMO that's the best way to update the panel's summary status
+- * -- Norbert
+- */
+- do_file_mark (panel, i, 0);
+- }
+- if (mc_lstat (list->list[i].fname, &list->list[i].st)) {
+- g_free (list->list[i].fname);
+- continue;
+- }
+- if (list->list[i].f.marked)
+- do_file_mark (panel, i, 1);
+- if (j != i)
+- list->list[j] = list->list[i];
+- j++;
+- }
+- if (j == 0)
+- panel->count = set_zero_dir (list);
+- else
+- panel->count = j;
+-
+- if (panel != current_panel)
+- mc_chdir (current_panel->cwd);
+-}
+-
+-static void
+-update_one_panel_widget (WPanel *panel, int force_update,
+- const char *current_file)
+-{
+- int free_pointer;
+- char *my_current_file = NULL;
+-
+- if (force_update & UP_RELOAD) {
+- panel->is_panelized = 0;
+- mc_setctl (panel->cwd, VFS_SETCTL_FLUSH, 0);
+- memset (&(panel->dir_stat), 0, sizeof (panel->dir_stat));
+- }
+-
+- /* If current_file == -1 (an invalid pointer) then preserve selection */
+- if (current_file == UP_KEEPSEL) {
+- free_pointer = 1;
+- my_current_file = g_strdup (panel->dir.list[panel->selected].fname);
+- current_file = my_current_file;
+- } else
+- free_pointer = 0;
+-
+- if (panel->is_panelized)
+- reload_panelized (panel);
+- else
+- panel_reload (panel);
+-
+- try_to_select (panel, current_file);
+- panel->dirty = 1;
+-
+- if (free_pointer)
+- g_free (my_current_file);
+-}
+-
+-void
+-panel_clean_dir (WPanel *panel)
+-{
+- int count = panel->count;
+-
+- panel->count = 0;
+- panel->top_file = 0;
+- panel->selected = 0;
+- panel->marked = 0;
+- panel->dirs_marked = 0;
+- panel->total = 0;
+- panel->searching = 0;
+- panel->is_panelized = 0;
+- panel->dirty = 1;
+-
+- clean_dir (&panel->dir, count);
+-}
+-
+-static void
+-update_one_panel (int which, int force_update, const char *current_file)
+-{
+- WPanel *panel;
+-
+- if (get_display_type (which) != view_listing)
+- return;
+-
+- panel = (WPanel *) get_panel_widget (which);
+- update_one_panel_widget (panel, force_update, current_file);
+-}
+-
+-/* This routine reloads the directory in both panels. It tries to
+- * select current_file in current_panel and other_file in other_panel.
+- * If current_file == -1 then it automatically sets current_file and
+- * other_file to the currently selected files in the panels.
+- *
+- * if force_update has the UP_ONLY_CURRENT bit toggled on, then it
+- * will not reload the other panel.
+-*/
+-void
+-update_panels (int force_update, const char *current_file)
+-{
+- int reload_other = !(force_update & UP_ONLY_CURRENT);
+- WPanel *panel;
+-
+- update_one_panel (get_current_index (), force_update, current_file);
+- if (reload_other)
+- update_one_panel (get_other_index (), force_update, UP_KEEPSEL);
+-
+- if (get_current_type () == view_listing)
+- panel = (WPanel *) get_panel_widget (get_current_index ());
+- else
+- panel = (WPanel *) get_panel_widget (get_other_index ());
+-
+- mc_chdir (panel->cwd);
+-}
+-
+-/* Save current stat of directories to avoid reloading the panels */
+-/* when no modifications have taken place */
+-void
+-save_cwds_stat (void)
+-{
+- if (fast_reload) {
+- mc_stat (current_panel->cwd, &(current_panel->dir_stat));
+- if (get_other_type () == view_listing)
+- mc_stat (other_panel->cwd, &(other_panel->dir_stat));
+- }
+-}
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+-void
+-do_possible_cd (const char *new_dir)
+-{
+- if (!do_cd (new_dir, cd_exact))
+- message (1, _("Warning"),
+- _(" The Commander can't change to the directory that \n"
+- " the subshell claims you are in. Perhaps you have \n"
+- " deleted your working directory, or given yourself \n"
+- " extra access permissions with the \"su\" command? "));
+-}
+-
+-void
+-do_update_prompt (void)
+-{
+- if (update_prompt) {
+- printf ("%s", subshell_prompt);
+- fflush (stdout);
+- update_prompt = 0;
+- }
+-}
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-
+-void
+-change_panel (void)
+-{
+- free_completions (cmdline);
+- dlg_one_down (midnight_dlg);
+-}
+-
+-/* Stop MC main dialog and the current dialog if it exists.
+- * Needed to provide fast exit from MC viewer or editor on shell exit */
+-static void
+-stop_dialogs (void)
+-{
+- midnight_dlg->running = 0;
+- if (current_dlg) {
+- current_dlg->running = 0;
+- }
+-}
+-
+-static int
+-quit_cmd_internal (int quiet)
+-{
+- int q = quit;
+-
+- if (quiet || !confirm_exit) {
+- q = 1;
+- } else {
+- if (query_dialog
+- (_(" The Midnight Commander "),
+- _(" Do you really want to quit the Midnight Commander? "), 0,
+- 2, _("&Yes"), _("&No")) == 0)
+- q = 1;
+- }
+- if (q) {
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- if (!use_subshell)
+- stop_dialogs ();
+- else if ((q = exit_subshell ()))
+-#endif
+- stop_dialogs ();
+- }
+- if (q)
+- quit |= 1;
+- return quit;
+-}
+-
+-static void
+-quit_cmd (void)
+-{
+- quit_cmd_internal (0);
+-}
+-
+-void
+-quiet_quit_cmd (void)
+-{
+- print_last_revert = 1;
+- quit_cmd_internal (1);
+-}
+-
+-/*
+- * Touch window and refresh window functions
+- */
+-
+-/* This routine untouches the first line on both panels in order */
+-/* to avoid the refreshing the menu bar */
+-
+-void
+-repaint_screen (void)
+-{
+- do_refresh ();
+- mc_refresh ();
+-}
+-
+-/* Wrapper for do_subshell_chdir, check for availability of subshell */
+-void
+-subshell_chdir (const char *directory)
+-{
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- if (use_subshell) {
+- if (vfs_current_is_local ())
+- do_subshell_chdir (directory, 0, 1);
+- }
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-}
+-
+-void
+-directory_history_add (struct WPanel *panel, const char *dir)
+-{
+- char *tmp;
+-
+- tmp = g_strdup (dir);
+- strip_password (tmp, 1);
+-
+- panel->dir_history = list_append_unique (panel->dir_history, tmp);
+-}
+-
+-/*
+- * If we moved to the parent directory move the selection pointer to
+- * the old directory name; If we leave VFS dir, remove FS specificator.
+- *
+- * You do _NOT_ want to add any vfs aware code here. <pavel at ucw.cz>
+- */
+-static const char *
+-get_parent_dir_name (const char *cwd, const char *lwd)
+-{
+- const char *p;
+- if (strlen (lwd) > strlen (cwd))
+- if ((p = strrchr (lwd, PATH_SEP)) && !strncmp (cwd, lwd, p - lwd) &&
+- (strlen (cwd) == p - lwd || (p == lwd && cwd[0] == PATH_SEP &&
+- cwd[1] == '\0'))) {
+- return (p + 1);
+- }
+- return NULL;
+-}
+-
+-/*
+- * Changes the current directory of the panel.
+- * Don't record change in the directory history.
+- */
+-static int
+-_do_panel_cd (WPanel *panel, const char *new_dir, enum cd_enum cd_type)
+-{
+- const char *directory;
+- char *olddir;
+- char temp[MC_MAXPATHLEN];
+- char *translated_url;
+-
+- if (cd_type == cd_parse_command) {
+- while (*new_dir == ' ')
+- new_dir++;
+- }
+-
+- olddir = g_strdup (panel->cwd);
+- new_dir = translated_url = vfs_translate_url (new_dir);
+-
+- /* Convert *new_path to a suitable pathname, handle ~user */
+-
+- if (cd_type == cd_parse_command) {
+- if (!strcmp (new_dir, "-")) {
+- strcpy (temp, panel->lwd);
+- new_dir = temp;
+- }
+- }
+- directory = *new_dir ? new_dir : home_dir;
+-
+- if (mc_chdir (directory) == -1) {
+- strcpy (panel->cwd, olddir);
+- g_free (olddir);
+- g_free (translated_url);
+- return 0;
+- }
+- g_free (translated_url);
+-
+- /* Success: save previous directory, shutdown status of previous dir */
+- strcpy (panel->lwd, olddir);
+- free_completions (cmdline);
+-
+- mc_get_current_wd (panel->cwd, sizeof (panel->cwd) - 2);
+-
+- vfs_release_path (olddir);
+-
+- subshell_chdir (panel->cwd);
+-
+- /* Reload current panel */
+- panel_clean_dir (panel);
+- panel->count =
+- do_load_dir (panel->cwd, &panel->dir, panel->sort_type,
+- panel->reverse, panel->case_sensitive, panel->filter);
+- try_to_select (panel, get_parent_dir_name (panel->cwd, olddir));
+- load_hint (0);
+- panel->dirty = 1;
+- update_xterm_title_path ();
+-
+- g_free (olddir);
+-
+- return 1;
+-}
+-
+-/*
+- * Changes the current directory of the panel.
+- * Record change in the directory history.
+- */
+-int
+-do_panel_cd (struct WPanel *panel, const char *new_dir, enum cd_enum cd_type)
+-{
+- int r;
+-
+- r = _do_panel_cd (panel, new_dir, cd_type);
+- if (r)
+- directory_history_add (panel, panel->cwd);
+- return r;
+-}
+-
+-int
+-do_cd (const char *new_dir, enum cd_enum exact)
+-{
+- return (do_panel_cd (current_panel, new_dir, exact));
+-}
+-
+-void
+-directory_history_next (WPanel *panel)
+-{
+- GList *nextdir;
+-
+- nextdir = g_list_next (panel->dir_history);
+-
+- if (!nextdir)
+- return;
+-
+- if (_do_panel_cd (panel, (char *) nextdir->data, cd_exact))
+- panel->dir_history = nextdir;
+-}
+-
+-void
+-directory_history_prev (WPanel *panel)
+-{
+- GList *prevdir;
+-
+- prevdir = g_list_previous (panel->dir_history);
+-
+- if (!prevdir)
+- return;
+-
+- if (_do_panel_cd (panel, (char *) prevdir->data, cd_exact))
+- panel->dir_history = prevdir;
+-}
+-
+-void
+-directory_history_list (WPanel *panel)
+-{
+- char *s;
+-
+- if (!panel->dir_history)
+- return;
+-
+- s = show_hist (panel->dir_history, panel->widget.x, panel->widget.y);
+-
+- if (!s)
+- return;
+-
+- if (_do_panel_cd (panel, s, cd_exact))
+- directory_history_add (panel, panel->cwd);
+- else
+- message (1, MSG_ERROR, _("Cannot change directory"));
+- g_free (s);
+-}
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+-int
+-load_prompt (int fd, void *unused)
+-{
+- (void) fd;
+- (void) unused;
+-
+- if (!read_subshell_prompt ())
+- return 0;
+-
+- /* Don't actually change the prompt if it's invisible */
+- if (current_dlg == midnight_dlg && command_prompt) {
+- char *tmp_prompt;
+- int prompt_len;
+-
+- tmp_prompt = strip_ctrl_codes (subshell_prompt);
+- prompt_len = mbstrlen (tmp_prompt);
+-
+- /* Check for prompts too big */
+- if (COLS > 8 && prompt_len > COLS - 8) {
+- tmp_prompt[COLS - 8] = '\0';
+- prompt_len = COLS - 8;
+- }
+- prompt = tmp_prompt;
+- label_set_text (the_prompt, prompt);
+- winput_set_origin ((WInput *) cmdline, prompt_len,
+- COLS - prompt_len);
+-
+- /* since the prompt has changed, and we are called from one of the
+- * get_event channels, the prompt updating does not take place
+- * automatically: force a cursor update and a screen refresh
+- */
+- update_cursor (midnight_dlg);
+- mc_refresh ();
+- }
+- update_prompt = 1;
+- return 0;
+-}
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-
+-/* Used to emulate Lynx's entering leaving a directory with the arrow keys */
+-int
+-maybe_cd (int move_up_dir)
+-{
+- if (navigate_with_arrows) {
+- if (!cmdline->buffer[0]) {
+- if (move_up_dir) {
+- do_cd ("..", cd_exact);
+- return 1;
+- }
+- if (S_ISDIR (selection (current_panel)->st.st_mode)
+- || link_isdir (selection (current_panel))) {
+- do_cd (selection (current_panel)->fname, cd_exact);
+- return 1;
+- }
+- }
+- }
+- return 0;
+-}
+-
+-static void
+-sort_cmd (void)
+-{
+- WPanel *p;
+- sortfn *sort_order;
+-
+- if (!SELECTED_IS_PANEL)
+- return;
+-
+- p = MENU_PANEL;
+- sort_order = sort_box (p->sort_type, &p->reverse, &p->case_sensitive);
+-
+- panel_set_sort_order (p, sort_order);
+-
+-}
+-
+-static void
+-treebox_cmd (void)
+-{
+- char *sel_dir;
+-
+- sel_dir = tree_box (selection (current_panel)->fname);
+- if (sel_dir) {
+- do_cd (sel_dir, cd_exact);
+- g_free (sel_dir);
+- }
+-}
+-
+-#ifdef LISTMODE_EDITOR
+-static void
+-listmode_cmd (void)
+-{
+- char *newmode;
+-
+- if (get_current_type () != view_listing)
+- return;
+-
+- newmode = listmode_edit (current_panel->user_format);
+- if (!newmode)
+- return;
+-
+- g_free (current_panel->user_format);
+- current_panel->list_type = list_user;
+- current_panel->user_format = newmode;
+- set_panel_formats (current_panel);
+-
+- do_refresh ();
+-}
+-#endif /* LISTMODE_EDITOR */
+-
+-/* NOTICE: hotkeys specified here are overriden in menubar_paint_idx (alex) */
+-static menu_entry LeftMenu[] = {
+- {' ', N_("&Listing mode..."), 'L', listing_cmd},
+- {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
+- {' ', N_("&Info C-x i"), 'I', info_cmd},
+- {' ', N_("&Tree"), 'T', tree_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("&Sort order..."), 'S', sort_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("&Filter..."), 'F', filter_cmd},
+-#ifdef USE_NETCODE
+- {' ', "", ' ', 0},
+-#ifdef WITH_MCFS
+- {' ', N_("&Network link..."), 'N', netlink_cmd},
+-#endif
+- {' ', N_("FT&P link..."), 'P', ftplink_cmd},
+- {' ', N_("S&hell link..."), 'H', fishlink_cmd},
+-#ifdef WITH_SMBFS
+- {' ', N_("SM&B link..."), 'B', smblink_cmd},
+-#endif
+-#endif
+- {' ', "", ' ', 0},
+- {' ', N_("&Rescan C-r"), 'R', reread_cmd}
+-};
+-
+-static menu_entry RightMenu[] = {
+- {' ', N_("&Listing mode..."), 'L', listing_cmd},
+- {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
+- {' ', N_("&Info C-x i"), 'I', info_cmd},
+- {' ', N_("&Tree"), 'T', tree_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("&Sort order..."), 'S', sort_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("&Filter..."), 'F', filter_cmd},
+-#ifdef USE_NETCODE
+- {' ', "", ' ', 0},
+-#ifdef WITH_MCFS
+- {' ', N_("&Network link..."), 'N', netlink_cmd},
+-#endif
+- {' ', N_("FT&P link..."), 'P', ftplink_cmd},
+- {' ', N_("S&hell link..."), 'H', fishlink_cmd},
+-#ifdef WITH_SMBFS
+- {' ', N_("SM&B link..."), 'B', smblink_cmd},
+-#endif
+-#endif
+- {' ', "", ' ', 0},
+- {' ', N_("&Rescan C-r"), 'R', reread_cmd}
+-};
+-
+-static menu_entry FileMenu[] = {
+- {' ', N_("&User menu F2"), 'U', user_file_menu_cmd},
+- {' ', N_("&View F3"), 'V', view_cmd},
+- {' ', N_("Vie&w file... "), 'W', view_file_cmd},
+- {' ', N_("&Filtered view M-!"), 'F', filtered_view_cmd},
+- {' ', N_("&Edit F4"), 'E', edit_cmd},
+- {' ', N_("&Copy F5"), 'C', copy_cmd},
+- {' ', N_("c&Hmod C-x c"), 'H', chmod_cmd},
+- {' ', N_("&Link C-x l"), 'L', link_cmd},
+- {' ', N_("&SymLink C-x s"), 'S', symlink_cmd},
+- {' ', N_("edit s&Ymlink C-x C-s"), 'Y', edit_symlink_cmd},
+- {' ', N_("ch&Own C-x o"), 'O', chown_cmd},
+- {' ', N_("&Advanced chown "), 'A', chown_advanced_cmd},
+- {' ', N_("&Rename/Move F6"), 'R', ren_cmd},
+- {' ', N_("&Mkdir F7"), 'M', mkdir_cmd},
+- {' ', N_("&Delete F8"), 'D', delete_cmd},
+- {' ', N_("&Quick cd M-c"), 'Q', quick_cd_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("select &Group M-+"), 'G', select_cmd},
+- {' ', N_("u&Nselect group M-\\"), 'N', unselect_cmd},
+- {' ', N_("reverse selec&Tion M-*"), 'T', reverse_selection_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("e&Xit F10"), 'X', quit_cmd}
+-};
+-
+-static menu_entry CmdMenu[] = {
+- /* I know, I'm lazy, but the tree widget when it's not running
+- * as a panel still has some problems, I have not yet finished
+- * the WTree widget port, sorry.
+- */
+- {' ', N_("&Directory tree"), 'D', treebox_cmd},
+- {' ', N_("&Find file M-?"), 'F', find_cmd},
+- {' ', N_("s&Wap panels C-u"), 'W', swap_cmd},
+- {' ', N_("switch &Panels on/off C-o"), 'P', view_other_cmd},
+- {' ', N_("&Compare directories C-x d"), 'C', compare_dirs_cmd},
+- {' ', N_("e&Xternal panelize C-x !"), 'X', external_panelize},
+- {' ', N_("show directory s&Izes"), 'I', dirsizes_cmd},
+- {' ', "", ' ', 0},
+- {' ', N_("command &History"), 'H', history_cmd},
+- {' ', N_("di&Rectory hotlist C-\\"), 'R', quick_chdir_cmd},
+-#ifdef USE_VFS
+- {' ', N_("&Active VFS list C-x a"), 'A', reselect_vfs},
+-#endif
+-#ifdef WITH_BACKGROUND
+- {' ', N_("&Background jobs C-x j"), 'B', jobs_cmd},
+-#endif
+- {' ', "", ' ', 0},
+-#ifdef USE_EXT2FSLIB
+- {' ', N_("&Undelete files (ext2fs only)"), 'U', undelete_cmd},
+-#endif
+-#ifdef LISTMODE_EDITOR
+- {' ', N_("&Listing format edit"), 'L', listmode_cmd},
+-#endif
+-#if defined (USE_EXT2FSLIB) || defined (LISTMODE_EDITOR)
+- {' ', "", ' ', 0},
+-#endif
+- {' ', N_("Edit &extension file"), 'E', ext_cmd},
+- {' ', N_("Edit &menu file"), 'M', edit_mc_menu_cmd},
+-#ifdef USE_INTERNAL_EDIT
+- {' ', N_("Edit edi&tor menu file"), 'T', edit_user_menu_cmd},
+- {' ', N_("Edit &syntax file"), 'S', edit_syntax_cmd}
+-#endif /* USE_INTERNAL_EDIT */
+-};
+-
+-/* Must keep in sync with the constants in menu_cmd */
+-static menu_entry OptMenu[] = {
+- {' ', N_("&Configuration..."), 'C', configure_box},
+- {' ', N_("&Layout..."), 'L', layout_cmd},
+- {' ', N_("c&Onfirmation..."), 'O', confirm_box},
+- {' ', N_("&Display bits..."), 'D', display_bits_box},
+- {' ', N_("learn &Keys..."), 'K', learn_keys},
+-#ifdef USE_VFS
+- {' ', N_("&Virtual FS..."), 'V', configure_vfs},
+-#endif /* !USE_VFS */
+- {' ', "", ' ', 0},
+- {' ', N_("&Save setup"), 'S', save_setup_cmd}
+-};
+-
+-#define menu_entries(x) sizeof(x)/sizeof(menu_entry)
+-
+-static Menu *MenuBar[5];
+-
+-void
+-init_menu (void)
+-{
+- MenuBar[0] =
+- create_menu (horizontal_split ? _(" &Above ") : _(" &Left "),
+- LeftMenu, menu_entries (LeftMenu),
+- "[Left and Right Menus]");
+- MenuBar[1] =
+- create_menu (_(" &File "), FileMenu, menu_entries (FileMenu),
+- "[File Menu]");
+- MenuBar[2] =
+- create_menu (_(" &Command "), CmdMenu, menu_entries (CmdMenu),
+- "[Command Menu]");
+- MenuBar[3] =
+- create_menu (_(" &Options "), OptMenu, menu_entries (OptMenu),
+- "[Options Menu]");
+- MenuBar[4] =
+- create_menu (horizontal_split ? _(" &Below ") : _(" &Right "),
+- RightMenu, menu_entries (RightMenu),
+- "[Left and Right Menus]");
+-}
+-
+-void
+-done_menu (void)
+-{
+- int i;
+-
+- for (i = 0; i < 5; i++) {
+- destroy_menu (MenuBar[i]);
+- }
+-}
+-
+-static void
+-menu_last_selected_cmd (void)
+-{
+- the_menubar->active = 1;
+- the_menubar->dropped = drop_menus;
+- the_menubar->previous_widget = midnight_dlg->current->dlg_id;
+- dlg_select_widget (the_menubar);
+-}
+-
+-static void
+-menu_cmd (void)
+-{
+- if (the_menubar->active)
+- return;
+-
+- if ((get_current_index () == 0) ^ (!current_panel->active))
+- the_menubar->selected = 0;
+- else
+- the_menubar->selected = 4;
+- menu_last_selected_cmd ();
+-}
+-
+-/* Flag toggling functions */
+-void
+-toggle_fast_reload (void)
+-{
+- fast_reload = !fast_reload;
+- if (fast_reload_w == 0 && fast_reload) {
+- message (0, _(" Information "),
+- _
+- (" Using the fast reload option may not reflect the exact \n"
+- " directory contents. In this case you'll need to do a \n"
+- " manual reload of the directory. See the man page for \n"
+- " the details. "));
+- fast_reload_w = 1;
+- }
+-}
+-
+-void
+-toggle_mix_all_files (void)
+-{
+- mix_all_files = !mix_all_files;
+- update_panels (UP_RELOAD, UP_KEEPSEL);
+-}
+-
+-void
+-toggle_show_backup (void)
+-{
+- show_backups = !show_backups;
+- update_panels (UP_RELOAD, UP_KEEPSEL);
+-}
+-
+-void
+-toggle_show_hidden (void)
+-{
+- show_dot_files = !show_dot_files;
+- update_panels (UP_RELOAD, UP_KEEPSEL);
+-}
+-
+-/*
+- * Just a hack for allowing url-like pathnames to be accepted from the
+- * command line.
+- */
+-static void
+-translated_mc_chdir (char *dir)
+-{
+- char *newdir;
+-
+- newdir = vfs_translate_url (dir);
+- mc_chdir (newdir);
+- g_free (newdir);
+-}
+-
+-static void
+-create_panels (void)
+-{
+- int current_index;
+- int other_index;
+- int current_mode;
+- int other_mode;
+- char original_dir[1024];
+-
+- original_dir[0] = 0;
+-
+- if (boot_current_is_left) {
+- current_index = 0;
+- other_index = 1;
+- current_mode = startup_left_mode;
+- other_mode = startup_right_mode;
+- } else {
+- current_index = 1;
+- other_index = 0;
+- current_mode = startup_right_mode;
+- other_mode = startup_left_mode;
+- }
+- /* Creates the left panel */
+- if (this_dir) {
+- if (other_dir) {
+- /* Ok, user has specified two dirs, save the original one,
+- * since we may not be able to chdir to the proper
+- * second directory later
+- */
+- mc_get_current_wd (original_dir, sizeof (original_dir) - 2);
+- }
+- translated_mc_chdir (this_dir);
+- }
+- set_display_type (current_index, current_mode);
+-
+- /* The other panel */
+- if (other_dir) {
+- if (original_dir[0])
+- translated_mc_chdir (original_dir);
+- translated_mc_chdir (other_dir);
+- }
+- set_display_type (other_index, other_mode);
+-
+- if (startup_left_mode == view_listing) {
+- current_panel = left_panel;
+- } else {
+- if (right_panel)
+- current_panel = right_panel;
+- else
+- current_panel = left_panel;
+- }
+-
+- /* Create the nice widgets */
+- cmdline = command_new (0, 0, 0);
+- the_prompt = label_new (0, 0, prompt);
+- the_prompt->transparent = 1;
+- the_bar = buttonbar_new (keybar_visible);
+-
+- the_hint = label_new (0, 0, 0);
+- the_hint->transparent = 1;
+- the_hint->auto_adjust_cols = 0;
+- the_hint->widget.cols = COLS;
+-
+- the_menubar = menubar_new (0, 0, COLS, MenuBar, 5);
+-}
+-
+-static void
+-copy_current_pathname (void)
+-{
+- if (!command_prompt)
+- return;
+-
+- command_insert (cmdline, current_panel->cwd, 0);
+- if (current_panel->cwd[strlen (current_panel->cwd) - 1] != PATH_SEP)
+- command_insert (cmdline, PATH_SEP_STR, 0);
+-}
+-
+-static void
+-copy_other_pathname (void)
+-{
+- if (get_other_type () != view_listing)
+- return;
+-
+- if (!command_prompt)
+- return;
+-
+- command_insert (cmdline, other_panel->cwd, 0);
+- if (other_panel->cwd[strlen (other_panel->cwd) - 1] != PATH_SEP)
+- command_insert (cmdline, PATH_SEP_STR, 0);
+-}
+-
+-static void
+-copy_readlink (WPanel *panel)
+-{
+- if (!command_prompt)
+- return;
+- if (S_ISLNK (selection (panel)->st.st_mode)) {
+- char buffer[MC_MAXPATHLEN];
+- char *p =
+- concat_dir_and_file (panel->cwd, selection (panel)->fname);
+- int i;
+-
+- i = mc_readlink (p, buffer, MC_MAXPATHLEN - 1);
+- g_free (p);
+- if (i > 0) {
+- buffer[i] = 0;
+- command_insert (cmdline, buffer, 1);
+- }
+- }
+-}
+-
+-static void
+-copy_current_readlink (void)
+-{
+- copy_readlink (current_panel);
+-}
+-
+-static void
+-copy_other_readlink (void)
+-{
+- if (get_other_type () != view_listing)
+- return;
+- copy_readlink (other_panel);
+-}
+-
+-/* Insert the selected file name into the input line */
+-static void
+-copy_prog_name (void)
+-{
+- char *tmp;
+- if (!command_prompt)
+- return;
+-
+- if (get_current_type () == view_tree) {
+- WTree *tree = (WTree *) get_panel_widget (get_current_index ());
+- tmp = tree_selected_name (tree);
+- } else
+- tmp = selection (current_panel)->fname;
+-
+- command_insert (cmdline, tmp, 1);
+-}
+-
+-static void
+-copy_tagged (WPanel *panel)
+-{
+- int i;
+-
+- if (!command_prompt)
+- return;
+- input_disable_update (cmdline);
+- if (panel->marked) {
+- for (i = 0; i < panel->count; i++) {
+- if (panel->dir.list[i].f.marked)
+- command_insert (cmdline, panel->dir.list[i].fname, 1);
+- }
+- } else {
+- command_insert (cmdline, panel->dir.list[panel->selected].fname,
+- 1);
+- }
+- input_enable_update (cmdline);
+-}
+-
+-static void
+-copy_current_tagged (void)
+-{
+- copy_tagged (current_panel);
+-}
+-
+-static void
+-copy_other_tagged (void)
+-{
+- if (get_other_type () != view_listing)
+- return;
+- copy_tagged (other_panel);
+-}
+-
+-static void
+-init_labels (void)
+-{
+- buttonbar_set_label (midnight_dlg, 1, _("Help"), help_cmd);
+- buttonbar_set_label (midnight_dlg, 2, _("Menu"), user_file_menu_cmd);
+- buttonbar_set_label (midnight_dlg, 9, _("PullDn"), menu_cmd);
+- buttonbar_set_label (midnight_dlg, 10, _("Quit"), quit_cmd);
+-}
+-
+-static const key_map ctl_x_map[] = {
+- {XCTRL ('c'), quit_cmd},
+- {'d', compare_dirs_cmd},
+-#ifdef USE_VFS
+- {'a', reselect_vfs},
+-#endif /* USE_VFS */
+- {'p', copy_current_pathname},
+- {XCTRL ('p'), copy_other_pathname},
+- {'t', copy_current_tagged},
+- {XCTRL ('t'), copy_other_tagged},
+- {'c', chmod_cmd},
+- {'o', chown_cmd},
+- {'r', copy_current_readlink},
+- {XCTRL ('r'), copy_other_readlink},
+- {'l', link_cmd},
+- {'s', symlink_cmd},
+- {XCTRL ('s'), edit_symlink_cmd},
+- {'i', info_cmd_no_menu},
+- {'q', quick_cmd_no_menu},
+- {'h', add2hotlist_cmd},
+- {'!', external_panelize},
+-#ifdef WITH_BACKGROUND
+- {'j', jobs_cmd},
+-#endif /* WITH_BACKGROUND */
+- {0, 0}
+-};
+-
+-static int ctl_x_map_enabled = 0;
+-
+-static void
+-ctl_x_cmd (void)
+-{
+- ctl_x_map_enabled = 1;
+-}
+-
+-static void
+-nothing (void)
+-{
+-}
+-
+-static const key_map default_map[] = {
+- {KEY_F (19), menu_last_selected_cmd},
+- {KEY_F (20), quiet_quit_cmd},
+-
+- {XCTRL ('@'), single_dirsize_cmd},
+-
+- /* Copy useful information to the command line */
+- {ALT ('a'), copy_current_pathname},
+- {ALT ('A'), copy_other_pathname},
+-
+- {ALT ('c'), quick_cd_cmd},
+-
+- /* To access the directory hotlist */
+- {XCTRL ('\\'), quick_chdir_cmd},
+-
+- /* Suspend */
+- {XCTRL ('z'), suspend_cmd},
+-
+- /* The filtered view command */
+- {ALT ('!'), filtered_view_cmd},
+-
+- /* Find file */
+- {ALT ('?'), find_cmd},
+-
+- /* Panel refresh */
+- {XCTRL ('r'), reread_cmd},
+-
+- /* Toggle listing between long, user defined and full formats */
+- {ALT ('t'), toggle_listing_cmd},
+-
+- /* Swap panels */
+- {XCTRL ('u'), swap_cmd},
+-
+- /* View output */
+- {XCTRL ('o'), view_other_cmd},
+-
+- /* Control-X keybindings */
+- {XCTRL ('x'), ctl_x_cmd},
+-
+- /* Trap dlg's exit commands */
+- {ESC_CHAR, nothing},
+- {XCTRL ('c'), nothing},
+- {XCTRL ('g'), nothing},
+- {0, 0},
+-};
+-
+-static void
+-setup_sigwinch (void)
+-{
+-#if (defined(HAVE_SLANG) || (NCURSES_VERSION_MAJOR >= 4)) && defined(SIGWINCH)
+- struct sigaction act, oact;
+- act.sa_handler = flag_winch;
+- sigemptyset (&act.sa_mask);
+- act.sa_flags = 0;
+-#ifdef SA_RESTART
+- act.sa_flags |= SA_RESTART;
+-#endif
+- sigaction (SIGWINCH, &act, &oact);
+-#endif
+-}
+-
+-static void
+-setup_pre (void)
+-{
+- /* Call all the inits */
+-#ifdef HAVE_CHARSET
+-/*
+- * Don't restrict the output on the screen manager level,
+- * the translation tables take care of it.
+- */
+-#define full_eight_bits (1)
+-#define eight_bit_clean (1)
+-#endif /* !HAVE_CHARSET */
+-
+-#ifndef HAVE_SLANG
+- meta (stdscr, eight_bit_clean);
+-#else
+- SLsmg_Display_Eight_Bit = full_eight_bits ? 128 : 160;
+-#endif
+-}
+-
+-static void
+-init_xterm_support (void)
+-{
+- const char *termvalue;
+-
+- termvalue = getenv ("TERM");
+- if (!termvalue || !(*termvalue)) {
+- fputs (_("The TERM environment variable is unset!\n"), stderr);
+- exit (1);
+- }
+-
+- /* Check mouse capabilities */
+- xmouse_seq = tty_tgetstr ("Km");
+-
+- if (strcmp (termvalue, "cygwin") == 0) {
+- force_xterm = 1;
+- use_mouse_p = MOUSE_DISABLED;
+- }
+-
+- if (force_xterm || strncmp (termvalue, "xterm", 5) == 0
+- || strncmp (termvalue, "rxvt", 4) == 0
+- || strcmp (termvalue, "Eterm") == 0
+- || strcmp (termvalue, "dtterm") == 0) {
+- xterm_flag = 1;
+-
+- /* Default to the standard xterm sequence */
+- if (!xmouse_seq) {
+- xmouse_seq = ESC_STR "[M";
+- }
+-
+- /* Enable mouse unless explicitly disabled by --nomouse */
+- if (use_mouse_p != MOUSE_DISABLED) {
+- const char *color_term = getenv ("COLORTERM");
+- if (strncmp (termvalue, "rxvt", 4) == 0 ||
+- (color_term != NULL && strncmp (color_term, "rxvt", 4) == 0) ||
+- strcmp (termvalue, "Eterm") == 0) {
+- use_mouse_p = MOUSE_XTERM_NORMAL_TRACKING;
+- } else {
+- use_mouse_p = MOUSE_XTERM_BUTTON_EVENT_TRACKING;
+- }
+- }
+- }
+-}
+-
+-static void
+-setup_mc (void)
+-{
+- setup_pre ();
+- init_menu ();
+- create_panels ();
+- setup_panels ();
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- if (use_subshell)
+- add_select_channel (subshell_pty, load_prompt, 0);
+-#endif /* !HAVE_SUBSHELL_SUPPORT */
+-
+- setup_sigwinch ();
+-
+- if (baudrate () < 9600 || slow_terminal) {
+- verbose = 0;
+- }
+- init_mouse ();
+-}
+-
+-static void
+-setup_dummy_mc ()
+-{
+- char d[MC_MAXPATHLEN];
+-
+- mc_get_current_wd (d, MC_MAXPATHLEN);
+- setup_mc ();
+- mc_chdir (d);
+-}
+-
+-static void
+-done_mc (void)
+-{
+- disable_mouse ();
+-
+- done_menu ();
+-
+- /* Setup shutdown
+- *
+- * We sync the profiles since the hotlist may have changed, while
+- * we only change the setup data if we have the auto save feature set
+- */
+- if (auto_save_setup)
+- save_setup (); /* does also call save_hotlist */
+- else
+- save_hotlist ();
+- done_screen ();
+- vfs_add_current_stamps ();
+-}
+-
+-/* This should be called after destroy_dlg since panel widgets
+- * save their state on the profiles
+- */
+-static void
+-done_mc_profile (void)
+-{
+- if (!auto_save_setup)
+- profile_forget_profile (profile_name);
+- sync_profiles ();
+- done_setup ();
+- free_profiles ();
+-}
+-
+-static cb_ret_t
+-midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
+-{
+- int i;
+-
+- switch (msg) {
+-
+- case DLG_IDLE:
+- /* We only need the first idle event */
+- set_idle_proc (h, 0);
+- if (auto_menu) {
+- user_file_menu_cmd ();
+- }
+- return MSG_HANDLED;
+-
+- case DLG_KEY:
+- if (ctl_x_map_enabled) {
+- ctl_x_map_enabled = 0;
+- for (i = 0; ctl_x_map[i].key_code; i++)
+- if (parm == ctl_x_map[i].key_code) {
+- (*ctl_x_map[i].fn) ();
+- return MSG_HANDLED;
+- }
+- }
+-
+- /* FIXME: should handle all menu shortcuts before this point */
+- if (the_menubar->active)
+- return MSG_NOT_HANDLED;
+-
+- if (parm == KEY_F (10)) {
+- quit_cmd ();
+- return MSG_HANDLED;
+- }
+-
+- if (parm == '\t')
+- free_completions (cmdline);
+-
+- if (parm == '\n') {
+- for (i = 0; cmdline->buffer[i] && (cmdline->buffer[i] == ' ' ||
+- cmdline->buffer[i] == '\t'); i++);
+- if (cmdline->buffer[i]) {
+- send_message ((Widget *) cmdline, WIDGET_KEY, parm);
+- return MSG_HANDLED;
+- }
+- stuff (cmdline, "", 0);
+- cmdline->point = 0;
+- }
+-
+- /* Ctrl-Enter and Alt-Enter */
+- if (((parm & ~(KEY_M_CTRL | KEY_M_ALT)) == '\n')
+- && (parm & (KEY_M_CTRL | KEY_M_ALT))) {
+- copy_prog_name ();
+- return MSG_HANDLED;
+- }
+-
+- /* Ctrl-Shift-Enter */
+- if (parm == (KEY_M_CTRL | KEY_M_SHIFT | '\n')) {
+- copy_current_pathname ();
+- copy_prog_name ();
+- return MSG_HANDLED;
+- }
+-
+- if ((!alternate_plus_minus || !(console_flag || xterm_flag))
+- && !quote && !current_panel->searching) {
+- if (!only_leading_plus_minus) {
+- /* Special treatement, since the input line will eat them */
+- if (parm == '+') {
+- select_cmd ();
+- return MSG_HANDLED;
+- }
+-
+- if (parm == '\\' || parm == '-') {
+- unselect_cmd ();
+- return MSG_HANDLED;
+- }
+-
+- if (parm == '*') {
+- reverse_selection_cmd ();
+- return MSG_HANDLED;
+- }
+- } else if (!command_prompt || !cmdline->buffer[0]) {
+- /* Special treatement '+', '-', '\', '*' only when this is
+- * first char on input line
+- */
+-
+- if (parm == '+') {
+- select_cmd ();
+- return MSG_HANDLED;
+- }
+-
+- if (parm == '\\' || parm == '-') {
+- unselect_cmd ();
+- return MSG_HANDLED;
+- }
+-
+- if (parm == '*') {
+- reverse_selection_cmd ();
+- return MSG_HANDLED;
+- }
+- }
+- }
+- return MSG_NOT_HANDLED;
+-
+- case DLG_HOTKEY_HANDLED:
+- if ((get_current_type () == view_listing) && current_panel->searching) {
+- current_panel->searching = 0;
+- current_panel->dirty = 1;
+- }
+- return MSG_HANDLED;
+-
+- case DLG_UNHANDLED_KEY:
+- if (command_prompt) {
+- int v;
+-
+- v = send_message ((Widget *) cmdline, WIDGET_KEY, parm);
+- if (v)
+- return v;
+- }
+- if (ctl_x_map_enabled) {
+- ctl_x_map_enabled = 0;
+- for (i = 0; ctl_x_map[i].key_code; i++)
+- if (parm == ctl_x_map[i].key_code) {
+- (*ctl_x_map[i].fn) ();
+- return MSG_HANDLED;
+- }
+- } else {
+- for (i = 0; default_map[i].key_code; i++) {
+- if (parm == default_map[i].key_code) {
+- (*default_map[i].fn) ();
+- return MSG_HANDLED;
+- }
+- }
+- }
+- return MSG_NOT_HANDLED;
+-
+- case DLG_DRAW:
+- /* We handle the special case of the output lines */
+- if (console_flag && output_lines)
+- show_console_contents (output_start_y,
+- LINES - output_lines - keybar_visible -
+- 1, LINES - keybar_visible - 1);
+- return MSG_HANDLED;
+-
+- case DLG_POST_KEY:
+- if (!the_menubar->active)
+- update_dirty_panels ();
+- return MSG_HANDLED;
+-
+- default:
+- return default_dlg_callback (h, msg, parm);
+- }
+-}
+-
+-/* Show current directory in the xterm title */
+-void
+-update_xterm_title_path (void)
+-{
+- char *p, *s;
+-
+- if (xterm_flag && xterm_title) {
+- p = s = g_strdup (strip_home_and_password (current_panel->cwd));
+- do {
+-#ifndef UTF8
+- if (!is_printable ((unsigned char) *s))
+-#else /* UTF8 */
+- if (*(unsigned char *)s < ' ')
+-#endif /* UTF8 */
+- *s = '?';
+- } while (*++s);
+- fprintf (stdout, "\33]0;mc - %s\7", p);
+- fflush (stdout);
+- g_free (p);
+- }
+-}
+-
+-/*
+- * Load new hint and display it.
+- * IF force is not 0, ignore the timeout.
+- */
+-void
+-load_hint (int force)
+-{
+- char *hint;
+-
+- if (!the_hint->widget.parent)
+- return;
+-
+- if (!message_visible) {
+- label_set_text (the_hint, 0);
+- return;
+- }
+-
+- if ((hint = get_random_hint (force))) {
+- if (*hint)
+- set_hintbar (hint);
+- g_free (hint);
+- } else {
+- char text[BUF_SMALL];
+-
+- g_snprintf (text, sizeof (text), _("GNU Midnight Commander %s\n"),
+- VERSION);
+- set_hintbar (text);
+- }
+-}
+-
+-static void
+-setup_panels_and_run_mc (void)
+-{
+- add_widget (midnight_dlg, the_menubar);
+- add_widget (midnight_dlg, get_panel_widget (0));
+- add_widget (midnight_dlg, get_panel_widget (1));
+- add_widget (midnight_dlg, the_hint);
+- load_hint (1);
+- add_widget (midnight_dlg, cmdline);
+- add_widget (midnight_dlg, the_prompt);
+- add_widget (midnight_dlg, the_bar);
+- init_labels ();
+-
+- if (boot_current_is_left)
+- dlg_select_widget (get_panel_widget (0));
+- else
+- dlg_select_widget (get_panel_widget (1));
+-
+- /* Run the Midnight Commander if no file was specified in the command line */
+- run_dlg (midnight_dlg);
+-}
+-
+-/* result must be free'd (I think this should go in util.c) */
+-static char *
+-prepend_cwd_on_local (const char *filename)
+-{
+- char *d;
+- int l;
+-
+- if (vfs_file_is_local (filename)) {
+- if (*filename == PATH_SEP) /* an absolute pathname */
+- return g_strdup (filename);
+- d = g_malloc (MC_MAXPATHLEN + strlen (filename) + 2);
+- mc_get_current_wd (d, MC_MAXPATHLEN);
+- l = strlen (d);
+- d[l++] = PATH_SEP;
+- strcpy (d + l, filename);
+- canonicalize_pathname (d);
+- return d;
+- } else
+- return g_strdup (filename);
+-}
+-
+-static int
+-mc_maybe_editor_or_viewer (void)
+-{
+- if (!(view_one_file || edit_one_file))
+- return 0;
+-
+- setup_dummy_mc ();
+-
+- /* Invoke the internal view/edit routine with:
+- * the default processing and forcing the internal viewer/editor
+- */
+- if (view_one_file) {
+- char *path = NULL;
+- path = prepend_cwd_on_local (view_one_file);
+- view_file (path, 0, 1);
+- g_free (path);
+- }
+-#ifdef USE_INTERNAL_EDIT
+- else {
+- edit_file (edit_one_file, edit_one_file_start_line);
+- }
+-#endif /* USE_INTERNAL_EDIT */
+- midnight_shutdown = 1;
+- done_mc ();
+- return 1;
+-}
+-
+-/* Run the main dialog that occupies the whole screen */
+-static void
+-do_nc (void)
+-{
+- int midnight_colors[4];
+-
+- midnight_colors[0] = NORMAL_COLOR; /* NORMALC */
+- midnight_colors[1] = REVERSE_COLOR; /* FOCUSC */
+- midnight_colors[2] = INPUT_COLOR; /* HOT_NORMALC */
+- midnight_colors[3] = NORMAL_COLOR; /* HOT_FOCUSC */
+-
+- midnight_dlg =
+- create_dlg (0, 0, LINES, COLS, midnight_colors, midnight_callback,
+- "[main]", NULL, DLG_WANT_IDLE);
+-
+- /* Check if we were invoked as an editor or file viewer */
+- if (mc_maybe_editor_or_viewer ())
+- return;
+-
+- setup_mc ();
+-
+- setup_panels_and_run_mc ();
+-
+- /* Program end */
+- midnight_shutdown = 1;
+-
+- /* destroy_dlg destroys even current_panel->cwd, so we have to save a copy :) */
+- if (last_wd_file && vfs_current_is_local ()) {
+- last_wd_string = g_strdup (current_panel->cwd);
+- }
+- done_mc ();
+-
+- destroy_dlg (midnight_dlg);
+- current_panel = 0;
+- done_mc_profile ();
+-}
+-
+-/* POSIX version. The only version we support. */
+-static void
+-OS_Setup (void)
+-{
+- const char *mc_libdir;
+- shell = getenv ("SHELL");
+- if (!shell || !*shell) {
+- struct passwd *pwd;
+- pwd = getpwuid (geteuid ());
+- if (pwd != NULL)
+- shell = g_strdup (pwd->pw_shell);
+- }
+- if (!shell || !*shell)
+- shell = "/bin/sh";
+-
+- /* This is the directory, where MC was installed, on Unix this is DATADIR */
+- /* and can be overriden by the MC_DATADIR environment variable */
+- if ((mc_libdir = getenv ("MC_DATADIR")) != NULL) {
+- mc_home = g_strdup (mc_libdir);
+- } else {
+- mc_home = g_strdup (DATADIR);
+- }
+-}
+-
+-static void
+-sigchld_handler_no_subshell (int sig)
+-{
+-#ifdef __linux__
+- int pid, status;
+-
+- if (!console_flag)
+- return;
+-
+- /* COMMENT: if it were true that after the call to handle_console(..INIT)
+- the value of console_flag never changed, we could simply not install
+- this handler at all if (!console_flag && !use_subshell). */
+-
+- /* That comment is no longer true. We need to wait() on a sigchld
+- handler (that's at least what the tarfs code expects currently). */
+-
+- pid = waitpid (cons_saver_pid, &status, WUNTRACED | WNOHANG);
+-
+- if (pid == cons_saver_pid) {
+-
+- if (WIFSTOPPED (status)) {
+- /* Someone has stopped cons.saver - restart it */
+- kill (pid, SIGCONT);
+- } else {
+- /* cons.saver has died - disable console saving */
+- handle_console (CONSOLE_DONE);
+- console_flag = 0;
+- }
+- }
+- /* If we got here, some other child exited; ignore it */
+-#endif /* __linux__ */
+-
+- (void) sig;
+-}
+-
+-static void
+-init_sigchld (void)
+-{
+- struct sigaction sigchld_action;
+-
+- sigchld_action.sa_handler =
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- use_subshell ? sigchld_handler :
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+- sigchld_handler_no_subshell;
+-
+- sigemptyset (&sigchld_action.sa_mask);
+-
+-#ifdef SA_RESTART
+- sigchld_action.sa_flags = SA_RESTART;
+-#else
+- sigchld_action.sa_flags = 0;
+-#endif /* !SA_RESTART */
+-
+- if (sigaction (SIGCHLD, &sigchld_action, NULL) == -1) {
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- /*
+- * This may happen on QNX Neutrino 6, where SA_RESTART
+- * is defined but not implemented. Fallback to no subshell.
+- */
+- use_subshell = 0;
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+- }
+-}
+-
+-static void
+-print_mc_usage (poptContext ctx, FILE *stream)
+-{
+- int leftColWidth;
+-
+- poptSetOtherOptionHelp (ctx,
+- _("[flags] [this_dir] [other_panel_dir]\n"));
+-
+- /* print help for options */
+- leftColWidth = poptPrintHelp (ctx, stream, 0);
+- fprintf (stream, " %-*s %s\n", leftColWidth, _("+number"),
+- _("Set initial line number for the internal editor"));
+- fputs (_
+- ("\n"
+- "Please send any bug reports (including the output of `mc -V')\n"
+- "to mc-devel at gnome.org\n"), stream);
+- show_version (0);
+-}
+-
+-static void
+-print_color_usage (void)
+-{
+- /*
+- * FIXME: undocumented keywords: viewunderline, editnormal, editbold,
+- * and editmarked. To preserve translations, lines should be split.
+- */
+- /* TRANSLATORS: don't translate keywords and names of colors */
+- fputs (_
+- ("--colors KEYWORD={FORE},{BACK}\n\n"
+- "{FORE} and {BACK} can be omitted, and the default will be used\n"
+- "\n" "Keywords:\n"
+- " Global: errors, reverse, gauge, input, viewunderline\n"
+- " File display: normal, selected, marked, markselect\n"
+- " Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus, errdhotnormal,\n"
+- " errdhotfocus\n"
+- " Menus: menu, menuhot, menusel, menuhotsel\n"
+- " Editor: editnormal, editbold, editmarked\n"
+- " Help: helpnormal, helpitalic, helpbold, helplink, helpslink\n"
+- " File types: directory, executable, link, stalelink, device, special, core\n"
+- "\n" "Colors:\n"
+- " black, gray, red, brightred, green, brightgreen, brown,\n"
+- " yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
+- " brightcyan, lightgray and white\n\n"), stdout);
+-}
+-
+-static void
+-process_args (poptContext ctx, int c, const char *option_arg)
+-{
+- switch (c) {
+- case 'V':
+- show_version (1);
+- exit (0);
+- break;
+-
+- case 'c':
+- disable_colors = 0;
+-#ifdef HAVE_SLANG
+- force_colors = 1;
+-#endif /* HAVE_SLANG */
+- break;
+-
+- case 'f':
+- printf ("%s\n", mc_home);
+- exit (0);
+- break;
+-
+-#ifdef USE_NETCODE
+- case 'l':
+- mc_setctl ("/#ftp:", VFS_SETCTL_LOGFILE, (void *) option_arg);
+-#ifdef WITH_SMBFS
+- smbfs_set_debugf (option_arg);
+-#endif /* WITH_SMBFS */
+- break;
+-
+-#ifdef WITH_SMBFS
+- case 'D':
+- smbfs_set_debug (atoi (option_arg));
+- break;
+-#endif /* WITH_SMBFS */
+-#endif /* USE_NETCODE */
+-
+- case 'd':
+- use_mouse_p = MOUSE_DISABLED;
+- break;
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- case 'u':
+- use_subshell = 0;
+- break;
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-
+- case 'H':
+- print_color_usage ();
+- exit (0);
+- break;
+-
+- case 'h':
+- print_mc_usage (ctx, stdout);
+- exit (0);
+- }
+-}
+-
+-static const struct poptOption argument_table[] = {
+- /* generic options */
+- {"help", 'h', POPT_ARG_NONE, NULL, 'h',
+- N_("Displays this help message"), NULL},
+- {"version", 'V', POPT_ARG_NONE, NULL, 'V',
+- N_("Displays the current version"), NULL},
+-
+- /* terminal options */
+- {"xterm", 'x', POPT_ARG_NONE, &force_xterm, 0,
+- N_("Forces xterm features"), NULL},
+- {"nomouse", 'd', POPT_ARG_NONE, NULL, 'd',
+- N_("Disable mouse support in text version"), NULL},
+-#if defined(HAVE_SLANG)
+- {"termcap", 't', 0, &SLtt_Try_Termcap, 0,
+- N_("Tries to use termcap instead of terminfo"), NULL},
+-#endif
+- {"resetsoft", 'k', POPT_ARG_NONE, &reset_hp_softkeys, 0,
+- N_("Resets soft keys on HP terminals"), NULL},
+- {"slow", 's', POPT_ARG_NONE, &slow_terminal, 0,
+- N_("To run on slow terminals"), NULL},
+- {"stickchars", 'a', 0, &force_ugly_line_drawing, 0,
+- N_("Use stickchars to draw"), NULL},
+-
+- /* color options */
+- {"nocolor", 'b', POPT_ARG_NONE, &disable_colors, 0,
+- N_("Requests to run in black and white"), NULL},
+- {"color", 'c', POPT_ARG_NONE, NULL, 'c',
+- N_("Request to run in color mode"), NULL},
+- {"colors", 'C', POPT_ARG_STRING, &command_line_colors, 0,
+- N_("Specifies a color configuration"), NULL},
+- {"help-colors", 'H', POPT_ARG_NONE, NULL, 'H',
+- N_("Displays a help screen on how to change the color scheme"), NULL},
+-
+- /* debug options */
+-#ifdef USE_NETCODE
+- {"ftplog", 'l', POPT_ARG_STRING, NULL, 'l',
+- N_("Log ftp dialog to specified file"), NULL},
+-#ifdef WITH_SMBFS
+- {"debuglevel", 'D', POPT_ARG_STRING, NULL, 'D',
+- N_("Set debug level"), NULL},
+-#endif
+-#endif
+-
+- /* options for wrappers */
+- {"datadir", 'f', POPT_ARG_NONE, NULL, 'f',
+- N_("Print data directory"), NULL},
+- {"printwd", 'P', POPT_ARG_STRING, &last_wd_file, 0,
+- N_("Print last working directory to specified file"), NULL},
+-
+- /* subshell options */
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- {"subshell", 'U', POPT_ARG_NONE, &use_subshell, 0,
+- N_("Enables subshell support (default)"), NULL},
+- {"nosubshell", 'u', POPT_ARG_NONE, NULL, 'u',
+- N_("Disables subshell support"), NULL},
+-#endif
+-
+- /* single file operations */
+- {"view", 'v', POPT_ARG_STRING, &view_one_file, 0,
+- N_("Launches the file viewer on a file"), NULL},
+-#ifdef USE_INTERNAL_EDIT
+- {"edit", 'e', POPT_ARG_STRING, &edit_one_file, 0,
+- N_("Edits one file"), NULL},
+-#endif
+-
+- {NULL, '\0', 0, NULL, 0, NULL, NULL}
+-};
+-
+-static void
+-handle_args (int argc, char *argv[])
+-{
+- char *tmp;
+- poptContext ctx;
+- const char *base;
+- int c;
+-
+- ctx =
+- poptGetContext ("mc", argc, argv, argument_table,
+- POPT_CONTEXT_NO_EXEC);
+-
+-#ifdef USE_TERMCAP
+- SLtt_Try_Termcap = 1;
+-#endif
+-
+- while ((c = poptGetNextOpt (ctx)) > 0) {
+- process_args (ctx, c, poptGetOptArg (ctx));
+- }
+-
+- if (c < -1) {
+- print_mc_usage (ctx, stderr);
+- fprintf (stderr, "%s: %s\n",
+- poptBadOption (ctx, POPT_BADOPTION_NOALIAS),
+- poptStrerror (c));
+- exit (1);
+- }
+-
+- tmp = poptGetArg (ctx);
+-
+- /*
+- * Check for special invocation names mcedit and mcview,
+- * if none apply then set the current directory and the other
+- * directory from the command line arguments
+- */
+- base = x_basename (argv[0]);
+- if (!STRNCOMP (base, "mce", 3) || !STRCOMP (base, "vi")) {
+- edit_one_file = "";
+- if (tmp) {
+- if (*tmp == '+' && isdigit ((unsigned char) tmp[1])) {
+- int start_line = atoi (tmp);
+- if (start_line > 0) {
+- char *file = poptGetArg (ctx);
+- if (file) {
+- tmp = file;
+- edit_one_file_start_line = start_line;
+- }
+- }
+- }
+- edit_one_file = g_strdup (tmp);
+- }
+- } else if (!STRNCOMP (base, "mcv", 3) || !STRCOMP (base, "view")) {
+- if (tmp)
+- view_one_file = g_strdup (tmp);
+- else {
+- fputs ("No arguments given to the viewer\n", stderr);
+- exit (1);
+- }
+- } else {
+- /* sets the current dir and the other dir */
+- if (tmp) {
+- this_dir = g_strdup (tmp);
+- if ((tmp = poptGetArg (ctx)))
+- other_dir = g_strdup (tmp);
+- }
+- }
+-
+- poptFreeContext (ctx);
+-}
+-
+-/*
+- * The compatibility_move_mc_files routine is intended to
+- * move all of the hidden .mc files into a private ~/.mc
+- * directory in the home directory, to avoid cluttering the users.
+- *
+- * Previous versions of the program had all of their files in
+- * the $HOME, we are now putting them in $HOME/.mc
+- */
+-
+-static int
+-do_mc_filename_rename (const char *o_name, const char *n_name)
+-{
+- char *full_o_name = concat_dir_and_file (home_dir, o_name);
+- char *full_n_name = g_strconcat (home_dir, MC_BASE, n_name, (char *) NULL);
+- int move;
+-
+- move = 0 == rename (full_o_name, full_n_name);
+- g_free (full_o_name);
+- g_free (full_n_name);
+- return move;
+-}
+-
+-static int
+-compatibility_move_mc_files (void)
+-{
+- struct stat s;
+- int move = 0;
+- char *mc_dir = concat_dir_and_file (home_dir, ".mc");
+-
+- if (stat (mc_dir, &s) && (errno == ENOENT)
+- && (mkdir (mc_dir, 0777) != -1)) {
+-
+- move = do_mc_filename_rename (".mc.ini", "ini");
+- move += do_mc_filename_rename (".mc.hot", "hotlist");
+- move += do_mc_filename_rename (".mc.ext", "bindings");
+- move += do_mc_filename_rename (".mc.menu", "menu");
+- move += do_mc_filename_rename (".mc.bashrc", "bashrc");
+- move += do_mc_filename_rename (".mc.inputrc", "inputrc");
+- move += do_mc_filename_rename (".mc.tcshrc", "tcshrc");
+- move += do_mc_filename_rename (".mc.tree", "Tree");
+- }
+- g_free (mc_dir);
+- return move;
+-}
+-
+-int
+-main (int argc, char *argv[])
+-{
+- /* if on, it displays the information that files have been moved to ~/.mc */
+- int show_change_notice = 0;
+-
+- /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
+- setlocale (LC_ALL, "");
+- bindtextdomain ("mc", LOCALEDIR);
+- textdomain ("mc");
+-
+- /* Set up temporary directory */
+- mc_tmpdir ();
+-
+- OS_Setup ();
+-
+- /* This variable is used by the subshell */
+- home_dir = getenv ("HOME");
+- if (!home_dir) {
+- /* mc_home was computed by OS_Setup */
+- home_dir = mc_home;
+- }
+-
+- vfs_init ();
+-
+-#ifdef HAVE_SLANG
+- SLtt_Ignore_Beep = 1;
+-#endif
+-
+- handle_args (argc, argv);
+-
+- /* NOTE: This has to be called before slang_init or whatever routine
+- calls any define_sequence */
+- init_key ();
+-
+- /* Must be done before installing the SIGCHLD handler [[FIXME]] */
+- handle_console (CONSOLE_INIT);
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- /* Don't use subshell when invoked as viewer or editor */
+- if (edit_one_file || view_one_file)
+- use_subshell = 0;
+-
+- if (use_subshell)
+- subshell_get_console_attributes ();
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-
+- /* Install the SIGCHLD handler; must be done before init_subshell() */
+- init_sigchld ();
+-
+- show_change_notice = compatibility_move_mc_files ();
+-
+- /* We need this, since ncurses endwin () doesn't restore the signals */
+- save_stop_handler ();
+-
+- /* Must be done before init_subshell, to set up the terminal size: */
+- /* FIXME: Should be removed and LINES and COLS computed on subshell */
+-#ifdef HAVE_SLANG
+- slang_init ();
+-#endif
+- /* NOTE: This call has to be after slang_init. It's the small part from
+- the previous init_key which had to be moved after the call of slang_init */
+- init_key_input_fd ();
+-
+- load_setup ();
+-
+- init_curses ();
+-
+- init_xterm_support ();
+-
+-#ifdef HAVE_SUBSHELL_SUPPORT
+-
+- /* Done here to ensure that the subshell doesn't */
+- /* inherit the file descriptors opened below, etc */
+- if (use_subshell)
+- init_subshell ();
+-
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+-
+- /* Removing this from the X code let's us type C-c */
+- load_key_defs ();
+-
+- /* Also done after init_subshell, to save any shell init file messages */
+- if (console_flag)
+- handle_console (CONSOLE_SAVE);
+-
+- if (alternate_plus_minus)
+- application_keypad_mode ();
+-
+- if (show_change_notice) {
+- message (1, _(" Notice "),
+- _(" The Midnight Commander configuration files \n"
+- " are now stored in the ~/.mc directory, the \n"
+- " files have been moved now\n"));
+- }
+-#ifdef HAVE_SUBSHELL_SUPPORT
+- if (use_subshell) {
+- prompt = strip_ctrl_codes (subshell_prompt);
+- if (!prompt)
+- prompt = "";
+- } else
+-#endif /* HAVE_SUBSHELL_SUPPORT */
+- prompt = (geteuid () == 0) ? "# " : "$ ";
+-
+- /* Program main loop */
+- if (!midnight_shutdown)
+- do_nc ();
+-
+- /* Save the tree store */
+- tree_store_save ();
+-
+- /* Virtual File System shutdown */
+- vfs_shut ();
+-
+- flush_extension_file (); /* does only free memory */
+-
+- endwin ();
+-#ifdef HAVE_SLANG
+- slang_shutdown ();
+-#endif
+-
+- if (console_flag && !(quit & SUBSHELL_EXIT))
+- handle_console (CONSOLE_RESTORE);
+- if (alternate_plus_minus)
+- numeric_keypad_mode ();
+-
+- signal (SIGCHLD, SIG_DFL); /* Disable the SIGCHLD handler */
+-
+- if (console_flag)
+- handle_console (CONSOLE_DONE);
+- putchar ('\n'); /* Hack to make shell's prompt start at left of screen */
+-
+- if (last_wd_file && last_wd_string && !print_last_revert
+- && !edit_one_file && !view_one_file) {
+- int last_wd_fd =
+- open (last_wd_file, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL,
+- S_IRUSR | S_IWUSR);
+-
+- if (last_wd_fd != -1) {
+- write (last_wd_fd, last_wd_string, strlen (last_wd_string));
+- close (last_wd_fd);
+- }
+- }
+- g_free (last_wd_string);
+-
+- g_free (mc_home);
+- done_key ();
+-#ifdef HAVE_CHARSET
+- free_codepages_list ();
+-#endif
+- g_free (this_dir);
+- g_free (other_dir);
+-
+- return 0;
+-}
+Index: mc-4.6.2~git20080311/src/widget.c
+===================================================================
+--- mc-4.6.2~git20080311.orig/src/widget.c 2008-05-17 17:42:47.000000000 +0200
++++ mc-4.6.2~git20080311/src/widget.c 2008-05-17 17:43:05.000000000 +0200
+@@ -1946,52 +1946,86 @@
+ return in;
+ }
+
+-
+-/* Listbox widget */
+-
+-/* Should draw the scrollbar, but currently draws only
+- * indications that there is more information
+- */
+-static int listbox_cdiff (WLEntry *s, WLEntry *e);
++/* Vertical scrollbar widget */
+
+-static void
+-listbox_drawscroll (WListbox *l)
++void
++vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
++ int selected, int count, gboolean color)
+ {
+ int line;
+- int i, top;
+- int max_line = l->height-1;
+-
++ int i;
++
+ /* Are we at the top? */
+- widget_move (&l->widget, 0, l->width);
+- if (l->list == l->top)
+- one_vline ();
++ widget_move (&widget, tpad, width);
++#ifndef UTF8
++ if (!selected)
++ one_vline ();
+ else
+- addch ('^');
++ addch ('^');
++#else
++ if (color) attrset (MARKED_COLOR);
++ if (is_utf8)
++ SLsmg_write_string("â´");
++ else
++ addch ('^');
++ if (color) attrset (NORMAL_COLOR);
++#endif
+
+ /* Are we at the bottom? */
+- widget_move (&l->widget, max_line, l->width);
+- top = listbox_cdiff (l->list, l->top);
+- if ((top + l->height == l->count) || l->height >= l->count)
+- one_vline ();
++ widget_move (&widget, height-1-bpad, width);
++#ifndef UTF8
++ if (selected == count-1)
++ one_vline ();
++ else
++ addch ('v');
++#else
++ if (color) attrset (MARKED_COLOR);
++ if (is_utf8)
++ SLsmg_write_string("â¾");
+ else
+- addch ('v');
++ addch('v');
++ if (color) attrset (NORMAL_COLOR);
++#endif
+
+ /* Now draw the nice relative pointer */
+- if (l->count)
+- line = 1+ ((l->pos * (l->height-2)) / l->count);
++ if (count > 1)
++ line = tpad + 1 + ((selected * (height-3-tpad-bpad)) / (count-1));
+ else
+- line = 0;
+-
+- for (i = 1; i < max_line; i++){
+- widget_move (&l->widget, i, l->width);
+- if (i != line)
+- one_vline ();
+- else
+- addch ('*');
++ line = 0;
++
++ for (i = tpad + 1; i < height-1-bpad; i++){
++ widget_move (&widget, i, width);
++ if (i != line)
++#ifndef UTF8
++ one_vline ();
++ else
++ addch ('*');
++#else
++ if (is_utf8)
++ SLsmg_write_string("â");
++ else
++ one_vline();
++ else {
++ if (color) attrset (MARKED_COLOR);
++ if (is_utf8)
++ SLsmg_write_string("â");
++ else
++ addch('*');
++ if (color) attrset (NORMAL_COLOR);
++ }
++#endif
+ }
+ }
+-
+-static void
++
++
++/* Listbox widget */
++
++/* Should draw the scrollbar, but currently draws only
++ * indications that there is more information
++ */
++static int listbox_cdiff (WLEntry *s, WLEntry *e);
++
++void
+ listbox_draw (WListbox *l, int focused)
+ {
+ WLEntry *e;
+@@ -2032,7 +2066,7 @@
+ if (!l->scrollbar)
+ return;
+ attrset (normalc);
+- listbox_drawscroll (l);
++ vscrollbar (l->widget, l->height, l->width, 0, 0, l->pos, l->count, FALSE);
+ }
+
+ /* Returns the number of items between s and e,
+Index: mc-4.6.2~git20080311/src/screen.c
+===================================================================
+--- mc-4.6.2~git20080311.orig/src/screen.c 2008-05-17 17:42:47.000000000 +0200
++++ mc-4.6.2~git20080311/src/screen.c 2008-05-17 17:43:05.000000000 +0200
+@@ -889,6 +889,9 @@
+ }
+ #endif /* HAVE_SLANG */
+
++ vscrollbar (panel->widget, panel->widget.lines, panel->widget.cols-1, 2, 2,
++ panel->selected, panel->count, TRUE);
++
+ if (panel->active)
+ attrset (REVERSE_COLOR);
+
+@@ -1489,7 +1492,7 @@
+ panel->dirty = 1;
+
+ /* Status needn't to be split */
+- usable_columns = ((panel->widget.cols-2)/((isstatus)
++ usable_columns = ((panel->widget.cols-3)/((isstatus)
+ ? 1
+ : (panel->split+1))) - (!isstatus && panel->split);
+
+Index: mc-4.6.2~git20080311/src/widget.h
+===================================================================
+--- mc-4.6.2~git20080311.orig/src/widget.h 2008-05-17 17:42:47.000000000 +0200
++++ mc-4.6.2~git20080311/src/widget.h 2008-05-17 17:43:05.000000000 +0200
+@@ -169,6 +169,10 @@
+ /* Listbox manager */
+ WLEntry *listbox_get_data (WListbox *l, int pos);
+
++/* Vertical scrollbar */
++void vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
++ int selected, int count, gboolean color);
++
+ /* search text int listbox entries */
+ WLEntry *listbox_search_text (WListbox *l, const char *text);
+ void listbox_select_entry (WListbox *l, WLEntry *dest);
+Index: mc-4.6.2~git20080311/src/main.h
+===================================================================
+--- mc-4.6.2~git20080311.orig/src/main.h 2008-02-19 18:25:27.000000000 +0100
++++ mc-4.6.2~git20080311/src/main.h 2008-05-17 17:45:33.000000000 +0200
+@@ -69,6 +69,7 @@
+ extern int only_leading_plus_minus;
+ extern int output_starts_shell;
+ extern int midnight_shutdown;
++extern gboolean is_utf8;
+ extern char cmd_buf [512];
+ extern const char *shell;
+
Added: trunk/debian/patches/utf8/mc-utf8-nlink.patch
===================================================================
--- trunk/debian/patches/utf8/mc-utf8-nlink.patch (rev 0)
+++ trunk/debian/patches/utf8/mc-utf8-nlink.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,11 @@
+--- mc/src/screen.c
++++ mc/src/screen.c
+@@ -669,7 +669,7 @@
+ SLsmg_write_nwchars (((wchar_t *) buffer)
+ + txtlen - n2, n2);
+ } else
+- SLsmg_write_nwchars ((wchar_t *) buffer, len);
++ SLsmg_write_nwchars ((wchar_t *) buffer + still, len);
+ } else {
+ printw ("%*s", still, "");
+ SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
Added: trunk/debian/patches/utf8/mc-utf8.patch
===================================================================
--- trunk/debian/patches/utf8/mc-utf8.patch (rev 0)
+++ trunk/debian/patches/utf8/mc-utf8.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,5338 @@
+--- mc/acinclude.m4.utf8 2006-09-09 00:35:29.000000000 +0200
++++ mc/acinclude.m4 2007-01-04 16:20:56.000000000 +0100
+@@ -399,14 +399,14 @@ AC_DEFUN([MC_WITH_SLANG], [
+ fi
+
+ 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 test x$with_screen = xslang; then
+ AC_DEFINE(HAVE_SYSTEM_SLANG, 1,
+--- mc/src/layout.c.utf8 2006-11-10 01:22:30.000000000 +0100
++++ mc/src/layout.c 2007-01-04 16:20:56.000000000 +0100
+@@ -366,36 +366,36 @@ init_layout (void)
+
+ while (i--) {
+ s_split_direction[i] = _(s_split_direction[i]);
+- l1 = strlen (s_split_direction[i]) + 7;
++ l1 = mbstrlen (s_split_direction[i]) + 7;
+ if (l1 > first_width)
+ first_width = l1;
+ }
+
+ for (i = 0; i <= 8; i++) {
+ check_options[i].text = _(check_options[i].text);
+- l1 = strlen (check_options[i].text) + 7;
++ l1 = mbstrlen (check_options[i].text) + 7;
+ if (l1 > first_width)
+ first_width = l1;
+ }
+
+- l1 = strlen (title1) + 1;
++ l1 = mbstrlen (title1) + 1;
+ if (l1 > first_width)
+ first_width = l1;
+
+- l1 = strlen (title2) + 1;
++ l1 = mbstrlen (title2) + 1;
+ if (l1 > first_width)
+ first_width = l1;
+
+
+- second_width = strlen (title3) + 1;
++ second_width = mbstrlen (title3) + 1;
+ for (i = 0; i < 6; i++) {
+ check_options[i].text = _(check_options[i].text);
+- l1 = strlen (check_options[i].text) + 7;
++ l1 = mbstrlen (check_options[i].text) + 7;
+ if (l1 > second_width)
+ second_width = l1;
+ }
+ if (console_flag) {
+- l1 = strlen (output_lines_label) + 13;
++ l1 = mbstrlen (output_lines_label) + 13;
+ if (l1 > second_width)
+ second_width = l1;
+ }
+@@ -409,14 +409,14 @@ init_layout (void)
+ *
+ * Now the last thing to do - properly space buttons...
+ */
+- l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */
+- +strlen (save_button) /* notice: it is 3 char less because */
+- +strlen (cancel_button); /* of '&' char in button text */
++ l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */
++ +mbstrlen (save_button) /* notice: it is 3 char less because */
++ +mbstrlen (cancel_button); /* of '&' char in button text */
+
+ i = (first_width + second_width - l1) / 4;
+ b1 = 5 + i;
+- b2 = b1 + strlen (ok_button) + i + 6;
+- b3 = b2 + strlen (save_button) + i + 4;
++ b2 = b1 + mbstrlen (ok_button) + i + 6;
++ b3 = b2 + mbstrlen (save_button) + i + 4;
+
+ i18n_layt_flag = 1;
+ }
+@@ -684,7 +684,7 @@ setup_panels (void)
+ panel_do_cols (0);
+ panel_do_cols (1);
+
+- promptl = strlen (prompt);
++ promptl = mbstrlen (prompt);
+
+ widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
+
+--- mc/src/tty.c.utf8 2006-05-23 16:20:39.000000000 +0200
++++ mc/src/tty.c 2007-01-04 16:20:56.000000000 +0100
+@@ -134,10 +134,12 @@ tty_print_char(int c)
+ * defined or not. Congratulations! At least, they left the API call
+ * for SLsmg_write_nchars as it has always been.
+ */
+- char ch;
+-
+- ch = c;
+- SLsmg_write_nchars(&ch, 1);
++
++ /* The above comment is a nonsense, SLsmg_write_char(c) works pretty
++ * good for me. So please don't mess with Red Hat people.
++ * Jindrich Novy (jnovy at redhat.com)
++ */
++ SLsmg_write_char(c);
+ #else
+ addch(c);
+ #endif
+--- mc/src/option.c.utf8 2006-02-28 18:44:28.000000000 +0100
++++ mc/src/option.c 2007-01-04 16:20:56.000000000 +0100
+@@ -123,12 +123,12 @@ init_configure (void)
+ title2 = _(" Pause after run... ");
+ title3 = _(" Other options ");
+
+- first_width = strlen (title1) + 1;
+- second_width = strlen (title3) + 1;
++ first_width = mbstrlen (title1) + 1;
++ second_width = mbstrlen (title3) + 1;
+
+ for (i = 0; check_options[i].text; i++) {
+ check_options[i].text = _(check_options[i].text);
+- l1 = strlen (check_options[i].text) + 7;
++ l1 = mbstrlen (check_options[i].text) + 7;
+ if (i >= OTHER_OPTIONS) {
+ if (l1 > first_width)
+ first_width = l1;
+@@ -141,23 +141,23 @@ init_configure (void)
+ i = PAUSE_OPTIONS;
+ while (i--) {
+ pause_options[i] = _(pause_options[i]);
+- l1 = strlen (pause_options[i]) + 7;
++ l1 = mbstrlen (pause_options[i]) + 7;
+ if (l1 > first_width)
+ first_width = l1;
+ }
+
+- l1 = strlen (title2) + 1;
++ l1 = mbstrlen (title2) + 1;
+ if (l1 > first_width)
+ first_width = l1;
+
+- l1 = 11 + strlen (ok_button)
+- + strlen (save_button)
+- + strlen (cancel_button);
++ l1 = 11 + mbstrlen (ok_button)
++ + mbstrlen (save_button)
++ + mbstrlen (cancel_button);
+
+ i = (first_width + second_width - l1) / 4;
+ b1 = 5 + i;
+- b2 = b1 + strlen (ok_button) + i + 6;
+- b3 = b2 + strlen (save_button) + i + 4;
++ b2 = b1 + mbstrlen (ok_button) + i + 6;
++ b3 = b2 + mbstrlen (save_button) + i + 4;
+
+ i18n_config_flag = 1;
+ }
+--- mc/src/menu.h.utf8 2004-12-03 20:17:47.000000000 +0100
++++ mc/src/menu.h 2007-01-04 16:20:56.000000000 +0100
+@@ -21,6 +21,8 @@ typedef struct Menu {
+ menu_entry *entries;
+ int start_x; /* position relative to menubar start */
+ char *help_node;
++ wchar_t **wentries;
++ wchar_t *wname;
+ } Menu;
+
+ extern int menubar_visible;
+--- mc/src/menu.c.utf8 2005-09-06 22:36:23.000000000 +0200
++++ mc/src/menu.c 2007-01-04 16:20:56.000000000 +0100
+@@ -22,6 +22,7 @@
+ #include <string.h>
+
+ #include <sys/types.h>
++#include <wchar.h>
+
+ #include "global.h"
+ #include "tty.h"
+@@ -53,35 +54,95 @@ create_menu (const char *name, menu_entr
+ {
+ Menu *menu;
+ const char *cp;
++ int wlen = 0;
++ mbstate_t s;
+
+ menu = (Menu *) g_malloc (sizeof (*menu));
+ menu->count = count;
+ menu->max_entry_len = 20;
+ menu->entries = entries;
++ menu->name = g_strdup (name);
++ menu_scan_hotkey (menu);
++#ifdef UTF8
++ menu->wentries = NULL;
++ menu->wname = NULL;
++ if (SLsmg_Is_Unicode) {
++ const char *str = menu->name;
++ memset (&s, 0, sizeof (s));
++ wlen = mbsrtowcs (NULL, &str, -1, &s);
++ if (wlen > 0)
++ ++wlen;
++ else {
++ wlen = 0;
++ memset (&s, 0, sizeof (s));
++ }
++ }
++#endif
+
+ if (entries != (menu_entry*) NULL) {
+ register menu_entry* mp;
+ for (mp = entries; count--; mp++) {
+ if (mp->text[0] != '\0') {
++ int len;
+ #ifdef ENABLE_NLS
+ mp->text = _(mp->text);
+ #endif /* ENABLE_NLS */
+ cp = strchr (mp->text,'&');
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ len = mbstrlen(mp->text) + 1;
++ wlen += len;
++ menu->max_entry_len = max (len - 1, menu->max_entry_len);
++ } else
++#endif
++ len = strlen (mp->text);
+
+ if (cp != NULL && *(cp+1) != '\0') {
+ mp->hot_key = tolower ((unsigned char) *(cp+1));
+- menu->max_entry_len = max ((int) (strlen (mp->text) - 1),
+- menu->max_entry_len);
++ menu->max_entry_len = max (len - 1, menu->max_entry_len);
+ } else {
+- menu->max_entry_len = max ((int) strlen (mp->text),
+- menu->max_entry_len);
++ menu->max_entry_len = max (len, menu->max_entry_len);
+ }
+ }
+ }
+ }
+
+- menu->name = g_strdup (name);
+- menu_scan_hotkey(menu);
++#ifdef UTF8
++ if (wlen) {
++ wchar_t *wp;
++ const char *str;
++ int len;
++
++ menu->wentries = (wchar_t **)
++ g_malloc (sizeof (wchar_t *) * menu->count
++ + wlen * sizeof (wchar_t));
++ wp = (wchar_t *) (menu->wentries + menu->count);
++ str = menu->name;
++ len = mbsrtowcs (wp, &str, wlen, &s);
++ if (len > 0) {
++ menu->wname = wp;
++ wlen -= len + 1;
++ wp += len + 1;
++ } else
++ memset (&s, 0, sizeof (s));
++ if (menu->entries != NULL)
++ for (count = 0; count < menu->count; ++count)
++ if (menu->entries[count].text[0] != '\0') {
++ str = menu->entries[count].text;
++ menu->wentries[count] = wp;
++ len = mbsrtowcs (wp, &str, wlen, &s);
++ if (len > 0) {
++ wlen -= len + 1;
++ wp += len + 1;
++ } else {
++ memset (&s, 0, sizeof (s));
++ *wp++ = L'\0';
++ --wlen;
++ }
++ }
++ }
++#endif
++
+ menu->start_x = 0;
+ menu->help_node = g_strdup (help_node);
+ return menu;
+@@ -112,8 +173,26 @@ static void menubar_paint_idx (WMenu *me
+ const char *text;
+
+ addch((unsigned char)menu->entries [idx].first_letter);
+- for (text = menu->entries [idx].text; *text; text++)
+- {
++#ifdef UTF8
++ if (menu->wentries) {
++ wchar_t *wtext, *wp;
++
++ for (wtext = wp = menu->wentries [idx]; *wtext; wtext++) {
++ if (*wtext == L'&') {
++ if (wtext > wp)
++ SLsmg_write_nwchars (wp, wtext - wp);
++ attrset (color == MENU_SELECTED_COLOR ?
++ MENU_HOTSEL_COLOR : MENU_HOT_COLOR);
++ SLsmg_write_nwchars (++wtext, 1);
++ attrset (color);
++ wp = wtext + 1;
++ }
++ }
++ if (wtext > wp)
++ SLsmg_write_nwchars (wp, wtext - wp);
++ } else
++#endif
++ for (text = menu->entries [idx].text; *text; text++) {
+ if (*text != '&')
+ addch(*text);
+ else {
+@@ -122,7 +201,7 @@ static void menubar_paint_idx (WMenu *me
+ addch(*(++text));
+ attrset(color);
+ }
+- }
++ }
+ }
+ widget_move (&menubar->widget, y, x + 1);
+ }
+@@ -168,6 +247,12 @@ static void menubar_draw (WMenu *menubar
+ if (menubar->active)
+ attrset(i == menubar->selected?MENU_SELECTED_COLOR:SELECTED_COLOR);
+ widget_move (&menubar->widget, 0, menubar->menu [i]->start_x);
++#ifdef UTF8
++ if (menubar->menu [i]->wname)
++ SLsmg_write_nwchars (menubar->menu [i]->wname,
++ wcslen (menubar->menu [i]->wname));
++ else
++#endif
+ tty_printf ("%s", menubar->menu [i]->name);
+ }
+
+@@ -493,7 +578,13 @@ menubar_arrange(WMenu* menubar)
+
+ for (i = 0; i < items; i++)
+ {
+- int len = strlen(menubar->menu[i]->name);
++ int len;
++#ifdef UTF8
++ if (menubar->menu[i]->wname)
++ len = wcslen (menubar->menu[i]->wname);
++ else
++#endif
++ len = strlen(menubar->menu[i]->name);
+ menubar->menu[i]->start_x = start_x;
+ start_x += len + gap;
+ }
+@@ -506,7 +597,13 @@ menubar_arrange(WMenu* menubar)
+ for (i = 0; i < items; i++)
+ {
+ /* preserve length here, to be used below */
+- gap -= (menubar->menu[i]->start_x = strlen(menubar->menu[i]->name));
++#ifdef UTF8
++ if (menubar->menu[i]->wname)
++ menubar->menu[i]->start_x = wcslen (menubar->menu[i]->wname);
++ else
++#endif
++ menubar->menu[i]->start_x = strlen (menubar->menu[i]->name);
++ gap -= menubar->menu[i]->start_x;
+ }
+
+ gap /= (items - 1);
+@@ -530,6 +627,9 @@ menubar_arrange(WMenu* menubar)
+ void
+ destroy_menu (Menu *menu)
+ {
++#ifdef UTF8
++ g_free (menu->wentries);
++#endif
+ g_free (menu->name);
+ g_free (menu->help_node);
+ g_free (menu);
+--- mc/src/filegui.c.utf8 2006-01-30 18:01:58.000000000 +0100
++++ mc/src/filegui.c 2007-01-04 16:20:56.000000000 +0100
+@@ -65,6 +65,7 @@
+ #include "filegui.h"
+ #include "key.h" /* get_event */
+ #include "util.h" /* strip_password() */
++#include "tty.h"
+
+ /* }}} */
+
+@@ -563,8 +564,8 @@ init_replace (FileOpContext *ctx, enum O
+ * longest of "Overwrite..." labels
+ * (assume "Target date..." are short enough)
+ */
+- l1 = max (strlen (rd_widgets[6].text),
+- strlen (rd_widgets[11].text));
++ l1 = max (mbstrlen (rd_widgets[6].text),
++ mbstrlen (rd_widgets[11].text));
+
+ /* longest of button rows */
+ i = sizeof (rd_widgets) / sizeof (rd_widgets[0]);
+@@ -575,7 +576,7 @@ init_replace (FileOpContext *ctx, enum O
+ l2 = max (l2, l);
+ l = 0;
+ }
+- l += strlen (rd_widgets[i].text) + 4;
++ l += mbstrlen (rd_widgets[i].text) + 4;
+ }
+ }
+ l2 = max (l2, l); /* last row */
+@@ -593,12 +594,12 @@ init_replace (FileOpContext *ctx, enum O
+ l = l1;
+ }
+ rd_widgets[i].xpos = l;
+- l += strlen (rd_widgets[i].text) + 4;
++ l += mbstrlen (rd_widgets[i].text) + 4;
+ }
+ }
+ /* Abort button is centered */
+ rd_widgets[1].xpos =
+- (rd_xlen - strlen (rd_widgets[1].text) - 3) / 2;
++ (rd_xlen - mbstrlen (rd_widgets[1].text) - 3) / 2;
+ }
+ #endif /* ENABLE_NLS */
+
+@@ -617,7 +618,7 @@ init_replace (FileOpContext *ctx, enum O
+
+ ADD_RD_LABEL (ui, 0,
+ name_trunc (ui->replace_filename,
+- rd_trunc - strlen (rd_widgets[0].text)), 0);
++ rd_trunc - mbstrlen (rd_widgets[0].text)), 0);
+ ADD_RD_BUTTON (1);
+
+ ADD_RD_BUTTON (2);
+@@ -804,36 +805,36 @@ fmd_init_i18n (int force)
+ if (fmd_widgets[i].text[0] != '\0')
+ fmd_widgets[i].text = _(fmd_widgets[i].text);
+
+- len = strlen (fmd_widgets[FMCB11].text)
+- + strlen (fmd_widgets[FMCB21].text) + 15;
++ len = mbstrlen (fmd_widgets[FMCB11].text)
++ + mbstrlen (fmd_widgets[FMCB21].text) + 15;
+ fmd_xlen = max (fmd_xlen, len);
+
+- len = strlen (fmd_widgets[FMCB12].text)
+- + strlen (fmd_widgets[FMCB22].text) + 15;
++ len = mbstrlen (fmd_widgets[FMCB12].text)
++ + mbstrlen (fmd_widgets[FMCB22].text) + 15;
+ fmd_xlen = max (fmd_xlen, len);
+
+- len = strlen (fmd_widgets[FMBRGT].text)
+- + strlen (fmd_widgets[FMBLFT].text) + 11;
++ len = mbstrlen (fmd_widgets[FMBRGT].text)
++ + mbstrlen (fmd_widgets[FMBLFT].text) + 11;
+
+ #ifdef FMBMID
+- len += strlen (fmd_widgets[FMBMID].text) + 6;
++ len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
+ #endif
+
+ fmd_xlen = max (fmd_xlen, len + 4);
+
+ len = (fmd_xlen - (len + 6)) / 2;
+ i = fmd_widgets[FMBLFT].relative_x = len + 3;
+- i += strlen (fmd_widgets[FMBLFT].text) + 8;
++ i += mbstrlen (fmd_widgets[FMBLFT].text) + 8;
+
+ #ifdef FMBMID
+ fmd_widgets[FMBMID].relative_x = i;
+- i += strlen (fmd_widgets[FMBMID].text) + 6;
++ i += mbstrlen (fmd_widgets[FMBMID].text) + 6;
+ #endif
+
+ fmd_widgets[FMBRGT].relative_x = i;
+
+ #define chkbox_xpos(i) \
+- fmd_widgets [i].relative_x = fmd_xlen - strlen (fmd_widgets [i].text) - 6
++ fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6
+
+ chkbox_xpos (FMCB0);
+ chkbox_xpos (FMCB21);
+@@ -855,7 +856,7 @@ fmd_init_i18n (int force)
+
+ char *
+ file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
+- const char *def_text, int only_one, int *do_background)
++ const char *def_text_orig, int only_one, int *do_background)
+ {
+ int source_easy_patterns = easy_patterns;
+ char *source_mask, *orig_mask, *dest_dir, *tmpdest;
+@@ -864,12 +865,20 @@ file_mask_dialog (FileOpContext *ctx, Fi
+ struct stat buf;
+ int val;
+ QuickDialog Quick_input;
+-
++ char *def_text;
+ g_return_val_if_fail (ctx != NULL, NULL);
++
++ def_text = g_strdup(def_text_orig);
++
+ #if 0
+ message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text,
+ def_text);
+ #endif
++
++#ifdef UTF8
++ fix_utf8(def_text);
++#endif
++
+ fmd_init_i18n (FALSE);
+
+ /* Set up the result pointers */
+@@ -928,6 +937,7 @@ file_mask_dialog (FileOpContext *ctx, Fi
+ orig_mask = source_mask;
+ if (!dest_dir || !*dest_dir) {
+ g_free (source_mask);
++ g_free(def_text);
+ return dest_dir;
+ }
+ if (source_easy_patterns) {
+@@ -981,5 +991,6 @@ file_mask_dialog (FileOpContext *ctx, Fi
+ }
+ if (val == B_USER)
+ *do_background = 1;
++ g_free(def_text);
+ return dest_dir;
+ }
+--- mc/src/panelize.c.utf8 2005-05-27 05:35:15.000000000 +0200
++++ mc/src/panelize.c 2007-01-04 16:20:56.000000000 +0100
+@@ -127,7 +127,7 @@ init_panelize (void)
+ i = sizeof (panelize_but) / sizeof (panelize_but[0]);
+ while (i--) {
+ panelize_but[i].text = _(panelize_but[i].text);
+- maxlen += strlen (panelize_but[i].text) + 5;
++ maxlen += mbstrlen (panelize_but[i].text) + 5;
+ }
+ maxlen += 10;
+
+@@ -136,11 +136,11 @@ init_panelize (void)
+ panelize_cols = max (panelize_cols, maxlen);
+
+ panelize_but[2].x =
+- panelize_but[3].x + strlen (panelize_but[3].text) + 7;
++ panelize_but[3].x + mbstrlen (panelize_but[3].text) + 7;
+ panelize_but[1].x =
+- panelize_but[2].x + strlen (panelize_but[2].text) + 5;
++ panelize_but[2].x + mbstrlen (panelize_but[2].text) + 5;
+ panelize_but[0].x =
+- panelize_cols - strlen (panelize_but[0].text) - 8 - BX;
++ panelize_cols - mbstrlen (panelize_but[0].text) - 8 - BX;
+
+ #endif /* ENABLE_NLS */
+
+--- mc/src/slint.c.utf8 2005-09-06 22:36:23.000000000 +0200
++++ mc/src/slint.c 2007-01-04 16:20:56.000000000 +0100
+@@ -141,7 +141,9 @@ void
+ slang_init (void)
+ {
+ SLtt_get_terminfo ();
+-
++#if SLANG_VERSION >= 20000
++ SLutf8_enable (-1);
++#endif
+ /*
+ * If the terminal in not in terminfo but begins with a well-known
+ * string such as "linux" or "xterm" S-Lang will go on, but the
+--- mc/src/main.c.utf8 2006-09-25 16:47:34.000000000 +0200
++++ mc/src/main.c 2007-01-04 16:20:56.000000000 +0100
+@@ -704,7 +704,7 @@ load_prompt (int fd, void *unused)
+ int prompt_len;
+
+ tmp_prompt = strip_ctrl_codes (subshell_prompt);
+- prompt_len = strlen (tmp_prompt);
++ prompt_len = mbstrlen (tmp_prompt);
+
+ /* Check for prompts too big */
+ if (COLS > 8 && prompt_len > COLS - 8) {
+@@ -1610,7 +1610,11 @@ update_xterm_title_path (void)
+ if (xterm_flag && xterm_title) {
+ p = s = g_strdup (strip_home_and_password (current_panel->cwd));
+ do {
++#ifndef UTF8
+ if (!is_printable ((unsigned char) *s))
++#else /* UTF8 */
++ if (*(unsigned char *)s < ' ')
++#endif /* UTF8 */
+ *s = '?';
+ } while (*++s);
+ fprintf (stdout, "\33]0;mc - %s\7", p);
+--- mc/src/view.c.utf8 2006-12-12 18:39:33.000000000 +0100
++++ mc/src/view.c 2007-01-04 16:20:56.000000000 +0100
+@@ -43,6 +43,10 @@
+ #include <sys/stat.h>
+ #include <unistd.h>
+
++#ifdef UTF8
++#include <wctype.h>
++#endif /* UTF8 */
++
+ #include "global.h"
+ #include "tty.h"
+ #include "cmd.h" /* For view_other_cmd */
+@@ -1639,7 +1643,7 @@ view_display_status (WView *view)
+ hline (' ', width);
+
+ file_label = _("File: %s");
+- file_label_width = strlen (file_label) - 2;
++ file_label_width = mbstrlen (file_label) - 2;
+ file_name = view->filename ? view->filename
+ : view->command ? view->command
+ : "";
+@@ -1907,6 +1911,12 @@ view_display_text (WView * view)
+ offset_type from;
+ int c;
+ struct hexedit_change_node *curr = view->change_list;
++#ifdef UTF8
++ mbstate_t mbs;
++ char mbbuf[MB_LEN_MAX];
++ int mblen;
++ wchar_t wc;
++#endif /* UTF8 */
+
+ view_display_clean (view);
+ view_display_ruler (view);
+@@ -1919,8 +1929,37 @@ view_display_text (WView * view)
+
+ tty_setcolor (NORMAL_COLOR);
+ for (row = 0, col = 0; row < height && (c = get_byte (view, from)) != -1; from++) {
+-
++#ifndef UTF8
+ if (view->text_nroff_mode && c == '\b') {
++#else /* UTF8 */
++ mblen = 1;
++ mbbuf[0] = convert_to_display_c (c);
++
++ while (mblen < MB_LEN_MAX) {
++ int res;
++ memset (&mbs, 0, sizeof (mbs));
++ res = mbrtowc (&wc, mbbuf, mblen, &mbs);
++ if (res <= 0 && res != -2) {
++ wc = '.';
++ mblen = 1;
++ break;
++ }
++ if (res == mblen)
++ break;
++
++ mbbuf[mblen] = convert_to_display_c (get_byte (view, from + mblen));
++ mblen++;
++ }
++
++ if (mblen == MB_LEN_MAX) {
++ wc = '.';
++ mblen = 1;
++ }
++
++ from += mblen - 1;
++
++ if (view->text_nroff_mode && wc == '\b') {
++#endif /* UTF8 */
+ int c_prev;
+ int c_next;
+
+@@ -1985,10 +2024,17 @@ view_display_text (WView * view)
+ if (col >= view->dpy_text_column
+ && col - view->dpy_text_column < width) {
+ widget_move (view, top + row, left + (col - view->dpy_text_column));
++#ifndef UTF8
+ c = convert_to_display_c (c);
+ if (!is_printable (c))
+ c = '.';
+ tty_print_char (c);
++#else
++ wc = convert_to_display_c (wc);
++ if (!iswprint (wc))
++ wc = '.';
++ tty_print_char (wc);
++#endif
+ }
+ col++;
+ tty_setcolor (NORMAL_COLOR);
+--- mc/src/screen.c.utf8 2006-02-09 02:59:16.000000000 +0100
++++ mc/src/screen.c 2007-01-04 16:20:56.000000000 +0100
+@@ -171,21 +171,56 @@ add_permission_string (char *dest, int w
+ static const char *
+ string_file_name (file_entry *fe, int len)
+ {
+- static char buffer [MC_MAXPATHLEN + 1];
+ size_t i;
+
+- for (i = 0; i < sizeof(buffer) - 1; i++) {
+- char c;
++#ifdef UTF8
++ static char buffer [BUF_SMALL * 4];
++ mbstate_t s;
++ int mbmax = MB_CUR_MAX;
++ const char *str = fe->fname;
+
+- c = fe->fname[i];
++ memset (&s, 0, sizeof (s));
++#else
++ static char buffer [BUF_SMALL];
++#endif
+
+- if (!c)
+- break;
++#ifdef UTF8
++ if (SLsmg_Is_Unicode)
++ for (i = 0; i < sizeof (buffer) - 1; i++) {
++ wchar_t wc;
++ int len;
+
+- if (!is_printable(c))
+- c = '?';
++ len = mbrtowc (&wc, str, mbmax, &s);
++ if (!len)
++ break;
++ if (len < 0) {
++ memset (&s, 0, sizeof (s));
++ buffer[i] = '?';
++ str++;
++ continue;
++ }
++ if (!is_printable (wc)) {
++ buffer[i] = '?';
++ str++;
++ continue;
++ }
++ if (i >= sizeof (buffer) - len)
++ break;
++ memcpy (buffer + i, str, len);
++ i += len - 1;
++ str += len;
++ } else
++#endif
++ for (i = 0; i < sizeof(buffer) - 1; i++) {
++ char c;
++
++ c = fe->fname[i];
+
+- buffer[i] = c;
++ if (!c) break;
++
++ if (!is_printable(c)) c = '?';
++
++ buffer[i] = c;
+ }
+
+ buffer[i] = 0;
+@@ -450,42 +485,6 @@ static struct {
+ { "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL },
+ };
+
+-static char *
+-to_buffer (char *dest, int just_mode, int len, const char *txt)
+-{
+- int txtlen = strlen (txt);
+- int still, over;
+-
+- /* Fill buffer with spaces */
+- memset (dest, ' ', len);
+-
+- still = (over=(txtlen > len)) ? (txtlen - len) : (len - txtlen);
+-
+- switch (HIDE_FIT(just_mode)){
+- case J_LEFT:
+- still = 0;
+- break;
+- case J_CENTER:
+- still /= 2;
+- break;
+- case J_RIGHT:
+- default:
+- break;
+- }
+-
+- if (over){
+- if (IS_FIT(just_mode))
+- strcpy (dest, name_trunc(txt, len));
+- else
+- strncpy (dest, txt+still, len);
+- } else
+- strncpy (dest+still, txt, txtlen);
+-
+- dest[len] = '\0';
+-
+- return (dest + len);
+-}
+-
+ static int
+ file_compute_color (int attr, file_entry *fe)
+ {
+@@ -539,14 +538,18 @@ file_compute_color (int attr, file_entry
+
+ /* Formats the file number file_index of panel in the buffer dest */
+ static void
+-format_file (char *dest, int limit, WPanel *panel, int file_index, int width, int attr, int isstatus)
++format_file (WPanel *panel, int file_index, int width, int attr, int isstatus)
+ {
+ int color, length, empty_line;
+ const char *txt;
+- char *old_pos;
+- char *cdest = dest;
+ format_e *format, *home;
+ file_entry *fe;
++#ifdef UTF8
++ char buffer[BUF_MEDIUM * sizeof (wchar_t)];
++#else
++ char buffer[BUF_MEDIUM];
++#endif
++ int txtwidth = 0;
+
+ length = 0;
+ empty_line = (file_index >= panel->count);
+@@ -564,34 +567,137 @@ format_file (char *dest, int limit, WPan
+ break;
+
+ if (format->string_fn){
+- int len;
++ int len, still, over, perm, txtlen, wide;
+
+ if (empty_line)
+ txt = " ";
+ else
+ txt = (*format->string_fn)(fe, format->field_len);
+
+- old_pos = cdest;
+-
+ len = format->field_len;
+ if (len + length > width)
+ len = width - length;
+- if (len + (cdest - dest) > limit)
+- len = limit - (cdest - dest);
++ if (len >= BUF_MEDIUM)
++ len = BUF_MEDIUM - 1;
+ if (len <= 0)
+ break;
+- cdest = to_buffer (cdest, format->just_mode, len, txt);
+- length += len;
+
+- attrset (color);
++ perm = 0;
++ if (permission_mode) {
++ if (!strcmp(format->id, "perm"))
++ perm = 1;
++ else if (!strcmp(format->id, "mode"))
++ perm = 2;
++ }
+
+- if (permission_mode && !strcmp(format->id, "perm"))
+- add_permission_string (old_pos, format->field_len, fe, attr, color, 0);
+- else if (permission_mode && !strcmp(format->id, "mode"))
+- add_permission_string (old_pos, format->field_len, fe, attr, color, 1);
+- else
+- addstr (old_pos);
++ wide = 0;
++#ifdef UTF8
++ if (SLsmg_Is_Unicode && !empty_line && !perm) {
++ mbstate_t s;
++ const char *str = txt;
++
++ memset (&s, 0, sizeof (s));
++ txtlen = mbsrtowcs ((wchar_t *) buffer, &str,
++ sizeof (buffer) / sizeof (wchar_t), &s);
++ if (txtlen < 0) {
++ txt = " ";
++ txtlen = 1;
++ } else {
++ wide = 1;
++ txtwidth = wcswidth((wchar_t*)buffer, txtlen);
++ }
++ } else
++#endif
++ {
++ txtlen = mbstrlen (txt);
++ txtwidth = txtlen;
++ }
++
++ over = txtwidth > len;
++ still = over ? txtlen - len : len - txtlen;
++
++ switch (HIDE_FIT(format->just_mode)) {
++ case J_LEFT:
++ still = 0;
++ break;
++ case J_CENTER:
++ still /= 2;
++ break;
++ case J_RIGHT:
++ default:
++ break;
++ }
++
++ attrset (color);
++
++ if (wide) {
++#ifdef UTF8
++ if (over) {
++ if (IS_FIT (format->just_mode)) {
++ int n1 = 0;
++ int width1 = 0;
++ int n2 = 0;
++ int width2 = 0;
++ int len1 = len / 2;
++ int len2;
++
++ while (1) {
++ int w = wcwidth(((wchar_t *) buffer)[n1]);
++ if (width1 + w <= len1) {
++ width1 += w;
++ n1++;
++ }
++ else
++ break;
++ }
++ len2 = len - width1 - 1;
++
++ while (1) {
++ int w = wcwidth(((wchar_t *) buffer)[txtlen - n2 - 1]);
++ if (width2 + w <= len2) {
++ width2 += w;
++ n2++;
++ }
++ else
++ break;
++ }
++
++
++ SLsmg_write_nwchars ((wchar_t *) buffer, n1);
++ SLsmg_write_nwchars (L"~", 1);
++ printw ("%*s", len - width1 - width2 - 1, "");
++ SLsmg_write_nwchars (((wchar_t *) buffer)
++ + txtlen - n2, n2);
++ } else
++ SLsmg_write_nwchars ((wchar_t *) buffer, len);
++ } else {
++ printw ("%*s", still, "");
++ SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
++ printw ("%*s", len - txtwidth - still, "");
++ }
++#endif
++ } else {
++ if (over) {
++ if (IS_FIT (format->just_mode))
++ strcpy (buffer, name_trunc(txt, len));
++ else
++ memcpy (buffer, txt + still, len);
++ } else {
++ memset (buffer, ' ', still);
++ memcpy (buffer + still, txt, txtlen);
++ memset (buffer + still + txtlen, ' ',
++ len - txtlen - still);
++ }
++ buffer[len] = '\0';
+
++ if (perm)
++ add_permission_string (buffer, format->field_len, fe,
++ attr, color, perm - 1);
++ else
++ addstr (buffer);
++ }
++
++ length += len;
+ } else {
+ if (attr == SELECTED || attr == MARKED_SELECTED)
+ attrset (SELECTED_COLOR);
+@@ -614,7 +720,6 @@ repaint_file (WPanel *panel, int file_in
+ {
+ int second_column = 0;
+ int width, offset;
+- char buffer [BUF_MEDIUM];
+
+ offset = 0;
+ if (!isstatus && panel->split){
+@@ -643,7 +748,7 @@ repaint_file (WPanel *panel, int file_in
+ widget_move (&panel->widget, file_index - panel->top_file + 2, 1);
+ }
+
+- format_file (buffer, sizeof(buffer), panel, file_index, width, attr, isstatus);
++ format_file (panel, file_index, width, attr, isstatus);
+
+ if (!isstatus && panel->split){
+ if (second_column)
+@@ -692,7 +797,7 @@ display_mini_info (WPanel *panel)
+ ngettext("%s in %d file", "%s in %d files", panel->marked),
+ b_bytes, panel->marked);
+
+- if ((int) strlen (buffer) > cols-2){
++ if ((int) mbstrlen (buffer) > cols-2){
+ buffer [cols] = 0;
+ p += 2;
+ } else
+@@ -1101,6 +1206,12 @@ paint_frame (WPanel *panel)
+ int side, width;
+
+ const char *txt;
++#ifdef UTF8
++ char buffer[30 * sizeof (wchar_t)];
++ mbstate_t s;
++
++ memset (&s, 0, sizeof (s));
++#endif
+ if (!panel->split)
+ adjust_top_file (panel);
+
+@@ -1125,16 +1236,38 @@ paint_frame (WPanel *panel)
+ if (format->string_fn){
+ txt = format->title;
+
+- header_len = strlen (txt);
++ attrset (MARKED_COLOR);
++ width -= format->field_len;
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ const char *str = txt;
++ header_len = mbsrtowcs ((wchar_t *) buffer, &str,
++ sizeof (buffer) / sizeof (wchar_t),
++ &s);
++ if (header_len < 0) {
++ memset (&s, 0, sizeof (s));
++ printw ("%*s", format->field_len, "");
++ continue;
++ }
++ if (header_len > format->field_len)
++ header_len = format->field_len;
++ spaces = (format->field_len - header_len) / 2;
++ extra = (format->field_len - header_len) % 2;
++ printw ("%*s", spaces, "");
++ SLsmg_write_nwchars ((wchar_t *) buffer, header_len);
++ printw ("%*s", spaces + extra, "");
++ continue;
++ }
++#endif
++
++ header_len = mbstrlen (txt);
+ if (header_len > format->field_len)
+ header_len = format->field_len;
+
+- attrset (MARKED_COLOR);
+ spaces = (format->field_len - header_len) / 2;
+ extra = (format->field_len - header_len) % 2;
+ tty_printf ("%*s%.*s%*s", spaces, "",
+ header_len, txt, spaces+extra, "");
+- width -= 2 * spaces + extra + header_len;
+ } else {
+ attrset (NORMAL_COLOR);
+ one_vline ();
+@@ -1891,11 +2024,24 @@ do_search (WPanel *panel, int c_code)
+ int i;
+ int wrapped = 0;
+ int found;
++ int prevpos, pos;
++ int j;
++ mbstate_t mbs;
+
+ l = strlen (panel->search_buffer);
+ if (c_code == KEY_BACKSPACE) {
+- if (l)
+- panel->search_buffer[--l] = '\0';
++ if (l) {
++ prevpos = pos = 0;
++ memset (&mbs, 0, sizeof (mbs));
++ while (pos < l) {
++ prevpos = pos;
++ j = mbrlen (panel->search_buffer + pos, l - pos, &mbs);
++ if (j <= 0) break;
++ pos += j;
++ }
++ --l;
++ panel->search_buffer[prevpos] = 0;
++ }
+ } else {
+ if (c_code && l < sizeof (panel->search_buffer)) {
+ panel->search_buffer[l] = c_code;
+@@ -1904,6 +2050,14 @@ do_search (WPanel *panel, int c_code)
+ }
+ }
+
++ prevpos = pos = 0;
++ memset (&mbs, 0, sizeof (mbs));
++ while (pos < l) {
++ prevpos = pos;
++ j = mbrlen (panel->search_buffer + pos, l - pos, &mbs);
++ if (j <= 0) break;
++ pos += j;
++ }
+ found = 0;
+ for (i = panel->selected; !wrapped || i != panel->selected; i++) {
+ if (i >= panel->count) {
+@@ -1914,9 +2068,9 @@ do_search (WPanel *panel, int c_code)
+ }
+ if (panel->
+ case_sensitive
+- ? (strncmp (panel->dir.list[i].fname, panel->search_buffer, l)
++ ? (strncmp (panel->dir.list[i].fname, panel->search_buffer, pos)
+ == 0) : (g_strncasecmp (panel->dir.list[i].fname,
+- panel->search_buffer, l) == 0)) {
++ panel->search_buffer, pos) == 0)) {
+ unselect_item (panel);
+ panel->selected = i;
+ select_item (panel);
+@@ -1925,7 +2079,7 @@ do_search (WPanel *panel, int c_code)
+ }
+ }
+ if (!found)
+- panel->search_buffer[--l] = 0;
++ panel->search_buffer[prevpos] = 0;
+
+ paint_panel (panel);
+ }
+--- mc/src/widget.h.utf8 2006-02-28 18:44:28.000000000 +0100
++++ mc/src/widget.h 2007-01-04 16:20:56.000000000 +0100
+@@ -22,6 +22,7 @@ typedef struct WButton {
+ char *text; /* text of button */
+ int hotkey; /* hot KEY */
+ int hotpos; /* offset hot KEY char in text */
++ wchar_t hotwc;
+ bcback callback; /* Callback function */
+ } WButton;
+
+@@ -42,6 +43,7 @@ typedef struct WCheck {
+ char *text; /* text of check button */
+ int hotkey; /* hot KEY */
+ int hotpos; /* offset hot KEY char in text */
++ wchar_t hotwc;
+ } WCheck;
+
+ typedef struct WGauge {
+@@ -57,16 +59,20 @@ char *show_hist (GList *history, int wid
+
+ typedef struct {
+ Widget widget;
+- int point; /* cursor position in the input line */
+- int mark; /* The mark position */
+- int first_shown; /* Index of the first shown character */
+- int current_max_len; /* Maximum length of input line */
+- int field_len; /* Length of the editing field */
++ int point; /* cursor position in the input line (mb chars) */
++ int mark; /* The mark position (mb chars) */
++ int first_shown; /* Index of the first shown character (mb chars) */
++ int current_max_len; /* Maximum length of input line (bytes) */
++ int field_len; /* Length of the editing field (mb chars) */
+ int color; /* color used */
+ int first; /* Is first keystroke? */
+ int disable_update; /* Do we want to skip updates? */
+ int is_password; /* Is this a password input line? */
+ char *buffer; /* pointer to editing buffer */
++#ifdef UTF8
++ char charbuf[MB_LEN_MAX];
++#endif /* UTF8 */
++ int charpoint;
+ GList *history; /* The history */
+ int need_push; /* need to push the current Input on hist? */
+ char **completions; /* Possible completions array */
+--- mc/src/tty.h.utf8 2006-05-15 17:46:20.000000000 +0200
++++ mc/src/tty.h 2007-01-04 16:20:56.000000000 +0100
+@@ -8,6 +8,8 @@
+ of ifdefs in the other files small.
+ */
+
++#include <glib.h> /* gboolean is used here */
++
+ #ifdef HAVE_SLANG
+ # include "myslang.h"
+ #endif
+--- mc/src/hotlist.c.utf8 2006-08-08 19:55:46.000000000 +0200
++++ mc/src/hotlist.c 2007-01-04 16:20:56.000000000 +0100
+@@ -563,7 +563,7 @@ init_i18n_stuff(int list_type, int cols)
+
+ row = hotlist_but [i].y;
+ ++count [row];
+- len [row] += strlen (hotlist_but [i].text) + 5;
++ len [row] += mbstrlen (hotlist_but [i].text) + 5;
+ if (hotlist_but [i].flags == DEFPUSH_BUTTON)
+ len [row] += 2;
+ }
+@@ -588,12 +588,12 @@ init_i18n_stuff(int list_type, int cols)
+ /* not first int the row */
+ if (!strcmp (hotlist_but [i].text, cancel_but))
+ hotlist_but [i].x =
+- cols - strlen (hotlist_but [i].text) - 13;
++ cols - mbstrlen (hotlist_but [i].text) - 13;
+ else
+ hotlist_but [i].x = cur_x [row];
+ }
+
+- cur_x [row] += strlen (hotlist_but [i].text) + 2
++ cur_x [row] += mbstrlen (hotlist_but [i].text) + 2
+ + (hotlist_but [i].flags == DEFPUSH_BUTTON ? 5 : 3);
+ }
+ }
+@@ -834,7 +834,7 @@ static void add_widgets_i18n(QuickWidget
+ for (i = 0; i < 3; i++)
+ {
+ qw [i].text = _(qw [i].text);
+- l[i] = strlen (qw [i].text) + 3;
++ l[i] = mbstrlen (qw [i].text) + 3;
+ }
+ space = (len - 4 - l[0] - l[1] - l[2]) / 4;
+
+@@ -883,7 +883,7 @@ add_new_entry_input (const char *header,
+
+ msglen(text1, &lines1, &cols1);
+ msglen(text2, &lines2, &cols2);
+- len = max ((int) strlen (header), cols1);
++ len = max ((int) mbstrlen (header), cols1);
+ len = max (len, cols2) + 4;
+ len = max (len, 64);
+
+@@ -979,7 +979,7 @@ add_new_group_input (const char *header,
+ #endif /* ENABLE_NLS */
+
+ msglen (label, &lines, &cols);
+- len = max ((int) strlen (header), cols) + 4;
++ len = max ((int) mbstrlen (header), cols) + 4;
+ len = max (len, 64);
+
+ #ifdef ENABLE_NLS
+@@ -1035,7 +1035,7 @@ void add2hotlist_cmd (void)
+ {
+ char *prompt, *label;
+ const char *cp = _("Label for \"%s\":");
+- int l = strlen (cp);
++ int l = mbstrlen (cp);
+ char *label_string = g_strdup (current_panel->cwd);
+
+ strip_password (label_string, 1);
+--- mc/src/help.c.utf8 2005-07-22 11:29:50.000000000 +0200
++++ mc/src/help.c 2007-01-04 16:20:56.000000000 +0100
+@@ -449,10 +449,28 @@ static void help_show (Dlg_head *h, cons
+ #ifndef HAVE_SLANG
+ addch (acs_map [c]);
+ #else
++#if defined(UTF8) && SLANG_VERSION < 20000
++ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, acs_map [c]);
++#else
+ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
++#endif /* UTF8 */
+ #endif
++ } else {
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ int len;
++ mbstate_t mbs;
++ wchar_t wc;
++ memset (&mbs, 0, sizeof (mbs));
++ len = mbrtowc(&wc, p, MB_CUR_MAX, &mbs);
++ if (len <= 0) len = 1; /* skip broken multibyte chars */
++
++ SLsmg_write_nwchars(&wc, 1);
++ p += len - 1;
+ } else
++#endif
+ addch (c);
++ }
+ col++;
+ break;
+ }
+@@ -805,6 +823,12 @@ interactive_display (const char *filenam
+ message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile,
+ unix_error_string (errno));
+ }
++ else
++ {
++ char *conv = utf8_to_local(data);
++ g_free(data);
++ data = conv;
++ }
+
+ if (!filename)
+ g_free (hlpfile);
+--- mc/src/wtools.c.utf8 2006-09-14 16:16:10.000000000 +0200
++++ mc/src/wtools.c 2007-01-04 16:20:56.000000000 +0100
+@@ -49,11 +49,11 @@ create_listbox_window (int cols, int lin
+ /* Adjust sizes */
+ lines = (lines > LINES - 6) ? LINES - 6 : lines;
+
+- if (title && (cols < (len = strlen (title) + 2)))
++ if (title && (cols < (len = mbstrlen (title) + 2)))
+ cols = len;
+
+ /* no &, but 4 spaces around button for brackets and such */
+- if (cols < (len = strlen (cancel_string) + 3))
++ if (cols < (len = mbstrlen (cancel_string) + 3))
+ cols = len;
+
+ cols = cols > COLS - 6 ? COLS - 6 : cols;
+@@ -124,7 +124,7 @@ query_dialog (const char *header, const
+ va_start (ap, count);
+ for (i = 0; i < count; i++) {
+ char *cp = va_arg (ap, char *);
+- win_len += strlen (cp) + 6;
++ win_len += mbstrlen (cp) + 6;
+ if (strchr (cp, '&') != NULL)
+ win_len--;
+ }
+@@ -133,7 +133,7 @@ query_dialog (const char *header, const
+
+ /* count coordinates */
+ msglen (text, &lines, &cols);
+- cols = 6 + max (win_len, max ((int) strlen (header), cols));
++ cols = 6 + max (win_len, max ((int) mbstrlen (header), cols));
+ lines += 4 + (count > 0 ? 2 : 0);
+ xpos = COLS / 2 - cols / 2;
+ ypos = LINES / 3 - (lines - 3) / 2;
+@@ -148,7 +148,7 @@ query_dialog (const char *header, const
+ va_start (ap, count);
+ for (i = 0; i < count; i++) {
+ cur_name = va_arg (ap, char *);
+- xpos = strlen (cur_name) + 6;
++ xpos = mbstrlen (cur_name) + 6;
+ if (strchr (cur_name, '&') != NULL)
+ xpos--;
+
+@@ -463,7 +463,7 @@ fg_input_dialog_help (const char *header
+ quick_widgets[2].histname = histname;
+
+ msglen (text, &lines, &cols);
+- len = max ((int) strlen (header), cols) + 4;
++ len = max ((int) mbstrlen (header), cols) + 4;
+ len = max (len, 64);
+
+ /* The special value of def_text is used to identify password boxes
+@@ -485,7 +485,7 @@ fg_input_dialog_help (const char *header
+ quick_widgets[1].text = _(quick_widgets[1].text);
+ quick_widgets[0].relative_x = len / 2 + 4;
+ quick_widgets[1].relative_x =
+- len / 2 - (strlen (quick_widgets[1].text) + 9);
++ len / 2 - (mbstrlen (quick_widgets[1].text) + 9);
+ quick_widgets[0].x_divisions = quick_widgets[1].x_divisions = len;
+ #endif /* ENABLE_NLS */
+
+--- mc/src/util.h.utf8 2006-02-06 17:55:43.000000000 +0100
++++ mc/src/util.h 2007-01-04 16:20:56.000000000 +0100
+@@ -103,6 +103,13 @@ void init_uid_gid_cache (void);
+ char *get_group (int);
+ char *get_owner (int);
+
++void fix_utf8(char *str);
++size_t mbstrlen (const char *);
++wchar_t *mbstr_to_wchar (const char *);
++char *wchar_to_mbstr (const wchar_t *);
++char *utf8_to_local(char *str);
++
++
+ #define MAX_I18NTIMELENGTH 14
+ #define MIN_I18NTIMELENGTH 10
+ #define STD_I18NTIMELENGTH 12
+--- mc/src/widget.c.utf8 2006-05-30 15:46:15.000000000 +0200
++++ mc/src/widget.c 2007-01-04 16:20:56.000000000 +0100
+@@ -36,6 +36,9 @@
+
+ #include "global.h"
+ #include "tty.h"
++#ifdef UTF8
++#include <wctype.h>
++#endif /* UTF8 */
+ #include "color.h"
+ #include "mouse.h"
+ #include "dialog.h"
+@@ -182,6 +185,11 @@ button_callback (Widget *w, widget_msg_t
+ if (b->hotpos >= 0) {
+ widget_selectcolor (w, b->selected, TRUE);
+ widget_move (w, 0, b->hotpos + off);
++#ifdef UTF8
++ if (SLsmg_Is_Unicode)
++ SLsmg_write_nwchars (&b->hotwc, 1);
++ else
++#endif
+ addch ((unsigned char) b->text[b->hotpos]);
+ }
+ return MSG_HANDLED;
+@@ -215,7 +223,7 @@ button_event (Gpm_Event *event, void *da
+ static int
+ button_len (const char *text, unsigned int flags)
+ {
+- int ret = strlen (text);
++ int ret = mbstrlen (text);
+ switch (flags){
+ case DEFPUSH_BUTTON:
+ ret += 6;
+@@ -238,14 +246,36 @@ button_len (const char *text, unsigned i
+ * the button text is g_malloc()ed, we can safely change and shorten it.
+ */
+ static void
+-button_scan_hotkey (WButton *b)
++scan_hotkey (char *text, int *hotposp, int *hotkeyp, wchar_t *hotwcp)
+ {
+- char *cp = strchr (b->text, '&');
++ char *cp = strchr (text, '&');
+
+ if (cp != NULL && cp[1] != '\0') {
+- g_strlcpy (cp, cp + 1, strlen (cp));
+- b->hotkey = tolower ((unsigned char) *cp);
+- b->hotpos = cp - b->text;
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ mbstate_t s;
++ int len;
++
++ *cp = '\0';
++ memset (&s, 0, sizeof (s));
++ len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s);
++ if (len > 0) {
++ *hotposp = mbstrlen (text);
++ if (*hotposp < 0) {
++ *hotposp = -1;
++ } else {
++ /* FIXME */
++ *hotkeyp = tolower (*hotwcp);
++ }
++ }
++ } else
++#endif
++ {
++ *hotkeyp = tolower (cp[1]);
++ *hotposp = cp - text;
++ }
++
++ memmove (cp, cp + 1, strlen (cp + 1) + 1);
+ }
+ }
+
+@@ -266,8 +296,9 @@ button_new (int y, int x, int action, in
+ widget_want_hotkey (b->widget, 1);
+ b->hotkey = 0;
+ b->hotpos = -1;
++ b->hotwc = L'\0';
+
+- button_scan_hotkey(b);
++ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
+ return b;
+ }
+
+@@ -280,14 +311,13 @@ button_get_text (WButton *b)
+ void
+ button_set_text (WButton *b, const char *text)
+ {
+- g_free (b->text);
++ g_free (b->text);
+ b->text = g_strdup (text);
+ b->widget.cols = button_len (text, b->flags);
+- button_scan_hotkey(b);
++ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
+ dlg_redraw (b->widget.parent);
+ }
+
+-
+ /* Radio button widget */
+ static int radio_event (Gpm_Event *event, void *);
+
+@@ -362,14 +392,35 @@ radio_callback (Widget *w, widget_msg_t
+ widget_move (&r->widget, i, 0);
+
+ tty_printf ("(%c) ", (r->sel == i) ? '*' : ' ');
+- for (cp = r->texts[i]; *cp; cp++) {
+- if (*cp == '&') {
+- widget_selectcolor (w, focused, TRUE);
++ cp = strchr (r->texts[i], '&');
++ if (cp != NULL) {
++#ifdef UTF8
++ mbstate_t s;
++ wchar_t wc;
++ int len;
++#endif
++ tty_printf ("%.*s", (int) ((char *) cp - r->texts[i]),
++ r->texts[i]);
++ widget_selectcolor (w, focused, TRUE);
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ memset (&s, 0, sizeof (s));
++ len = mbrtowc (&wc, cp + 1, MB_CUR_MAX, &s);
++ ++cp;
++ if (len > 0) {
++ tty_printf ("%.*s", len, cp);
++ cp += len;
++ }
++ } else
++#endif
++ {
+ addch (*++cp);
+- widget_selectcolor (w, focused, FALSE);
+- } else
+- addch (*cp);
+- }
++ ++cp;
++ }
++ widget_selectcolor (w, focused, FALSE);
++ } else
++ cp = r->texts[i];
++ addstr ((char *) cp);
+ }
+ return MSG_HANDLED;
+
+@@ -408,7 +459,7 @@ radio_new (int y, int x, int count, cons
+ /* Compute the longest string */
+ max = 0;
+ for (i = 0; i < count; i++){
+- m = strlen (texts [i]);
++ m = mbstrlen (texts [i]);
+ if (m > max)
+ max = m;
+ }
+@@ -468,6 +519,11 @@ check_callback (Widget *w, widget_msg_t
+ if (c->hotpos >= 0) {
+ widget_selectcolor (w, msg == WIDGET_FOCUS, TRUE);
+ widget_move (&c->widget, 0, +c->hotpos + 4);
++#ifdef UTF8
++ if (SLsmg_Is_Unicode)
++ SLsmg_write_nwchars (&c->hotwc, 1);
++ else
++#endif
+ addch ((unsigned char) c->text[c->hotpos]);
+ }
+ return MSG_HANDLED;
+@@ -505,35 +561,20 @@ WCheck *
+ check_new (int y, int x, int state, const char *text)
+ {
+ WCheck *c = g_new (WCheck, 1);
+- const char *s;
+- char *t;
+-
+- init_widget (&c->widget, y, x, 1, strlen (text),
++
++ init_widget (&c->widget, y, x, 1, mbstrlen (text),
+ check_callback, check_event);
+ c->state = state ? C_BOOL : 0;
+ c->text = g_strdup (text);
+ c->hotkey = 0;
+ c->hotpos = -1;
++ c->hotwc = L'\0';
+ widget_want_hotkey (c->widget, 1);
+
+- /* Scan for the hotkey */
+- for (s = text, t = c->text; *s; s++, t++){
+- if (*s != '&'){
+- *t = *s;
+- continue;
+- }
+- s++;
+- if (*s){
+- c->hotkey = tolower ((unsigned char) *s);
+- c->hotpos = t - c->text;
+- }
+- *t = *s;
+- }
+- *t = 0;
++ scan_hotkey (c->text, &c->hotpos, &c->hotkey, &c->hotwc);
+ return c;
+ }
+
+-
+ /* Label widget */
+
+ static cb_ret_t
+@@ -572,7 +613,7 @@ label_callback (Widget *w, widget_msg_t
+ }
+ widget_move (&l->widget, y, 0);
+ tty_printf ("%s", p);
+- xlen = l->widget.cols - strlen (p);
++ xlen = l->widget.cols - mbstrlen (p);
+ if (xlen > 0)
+ tty_printf ("%*s", xlen, " ");
+ if (!q)
+@@ -606,7 +647,7 @@ label_set_text (WLabel *label, const cha
+ if (text){
+ label->text = g_strdup (text);
+ if (label->auto_adjust_cols) {
+- newcols = strlen (text);
++ newcols = mbstrlen (text);
+ if (newcols > label->widget.cols)
+ label->widget.cols = newcols;
+ }
+@@ -630,7 +671,7 @@ label_new (int y, int x, const char *tex
+ if (!text || strchr(text, '\n'))
+ width = 1;
+ else
+- width = strlen (text);
++ width = mbstrlen (text);
+
+ l = g_new (WLabel, 1);
+ init_widget (&l->widget, y, x, 1, width, label_callback, NULL);
+@@ -778,13 +819,69 @@ static void draw_history_button (WInput
+ /* Pointer to killed data */
+ static char *kill_buffer = 0;
+
++#ifdef UTF8
++static int
++charpos(WInput *in, int idx)
++{
++ int i, pos, l, len;
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++ i = 0;
++ pos = 0;
++ len = strlen(in->buffer);
++
++ while (in->buffer[pos]) {
++ if (i == idx)
++ return pos;
++ l = mbrlen(in->buffer + pos, len - pos, &mbs);
++ if (l <= 0)
++ return pos;
++ pos+=l;
++ i++;
++ };
++ return pos;
++}
++
++static int
++charcolumn(WInput *in, int idx)
++{
++ int i, pos, l, width, len;
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++ i = 0;
++ pos = 0; width = 0;
++ len = strlen(in->buffer);
++
++ while (in->buffer[pos]) {
++ wchar_t wc;
++ if (i == idx)
++ return width;
++ l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs);
++ if (l <= 0)
++ return width;
++ pos += l; width += wcwidth(wc);
++ i++;
++ };
++ return width;
++}
++#else
++#define charpos(in, idx) (idx)
++#define charcolumn(in, idx) (idx)
++#endif /* UTF8 */
++
+ void
+ update_input (WInput *in, int clear_first)
+ {
+ int has_history = 0;
+ int i, j;
+- unsigned char c;
+- int buf_len = strlen (in->buffer);
++ int buf_len = mbstrlen (in->buffer);
++#ifndef UTF8
++ unsigned char c;
++#else /* UTF8 */
++ wchar_t c;
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++#endif /* UTF8 */
+
+ if (should_show_history_button (in))
+ has_history = HISTORY_BUTTON_WIDTH;
+@@ -794,7 +891,7 @@ update_input (WInput *in, int clear_firs
+
+ /* Make the point visible */
+ if ((in->point < in->first_shown) ||
+- (in->point >= in->first_shown+in->field_len - has_history)){
++ (charcolumn(in, in->point) >= charcolumn(in, in->first_shown) + in->field_len - has_history)){
+ in->first_shown = in->point - (in->field_len / 3);
+ if (in->first_shown < 0)
+ in->first_shown = 0;
+@@ -814,14 +911,29 @@ update_input (WInput *in, int clear_firs
+ addch (' ');
+ widget_move (&in->widget, 0, 0);
+
++#ifndef UTF8
+ for (i = 0, j = in->first_shown; i < in->field_len - has_history && in->buffer [j]; i++){
+ c = in->buffer [j++];
+ c = is_printable (c) ? c : '.';
+- if (in->is_password)
++#else /* UTF8 */
++ for (i = 0, j = in->first_shown; (i < in->field_len - has_history) && (j < buf_len); i++,j++){
++ char * chp = in->buffer + charpos(in,j);
++ size_t res = mbrtowc(&c, chp, strlen(chp), &mbs);
++ c = (res && iswprint (c)) ? 0 : '.';
++#endif /* UTF8 */
++ if (in->is_password)
+ c = '*';
++#ifndef UTF8
+ addch (c);
++#else /* UTF8 */
++ if (c) {
++ addch (c);
++ }
++ else
++ SLsmg_write_nchars (chp, res);
++#endif /* UTF8 */
+ }
+- widget_move (&in->widget, 0, in->point - in->first_shown);
++ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
+
+ if (clear_first)
+ in->first = 0;
+@@ -974,7 +1086,7 @@ char *
+ show_hist (GList *history, int widget_x, int widget_y)
+ {
+ GList *hi, *z;
+- size_t maxlen = strlen (i18n_htitle ()), i, count = 0;
++ size_t maxlen = mbstrlen (i18n_htitle ()), i, count = 0;
+ int x, y, w, h;
+ char *q, *r = 0;
+ Dlg_head *query_dlg;
+@@ -987,7 +1099,7 @@ show_hist (GList *history, int widget_x,
+ z = g_list_first (history);
+ hi = z;
+ while (hi) {
+- if ((i = strlen ((char *) hi->data)) > maxlen)
++ if ((i = mbstrlen ((char *) hi->data)) > maxlen)
+ maxlen = i;
+ count++;
+ hi = g_list_next (hi);
+@@ -1157,35 +1269,83 @@ new_input (WInput *in)
+ in->need_push = 1;
+ in->buffer [0] = 0;
+ in->point = 0;
++ in->charpoint = 0;
+ in->mark = 0;
+ free_completions (in);
+ update_input (in, 0);
+ }
+
++static void
++move_buffer_backward (WInput *in, int point)
++{
++ int i, pos, len;
++ int str_len = mbstrlen (in->buffer);
++ if (point >= str_len) return;
++
++ pos = charpos(in,point);
++ len = charpos(in,point + 1) - pos;
++
++ for (i = pos; in->buffer [i + len - 1]; i++)
++ in->buffer [i] = in->buffer [i + len];
++}
++
+ static cb_ret_t
+ insert_char (WInput *in, int c_code)
+ {
+ size_t i;
++#ifdef UTF8
++ mbstate_t mbs;
++ int res;
++
++ memset (&mbs, 0, sizeof (mbs));
++#else
++ in->charpoint = 0;
++#endif /* UTF8 */
+
+ if (c_code == -1)
+ return MSG_NOT_HANDLED;
+
++#ifdef UTF8
++ if (in->charpoint >= MB_CUR_MAX) return 1;
++
++ in->charbuf[in->charpoint++] = c_code;
++
++ res = mbrlen((char *)in->charbuf, in->charpoint, &mbs);
++ if (res < 0) {
++ if (res != -2) in->charpoint = 0; /* broken multibyte char, skip */
++ return 1;
++ }
++
++#endif /* UTF8 */
+ in->need_push = 1;
+- if (strlen (in->buffer)+1 == (size_t) in->current_max_len){
++ if (strlen (in->buffer) + 1 + in->charpoint >= (size_t) in->current_max_len){
+ /* Expand the buffer */
+- char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len);
++ char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len + in->charpoint);
+ if (narea){
+ in->buffer = narea;
+- in->current_max_len += in->field_len;
++ in->current_max_len += in->field_len + in->charpoint;
+ }
+ }
++#ifndef UTF8
+ if (strlen (in->buffer)+1 < (size_t) in->current_max_len){
+ size_t l = strlen (&in->buffer [in->point]);
+ for (i = l+1; i > 0; i--)
+ in->buffer [in->point+i] = in->buffer [in->point+i-1];
+ in->buffer [in->point] = c_code;
++#else /* UTF8 */
++ if (strlen (in->buffer) + in->charpoint < in->current_max_len){
++ size_t ins_point = charpos(in,in->point); /* bytes from begin */
++ /* move chars */
++ size_t rest_bytes = strlen (in->buffer + ins_point);
++
++ for (i = rest_bytes + 1; i > 0; i--)
++ in->buffer [ins_point + i + in->charpoint - 1] = in->buffer [ins_point + i - 1];
++
++ memcpy(in->buffer + ins_point, in->charbuf, in->charpoint);
++#endif /* UTF8 */
+ in->point++;
+ }
++ in->charpoint = 0;
+ return MSG_HANDLED;
+ }
+
+@@ -1193,12 +1353,14 @@ static void
+ beginning_of_line (WInput *in)
+ {
+ in->point = 0;
++ in->charpoint = 0;
+ }
+
+ static void
+ end_of_line (WInput *in)
+ {
+- in->point = strlen (in->buffer);
++ in->point = mbstrlen (in->buffer);
++ in->charpoint = 0;
+ }
+
+ static void
+@@ -1206,18 +1368,21 @@ backward_char (WInput *in)
+ {
+ if (in->point)
+ in->point--;
++ in->charpoint = 0;
+ }
+
+ static void
+ forward_char (WInput *in)
+ {
+- if (in->buffer [in->point])
++ if (in->buffer [charpos(in,in->point)])
+ in->point++;
++ in->charpoint = 0;
+ }
+
+ static void
+ forward_word (WInput * in)
+ {
++#ifndef UTF8
+ char *p = in->buffer + in->point;
+
+ while (*p
+@@ -1227,11 +1392,39 @@ forward_word (WInput * in)
+ while (*p && isalnum ((unsigned char) *p))
+ p++;
+ in->point = p - in->buffer;
++#else /* UTF8 */
++ mbstate_t mbs;
++ int len = mbstrlen (in->buffer);
++ memset (&mbs, 0, sizeof (mbs));
++
++ while (in->point < len) {
++ wchar_t c;
++ char *p = in->buffer + charpos(in,in->point);
++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
++ if (res <= 0 || !(iswspace (c) || iswpunct (c)))
++ break;
++ in->point++;
++ }
++
++ memset (&mbs, 0, sizeof (mbs));
++
++ while (in->point < len) {
++ wchar_t c;
++ char *p = in->buffer + charpos(in,in->point);
++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
++ if (res <= 0 || !iswalnum (c))
++ break;
++ in->point++;
++ }
++
++ in->charpoint = 0;
++#endif /* UTF8 */
+ }
+
+ static void
+ backward_word (WInput *in)
+ {
++#ifndef UTF8
+ char *p = in->buffer + in->point;
+
+ while (p - 1 > in->buffer - 1 && (isspace ((unsigned char) *(p - 1))
+@@ -1241,6 +1434,32 @@ backward_word (WInput *in)
+ while (p - 1 > in->buffer - 1 && isalnum ((unsigned char) *(p - 1)))
+ p--;
+ in->point = p - in->buffer;
++#else /* UTF8 */
++ mbstate_t mbs;
++
++ memset (&mbs, 0, sizeof (mbs));
++ while (in->point > 0) {
++ wchar_t c;
++ char *p = in->buffer + charpos(in,in->point);
++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
++ if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c))))
++ break;
++ in->point--;
++ }
++
++ memset (&mbs, 0, sizeof (mbs));
++
++ while (in->point > 0) {
++ wchar_t c;
++ char *p = in->buffer + charpos(in,in->point);
++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
++ if (*p && (res <= 0 || !iswalnum (c)))
++ break;
++ in->point--;
++ }
++
++ in->charpoint = 0;
++#endif /* UTF8 */
+ }
+
+ static void
+@@ -1273,8 +1492,9 @@ backward_delete (WInput *in)
+
+ if (!in->point)
+ return;
+- for (i = in->point; in->buffer [i-1]; i++)
+- in->buffer [i-1] = in->buffer [i];
++
++ move_buffer_backward(in, in->point - 1);
++ in->charpoint = 0;
+ in->need_push = 1;
+ in->point--;
+ }
+@@ -1282,10 +1502,8 @@ backward_delete (WInput *in)
+ static void
+ delete_char (WInput *in)
+ {
+- int i;
+-
+- for (i = in->point; in->buffer [i]; i++)
+- in->buffer [i] = in->buffer [i+1];
++ move_buffer_backward(in, in->point);
++ in->charpoint = 0;
+ in->need_push = 1;
+ }
+
+@@ -1300,6 +1518,9 @@ copy_region (WInput *in, int x_first, in
+
+ g_free (kill_buffer);
+
++ first=charpos(in,first);
++ last=charpos(in,last);
++
+ kill_buffer = g_strndup(in->buffer+first,last-first);
+ }
+
+@@ -1308,11 +1529,13 @@ delete_region (WInput *in, int x_first,
+ {
+ int first = min (x_first, x_last);
+ int last = max (x_first, x_last);
+- size_t len = strlen (&in->buffer [last]) + 1;
++ size_t len;
+
+ in->point = first;
+ in->mark = first;
+- memmove (&in->buffer [first], &in->buffer [last], len);
++ len = strlen (&in->buffer [charpos(in,last)]) + 1;
++ memmove (&in->buffer [charpos(in,first)], &in->buffer [charpos(in,last)], len);
++ in->charpoint = 0;
+ in->need_push = 1;
+ }
+
+@@ -1329,6 +1552,8 @@ kill_word (WInput *in)
+ copy_region (in, old_point, new_point);
+ delete_region (in, old_point, new_point);
+ in->need_push = 1;
++ in->charpoint = 0;
++ in->charpoint = 0;
+ }
+
+ static void
+@@ -1372,16 +1597,20 @@ yank (WInput *in)
+
+ if (!kill_buffer)
+ return;
++ in->charpoint = 0;
+ for (p = kill_buffer; *p; p++)
+ insert_char (in, *p);
++ in->charpoint = 0;
+ }
+
+ static void
+ kill_line (WInput *in)
+ {
++ int chp = charpos(in,in->point);
+ g_free (kill_buffer);
+- kill_buffer = g_strdup (&in->buffer [in->point]);
+- in->buffer [in->point] = 0;
++ kill_buffer = g_strdup (&in->buffer [chp]);
++ in->buffer [chp] = 0;
++ in->charpoint = 0;
+ }
+
+ void
+@@ -1391,9 +1620,10 @@ assign_text (WInput *in, const char *tex
+ g_free (in->buffer);
+ in->buffer = g_strdup (text); /* was in->buffer->text */
+ in->current_max_len = strlen (in->buffer) + 1;
+- in->point = strlen (in->buffer);
++ in->point = mbstrlen (in->buffer);
+ in->mark = 0;
+ in->need_push = 1;
++ in->charpoint = 0;
+ }
+
+ static void
+@@ -1520,6 +1750,7 @@ port_region_marked_for_delete (WInput *i
+ *in->buffer = 0;
+ in->point = 0;
+ in->first = 0;
++ in->charpoint = 0;
+ }
+
+ cb_ret_t
+@@ -1548,7 +1779,11 @@ handle_char (WInput *in, int c_code)
+ }
+ }
+ if (!input_map [i].fn){
++#ifndef UTF8
+ if (c_code > 255 || !is_printable (c_code))
++#else /* UTF8 */
++ if (c_code > 255)
++#endif /* UTF8 */
+ return MSG_NOT_HANDLED;
+ if (in->first){
+ port_region_marked_for_delete (in);
+@@ -1581,6 +1816,9 @@ input_set_point (WInput *in, int pos)
+ if (pos != in->point)
+ free_completions (in);
+ in->point = pos;
++#ifdef UTF8
++ in->charpoint = 0;
++#endif /* UTF8 */
+ update_input (in, 1);
+ }
+
+@@ -1621,7 +1859,7 @@ input_callback (Widget *w, widget_msg_t
+ return MSG_HANDLED;
+
+ case WIDGET_CURSOR:
+- widget_move (&in->widget, 0, in->point - in->first_shown);
++ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
+ return MSG_HANDLED;
+
+ case WIDGET_DESTROY:
+@@ -1645,7 +1883,7 @@ input_event (Gpm_Event * event, void *da
+ && should_show_history_button (in)) {
+ do_show_hist (in);
+ } else {
+- in->point = strlen (in->buffer);
++ in->point = mbstrlen (in->buffer);
+ if (event->x - in->first_shown - 1 < in->point)
+ in->point = event->x - in->first_shown - 1;
+ if (in->point < 0)
+@@ -1702,7 +1940,8 @@ input_new (int y, int x, int color, int
+ in->is_password = 0;
+
+ strcpy (in->buffer, def_text);
+- in->point = strlen (in->buffer);
++ in->point = mbstrlen (in->buffer);
++ in->charpoint = 0;
+ return in;
+ }
+
+--- mc/src/util.c.utf8 2005-11-03 03:01:12.000000000 +0100
++++ mc/src/util.c 2007-01-04 16:20:56.000000000 +0100
+@@ -34,7 +34,11 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <iconv.h>
++#include <langinfo.h>
++#include <errno.h>
+
++#include "tty.h"
+ #include "global.h"
+ #include "profile.h"
+ #include "main.h" /* mc_home */
+@@ -46,9 +50,39 @@
+ #include "charsets.h"
+ #endif
+
++#ifdef UTF8
++#include <wctype.h>
++#endif
++
+ static const char app_text [] = "Midnight-Commander";
+ int easy_patterns = 1;
+
++#if SLANG_VERSION >= 20000
++void SLsmg_write_nwchars(wchar_t *s, size_t n)
++{
++ if (SLsmg_is_utf8_mode()) { /* slang can handle it directly */
++ while(n-- && *s)
++ SLsmg_write_char(*s++);
++ }
++ else { /* convert wchars back to 8bit encoding */
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++ while (n-- && *s) {
++ char buf[MB_LEN_MAX + 1]; /* should use 1 char, but to be sure */
++ if (*s < 0x80) {
++ SLsmg_write_char(*s++); /* ASCII */
++ }
++ else {
++ if (wcrtomb(buf, *s++, &mbs) == 1)
++ SLsmg_write_char((wchar_t)(buf[0]));
++ else
++ SLsmg_write_char('?'); /* should not happen */
++ }
++ }
++ }
++}
++#endif
++
+ extern void str_replace(char *s, char from, char to)
+ {
+ for (; *s != '\0'; s++) {
+@@ -79,9 +113,106 @@
+ return (c > 31 && c != 127 && c != 155);
+ }
+
++size_t
++mbstrlen (const char *str)
++{
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ size_t width = 0;
++
++ for (; *str; str++) {
++ wchar_t c;
++ size_t len;
++
++ len = mbrtowc (&c, str, MB_CUR_MAX, NULL);
++
++ if (len == (size_t)(-1) || len == (size_t)(-2)) break;
++
++ if (len > 0) {
++ int wcsize = wcwidth(c);
++ width += wcsize > 0 ? wcsize : 0;
++ str += len-1;
++ }
++ }
++
++ return width;
++ } else
++#endif
++ return strlen (str);
++}
++
++#ifdef UTF8
++
++void
++fix_utf8(char *str)
++{
++ mbstate_t mbs;
++
++ char *p = str;
++
++ while (*p) {
++ int len;
++ memset (&mbs, 0, sizeof (mbs));
++ len = mbrlen(p, MB_CUR_MAX, &mbs);
++ if (len == -1) {
++ *p = '?';
++ p++;
++ } else if (len > 0) {
++ p += len;
++ } else {
++ p++;
++ }
++ }
++}
++#endif
++
++
++
++#ifdef UTF8
++wchar_t *
++mbstr_to_wchar (const char *str)
++{
++ int len = mbstrlen(str);
++ wchar_t *buf = g_malloc((len+1) * sizeof(wchar_t));
++ mbstate_t mbs;
++ memset (&mbs, 0, sizeof (mbs));
++ mbsrtowcs (buf, &str, len, &mbs);
++ buf[len] = 0;
++ return buf;
++}
++
++char *
++wchar_to_mbstr (const wchar_t *wstr)
++{
++ mbstate_t mbs;
++ const wchar_t *wstr2;
++ char * string;
++ int len;
++
++ memset (&mbs, 0, sizeof (mbs));
++ wstr2 = wstr;
++ len = wcsrtombs(NULL, &wstr2, 0, &mbs);
++ if (len <= 0)
++ return NULL;
++
++ string = g_malloc(len + 1);
++
++ wstr2 = wstr;
++ wcsrtombs(string, &wstr2, len, &mbs);
++ string[len] = 0;
++ return string;
++}
++#endif
++
++
++
+ int
+ is_printable (int c)
+ {
++#ifdef UTF8
++ if (SLsmg_Is_Unicode)
++ return iswprint (c);
++#endif
+ c &= 0xff;
+
+ #ifdef HAVE_CHARSET
+@@ -99,7 +230,7 @@
+ #endif /* !HAVE_CHARSET */
+ }
+
+-/* Calculates the message dimensions (lines and columns) */
++/* Calculates the message dimension in columns and lines. */
+ void
+ msglen (const char *text, int *lines, int *columns)
+ {
+@@ -112,8 +243,21 @@
+ nlines++;
+ colindex = 0;
+ } else {
++#ifndef UTF8
+ colindex++;
+ if (colindex > ncolumns)
++#else /* UTF8 */
++ size_t len;
++ wchar_t c;
++
++ len = mbrtowc (&c, text, MB_CUR_MAX, NULL);
++ if (len > 0 && len != (size_t)(-1) && len != (size_t)(-2)) {
++ int wcsize = wcwidth(c);
++ colindex += wcsize > 0 ? wcsize-1 : -1;
++ text += len-1;
++ }
++ if (++colindex > ncolumns)
++#endif /* UTF8 */
+ ncolumns = colindex;
+ }
+ }
+@@ -207,7 +351,24 @@
+ *d++ = '\\';
+ break;
+ }
++#ifndef UTF8
+ *d = *s;
++#else /* UTF8 */
++ {
++ mbstate_t mbs;
++ int len;
++ memset (&mbs, 0, sizeof (mbs));
++ len = mbrlen(s, MB_CUR_MAX, &mbs);
++ if (len > 0) {
++ while (len-- > 1)
++ *d++ = *s++;
++ *d = *s;
++ } else {
++ *d = '?';
++ }
++
++ }
++#endif /* UTF8 */
+ }
+ *d = '\0';
+ return ret;
+@@ -229,25 +390,90 @@
+ name_trunc (const char *txt, int trunc_len)
+ {
+ static char x[MC_MAXPATHLEN + MC_MAXPATHLEN];
+- int txt_len;
++ int txt_len, first, skip;
+ char *p;
++ const char *str;
+
+ if ((size_t) trunc_len > sizeof (x) - 1) {
+ trunc_len = sizeof (x) - 1;
+ }
+- txt_len = strlen (txt);
+- if (txt_len <= trunc_len) {
+- strcpy (x, txt);
+- } else {
+- int y = (trunc_len / 2) + (trunc_len % 2);
+- strncpy (x, txt, y);
+- strncpy (x + y, txt + txt_len - (trunc_len / 2), trunc_len / 2);
+- x[y] = '~';
+- }
+- x[trunc_len] = 0;
+- for (p = x; *p; p++)
+- if (!is_printable (*p))
+- *p = '?';
++ txt_len = mbstrlen (txt);
++ first = 0;
++ skip = 0;
++ if (txt_len > trunc_len) {
++ first = trunc_len / 2;
++ skip = txt_len - trunc_len + 1;
++ }
++
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ mbstate_t s;
++ int mbmax;
++
++ str = txt;
++ memset (&s, 0, sizeof (s));
++ mbmax = MB_CUR_MAX;
++ p = x;
++ while (p < x + sizeof (x) - 1 && trunc_len) {
++ wchar_t wc;
++ int len;
++
++ len = mbrtowc (&wc, str, mbmax, &s);
++ if (!len)
++ break;
++ if (len < 0) {
++ memset (&s, 0, sizeof (s));
++ *p = '?';
++ len = 1;
++ str++;
++ } else if (!is_printable (wc)) {
++ *p = '?';
++ str += len;
++ len = 1;
++ } else if (p >= x + sizeof (x) - len)
++ break;
++ else {
++ memcpy (p, str, len);
++ str += len;
++ }
++ if (first) {
++ --trunc_len;
++ --first;
++ p += len;
++ if (!first && p < x + sizeof (x) - 1 && trunc_len) {
++ *p++ = '~';
++ --trunc_len;
++ }
++ } else if (skip)
++ --skip;
++ else {
++ --trunc_len;
++ p += len;
++ }
++ }
++ } else
++#endif
++ {
++ str = txt;
++ p = x;
++ while (p < x + sizeof (x) - 1) {
++ if (*str == '\0')
++ break;
++ else if (!is_printable (*str))
++ *p++ = '?';
++ else
++ *p++ = *str;
++ ++str;
++ if (first) {
++ --first;
++ if (!first) {
++ *p++ = '~';
++ str += skip;
++ }
++ }
++ }
++ }
++ *p = '\0';
+ return x;
+ }
+
+@@ -679,11 +905,61 @@
+ }
+
+ char *
++utf8_to_local(char *str)
++{
++ iconv_t cd;
++ size_t buflen = strlen(str);
++ char *output;
++ int retry = 1;
++
++ cd = iconv_open (nl_langinfo(CODESET), "UTF-8");
++ if (cd == (iconv_t) -1) {
++ return g_strdup(str);
++ }
++
++ output = g_malloc(buflen + 1);
++
++ while (retry)
++ {
++ char *wrptr = output;
++ char *inptr = str;
++ size_t insize = buflen;
++ size_t avail = buflen;
++ size_t nconv;
++
++ nconv = iconv (cd, &inptr, &insize, &wrptr, &avail);
++ if (nconv == (size_t) -1)
++ {
++ if (errno == E2BIG)
++ {
++ buflen *= 2;
++ g_free(output);
++ output = g_malloc(buflen + 1);
++ }
++ else
++ {
++ g_free(output);
++ return g_strdup(str);
++ }
++ }
++ else {
++ retry = 0;
++ *wrptr = 0;
++ }
++ }
++
++ iconv_close (cd);
++
++ return output;
++}
++
++char *
+ load_mc_home_file (const char *filename, char **allocated_filename)
+ {
+ char *hintfile_base, *hintfile;
+ char *lang;
+ char *data;
++ char *conv_data;
+
+ hintfile_base = concat_dir_and_file (mc_home, filename);
+ lang = guess_message_value ();
+@@ -716,7 +992,10 @@
+ else
+ g_free (hintfile);
+
+- return data;
++ conv_data = utf8_to_local(data);
++ g_free(data);
++
++ return conv_data;
+ }
+
+ /* Check strftime() results. Some systems (i.e. Solaris) have different
+@@ -725,12 +1004,14 @@
+ i18n_checktimelength (void)
+ {
+ size_t length, a, b;
+- char buf [MAX_I18NTIMELENGTH + 1];
++ char buf [4 * MAX_I18NTIMELENGTH + 1];
+ time_t testtime = time (NULL);
+
+- a = strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
+- b = strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
+-
++ strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
++ a = mbstrlen (buf);
++ strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
++ b = mbstrlen (buf);
++
+ length = max (a, b);
+ length = max (strlen (_("(invalid)")), length);
+
+@@ -744,16 +1025,13 @@
+ const char *
+ file_date (time_t when)
+ {
+- static char timebuf [MAX_I18NTIMELENGTH + 1];
++ static char timebuf [4 * MAX_I18NTIMELENGTH + 1];
+ time_t current_time = time ((time_t) 0);
+- static size_t i18n_timelength = 0;
+ static const char *fmtyear, *fmttime;
+ const char *fmt;
+ struct tm *whentm;
+
+- if (i18n_timelength == 0){
+- i18n_timelength = i18n_checktimelength() + 1;
+-
++ if (fmtyear == NULL) {
+ /* strftime() format string for old dates */
+ fmtyear = _("%b %e %Y");
+ /* strftime() format string for recent dates */
+@@ -775,9 +1053,9 @@
+
+ whentm = localtime(&when);
+ if (whentm == NULL)
+- g_snprintf (timebuf, i18n_timelength, "%s", _("(invalid)"));
++ g_snprintf (timebuf, sizeof (timebuf) - 1, "%s", _("(invalid)"));
+ else
+- strftime (timebuf, i18n_timelength, fmt, whentm);
++ strftime (timebuf, sizeof (timebuf) - 1, fmt, whentm);
+ return timebuf;
+ }
+
+@@ -907,10 +1185,27 @@
+ r++;
+ continue;
+ }
+-
++#ifndef UTF8
+ if (is_printable(*r))
+ *w++ = *r;
+ ++r;
++#else /* UTF8 */
++ {
++ mbstate_t mbs;
++ int len;
++ memset (&mbs, 0, sizeof (mbs));
++ len = mbrlen(r, MB_CUR_MAX, &mbs);
++
++ if (len > 0 && (unsigned char)*r >= ' ')
++ while (len--)
++ *w++ = *r++;
++ else {
++ if (len == -1)
++ *w++ = '?';
++ r++;
++ }
++ }
++#endif /* UTF8 */
+ }
+ *w = 0;
+ return s;
+--- mc/src/file.c.utf8 2006-05-23 16:20:39.000000000 +0200
++++ mc/src/file.c 2007-01-04 16:20:56.000000000 +0100
+@@ -161,15 +161,20 @@ static const char *
+ do_transform_source (FileOpContext *ctx, const char *source)
+ {
+ size_t j, k, l, len;
+- const char *fnsource = x_basename (source);
++ char *fnsource = g_strdup (x_basename (source));
+ int next_reg;
+ enum CaseConvs case_conv = NO_CONV;
+ static char fntarget[MC_MAXPATHLEN];
+
++#ifdef UTF8
++ fix_utf8(fnsource);
++#endif
++
+ len = strlen (fnsource);
+ j = re_match (&ctx->rx, fnsource, len, 0, &ctx->regs);
+ if (j != len) {
+ transform_error = FILE_SKIP;
++ g_free (fnsource);
+ return NULL;
+ }
+ for (next_reg = 1, j = 0, k = 0; j < strlen (ctx->dest_mask); j++) {
+@@ -213,6 +218,7 @@ do_transform_source (FileOpContext *ctx,
+ || ctx->regs.start[next_reg] < 0) {
+ message (1, MSG_ERROR, _(" Invalid target mask "));
+ transform_error = FILE_ABORT;
++ g_free(fnsource);
+ return NULL;
+ }
+ for (l = (size_t) ctx->regs.start[next_reg];
+@@ -227,6 +233,7 @@ do_transform_source (FileOpContext *ctx,
+ }
+ }
+ fntarget[k] = 0;
++ g_free(fnsource);
+ return fntarget;
+ }
+
+@@ -1688,13 +1695,13 @@ panel_operate_generate_prompt (const WPa
+ *dp = '\0';
+
+ if (single_source) {
+- i = fmd_xlen - strlen (format_string) - 4;
++ i = fmd_xlen - mbstrlen (format_string) - 4;
+ g_snprintf (cmd_buf, sizeof (cmd_buf), format_string,
+ name_trunc (single_source, i));
+ } else {
+ g_snprintf (cmd_buf, sizeof (cmd_buf), format_string,
+ panel->marked);
+- i = strlen (cmd_buf) + 6 - fmd_xlen;
++ i = mbstrlen (cmd_buf) + 6 - fmd_xlen;
+ if (i > 0) {
+ fmd_xlen += i;
+ fmd_init_i18n (TRUE); /* to recalculate positions of child widgets */
+--- mc/src/find.c.utf8 2006-02-06 17:55:43.000000000 +0100
++++ mc/src/find.c 2007-01-04 16:20:56.000000000 +0100
+@@ -217,7 +217,7 @@ find_parameters (char **start_dir, char
+ int l1, maxlen = 0;
+
+ while (i--) {
+- l1 = strlen (labs[i] = _(labs[i]));
++ l1 = mbstrlen (labs[i] = _(labs[i]));
+ if (l1 > maxlen)
+ maxlen = l1;
+ }
+@@ -226,7 +226,7 @@ find_parameters (char **start_dir, char
+ FIND_X = i;
+
+ for (i = sizeof (buts) / sizeof (buts[0]), l1 = 0; i--;) {
+- l1 += strlen (buts[i] = _(buts[i]));
++ l1 += mbstrlen (buts[i] = _(buts[i]));
+ }
+ l1 += 21;
+ if (l1 > FIND_X)
+@@ -235,8 +235,8 @@ find_parameters (char **start_dir, char
+ ilen = FIND_X - 7 - maxlen; /* for the case of very long buttons :) */
+ istart = FIND_X - 3 - ilen;
+
+- b1 = b0 + strlen (buts[0]) + 7;
+- b2 = FIND_X - (strlen (buts[2]) + 6);
++ b1 = b0 + mbstrlen (buts[0]) + 7;
++ b2 = FIND_X - (mbstrlen (buts[2]) + 6);
+
+ i18n_flag = 1;
+ case_label = _(case_label);
+@@ -863,7 +863,7 @@ setup_gui (void)
+ if (!i18n_flag) {
+ register int i = sizeof (fbuts) / sizeof (fbuts[0]);
+ while (i--)
+- fbuts[i].len = strlen (fbuts[i].text = _(fbuts[i].text)) + 3;
++ fbuts[i].len = mbstrlen (fbuts[i].text = _(fbuts[i].text)) + 3;
+ fbuts[2].len += 2; /* DEFPUSH_BUTTON */
+ i18n_flag = 1;
+ }
+@@ -1028,7 +1028,7 @@ find_file (char *start_dir, char *patter
+
+ if (!next_free) /* first turn i.e clean old list */
+ panel_clean_dir (current_panel);
+- list->list[next_free].fnamelen = strlen (name);
++ list->list[next_free].fnamelen = mbstrlen (name);
+ list->list[next_free].fname = name;
+ list->list[next_free].f.marked = 0;
+ list->list[next_free].f.link_to_dir = link_to_dir;
+--- mc/src/myslang.h.utf8 2005-09-06 22:36:23.000000000 +0200
++++ mc/src/myslang.h 2007-01-04 16:20:56.000000000 +0100
+@@ -11,6 +11,16 @@
+ #endif /* HAVE_SLANG_SLANG_H */
+ #endif
+
++#if SLANG_VERSION >= 20000
++#define UTF8 1
++#define SLsmg_Is_Unicode SLsmg_is_utf8_mode()
++void SLsmg_write_nwchars(wchar_t *s, size_t n);
++#endif
++
++#ifdef UTF8
++# include <wchar.h>
++#endif
++
+ enum {
+ KEY_BACKSPACE = 400,
+ KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
+--- mc/src/achown.c.utf8 2005-09-06 22:36:23.000000000 +0200
++++ mc/src/achown.c 2007-01-04 16:20:56.000000000 +0100
+@@ -584,6 +584,12 @@ init_chown_advanced (void)
+ b_att[2] = button_new (XTRACT (6));
+ b_user = button_new (XTRACT (5));
+ b_group = button_new (XTRACT (4));
++#ifdef UTF8
++ if (SLsmg_Is_Unicode) {
++ b_user->text = g_realloc (b_user->text, MB_CUR_MAX * 15 + 1);
++ b_group->text = g_realloc (b_group->text, MB_CUR_MAX * 15 + 1);
++ }
++#endif
+
+ add_widget (ch_dlg, b_group);
+ add_widget (ch_dlg, b_user);
+--- mc/src/dialog.c.utf8 2005-09-06 22:36:23.000000000 +0200
++++ mc/src/dialog.c 2007-01-04 16:20:56.000000000 +0100
+@@ -166,7 +166,7 @@ common_dialog_repaint (struct Dlg_head *
+
+ if (h->title) {
+ attrset (DLG_HOT_NORMALC (h));
+- dlg_move (h, space, (h->cols - strlen (h->title)) / 2);
++ dlg_move (h, space, (h->cols - mbstrlen (h->title)) / 2);
+ addstr (h->title);
+ }
+ }
+--- mc/src/boxes.c.utf8 2006-02-28 18:44:28.000000000 +0100
++++ mc/src/boxes.c 2007-01-04 16:20:56.000000000 +0100
+@@ -153,23 +153,23 @@ display_init (int radio_sel, char *init_
+ display_title = _(display_title);
+ for (i = 0; i < LIST_TYPES; i++) {
+ displays[i] = _(displays[i]);
+- if ((l = strlen (displays[i])) > maxlen)
++ if ((l = mbstrlen (displays[i])) > maxlen)
+ maxlen = l;
+ }
+
+- i = strlen (ok_button) + 5;
+- l = strlen (cancel_button) + 3;
++ i = mbstrlen (ok_button) + 5;
++ l = mbstrlen (cancel_button) + 3;
+ l = max (i, l);
+
+ i = maxlen + l + 16;
+ if (i > DISPLAY_X)
+ DISPLAY_X = i;
+
+- i = strlen (user_mini_status) + 13;
++ i = mbstrlen (user_mini_status) + 13;
+ if (i > DISPLAY_X)
+ DISPLAY_X = i;
+
+- i = strlen (display_title) + 10;
++ i = mbstrlen (display_title) + 10;
+ if (i > DISPLAY_X)
+ DISPLAY_X = i;
+
+@@ -288,20 +288,20 @@ sort_box (sortfn *sort_fn, int *reverse,
+ int maxlen = 0;
+ for (i = SORT_TYPES - 1; i >= 0; i--) {
+ sort_orders_names[i] = _(sort_orders[i].sort_name);
+- r = strlen (sort_orders_names[i]);
++ r = mbstrlen (sort_orders_names[i]);
+ if (r > maxlen)
+ maxlen = r;
+ }
+
+ check_pos = maxlen + 9;
+
+- r = strlen (reverse_label) + 4;
+- i = strlen (case_label) + 4;
++ r = mbstrlen (reverse_label) + 4;
++ i = mbstrlen (case_label) + 4;
+ if (i > r)
+ r = i;
+
+- l = strlen (ok_button) + 6;
+- i = strlen (cancel_button) + 4;
++ l = mbstrlen (ok_button) + 6;
++ i = mbstrlen (cancel_button) + 4;
+ if (i > l)
+ l = i;
+
+@@ -310,7 +310,7 @@ sort_box (sortfn *sort_fn, int *reverse,
+ if (i > SORT_X)
+ SORT_X = i;
+
+- i = strlen (sort_title) + 6;
++ i = mbstrlen (sort_title) + 6;
+ if (i > SORT_X)
+ SORT_X = i;
+
+@@ -408,7 +408,7 @@ confirm_box (void)
+ while (i--)
+ {
+ conf_widgets [i].text = _(conf_widgets [i].text);
+- l1 = strlen (conf_widgets [i].text) + 3;
++ l1 = mbstrlen (conf_widgets [i].text) + 3;
+ if (l1 > maxlen)
+ maxlen = l1;
+ }
+@@ -423,8 +423,8 @@ confirm_box (void)
+ * And this for the case when buttons with some space to the right
+ * do not fit within 2/6
+ */
+- l1 = strlen (conf_widgets [0].text) + 3;
+- i = strlen (conf_widgets [1].text) + 5;
++ l1 = mbstrlen (conf_widgets [0].text) + 3;
++ i = mbstrlen (conf_widgets [1].text) + 5;
+ if (i > l1)
+ l1 = i;
+
+@@ -497,11 +497,11 @@ display_bits_box (void)
+ {
+ display_widgets [i].text = _(display_widgets[i].text);
+ display_bits_str [i] = _(display_bits_str [i]);
+- l1 = strlen (display_bits_str [i]);
++ l1 = mbstrlen (display_bits_str [i]);
+ if (l1 > maxlen)
+ maxlen = l1;
+ }
+- l1 = strlen (display_widgets [2].text);
++ l1 = mbstrlen (display_widgets [2].text);
+ if (l1 > maxlen)
+ maxlen = l1;
+
+@@ -509,8 +509,8 @@ display_bits_box (void)
+ display_bits.xlen = (maxlen + 5) * 6 / 4;
+
+ /* See above confirm_box */
+- l1 = strlen (display_widgets [0].text) + 3;
+- i = strlen (display_widgets [1].text) + 5;
++ l1 = mbstrlen (display_widgets [0].text) + 3;
++ i = mbstrlen (display_widgets [1].text) + 5;
+ if (i > l1)
+ l1 = i;
+
+@@ -605,7 +605,7 @@ init_disp_bits_box (void)
+
+ cpname = _("&Select");
+ add_widget (dbits_dlg,
+- button_new (4, DISPX - 8 - strlen (cpname), B_USER,
++ button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER,
+ NORMAL_BUTTON, cpname, sel_charset_button));
+
+ return dbits_dlg;
+@@ -816,7 +816,7 @@ cd_dialog (void)
+ quick_widgets [1].y_divisions =
+ quick_widgets [0].y_divisions = Quick_input.ylen = 5;
+
+- len = strlen (quick_widgets [1].text);
++ len = mbstrlen (quick_widgets [1].text);
+
+ quick_widgets [0].relative_x =
+ quick_widgets [1].relative_x + len + 1;
+@@ -975,7 +975,7 @@ jobs_cmd (void)
+ {
+ job_buttons [i].name = _(job_buttons [i].name);
+
+- len = strlen (job_buttons [i].name) + 4;
++ len = mbstrlen (job_buttons [i].name) + 4;
+ JOBS_X = max (JOBS_X, startx + len + 3);
+
+ job_buttons [i].xpos = startx;
+@@ -984,7 +984,7 @@ jobs_cmd (void)
+
+ /* Last button - Ok a.k.a. Cancel :) */
+ job_buttons [n_buttons - 1].xpos =
+- JOBS_X - strlen (job_buttons [n_buttons - 1].name) - 7;
++ JOBS_X - mbstrlen (job_buttons [n_buttons - 1].name) - 7;
+
+ i18n_flag = 1;
+ }
+@@ -1042,7 +1042,7 @@ vfs_smb_get_authinfo (const char *host,
+
+ while (i--)
+ {
+- l1 = strlen (labs [i] = _(labs [i]));
++ l1 = mbstrlen (labs [i] = _(labs [i]));
+ if (l1 > maxlen)
+ maxlen = l1;
+ }
+@@ -1052,7 +1052,7 @@ vfs_smb_get_authinfo (const char *host,
+
+ for (i = sizeof(buts)/sizeof(buts[0]), l1 = 0; i--; )
+ {
+- l1 += strlen (buts [i] = _(buts [i]));
++ l1 += mbstrlen (buts [i] = _(buts [i]));
+ }
+ l1 += 15;
+ if (l1 > dialog_x)
+@@ -1061,7 +1061,7 @@ vfs_smb_get_authinfo (const char *host,
+ ilen = dialog_x - 7 - maxlen; /* for the case of very long buttons :) */
+ istart = dialog_x - 3 - ilen;
+
+- b2 = dialog_x - (strlen(buts[1]) + 6);
++ b2 = dialog_x - (mbstrlen(buts[1]) + 6);
+
+ i18n_flag = 1;
+ }
+--- mc/src/learn.c.utf8 2005-05-27 05:35:15.000000000 +0200
++++ mc/src/learn.c 2007-01-04 16:20:56.000000000 +0100
+@@ -237,7 +237,7 @@ init_learn (void)
+ learn_but[0].x = 78 / 2 + 4;
+
+ learn_but[1].text = _(learn_but[1].text);
+- learn_but[1].x = 78 / 2 - (strlen (learn_but[1].text) + 9);
++ learn_but[1].x = 78 / 2 - (mbstrlen (learn_but[1].text) + 9);
+
+ learn_title = _(learn_title);
+ i18n_flag = 1;
+--- mc/edit/edit-widget.h.utf8 2006-03-20 17:44:32.000000000 +0100
++++ mc/edit/edit-widget.h 2007-01-04 16:20:56.000000000 +0100
+@@ -30,6 +30,11 @@ typedef struct edit_key_map_type {
+ long command;
+ } edit_key_map_type;
+
++struct action {
++ mc_wchar_t ch;
++ long flags;
++};
++
+ struct WEdit {
+ Widget widget;
+
+@@ -42,8 +47,17 @@ struct WEdit {
+ /* dynamic buffers and cursor position for editor: */
+ long curs1; /* position of the cursor from the beginning of the file. */
+ long curs2; /* position from the end of the file */
++#ifndef UTF8
+ unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
+ unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
++#else /* UTF8 */
++ mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
++ mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
++
++ unsigned char charbuf[MB_LEN_MAX];
++ int charpoint;
++#endif /* UTF8 */
++
+
+ /* search variables */
+ long search_start; /* First character to start searching from */
+@@ -87,7 +101,7 @@ struct WEdit {
+
+ /* undo stack and pointers */
+ unsigned long stack_pointer;
+- long *undo_stack;
++ struct action *undo_stack;
+ unsigned long stack_size;
+ unsigned long stack_size_mask;
+ unsigned long stack_bottom;
+--- mc/edit/editkeys.c.utf8 2006-02-02 00:05:15.000000000 +0100
++++ mc/edit/editkeys.c 2007-01-04 16:20:56.000000000 +0100
+@@ -182,10 +182,10 @@ static const edit_key_map_type common_ke
+ * 'command' is one of the editor commands from editcmddef.h.
+ */
+ int
+-edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch)
++edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch)
+ {
+ int command = CK_Insert_Char;
+- int char_for_insertion = -1;
++ mc_wint_t char_for_insertion = -1;
+ int i = 0;
+ int extmod = 0;
+ const edit_key_map_type *key_map = NULL;
+@@ -242,9 +242,30 @@ edit_translate_key (WEdit *edit, long x_
+ /* an ordinary insertable character */
+ if (x_key < 256 && !extmod) {
+ int c = convert_from_input_c (x_key);
+-
++#ifdef UTF8
++ mbstate_t mbs;
++ int res;
++ mc_wchar_t wc;
++
++ memset (&mbs, 0, sizeof (mbs));
++
++ if (edit->charpoint >= MB_CUR_MAX) edit->charpoint = 0;
++
++ edit->charbuf[edit->charpoint++] = c;
++
++ res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs);
++ if (res < 0) {
++ if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */
++ return 0;
++ }
++ edit->charpoint = 0;
++
++ if (iswprint (wc)) {
++ char_for_insertion = wc;
++#else
+ if (is_printable (c)) {
+ char_for_insertion = c;
++#endif /* UTF8 */
+ goto fin;
+ }
+ }
+@@ -283,7 +304,7 @@ edit_translate_key (WEdit *edit, long x_
+ *cmd = command;
+ *ch = char_for_insertion;
+
+- if (command == CK_Insert_Char && char_for_insertion == -1) {
++ if (command == CK_Insert_Char && char_for_insertion == (mc_wint_t)-1) {
+ /* unchanged, key has no function here */
+ return 0;
+ }
+--- mc/edit/editwidget.c.utf8 2006-12-12 18:39:33.000000000 +0100
++++ mc/edit/editwidget.c 2007-01-04 16:20:56.000000000 +0100
+@@ -331,7 +331,8 @@ edit_callback (Widget *w, widget_msg_t m
+
+ case WIDGET_KEY:
+ {
+- int cmd, ch;
++ int cmd;
++ mc_wint_t ch;
+
+ /* The user may override the access-keys for the menu bar. */
+ if (edit_translate_key (e, parm, &cmd, &ch)) {
+--- mc/edit/editcmd.c.utf8 2006-11-27 15:19:29.000000000 +0100
++++ mc/edit/editcmd.c 2007-01-04 16:20:56.000000000 +0100
+@@ -61,7 +61,7 @@
+ #define edit_get_save_file(f,h) input_expand_dialog (h, _(" Enter file name: "), f)
+
+ struct selection {
+- unsigned char * text;
++ mc_wchar_t *text;
+ int len;
+ };
+
+@@ -84,12 +84,16 @@ int edit_confirm_save = 1;
+ #define MAX_REPL_LEN 1024
+
+ static int edit_save_cmd (WEdit *edit);
+-static unsigned char *edit_get_block (WEdit *edit, long start,
++static mc_wchar_t *edit_get_block (WEdit *edit, long start,
+ long finish, int *l);
+
+-static inline int my_lower_case (int c)
++static inline mc_wchar_t my_lower_case (mc_wchar_t c)
+ {
++#ifndef UTF8
+ return tolower(c & 0xFF);
++#else
++ return towlower(c);
++#endif
+ }
+
+ static const char *
+@@ -124,11 +128,11 @@ static void *memmove (void *dest, const
+ #endif /* !HAVE_MEMMOVE */
+
+ /* #define itoa MY_itoa <---- this line is now in edit.h */
+-static char *
++static mc_wchar_t *
+ MY_itoa (int i)
+ {
+- static char t[14];
+- char *s = t + 13;
++ static mc_wchar_t t[14];
++ mc_wchar_t *s = t + 13;
+ int j = i;
+ *s-- = 0;
+ do {
+@@ -213,6 +217,48 @@ void edit_refresh_cmd (WEdit * edit)
+ doupdate();
+ }
+
++#ifdef UTF8
++
++static size_t
++wchar_write(int fd, mc_wchar_t *buf, size_t len)
++{
++ char *tmpbuf = g_malloc(len + MB_LEN_MAX);
++ mbstate_t mbs;
++ size_t i;
++ size_t outlen = 0;
++ size_t res;
++
++ for (i = 0; i < len; i++) {
++ if (outlen >= len) {
++ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
++ g_free(tmpbuf);
++ return -1;
++ }
++ outlen = 0;
++ }
++ memset (&mbs, 0, sizeof (mbs));
++#ifdef __STDC_ISO_10646__
++ if (buf[i] >= BINARY_CHAR_OFFSET && buf[i] < (BINARY_CHAR_OFFSET + 256)) {
++ res = 1;
++ tmpbuf[outlen] = (char) (buf[i] - BINARY_CHAR_OFFSET);
++
++ } else
++#endif
++ res = wcrtomb(tmpbuf + outlen, buf[i], &mbs);
++ if (res > 0) {
++ outlen += res;
++ }
++ }
++ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
++ g_free(tmpbuf);
++ return -1;
++ }
++ g_free(tmpbuf);
++ return len;
++}
++
++#endif /* UTF8 */
++
+ /* If 0 (quick save) then a) create/truncate <filename> file,
+ b) save to <filename>;
+ if 1 (safe save) then a) save to <tempnam>,
+@@ -360,32 +406,48 @@ edit_save_file (WEdit *edit, const char
+ buf = 0;
+ filelen = edit->last_byte;
+ while (buf <= (edit->curs1 >> S_EDIT_BUF_SIZE) - 1) {
++#ifndef UTF8
+ if (mc_write (fd, (char *) edit->buffers1[buf], EDIT_BUF_SIZE)
++#else /* UTF8 */
++ if (wchar_write (fd, edit->buffers1[buf], EDIT_BUF_SIZE)
++#endif /* UTF8 */
+ != EDIT_BUF_SIZE) {
+ mc_close (fd);
+ goto error_save;
+ }
+ buf++;
+ }
++#ifndef UTF8
+ if (mc_write
+ (fd, (char *) edit->buffers1[buf],
++#else /* UTF8 */
++ if (wchar_write
++ (fd, edit->buffers1[buf],
++#endif /* UTF8 */
+ edit->curs1 & M_EDIT_BUF_SIZE) !=
+ (edit->curs1 & M_EDIT_BUF_SIZE)) {
+ filelen = -1;
+ } else if (edit->curs2) {
+ edit->curs2--;
+ buf = (edit->curs2 >> S_EDIT_BUF_SIZE);
+- if (mc_write
+- (fd,
+- (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
++#ifndef UTF8
++ if (mc_write(fd, (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
++#else /* UTF8 */
++ if (wchar_write(fd, edit->buffers2[buf] + EDIT_BUF_SIZE -
++#endif /* UTF8 */
+ (edit->curs2 & M_EDIT_BUF_SIZE) - 1,
+ 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) !=
+ 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) {
+ filelen = -1;
+ } else {
+ while (--buf >= 0) {
++#ifndef UTF8
+ if (mc_write
+ (fd, (char *) edit->buffers2[buf],
++#else /* UTF8 */
++ if (wchar_write
++ (fd, edit->buffers2[buf],
++#endif /* UTF8 */
+ EDIT_BUF_SIZE) != EDIT_BUF_SIZE) {
+ filelen = -1;
+ break;
+@@ -705,13 +767,21 @@ edit_delete_macro (WEdit * edit, int k)
+ if (!n || n == EOF)
+ break;
+ n = 0;
++#ifndef UTF8
+ while (fscanf (f, "%hd %hd, ", ¯o[n].command, ¯o[n].ch))
++#else /* UTF8 */
++ while (fscanf (f, "%hd %lu, ", ¯o[n].command, ¯o[n].ch))
++#endif /* UTF8 */
+ n++;
+ fscanf (f, ";\n");
+ if (s != k) {
+ fprintf (g, ("key '%d 0': "), s);
+ for (i = 0; i < n; i++)
++#ifndef UTF8
+ fprintf (g, "%hd %hd, ", macro[i].command, macro[i].ch);
++#else /* UTF8 */
++ fprintf (g, "%hd %lu, ", macro[i].command, macro[i].ch);
++#endif /* UTF8 */
+ fprintf (g, ";\n");
+ }
+ }
+@@ -744,7 +814,11 @@ int edit_save_macro_cmd (WEdit * edit, s
+ if (f) {
+ fprintf (f, ("key '%d 0': "), s);
+ for (i = 0; i < n; i++)
++#ifndef UTF8
+ fprintf (f, "%hd %hd, ", macro[i].command, macro[i].ch);
++#else /* UTF8 */
++ fprintf (f, "%hd %lu, ", macro[i].command, macro[i].ch);
++#endif /* UTF8 */
+ fprintf (f, ";\n");
+ fclose (f);
+ if (saved_macros_loaded) {
+@@ -794,10 +868,18 @@ int edit_load_macro_cmd (WEdit * edit, s
+ saved_macro[i++] = s;
+ if (!found) {
+ *n = 0;
++#ifndef UTF8
+ while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %hd, ", ¯o[*n].command, ¯o[*n].ch))
++#else /* UTF8 */
++ while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %lu, ", ¯o[*n].command, ¯o[*n].ch))
++#endif /* UTF8 */
+ (*n)++;
+ } else {
++#ifndef UTF8
+ while (2 == fscanf (f, "%hd %hd, ", &dummy.command, &dummy.ch));
++#else /* UTF8 */
++ while (2 == fscanf (f, "%hd %lu, ", &dummy.command, &dummy.ch));
++#endif /* UTF8 */
+ }
+ fscanf (f, ";\n");
+ if (s == k)
+@@ -944,7 +1026,7 @@ int eval_marks (WEdit * edit, long *star
+ #define space_width 1
+
+ static void
+-edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width)
++edit_insert_column_of_text (WEdit * edit, mc_wchar_t *data, int size, int width)
+ {
+ long cursor;
+ int i, col;
+@@ -992,7 +1074,7 @@ edit_block_copy_cmd (WEdit *edit)
+ {
+ long start_mark, end_mark, current = edit->curs1;
+ int size;
+- unsigned char *copy_buf;
++ mc_wchar_t *copy_buf;
+
+ edit_update_curs_col (edit);
+ if (eval_marks (edit, &start_mark, &end_mark))
+@@ -1032,7 +1114,7 @@ edit_block_move_cmd (WEdit *edit)
+ {
+ long count;
+ long current;
+- unsigned char *copy_buf;
++ mc_wchar_t *copy_buf;
+ long start_mark, end_mark;
+ int deleted = 0;
+ int x = 0;
+@@ -1093,7 +1175,7 @@ edit_block_move_cmd (WEdit *edit)
+ edit_push_action (edit, COLUMN_ON);
+ column_highlighting = 0;
+ } else {
+- copy_buf = g_malloc (end_mark - start_mark);
++ copy_buf = g_malloc ((end_mark - start_mark) * sizeof(mc_wchar_t));
+ edit_cursor_move (edit, start_mark - edit->curs1);
+ edit_scroll_screen_over_cursor (edit);
+ count = start_mark;
+@@ -1432,7 +1514,11 @@ static long sargs[NUM_REPL_ARGS][256 / s
+ /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */
+ /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */
+ static int
++#ifndef UTF8
+ string_regexp_search (char *pattern, char *string, int match_type,
++#else /* UTF8 */
++string_regexp_search (char *pattern, mc_wchar_t *wstring, int match_type,
++#endif /* UTF8 */
+ int match_bol, int icase, int *found_len, void *d)
+ {
+ static regex_t r;
+@@ -1441,6 +1527,11 @@ string_regexp_search (char *pattern, cha
+ regmatch_t *pmatch;
+ static regmatch_t s[1];
+
++#ifdef UTF8
++ char *string;
++ int i;
++#endif /* UTF8 */
++
+ pmatch = (regmatch_t *) d;
+ if (!pmatch)
+ pmatch = s;
+@@ -1460,13 +1551,51 @@ string_regexp_search (char *pattern, cha
+ old_type = match_type;
+ old_icase = icase;
+ }
++
++#ifdef UTF8
++ string = wchar_to_mbstr(wstring);
++ if (string == NULL)
++ return -1;
++#endif /* UTF8 */
++
+ if (regexec
+ (&r, string, d ? NUM_REPL_ARGS : 1, pmatch,
+ ((match_bol
+ || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) {
+ *found_len = 0;
++
++#ifdef UTF8
++ g_free(string);
++#endif /* UTF8 */
++
+ return -1;
+ }
++
++#ifdef UTF8
++ for (i = 0; i < (d ? NUM_REPL_ARGS : 1); i++) {
++ char tmp;
++ int new_o;
++
++ if (pmatch[i].rm_so < 0)
++ continue;
++ tmp = string[pmatch[i].rm_so];
++ string[pmatch[i].rm_so] = 0;
++ new_o = mbstrlen(string);
++ string[pmatch[i].rm_so] = tmp;
++ pmatch[i].rm_so = new_o;
++
++ if (pmatch[i].rm_eo < 0)
++ continue;
++ tmp = string[pmatch[i].rm_eo];
++ string[pmatch[i].rm_eo] = 0;
++ new_o = mbstrlen(string);
++ string[pmatch[i].rm_eo] = tmp;
++ pmatch[i].rm_eo = new_o;
++ }
++
++ g_free(string);
++#endif /* UTF8 */
++
+ *found_len = pmatch[0].rm_eo - pmatch[0].rm_so;
+ return (pmatch[0].rm_so);
+ }
+@@ -1474,13 +1603,29 @@ string_regexp_search (char *pattern, cha
+ /* thanks to Liviu Daia <daia at stoilow.imar.ro> for getting this
+ (and the above) routines to work properly - paul */
+
++#ifndef UTF8
+ typedef int (*edit_getbyte_fn) (WEdit *, long);
++#else /* UTF8 */
++typedef mc_wchar_t (*edit_getbyte_fn) (WEdit *, long);
++#endif /* UTF8 */
+
+ static long
++#ifndef UTF8
+ edit_find_string (long start, unsigned char *exp, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d)
++#else /* UTF8 */
++edit_find_string (long start, unsigned char *exp_mb, int *len, long last_byte, edit_getbyte_fn get_byte, void *data, int once_only, void *d)
++#endif /* UTF8 */
+ {
+ long p, q = 0;
+- long l = strlen ((char *) exp), f = 0;
++ long f = 0;
++
++#ifndef UTF8
++ long l = strlen ((char *) exp);
++#else /* UTF8 */
++ mc_wchar_t *exp = mbstr_to_wchar((char *)exp_mb);
++ mc_wchar_t *exp_backup = exp;
++ long l = wcslen(exp);
++#endif /* UTF8 */
+ int n = 0;
+
+ for (p = 0; p < l; p++) /* count conversions... */
+@@ -1489,19 +1634,22 @@ edit_find_string (long start, unsigned c
+ n++;
+
+ if (replace_scanf || replace_regexp) {
+- int c;
+- unsigned char *buf;
+- unsigned char mbuf[MAX_REPL_LEN * 2 + 3];
++ mc_wint_t c;
++ mc_wchar_t *buf;
++ mc_wchar_t mbuf[MAX_REPL_LEN * 2 + 3];
+
+ replace_scanf = (!replace_regexp); /* can't have both */
+
+ buf = mbuf;
+
+ if (replace_scanf) {
+- unsigned char e[MAX_REPL_LEN];
+- if (n >= NUM_REPL_ARGS)
+- return -3;
+-
++ mc_wchar_t e[MAX_REPL_LEN];
++ if (n >= NUM_REPL_ARGS) {
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
++ return -3;
++ }
+ if (replace_case) {
+ for (p = start; p < last_byte && p < start + MAX_REPL_LEN; p++)
+ buf[p - start] = (*get_byte) (data, p);
+@@ -1515,20 +1663,36 @@ edit_find_string (long start, unsigned c
+ }
+
+ buf[(q = p - start)] = 0;
++#ifndef UTF8
+ strcpy ((char *) e, (char *) exp);
+ strcat ((char *) e, "%n");
++#else /* UTF8 */
++ wcscpy (e, exp);
++ wcscat (e, L"%n");
++#endif /* UTF8 */
+ exp = e;
+
+ while (q) {
+ *((int *) sargs[n]) = 0; /* --> here was the problem - now fixed: good */
++#ifndef UTF8
+ if (n == sscanf ((char *) buf, (char *) exp, SCANF_ARGS)) {
++#else /* UTF8 */
++ if (n == swscanf (buf, exp, SCANF_ARGS)) {
++#endif /* UTF8 */
+ if (*((int *) sargs[n])) {
+ *len = *((int *) sargs[n]);
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
+ return start;
+ }
+ }
+- if (once_only)
++ if (once_only) {
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
+ return -2;
++ }
+ if (q + start < last_byte) {
+ if (replace_case) {
+ buf[q] = (*get_byte) (data, q + start);
+@@ -1542,7 +1706,11 @@ edit_find_string (long start, unsigned c
+ start++;
+ buf++; /* move the window along */
+ if (buf == mbuf + MAX_REPL_LEN) { /* the window is about to go past the end of array, so... */
++#ifndef UTF8
+ memmove (mbuf, buf, strlen ((char *) buf) + 1); /* reset it */
++#else /* UTF8 */
++ wmemmove (mbuf, buf, (wcslen (buf) + 1)); /* reset it */
++#endif /* UTF8 */
+ buf = mbuf;
+ }
+ q--;
+@@ -1568,10 +1736,16 @@ edit_find_string (long start, unsigned c
+
+ buf = mbuf;
+ while (q) {
++#ifndef UTF8
+ found_start = string_regexp_search ((char *) exp, (char *) buf, match_normal, match_bol, !replace_case, len, d);
+-
++#else /* UTF8 */
++ found_start = string_regexp_search ((char *) exp_mb, buf, match_normal, match_bol, !replace_case, len, d);
++#endif /* UTF8 */
+ if (found_start <= -2) { /* regcomp/regexec error */
+ *len = 0;
++#ifdef UTF8
++ g_free (exp_backup);
++#endif /* UTF8 */
+ return -3;
+ }
+ else if (found_start == -1) /* not found: try next line */
+@@ -1582,15 +1756,27 @@ edit_find_string (long start, unsigned c
+ match_bol = 0;
+ continue;
+ }
+- else /* found */
++ else { /* found */
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
+ return (start + offset - q + found_start);
++ }
+ }
+- if (once_only)
++ if (once_only) {
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
+ return -2;
++ }
+
+ if (buf[q - 1] != '\n') { /* incomplete line: try to recover */
+ buf = mbuf + MAX_REPL_LEN / 2;
++#ifndef UTF8
+ q = strlen ((const char *) buf);
++#else /* UTF8 */
++ q = wcslen (buf);
++#endif /* UTF8 */
+ memmove (mbuf, buf, q);
+ p = start + q;
+ move_win = 1;
+@@ -1600,36 +1786,59 @@ edit_find_string (long start, unsigned c
+ }
+ }
+ } else {
++#ifndef UTF8
+ *len = strlen ((const char *) exp);
++#else /* UTF8 */
++ *len = wcslen (exp);
++#endif /* UTF8 */
+ if (replace_case) {
+ for (p = start; p <= last_byte - l; p++) {
+- if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */
++ if ((*get_byte) (data, p) == exp[0]) { /* check if first char matches */
+ for (f = 0, q = 0; q < l && f < 1; q++)
+- if ((*get_byte) (data, q + p) != (unsigned char)exp[q])
++ if ((*get_byte) (data, q + p) != exp[q])
+ f = 1;
+- if (f == 0)
++ if (f == 0) {
++#ifdef UTF8
++ g_free (exp_backup);
++#endif /* UTF8 */
+ return p;
++ }
+ }
+- if (once_only)
++ if (once_only) {
++#ifdef UTF8
++ g_free(exp_backup);
++#endif /* UTF8 */
+ return -2;
++ }
+ }
+ } else {
+ for (p = 0; exp[p] != 0; p++)
+ exp[p] = my_lower_case (exp[p]);
+
+ for (p = start; p <= last_byte - l; p++) {
+- if (my_lower_case ((*get_byte) (data, p)) == (unsigned char)exp[0]) {
++ if (my_lower_case ((*get_byte) (data, p)) == exp[0]) {
+ for (f = 0, q = 0; q < l && f < 1; q++)
+- if (my_lower_case ((*get_byte) (data, q + p)) != (unsigned char)exp[q])
++ if (my_lower_case ((*get_byte) (data, q + p)) != exp[q])
+ f = 1;
+- if (f == 0)
++ if (f == 0) {
++#ifdef UTF8
++ g_free (exp_backup);
++#endif /* UTF8 */
+ return p;
++ }
+ }
+- if (once_only)
++ if (once_only) {
++#ifdef UTF8
++ g_free (exp_backup);
++#endif /* UTF8 */
+ return -2;
++ }
+ }
+ }
+ }
++#ifdef UTF8
++ g_free (exp_backup);
++#endif /* UTF8 */
+ return -2;
+ }
+
+@@ -1643,9 +1852,14 @@ edit_find_forwards (long search_start, u
+
+ while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) {
+ if (replace_whole) {
++#ifndef UTF8
+ /*If the bordering chars are not in option_whole_chars_search then word is whole */
+ if (!strcasechr (option_whole_chars_search, (*get_byte) (data, p - 1))
+ && !strcasechr (option_whole_chars_search, (*get_byte) (data, p + *len)))
++#else /* UTF8 */
++ if (!iswalnum((*get_byte) (data, p - 1))
++ && !iswalnum((*get_byte) (data, p + *len)))
++#endif /* UTF8 */
+ return p;
+ if (once_only)
+ return -2;
+@@ -1677,6 +1891,7 @@ edit_find (long search_start, unsigned c
+
+ #define is_digit(x) ((x) >= '0' && (x) <= '9')
+
++#ifndef UTF8
+ #define snprint(v) { \
+ *p1++ = *p++; \
+ *p1 = '\0'; \
+@@ -1684,33 +1899,48 @@ edit_find (long search_start, unsigned c
+ if (n >= (size_t) (e - s)) goto nospc; \
+ s += n; \
+ }
++#else /* UTF8 */
++#define snprint(v) { \
++ *p1++ = *p++; \
++ *p1 = '\0'; \
++ n = swprintf(s, e-s, q1,v); \
++ if (n >= (size_t) (e - s)) goto nospc; \
++ s += n; \
++ }
++#endif /* UTF8 */
+
+ /* this function uses the sprintf command to do a vprintf */
+ /* it takes pointers to arguments instead of the arguments themselves */
+ /* The return value is the number of bytes written excluding '\0'
+ if successfull, -1 if the resulting string would be too long and
+ -2 if the format string is errorneous. */
+-static int snprintf_p (char *str, size_t size, const char *fmt,...)
+- __attribute__ ((format (printf, 3, 4)));
+-
+-static int snprintf_p (char *str, size_t size, const char *fmt,...)
++static int snprintf_p (mc_wchar_t *str, size_t size, const mc_wchar_t *fmt,...)
+ {
+ va_list ap;
+ size_t n;
+- const char *q, *p;
+- char *s = str, *e = str + size;
+- char q1[40];
+- char *p1;
++ const mc_wchar_t *q, *p;
++ mc_wchar_t *s = str, *e = str + size;
++ mc_wchar_t q1[40];
++
++ mc_wchar_t *p1;
+ int nargs = 0;
+
+ va_start (ap, fmt);
+ p = q = fmt;
+
++#ifndef UTF8
+ while ((p = strchr (p, '%'))) {
++#else /* UTF8 */
++ while ((p = wcschr (p, L'%'))) {
++#endif /* UTF8 */
+ n = p - q;
+ if (n >= (size_t) (e - s))
+ goto nospc;
++#ifndef UTF8
+ memcpy (s, q, n); /* copy stuff between format specifiers */
++#else /* UTF8 */
++ wmemcpy (s, q, n); /* copy stuff between format specifiers */
++#endif /* UTF8 */
+ s += n;
+ q = p;
+ p1 = q1;
+@@ -1738,45 +1968,78 @@ static int snprintf_p (char *str, size_t
+ *p1++ = *p++;
+ if (*p == '*') {
+ p++;
++#ifndef UTF8
+ strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
+ p1 += strlen (p1);
++#else /* UTF8 */
++ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
++ p1 += wcslen (p1);
++#endif /* UTF8 */
+ } else {
+- while (is_digit (*p) && p1 < q1 + 20)
++#ifndef UTF8
++ while (is_digit (*p)
++#else /* UTF8 */
++ while (iswdigit (*p)
++#endif /* UTF8 */
++ && p1 < q1 + 20)
+ *p1++ = *p++;
+- if (is_digit (*p))
++#ifndef UTF8
++ if (is_digit (*p))
++#else /* UTF8 */
++ if (iswdigit (*p))
++#endif /* UTF8 */
+ goto err;
+ }
+ if (*p == '.')
+ *p1++ = *p++;
+ if (*p == '*') {
+ p++;
++#ifndef UTF8
+ strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
+ p1 += strlen (p1);
++#else /* UTF8 */
++ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
++ p1 += wcslen (p1);
++#endif /* UTF8 */
+ } else {
+- while (is_digit (*p) && p1 < q1 + 32)
++#ifndef UTF8
++ while (is_digit (*p)
++#else /* UTF8 */
++ while (iswdigit (*p)
++#endif /* UTF8 */
++ && p1 < q1 + 32)
+ *p1++ = *p++;
+- if (is_digit (*p))
++#ifndef UTF8
++ if (is_digit (*p))
++#else /* UTF8 */
++ if (iswdigit (*p))
++#endif /* UTF8 */
+ goto err;
+ }
+ /* flags done, now get argument */
+ if (*p == 's') {
++#ifndef UTF8
+ snprint (va_arg (ap, char *));
++#else /* UTF8 */
++ *p1++ = 'l';
++ snprint (va_arg (ap, mc_wchar_t *));
++#endif /* UTF8 */
+ } else if (*p == 'h') {
+- if (strchr ("diouxX", *p))
++ if (*p < 128 && strchr ("diouxX", *p))
+ snprint (*va_arg (ap, short *));
+ } else if (*p == 'l') {
+ *p1++ = *p++;
+- if (strchr ("diouxX", *p))
++ if (*p < 128 && strchr ("diouxX", *p))
+ snprint (*va_arg (ap, long *));
+- } else if (strchr ("cdiouxX", *p)) {
++ } else if (*p < 128 && strchr ("cdiouxX", *p)) {
+ snprint (*va_arg (ap, int *));
+ } else if (*p == 'L') {
+ *p1++ = *p++;
+- if (strchr ("EefgG", *p))
++ if (*p < 128 && strchr ("EefgG", *p))
+ snprint (*va_arg (ap, double *)); /* should be long double */
+- } else if (strchr ("EefgG", *p)) {
++ } else if (*p < 128 && strchr ("EefgG", *p)) {
+ snprint (*va_arg (ap, double *));
+- } else if (strchr ("DOU", *p)) {
++ } else if (*p < 128 && strchr ("DOU", *p)) {
+ snprint (*va_arg (ap, long *));
+ } else if (*p == 'p') {
+ snprint (*va_arg (ap, void **));
+@@ -1785,10 +2048,17 @@ static int snprintf_p (char *str, size_t
+ q = p;
+ }
+ va_end (ap);
++#ifndef UTF8
+ n = strlen (q);
+ if (n >= (size_t) (e - s))
+ return -1;
+ memcpy (s, q, n + 1);
++#else /* UTF8 */
++ n = wcslen (q);
++ if (n >= (size_t) (e - s))
++ return -1;
++ wmemcpy (s, q, n + 1);
++#endif /* UTF8 */
+ return s + n - str;
+ nospc:
+ va_end (ap);
+@@ -1967,8 +2237,11 @@ edit_replace_cmd (WEdit *edit, int again
+ }
+ }
+ if (replace_yes) { /* delete then insert new */
++#ifdef UTF8
++ mc_wchar_t *winput2 = mbstr_to_wchar(input2);
++#endif /* UTF8 */
+ if (replace_scanf) {
+- char repl_str[MAX_REPL_LEN + 2];
++ mc_wchar_t repl_str[MAX_REPL_LEN + 2];
+ int ret = 0;
+
+ /* we need to fill in sargs just like with scanf */
+@@ -1977,17 +2250,25 @@ edit_replace_cmd (WEdit *edit, int again
+ for (k = 1;
+ k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0;
+ k++) {
++#ifndef UTF8
+ unsigned char *t;
++#else /* UTF8 */
++ mc_wchar_t *t;
++#endif
+
+ if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) {
+ ret = -1;
+ break;
+ }
++#ifndef UTF8
+ t = (unsigned char *) &sargs[k - 1][0];
++#else /* UTF8 */
++ t = (mc_wchar_t *) &sargs[k - 1][0];
++#endif /* UTF8 */
+ for (j = 0;
+ j < pmatch[k].rm_eo - pmatch[k].rm_so
+ && j < 255; j++, t++)
+- *t = (unsigned char) edit_get_byte (edit,
++ *t = edit_get_byte (edit,
+ edit->
+ search_start
+ -
+@@ -2005,14 +2286,23 @@ edit_replace_cmd (WEdit *edit, int again
+ }
+ if (!ret)
+ ret =
++#ifndef UTF8
+ snprintf_p (repl_str, MAX_REPL_LEN + 2, input2,
++#else /* UTF8 */
++ snprintf_p (repl_str, MAX_REPL_LEN + 2, winput2,
++#endif /* UTF8 */
+ PRINTF_ARGS);
+ if (ret >= 0) {
+ times_replaced++;
+ while (i--)
+ edit_delete (edit);
++#ifndef UTF8
+ while (repl_str[++i])
+ edit_insert (edit, repl_str[i]);
++#else /* UTF8 */
++ while (winput2[++i])
++ edit_insert (edit, winput2[i]);
++#endif /* UTF8 */
+ } else {
+ edit_error_dialog (_(" Replace "),
+ ret ==
+@@ -2026,10 +2316,18 @@ edit_replace_cmd (WEdit *edit, int again
+ times_replaced++;
+ while (i--)
+ edit_delete (edit);
++#ifndef UTF8
+ while (input2[++i])
+ edit_insert (edit, input2[i]);
++#else /* UTF8 */
++ while (winput2[++i])
++ edit_insert (edit, winput2[i]);
++#endif /* UTF8 */
+ }
+ edit->found_len = i;
++#ifdef UTF8
++ g_free (winput2);
++#endif /* UTF8 */
+ }
+ /* so that we don't find the same string again */
+ if (replace_backwards) {
+@@ -2202,16 +2500,17 @@ edit_ok_to_exit (WEdit *edit)
+ #define TEMP_BUF_LEN 1024
+
+ /* Return a null terminated length of text. Result must be g_free'd */
+-static unsigned char *
++static mc_wchar_t *
+ edit_get_block (WEdit *edit, long start, long finish, int *l)
+ {
+- unsigned char *s, *r;
+- r = s = g_malloc (finish - start + 1);
++ mc_wchar_t *s, *r;
++ r = s = g_malloc ((finish - start + 1) * sizeof(mc_wchar_t));
+ if (column_highlighting) {
+ *l = 0;
+ /* copy from buffer, excluding chars that are out of the column 'margins' */
+ while (start < finish) {
+- int c, x;
++ mc_wchar_t c;
++ int x;
+ x = edit_move_forward3 (edit, edit_bol (edit, start), 0,
+ start);
+ c = edit_get_byte (edit, start);
+@@ -2244,11 +2543,15 @@ edit_save_block (WEdit * edit, const cha
+ return 0;
+
+ if (column_highlighting) {
+- unsigned char *block, *p;
++ mc_wchar_t *block, *p;
+ int r;
+ p = block = edit_get_block (edit, start, finish, &len);
+ while (len) {
++#ifndef UTF8
+ r = mc_write (file, p, len);
++#else /* UTF8 */
++ r = wchar_write (file, p, len);
++#endif /* UTF8 */
+ if (r < 0)
+ break;
+ p += r;
+@@ -2256,15 +2559,19 @@ edit_save_block (WEdit * edit, const cha
+ }
+ g_free (block);
+ } else {
+- unsigned char *buf;
++ mc_wchar_t *buf;
+ int i = start, end;
+ len = finish - start;
+- buf = g_malloc (TEMP_BUF_LEN);
++ buf = g_malloc (TEMP_BUF_LEN * sizeof(mc_wchar_t));
+ while (start != finish) {
+ end = min (finish, start + TEMP_BUF_LEN);
+ for (; i < end; i++)
+ buf[i - start] = edit_get_byte (edit, i);
++#ifndef UTF8
+ len -= mc_write (file, (char *) buf, end - start);
++#else /* UTF8 */
++ len -= wchar_write (file, buf, end - start);
++#endif /* UTF8 */
+ start = end;
+ }
+ g_free (buf);
+@@ -2602,17 +2909,20 @@ edit_block_process_cmd (WEdit *edit, con
+
+ /* prints at the cursor */
+ /* returns the number of chars printed */
++#ifndef UTF8
+ int edit_print_string (WEdit * e, const char *s)
++#else /* UTF8 */
++int edit_print_wstring (WEdit * e, mc_wchar_t *s)
++#endif /* UTF8 */
+ {
+ int i = 0;
+ while (s[i])
+- edit_execute_cmd (e, -1, (unsigned char) s[i++]);
++ edit_execute_cmd (e, -1, s[i++]);
+ e->force |= REDRAW_COMPLETELY;
+ edit_update_screen (e);
+ return i;
+ }
+
+-
+ static void pipe_mail (WEdit *edit, char *to, char *subject, char *cc)
+ {
+ FILE *p = 0;
+@@ -2706,15 +3016,20 @@ void edit_mail_dialog (WEdit * edit)
+ /* find first character of current word */
+ static int edit_find_word_start (WEdit *edit, long *word_start, int *word_len)
+ {
+- int i, c, last;
++ int i;
++ mc_wint_t c, last;
+
+ /* return if at begin of file */
+ if (edit->curs1 <= 0)
+ return 0;
+
+- c = (unsigned char) edit_get_byte (edit, edit->curs1 - 1);
++ c = edit_get_byte (edit, edit->curs1 - 1);
+ /* return if not at end or in word */
++#ifndef UTF8
+ if (isspace (c) || !(isalnum (c) || c == '_'))
++#else /* UTF8 */
++ if (iswspace (c) || !(iswalnum (c) || c == '_'))
++#endif /* UTF8 */
+ return 0;
+
+ /* search start of word to be completed */
+@@ -2724,11 +3039,19 @@ static int edit_find_word_start (WEdit *
+ return 0;
+
+ last = c;
+- c = (unsigned char) edit_get_byte (edit, edit->curs1 - i);
++ c = edit_get_byte (edit, edit->curs1 - i);
+
++#ifndef UTF8
+ if (!(isalnum (c) || c == '_')) {
++#else /* UTF8 */
++ if (!(iswalnum (c) || c == '_')) {
++#endif /* UTF8 */
+ /* return if word starts with digit */
++#ifndef UTF8
+ if (isdigit (last))
++#else /* UTF8 */
++ if (iswdigit (last))
++#endif /* UTF8 */
+ return 0;
+
+ *word_start = edit->curs1 - (i - 1); /* start found */
+@@ -2761,7 +3084,7 @@ edit_collect_completions (WEdit *edit, l
+ int *num)
+ {
+ int len, max_len = 0, i, skip;
+- unsigned char *bufpos;
++ mc_wchar_t *bufpos;
+
+ /* collect max MAX_WORD_COMPLETIONS completions */
+ while (*num < MAX_WORD_COMPLETIONS) {
+@@ -2780,11 +3103,16 @@ edit_collect_completions (WEdit *edit, l
+ buffers1[start >> S_EDIT_BUF_SIZE][start & M_EDIT_BUF_SIZE];
+ skip = 0;
+ for (i = 0; i < *num; i++) {
++#ifndef UTF8
+ if (strncmp
+ ((char *) &compl[i].text[word_len],
+- (char *) &bufpos[word_len], max (len,
+- compl[i].len) -
+- word_len) == 0) {
++ (char *) &bufpos[word_len],
++#else /* UTF8 */
++ if (wcsncmp
++ ((wchar_t *) &compl[i].text[word_len],
++ (wchar_t *) &bufpos[word_len],
++#endif /* UTF8 */
++ max (len, compl[i].len) - word_len) == 0) {
+ skip = 1;
+ break; /* skip it, already added */
+ }
+@@ -2792,7 +3120,7 @@ edit_collect_completions (WEdit *edit, l
+ if (skip)
+ continue;
+
+- compl[*num].text = g_malloc (len + 1);
++ compl[*num].text = g_malloc ((len + 1) * sizeof(mc_wchar_t));
+ compl[*num].len = len;
+ for (i = 0; i < len; i++)
+ compl[*num].text[i] = *(bufpos + i);
+@@ -2806,6 +3134,18 @@ edit_collect_completions (WEdit *edit, l
+ return max_len;
+ }
+
++#ifdef UTF8
++int edit_print_string (WEdit * e, const char *s)
++{
++ int i;
++ mc_wchar_t *ws = mbstr_to_wchar(s);
++ i = edit_print_wstring (e, ws);
++ g_free(ws);
++ return i;
++}
++
++#endif /* UTF8 */
++
+
+ /* let the user select its preferred completion */
+ static void
+@@ -2818,6 +3158,9 @@ edit_completion_dialog (WEdit * edit, in
+ WListbox *compl_list;
+ int compl_dlg_h; /* completion dialog height */
+ int compl_dlg_w; /* completion dialog width */
++#ifdef UTF8
++ char *mbtext;
++#endif /* UTF8 */
+
+ /* calculate the dialog metrics */
+ compl_dlg_h = num_compl + 2;
+@@ -2853,9 +3196,18 @@ edit_completion_dialog (WEdit * edit, in
+ add_widget (compl_dlg, compl_list);
+
+ /* fill the listbox with the completions */
++#ifndef UTF8
+ for (i = 0; i < num_compl; i++)
+ listbox_add_item (compl_list, LISTBOX_APPEND_AT_END, 0,
+ (char *) compl[i].text, NULL);
++#else /* UTF8 */
++ for (i = 0; i < num_compl; i++) {
++ mbtext = wchar_to_mbstr(compl[i].text);
++ listbox_add_item (compl_list, LISTBOX_APPEND_AT_END, 0,
++ mbtext, NULL);
++ g_free(mbtext);
++ }
++#endif /* UTF8 */
+
+ /* pop up the dialog */
+ run_dlg (compl_dlg);
+@@ -2863,9 +3215,17 @@ edit_completion_dialog (WEdit * edit, in
+ /* apply the choosen completion */
+ if (compl_dlg->ret_value == B_ENTER) {
+ listbox_get_current (compl_list, &curr, NULL);
+- if (curr)
++ if (curr){
++#ifndef UTF8
+ for (curr += word_len; *curr; curr++)
+ edit_insert (edit, *curr);
++#else /* UTF8 */
++ mc_wchar_t *wc, *wccurr = mbstr_to_wchar(curr);
++ for (wc = wccurr + word_len; *wc; wc++)
++ edit_insert (edit, *wc);
++ g_free(wccurr);
++#endif /* UTF8 */
++ }
+ }
+
+ /* destroy dialog before return */
+@@ -2882,8 +3242,9 @@ edit_complete_word_cmd (WEdit *edit)
+ {
+ int word_len = 0, i, num_compl = 0, max_len;
+ long word_start = 0;
+- unsigned char *bufpos;
+- char *match_expr;
++ mc_wchar_t *bufpos;
++ mc_wchar_t *match_expr;
++ char *mbmatch_expr;
+ struct selection compl[MAX_WORD_COMPLETIONS]; /* completions */
+
+ /* don't want to disturb another search */
+@@ -2900,16 +3261,32 @@ edit_complete_word_cmd (WEdit *edit)
+ /* prepare match expression */
+ bufpos = &edit->buffers1[word_start >> S_EDIT_BUF_SIZE]
+ [word_start & M_EDIT_BUF_SIZE];
++
++ match_expr = g_malloc((word_len + 14) * sizeof(mc_wchar_t));
++#ifndef UTF8
+ match_expr = g_strdup_printf ("%.*s[a-zA-Z_0-9]+", word_len, bufpos);
++#else /* UTF8 */
++ wcsncpy (match_expr, bufpos, word_len);
++ match_expr[word_len] = '\0';
++ wcscat (match_expr, L"[a-zA-Z_0-9]+");
++#endif /* UTF8 */
+
+ /* init search: backward, regexp, whole word, case sensitive */
+ edit_set_search_parameters (0, 1, 1, 1, 1);
+
+ /* collect the possible completions */
+ /* start search from curs1 down to begin of file */
++#ifndef UTF8
+ max_len =
+ edit_collect_completions (edit, word_start, word_len, match_expr,
+ (struct selection *) &compl, &num_compl);
++#else /* UTF8 */
++ mbmatch_expr = wchar_to_mbstr(match_expr);
++ max_len =
++ edit_collect_completions (edit, word_start, word_len, mbmatch_expr,
++ (struct selection *) &compl, &num_compl);
++ g_free(mbmatch_expr);
++#endif /* UTF8 */
+
+ if (num_compl > 0) {
+ /* insert completed word if there is only one match */
+--- mc/edit/wordproc.c.utf8 2006-06-17 04:55:41.000000000 +0200
++++ mc/edit/wordproc.c 2007-01-04 16:20:56.000000000 +0100
+@@ -40,7 +40,12 @@
+
+ #define tab_width option_tab_spacing
+
++#ifndef UTF8
+ #define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
++#else /* UTF8 */
++#define NO_FORMAT_CHARS_START L"-+*\\,.;:&>"
++#endif /* UTF8 */
++
+ #define FONT_MEAN_WIDTH 1
+
+ static long
+@@ -57,14 +62,21 @@ line_start (WEdit *edit, long line)
+ p = edit_move_forward (edit, p, line - l, 0);
+
+ p = edit_bol (edit, p);
++
++#ifndef UTF8
+ while (strchr ("\t ", edit_get_byte (edit, p)))
++#else /* UTF8 */
++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
++#endif /* UTF8 */
++
+ p++;
+ return p;
+ }
+
+ static int bad_line_start (WEdit * edit, long p)
+ {
+- int c;
++ mc_wint_t c;
++
+ c = edit_get_byte (edit, p);
+ if (c == '.') { /* `...' is acceptable */
+ if (edit_get_byte (edit, p + 1) == '.')
+@@ -78,7 +90,13 @@ static int bad_line_start (WEdit * edit,
+ return 0; /* `---' is acceptable */
+ return 1;
+ }
++
++#ifndef UTF8
+ if (strchr (NO_FORMAT_CHARS_START, c))
++#else /* UTF8 */
++ if (wcschr (NO_FORMAT_CHARS_START, c))
++#endif /* UTF8 */
++
+ return 1;
+ return 0;
+ }
+@@ -131,33 +149,37 @@ end_paragraph (WEdit *edit, int force)
+ i - edit->curs_line, 0));
+ }
+
+-static unsigned char *
++static mc_wchar_t *
+ get_paragraph (WEdit *edit, long p, long q, int indent, int *size)
+ {
+- unsigned char *s, *t;
++ mc_wchar_t *s, *t;
+ #if 0
+- t = g_malloc ((q - p) + 2 * (q - p) / option_word_wrap_line_length +
+- 10);
++ t = g_malloc (((q - p) + 2 * (q - p) / option_word_wrap_line_length +
++ 10) * sizeof(mc_wchar_t));
+ #else
+- t = g_malloc (2 * (q - p) + 100);
++ t = g_malloc ((2 * (q - p) + 100) * sizeof(mc_wchar_t));
+ #endif
+ if (!t)
+ return 0;
+ for (s = t; p < q; p++, s++) {
+ if (indent)
+ if (edit_get_byte (edit, p - 1) == '\n')
++#ifndef UTF8
+ while (strchr ("\t ", edit_get_byte (edit, p)))
++#else /* UTF8 */
++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
++#endif /* UTF8 */
+ p++;
+ *s = edit_get_byte (edit, p);
+ }
+- *size = (unsigned long) s - (unsigned long) t;
++ *size = s - t;
+ t[*size] = '\n';
+ return t;
+ }
+
+-static void strip_newlines (unsigned char *t, int size)
++static void strip_newlines (mc_wchar_t *t, int size)
+ {
+- unsigned char *p = t;
++ mc_wchar_t *p = t;
+ while (size--) {
+ *p = *p == '\n' ? ' ' : *p;
+ p++;
+@@ -174,7 +196,7 @@ static inline int next_tab_pos (int x)
+ {
+ return x += tab_width - x % tab_width;
+ }
+-static int line_pixel_length (unsigned char *t, long b, int l)
++static int line_pixel_length (mc_wchar_t *t, long b, int l)
+ {
+ int x = 0, c, xn = 0;
+ for (;;) {
+@@ -198,7 +220,7 @@ static int line_pixel_length (unsigned c
+ }
+
+ static int
+-next_word_start (unsigned char *t, int q, int size)
++next_word_start (mc_wchar_t *t, int q, int size)
+ {
+ int i;
+ int saw_ws = 0;
+@@ -222,7 +244,7 @@ next_word_start (unsigned char *t, int q
+
+ /* find the start of a word */
+ static int
+-word_start (unsigned char *t, int q, int size)
++word_start (mc_wchar_t *t, int q, int size)
+ {
+ int i = q;
+ if (t[q] == ' ' || t[q] == '\t')
+@@ -241,7 +263,7 @@ word_start (unsigned char *t, int q, int
+ }
+
+ /* replaces ' ' with '\n' to properly format a paragraph */
+-static void format_this (unsigned char *t, int size, int indent)
++static void format_this (mc_wchar_t *t, int size, int indent)
+ {
+ int q = 0, ww;
+ strip_newlines (t, size);
+@@ -269,7 +291,7 @@ static void format_this (unsigned char *
+ }
+ }
+
+-static void replace_at (WEdit * edit, long q, int c)
++static void replace_at (WEdit * edit, long q, mc_wint_t c)
+ {
+ edit_cursor_move (edit, q - edit->curs1);
+ edit_delete (edit);
+@@ -278,18 +300,27 @@ static void replace_at (WEdit * edit, lo
+
+ /* replaces a block of text */
+ static void
+-put_paragraph (WEdit * edit, unsigned char *t, long p, int indent, int size)
++put_paragraph (WEdit * edit, mc_wchar_t *t, long p, int indent, int size)
+ {
+ long cursor;
+- int i, c = 0;
++ int i;
++ mc_wchar_t c = 0;
+ cursor = edit->curs1;
+ if (indent)
++#ifndef UTF8
+ while (strchr ("\t ", edit_get_byte (edit, p)))
++#else /* UTF8 */
++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
++#endif /* UTF8 */
+ p++;
+ for (i = 0; i < size; i++, p++) {
+ if (i && indent) {
+ if (t[i - 1] == '\n' && c == '\n') {
++#ifndef UTF8
+ while (strchr ("\t ", edit_get_byte (edit, p)))
++#else /* UTF8 */
++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
++#endif /* UTF8 */
+ p++;
+ } else if (t[i - 1] == '\n') {
+ long curs;
+@@ -301,7 +332,11 @@ put_paragraph (WEdit * edit, unsigned ch
+ p = edit->curs1;
+ } else if (c == '\n') {
+ edit_cursor_move (edit, p - edit->curs1);
++#ifndef UTF8
+ while (strchr ("\t ", edit_get_byte (edit, p))) {
++#else /* UTF8 */
++ while (wcschr (L"\t ", edit_get_byte (edit, p))) {
++#endif /* UTF8 */
+ edit_delete (edit);
+ if (cursor > edit->curs1)
+ cursor--;
+@@ -334,7 +369,7 @@ format_paragraph (WEdit *edit, int force
+ {
+ long p, q;
+ int size;
+- unsigned char *t;
++ mc_wchar_t *t;
+ int indent = 0;
+ if (option_word_wrap_line_length < 2)
+ return;
+@@ -344,17 +379,25 @@ format_paragraph (WEdit *edit, int force
+ q = end_paragraph (edit, force);
+ indent = test_indent (edit, p, q);
+ t = get_paragraph (edit, p, q, indent, &size);
+- if (!t)
++ if (!t)
+ return;
+ if (!force) {
+ int i;
++#ifndef UTF8
+ if (strchr (NO_FORMAT_CHARS_START, *t)) {
++#else /* UTF8 */
++ if (wcschr (NO_FORMAT_CHARS_START, *t)) {
++#endif /* UTF8 */
+ g_free (t);
+ return;
+ }
+ for (i = 0; i < size - 1; i++) {
+ if (t[i] == '\n') {
++#ifndef UTF8
+ if (strchr (NO_FORMAT_CHARS_START "\t ", t[i + 1])) {
++#else /* UTF8 */
++ if (wcschr (NO_FORMAT_CHARS_START "\t", t[i + 1])) {
++#endif /* UTF8 */
+ g_free (t);
+ return;
+ }
+--- mc/edit/edit.h.utf8 2006-12-12 18:39:33.000000000 +0100
++++ mc/edit/edit.h 2007-01-04 16:20:56.000000000 +0100
+@@ -25,6 +25,27 @@
+
+ #include <stdio.h>
+
++#include "src/tty.h"
++
++#ifdef UTF8
++#include <wchar.h>
++#include <wctype.h>
++
++#define mc_wchar_t wchar_t
++#define mc_wint_t wint_t
++
++#else
++
++#define mc_wchar_t unsigned char
++#define mc_wint_t int
++
++#endif
++
++
++/* unicode private use area */
++#define BINARY_CHAR_OFFSET 0xFFE00
++
++
+ #define N_menus 5
+
+ #define SEARCH_DIALOG_OPTION_NO_SCANF (1 << 0)
+@@ -86,6 +107,8 @@
+ #define START_STACK_SIZE 32
+
+ /* Some codes that may be pushed onto or returned from the undo stack */
++#define CHAR_INSERT 65
++#define CHAR_INSERT_AHEAD 66
+ #define CURS_LEFT 601
+ #define CURS_RIGHT 602
+ #define DELCHAR 603
+@@ -105,7 +128,7 @@
+
+ struct macro {
+ short command;
+- short ch;
++ mc_wchar_t ch;
+ };
+
+ struct WEdit;
+@@ -120,8 +143,12 @@ void edit_reload_menu (void);
+ void menu_save_mode_cmd (void);
+ int edit_raw_key_query (const char *heading, const char *query, int cancel);
+ int edit_file (const char *_file, int line);
+-int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch);
++int edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch);
++#ifndef UTF8
+ int edit_get_byte (WEdit * edit, long byte_index);
++#else /* UTF8 */
++mc_wchar_t edit_get_byte (WEdit * edit, long byte_index);
++#endif /* UTF8 */
+ int edit_count_lines (WEdit * edit, long current, int upto);
+ long edit_move_forward (WEdit * edit, long current, int lines, long upto);
+ long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
+@@ -148,11 +175,11 @@ int edit_block_delete_cmd (WEdit * edit)
+ void edit_delete_line (WEdit * edit);
+
+ int edit_delete (WEdit * edit);
+-void edit_insert (WEdit * edit, int c);
++void edit_insert (WEdit * edit, mc_wchar_t c);
+ int edit_cursor_move (WEdit * edit, long increment);
+ void edit_push_action (WEdit * edit, long c, ...);
+ void edit_push_key_press (WEdit * edit);
+-void edit_insert_ahead (WEdit * edit, int c);
++void edit_insert_ahead (WEdit * edit, mc_wchar_t c);
+ long edit_write_stream (WEdit * edit, FILE * f);
+ char *edit_get_write_filter (const char *writename, const char *filename);
+ int edit_save_confirm_cmd (WEdit * edit);
+@@ -183,7 +210,7 @@ void edit_goto_cmd (WEdit * edit);
+ int eval_marks (WEdit * edit, long *start_mark, long *end_mark);
+ void edit_status (WEdit * edit);
+ void edit_execute_key_command (WEdit *edit, int command,
+- int char_for_insertion);
++ mc_wint_t char_for_insertion);
+ void edit_update_screen (WEdit * edit);
+ int edit_print_string (WEdit * e, const char *s);
+ void edit_move_to_line (WEdit * e, long line);
+@@ -233,7 +260,7 @@ void edit_mail_dialog (WEdit *edit);
+ void format_paragraph (WEdit *edit, int force);
+
+ /* either command or char_for_insertion must be passed as -1 */
+-void edit_execute_cmd (WEdit *edit, int command, int char_for_insertion);
++void edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion);
+
+ #define get_sys_error(s) (s)
+
+--- mc/edit/editdraw.c.utf8 2006-12-09 16:19:48.000000000 +0100
++++ mc/edit/editdraw.c 2007-01-04 16:20:56.000000000 +0100
+@@ -71,11 +71,16 @@
+ * 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>");
+ }
+@@ -207,11 +212,16 @@
+ #define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color))
+ #endif
+
++struct line_s {
++ mc_wchar_t ch;
++ unsigned int style;
++};
++
+ static void
+ print_to_widget (WEdit *edit, long row, int start_col, int start_col_real,
+- long end_col, unsigned int line[])
++ long end_col, struct line_s line[])
+ {
+- unsigned int *p;
++ struct line_s *p;
+
+ int x = start_col_real + EDIT_TEXT_HORIZONTAL_OFFSET;
+ int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET;
+@@ -225,9 +235,9 @@
+ edit_move (x1 + FONT_OFFSET_X, y + FONT_OFFSET_Y);
+ p = line;
+
+- while (*p) {
++ while (p->ch) {
+ int style;
+- int textchar;
++ mc_wchar_t textchar;
+ int color;
+
+ if (cols_to_skip) {
+@@ -236,9 +246,9 @@
+ continue;
+ }
+
+- style = *p & 0xFF00;
+- textchar = *p & 0xFF;
+- color = *p >> 16;
++ style = p->style & 0xFF00;
++ textchar = p->ch;
++ color = p->style >> 16;
+
+ if (style & MOD_ABNORMAL) {
+ /* Non-printable - use black background */
+@@ -267,8 +277,11 @@
+ lowlevel_set_color (color);
+ }
+ }
+-
++#ifdef UTF8
++ SLsmg_write_nwchars(&textchar, 1);
++#else
+ addch (textchar);
++#endif
+ p++;
+ }
+ }
+@@ -280,11 +293,11 @@
+ edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
+ long end_col)
+ {
+- static unsigned int line[MAX_LINE_LEN];
+- unsigned int *p = line;
++ struct line_s line[MAX_LINE_LEN];
++ struct line_s *p = line;
+ long m1 = 0, m2 = 0, q, c1, c2, tws;
+ int col, start_col_real;
+- unsigned int c;
++ mc_wint_t c;
+ int color;
+ int i;
+
+@@ -308,87 +321,92 @@
+ }
+
+ while (col <= end_col - edit->start_col) {
+- *p = 0;
++ p->ch = 0;
++ p->style = 0;
+ if (q == edit->curs1)
+- *p |= MOD_CURSOR;
++ p->style |= MOD_CURSOR;
+ if (q >= m1 && q < m2) {
+ if (column_highlighting) {
+ int x;
+ x = edit_move_forward3 (edit, b, 0, q);
+ if (x >= c1 && x < c2)
+- *p |= MOD_MARKED;
++ p->style |= MOD_MARKED;
+ } else
+- *p |= MOD_MARKED;
++ p->style |= MOD_MARKED;
+ }
+ if (q == edit->bracket)
+- *p |= MOD_BOLD;
++ p->style |= MOD_BOLD;
+ if (q >= edit->found_start
+ && q < edit->found_start + edit->found_len)
+- *p |= MOD_BOLD;
++ p->style |= MOD_BOLD;
+ c = edit_get_byte (edit, q);
+ /* we don't use bg for mc - fg contains both */
+ edit_get_syntax_color (edit, q, &color);
+- *p |= color << 16;
++ p->style |= color << 16;
+ switch (c) {
+ case '\n':
+ col = end_col - edit->start_col + 1; /* quit */
+- *(p++) |= ' ';
++ p->ch = ' ';
++ p++;
+ break;
+- case '\t':
+- i = TAB_SIZE - ((int) col % TAB_SIZE);
+- col += i;
+- if (use_colors && visible_tabs) {
+- c = (*p & ~MOD_CURSOR) | MOD_WHITESPACE;
+- if (i > 2) {
+- *(p++) |= '<' | MOD_WHITESPACE;
+- while (--i > 1)
+- *(p++) = c | '-';
+- *(p++) = c | '>';
+- } else if (i > 1) {
+- *(p++) |= '<' | MOD_WHITESPACE;
+- *(p++) = c | '>';
+- } else
+- *(p++) |= '>' | MOD_WHITESPACE;
+- } else if (use_colors && visible_tws && q >= tws) {
+- *p |= '.' | MOD_WHITESPACE;
+- c = *(p++) & ~MOD_CURSOR;
+- while (--i)
+- *(p++) = c;
+- } else {
+- *p |= ' ';
+- c = *(p++) & ~MOD_CURSOR;
+- while (--i)
+- *(p++) = c;
+- }
+- break;
+- case ' ':
+- if (use_colors && visible_tws && q >= tws) {
+- *(p++) |= '.' | MOD_WHITESPACE;
+- col++;
+- break;
++ case '\t':
++ i = TAB_SIZE - ((int) col % TAB_SIZE);
++ p->ch = ' ';
++ c = p->style & ~MOD_CURSOR;
++ p++;
++ col += i;
++ while (--i) {
++ p->ch = ' '; p->style = c;
++ p++;
+ }
++ break;
+ /* fallthrough */
+ default:
+ c = convert_to_display_c (c);
+
+ /* Caret notation for control characters */
+ if (c < 32) {
+- *(p++) = '^' | MOD_ABNORMAL;
+- *(p++) = (c + 0x40) | MOD_ABNORMAL;
++ p->ch = '^';
++ p->style = MOD_ABNORMAL;
++ p++;
++ p->ch = c + 0x40;
++ p->style = MOD_ABNORMAL;
+ col += 2;
+ break;
+ }
+ if (c == 127) {
+- *(p++) = '^' | MOD_ABNORMAL;
+- *(p++) = '?' | MOD_ABNORMAL;
++ p->ch = '^';
++ p->style = MOD_ABNORMAL;
++ p++;
++ p->ch = '?';
++ p->style = MOD_ABNORMAL;
++ p++;
+ col += 2;
+ break;
+ }
+
+- if (is_printable (c)) {
+- *(p++) |= c;
++#ifndef UTF8
++ if (is_printable (c)
++#else /* UTF8 */
++ if (iswprint (c)
++#ifdef __STDC_ISO_10646__
++ && (c < BINARY_CHAR_OFFSET || c >= (BINARY_CHAR_OFFSET + 256))
++#endif
++#endif /* UTF8 */
++ ) {
++ p->ch = c;
++ p++;
++
++#ifdef UTF8
++ i = wcwidth(c);
++ if (i > 1) {
++ col += i - 1;
++ }
++#endif /* UTF8 */
+ } else {
+- *(p++) = '.' | MOD_ABNORMAL;
++ p->ch = '.';
++ p->style = MOD_ABNORMAL;
++ p++;
+ }
+ col++;
+ break;
+@@ -399,7 +417,7 @@
+ } else {
+ start_col_real = start_col = 0;
+ }
+- *p = 0;
++ p->ch = 0;
+
+ print_to_widget (edit, row, start_col, start_col_real, end_col, line);
+ }
+--- mc/edit/edit.c.utf8 2006-12-12 18:39:33.000000000 +0100
++++ mc/edit/edit.c 2007-01-04 16:20:56.000000000 +0100
+@@ -102,7 +102,11 @@ char *option_backup_ext = NULL;
+
+ static void user_menu (WEdit *edit);
+
++#ifndef UTF8
+ int edit_get_byte (WEdit * edit, long byte_index)
++#else
++mc_wchar_t edit_get_byte (WEdit * edit, long byte_index)
++#endif
+ {
+ unsigned long p;
+ if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
+@@ -131,7 +135,7 @@ edit_init_buffers (WEdit *edit)
+
+ edit->curs1 = 0;
+ edit->curs2 = 0;
+- edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ }
+
+ /*
+@@ -156,7 +160,7 @@ edit_load_file_fast (WEdit *edit, const
+ }
+
+ if (!edit->buffers2[buf2])
+- edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+
+ mc_read (file,
+ (char *) edit->buffers2[buf2] + EDIT_BUF_SIZE -
+@@ -166,7 +170,7 @@ edit_load_file_fast (WEdit *edit, const
+ for (buf = buf2 - 1; buf >= 0; buf--) {
+ /* edit->buffers2[0] is already allocated */
+ if (!edit->buffers2[buf])
+- edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ mc_read (file, (char *) edit->buffers2[buf], EDIT_BUF_SIZE);
+ }
+
+@@ -239,9 +243,44 @@ edit_insert_stream (WEdit * edit, FILE *
+ {
+ int c;
+ long i = 0;
+- while ((c = fgetc (f)) >= 0) {
++#ifndef UTF8
++ while ((c = fgetc (f)) != EOF) {
+ edit_insert (edit, c);
+ i++;
++#else /* UTF8 */
++ unsigned char buf[MB_LEN_MAX];
++ int charpos = 0;
++ mbstate_t mbs;
++
++ while ((c = fgetc (f)) != EOF) {
++ mc_wchar_t wc;
++ int size;
++ int j;
++
++ buf[charpos++] = c;
++
++ memset (&mbs, 0, sizeof (mbs));
++ size = mbrtowc(&wc, (char *)buf, charpos, &mbs);
++
++ if (size == -2)
++ continue; /* incomplete */
++
++ else if (size >= 0) {
++ edit_insert (edit, wc);
++ i++;
++ charpos = 0;
++ continue;
++ }
++ else {
++
++ /* invalid */
++#ifdef __STDC_ISO_10646__
++ for (j=0; j<charpos; j++)
++ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[j]);
++#endif
++ charpos = 0;
++ }
++#endif /* UTF8 */
+ }
+ return i;
+ }
+@@ -249,9 +288,32 @@ edit_insert_stream (WEdit * edit, FILE *
+ long edit_write_stream (WEdit * edit, FILE * f)
+ {
+ long i;
++#ifndef UTF8
+ for (i = 0; i < edit->last_byte; i++)
+ if (fputc (edit_get_byte (edit, i), f) < 0)
+ break;
++#else /* UTF8 */
++ for (i = 0; i < edit->last_byte; i++) {
++ mc_wchar_t wc = edit_get_byte (edit, i);
++ int res;
++ char tmpbuf[MB_LEN_MAX];
++ mbstate_t mbs;
++
++ memset (&mbs, 0, sizeof (mbs));
++
++#ifdef __STDC_ISO_10646__
++ if (wc >= BINARY_CHAR_OFFSET && wc < (BINARY_CHAR_OFFSET + 256)) {
++ res = 1;
++ tmpbuf[0] = (char) (wc - BINARY_CHAR_OFFSET);
++ } else
++#endif
++ res = wcrtomb(tmpbuf, wc, &mbs);
++ if (res > 0) {
++ if (fwrite(tmpbuf, res, 1, f) != 1)
++ break;
++ }
++ }
++#endif /* UTF8 */
+ return i;
+ }
+
+@@ -290,12 +352,46 @@ edit_insert_file (WEdit *edit, const cha
+ int i, file, blocklen;
+ long current = edit->curs1;
+ unsigned char *buf;
++#ifdef UTF8
++ mbstate_t mbs;
++ int bufstart = 0;
++
++ memset (&mbs, 0, sizeof (mbs));
++#endif /* UTF8 */
+ if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1)
+ return 0;
+ buf = g_malloc (TEMP_BUF_LEN);
++#ifndef UTF8
+ while ((blocklen = mc_read (file, (char *) buf, TEMP_BUF_LEN)) > 0) {
+ for (i = 0; i < blocklen; i++)
+ edit_insert (edit, buf[i]);
++#else /* UTF8 */
++ while ((blocklen = mc_read (file, (char *) buf + bufstart, TEMP_BUF_LEN - bufstart)) > 0) {
++ blocklen += bufstart;
++ bufstart = 0;
++ for (i = 0; i < blocklen; ) {
++ mc_wchar_t wc;
++ int j;
++ int size = mbrtowc(&wc, (char *)buf + i, blocklen - i, &mbs);
++ if (size == -2) { /*incomplete char*/
++ bufstart = blocklen - i;
++ memcpy(buf, buf+i, bufstart);
++ i = blocklen;
++ memset (&mbs, 0, sizeof (mbs));
++ }
++ else if (size <= 0) {
++#ifdef __STDC_ISO_10646__
++ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[i]);
++#endif
++ memset (&mbs, 0, sizeof (mbs));
++ i++; /* skip broken char */
++ }
++ else {
++ edit_insert (edit, wc);
++ i+=size;
++ }
++ }
++#endif /* UTF8 */
+ }
+ edit_cursor_move (edit, current - edit->curs1);
+ g_free (buf);
+@@ -385,7 +481,11 @@ cleanup:
+ static int
+ edit_load_file (WEdit *edit)
+ {
++#ifndef UTF8
+ int fast_load = 1;
++#else /* UTF8 */
++ int fast_load = 0; /* can't be used with multibyte characters */
++#endif /* UTF8 */
+
+ /* Cannot do fast load if a filter is used */
+ if (edit_find_filter (edit->filename) >= 0)
+@@ -451,6 +551,7 @@ edit_load_position (WEdit *edit)
+ edit->prev_col = column;
+ edit_move_to_prev_col (edit, edit_bol (edit, edit->curs1));
+ edit_move_display (edit, line - (edit->num_widget_lines / 2));
++ edit->charpoint = 0;
+ }
+
+ /* Save cursor position in the file */
+@@ -534,7 +635,7 @@ edit_init (WEdit *edit, int lines, int c
+ edit_set_filename (edit, filename);
+ edit->stack_size = START_STACK_SIZE;
+ edit->stack_size_mask = START_STACK_SIZE - 1;
+- edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (long));
++ edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (struct action));
+ if (edit_load_file (edit)) {
+ /* edit_load_file already gives an error message */
+ if (to_free)
+@@ -689,14 +790,23 @@ void edit_push_action (WEdit * edit, lon
+ {
+ unsigned long sp = edit->stack_pointer;
+ unsigned long spm1;
+- long *t;
++
++ struct action *t;
++ mc_wchar_t ch = 0;
++
++ if (c == CHAR_INSERT || c == CHAR_INSERT_AHEAD) {
++ va_list ap;
++ va_start (ap, c);
++ ch = va_arg (ap, mc_wint_t);
++ va_end (ap);
++ }
+
+ /* first enlarge the stack if necessary */
+ if (sp > edit->stack_size - 10) { /* say */
+ if (option_max_undo < 256)
+ option_max_undo = 256;
+ if (edit->stack_size < (unsigned long) option_max_undo) {
+- t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (long));
++ t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (struct action));
+ if (t) {
+ edit->undo_stack = t;
+ edit->stack_size <<= 1;
+@@ -711,7 +821,7 @@ void edit_push_action (WEdit * edit, lon
+ #ifdef FAST_MOVE_CURSOR
+ if (c == CURS_LEFT_LOTS || c == CURS_RIGHT_LOTS) {
+ va_list ap;
+- edit->undo_stack[sp] = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
++ edit->undo_stack[sp].flags = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
+ edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
+ va_start (ap, c);
+ c = -(va_arg (ap, int));
+@@ -722,12 +832,14 @@ void edit_push_action (WEdit * edit, lon
+ && spm1 != edit->stack_bottom
+ && ((sp - 2) & edit->stack_size_mask) != edit->stack_bottom) {
+ int d;
+- if (edit->undo_stack[spm1] < 0) {
+- d = edit->undo_stack[(sp - 2) & edit->stack_size_mask];
+- if (d == c) {
+- if (edit->undo_stack[spm1] > -1000000000) {
++ mc_wchar_t d_ch;
++ if (edit->undo_stack[spm1].flags < 0) {
++ d = edit->undo_stack[(sp - 2) & edit->stack_size_mask].flags;
++ d_ch = edit->undo_stack[(sp - 2) & edit->stack_size_mask].ch;
++ if (d == c && d_ch == ch) {
++ if (edit->undo_stack[spm1].flags > -1000000000) {
+ if (c < KEY_PRESS) /* --> no need to push multiple do-nothings */
+- edit->undo_stack[spm1]--;
++ edit->undo_stack[spm1].flags--;
+ return;
+ }
+ }
+@@ -735,19 +847,20 @@ void edit_push_action (WEdit * edit, lon
+ #ifndef NO_STACK_CURSMOVE_ANIHILATION
+ else if ((c == CURS_LEFT && d == CURS_RIGHT)
+ || (c == CURS_RIGHT && d == CURS_LEFT)) { /* a left then a right anihilate each other */
+- if (edit->undo_stack[spm1] == -2)
++ if (edit->undo_stack[spm1].flags == -2)
+ edit->stack_pointer = spm1;
+ else
+- edit->undo_stack[spm1]++;
++ edit->undo_stack[spm1].flags++;
+ return;
+ }
+ #endif
+ } else {
+- d = edit->undo_stack[spm1];
+- if (d == c) {
++ d = edit->undo_stack[spm1].flags;
++ d_ch = edit->undo_stack[spm1].ch;
++ if (d == c && d_ch == ch) {
+ if (c >= KEY_PRESS)
+ return; /* --> no need to push multiple do-nothings */
+- edit->undo_stack[sp] = -2;
++ edit->undo_stack[sp].flags = -2;
+ goto check_bottom;
+ }
+ #ifndef NO_STACK_CURSMOVE_ANIHILATION
+@@ -759,7 +872,9 @@ void edit_push_action (WEdit * edit, lon
+ #endif
+ }
+ }
+- edit->undo_stack[sp] = c;
++ edit->undo_stack[sp].flags = c;
++ edit->undo_stack[sp].ch = ch;
++
+ check_bottom:
+
+ edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
+@@ -772,10 +887,10 @@ void edit_push_action (WEdit * edit, lon
+ (((unsigned long) c + 1) & edit->stack_size_mask) == edit->stack_bottom)
+ do {
+ edit->stack_bottom = (edit->stack_bottom + 1) & edit->stack_size_mask;
+- } while (edit->undo_stack[edit->stack_bottom] < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
++ } while (edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
+
+ /*If a single key produced enough pushes to wrap all the way round then we would notice that the [stack_bottom] does not contain KEY_PRESS. The stack is then initialised: */
+- if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom] < KEY_PRESS)
++ if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS)
+ edit->stack_bottom = edit->stack_pointer = 0;
+ }
+
+@@ -784,30 +899,30 @@ void edit_push_action (WEdit * edit, lon
+ then the file should be as it was when he loaded up. Then set edit->modified to 0.
+ */
+ static long
+-pop_action (WEdit * edit)
++pop_action (WEdit * edit, struct action *c)
+ {
+- long c;
+ unsigned long sp = edit->stack_pointer;
+ if (sp == edit->stack_bottom) {
+- return STACK_BOTTOM;
++ c->flags = STACK_BOTTOM;
++ return c->flags;
+ }
+ sp = (sp - 1) & edit->stack_size_mask;
+- if ((c = edit->undo_stack[sp]) >= 0) {
+-/* edit->undo_stack[sp] = '@'; */
++ *c = edit->undo_stack[sp];
++ if (edit->undo_stack[sp].flags >= 0) {
+ edit->stack_pointer = (edit->stack_pointer - 1) & edit->stack_size_mask;
+- return c;
++ return c->flags;
+ }
+ if (sp == edit->stack_bottom) {
+ return STACK_BOTTOM;
+ }
+- c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
+- if (edit->undo_stack[sp] == -2) {
+-/* edit->undo_stack[sp] = '@'; */
++ *c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
++
++ if (edit->undo_stack[sp].flags == -2) {
+ edit->stack_pointer = sp;
+ } else
+- edit->undo_stack[sp]++;
++ edit->undo_stack[sp].flags++;
+
+- return c;
++ return c->flags;
+ }
+
+ /* is called whenever a modification is made by one of the four routines below */
+@@ -828,7 +943,7 @@ static inline void edit_modification (WE
+ */
+
+ void
+-edit_insert (WEdit *edit, int c)
++edit_insert (WEdit *edit, mc_wchar_t c)
+ {
+ /* check if file has grown to large */
+ if (edit->last_byte >= SIZE_LIMIT)
+@@ -866,12 +981,11 @@ edit_insert (WEdit *edit, int c)
+ /* add a new buffer if we've reached the end of the last one */
+ if (!(edit->curs1 & M_EDIT_BUF_SIZE))
+ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] =
+- g_malloc (EDIT_BUF_SIZE);
++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+
+ /* perform the insertion */
+- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->
+- curs1 & M_EDIT_BUF_SIZE]
+- = (unsigned char) c;
++ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE]
++ [edit->curs1 & M_EDIT_BUF_SIZE] = c;
+
+ /* update file length */
+ edit->last_byte++;
+@@ -882,7 +996,7 @@ edit_insert (WEdit *edit, int c)
+
+
+ /* same as edit_insert and move left */
+-void edit_insert_ahead (WEdit * edit, int c)
++void edit_insert_ahead (WEdit * edit, mc_wchar_t c)
+ {
+ if (edit->last_byte >= SIZE_LIMIT)
+ return;
+@@ -905,7 +1019,7 @@ void edit_insert_ahead (WEdit * edit, in
+ edit->last_get_rule += (edit->last_get_rule >= edit->curs1);
+
+ if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
+- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
+
+ edit->last_byte++;
+@@ -915,7 +1029,7 @@ void edit_insert_ahead (WEdit * edit, in
+
+ int edit_delete (WEdit * edit)
+ {
+- int p;
++ mc_wint_t p;
+ if (!edit->curs2)
+ return 0;
+
+@@ -939,7 +1053,7 @@ int edit_delete (WEdit * edit)
+ edit->total_lines--;
+ edit->force |= REDRAW_AFTER_CURSOR;
+ }
+- edit_push_action (edit, p + 256);
++ edit_push_action (edit, CHAR_INSERT_AHEAD, p);
+ if (edit->curs1 < edit->start_display) {
+ edit->start_display--;
+ if (p == '\n')
+@@ -953,7 +1067,7 @@ int edit_delete (WEdit * edit)
+ static int
+ edit_backspace (WEdit * edit)
+ {
+- int p;
++ mc_wint_t p;
+ if (!edit->curs1)
+ return 0;
+
+@@ -977,7 +1091,7 @@ edit_backspace (WEdit * edit)
+ edit->total_lines--;
+ edit->force |= REDRAW_AFTER_CURSOR;
+ }
+- edit_push_action (edit, p);
++ edit_push_action (edit, CHAR_INSERT, p);
+
+ if (edit->curs1 < edit->start_display) {
+ edit->start_display--;
+@@ -990,10 +1104,18 @@ edit_backspace (WEdit * edit)
+
+ #ifdef FAST_MOVE_CURSOR
+
+-static void memqcpy (WEdit * edit, unsigned char *dest, unsigned char *src, int n)
++static void memqcpy (WEdit * edit, mc_wchar_t *dest, mc_wchar_t *src, int n)
+ {
+ unsigned long next;
++#ifndef UTF8
+ while ((next = (unsigned long) memccpy (dest, src, '\n', n))) {
++#else /* UTF8 */
++ while (n) {
++ next = 0;
++ while (next < n && src[next]!='\n') next++;
++ if (next < n) next++;
++ wmemcpy (dest, src, next)
++#endif /* UTF8 */
+ edit->curs_line--;
+ next -= (unsigned long) dest;
+ n -= next;
+@@ -1006,7 +1128,7 @@ int
+ edit_move_backward_lots (WEdit *edit, long increment)
+ {
+ int r, s, t;
+- unsigned char *p;
++ mc_wchar_t *p;
+
+ if (increment > edit->curs1)
+ increment = edit->curs1;
+@@ -1046,7 +1168,7 @@ edit_move_backward_lots (WEdit *edit, lo
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
+ else
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
+- g_malloc (EDIT_BUF_SIZE);
++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ } else {
+ g_free (p);
+ }
+@@ -1084,7 +1206,7 @@ edit_move_backward_lots (WEdit *edit, lo
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
+ else
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
+- g_malloc (EDIT_BUF_SIZE);
++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ } else {
+ g_free (p);
+ }
+@@ -1116,7 +1238,7 @@ int edit_cursor_move (WEdit * edit, long
+
+ c = edit_get_byte (edit, edit->curs1 - 1);
+ if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
+- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
+ edit->curs2++;
+ c = edit->buffers1[(edit->curs1 - 1) >> S_EDIT_BUF_SIZE][(edit->curs1 - 1) & M_EDIT_BUF_SIZE];
+@@ -1141,7 +1263,7 @@ int edit_cursor_move (WEdit * edit, long
+
+ c = edit_get_byte (edit, edit->curs1);
+ if (!(edit->curs1 & M_EDIT_BUF_SIZE))
+- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
++ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
+ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->curs1 & M_EDIT_BUF_SIZE] = c;
+ edit->curs1++;
+ c = edit->buffers2[(edit->curs2 - 1) >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - ((edit->curs2 - 1) & M_EDIT_BUF_SIZE) - 1];
+@@ -1248,7 +1370,7 @@ long edit_move_forward3 (WEdit * edit, l
+ q = edit->last_byte + 2;
+
+ for (col = 0, p = current; p < q; p++) {
+- int c;
++ mc_wchar_t c;
+ if (cols != -10) {
+ if (col == cols)
+ return p;
+@@ -1266,7 +1388,7 @@ long edit_move_forward3 (WEdit * edit, l
+ } else if (c < 32 || c == 127)
+ col += 2; /* Caret notation for control characters */
+ else
+- col++;
++ col += wcwidth(c);
+ }
+ return col;
+ }
+@@ -1399,7 +1521,7 @@ static int
+ is_blank (WEdit *edit, long offset)
+ {
+ long s, f;
+- int c;
++ mc_wchar_t c;
+ s = edit_bol (edit, offset);
+ f = edit_eol (edit, offset) - 1;
+ while (s <= f) {
+@@ -1771,13 +1893,13 @@ static void edit_left_delete_word (WEdit
+ static void
+ edit_do_undo (WEdit * edit)
+ {
+- long ac;
++ struct action ac;
+ long count = 0;
+
+ edit->stack_disable = 1; /* don't record undo's onto undo stack! */
+
+- while ((ac = pop_action (edit)) < KEY_PRESS) {
+- switch ((int) ac) {
++ while (pop_action (edit, &ac) < KEY_PRESS) {
++ switch ((int) ac.flags) {
+ case STACK_BOTTOM:
+ goto done_undo;
+ case CURS_RIGHT:
+@@ -1798,31 +1920,33 @@ edit_do_undo (WEdit * edit)
+ case COLUMN_OFF:
+ column_highlighting = 0;
+ break;
++ case CHAR_INSERT:
++ edit_insert (edit, ac.ch);
++ break;
++ case CHAR_INSERT_AHEAD:
++ edit_insert_ahead (edit, ac.ch);
++ break;
+ }
+- if (ac >= 256 && ac < 512)
+- edit_insert_ahead (edit, ac - 256);
+- if (ac >= 0 && ac < 256)
+- edit_insert (edit, ac);
+
+- if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) {
+- edit->mark1 = ac - MARK_1;
++ if (ac.flags >= MARK_1 - 2 && ac.flags < MARK_2 - 2) {
++ edit->mark1 = ac.flags - MARK_1;
+ edit->column1 = edit_move_forward3 (edit, edit_bol (edit, edit->mark1), 0, edit->mark1);
+- } else if (ac >= MARK_2 - 2 && ac < KEY_PRESS) {
+- edit->mark2 = ac - MARK_2;
++ } else if (ac.flags >= MARK_2 - 2 && ac.flags < KEY_PRESS) {
++ edit->mark2 = ac.flags - MARK_2;
+ edit->column2 = edit_move_forward3 (edit, edit_bol (edit, edit->mark2), 0, edit->mark2);
+ }
+ if (count++)
+ edit->force |= REDRAW_PAGE; /* more than one pop usually means something big */
+ }
+
+- if (edit->start_display > ac - KEY_PRESS) {
+- edit->start_line -= edit_count_lines (edit, ac - KEY_PRESS, edit->start_display);
++ if (edit->start_display > ac.flags - KEY_PRESS) {
++ edit->start_line -= edit_count_lines (edit, ac.flags - KEY_PRESS, edit->start_display);
+ edit->force |= REDRAW_PAGE;
+- } else if (edit->start_display < ac - KEY_PRESS) {
+- edit->start_line += edit_count_lines (edit, edit->start_display, ac - KEY_PRESS);
++ } else if (edit->start_display < ac.flags - KEY_PRESS) {
++ edit->start_line += edit_count_lines (edit, edit->start_display, ac.flags - KEY_PRESS);
+ edit->force |= REDRAW_PAGE;
+ }
+- edit->start_display = ac - KEY_PRESS; /* see push and pop above */
++ edit->start_display = ac.flags - KEY_PRESS; /* see push and pop above */
+ edit_update_curs_row (edit);
+
+ done_undo:;
+@@ -2102,7 +2226,7 @@ static void edit_goto_matching_bracket (
+ * passed as -1. Commands are executed, and char_for_insertion is
+ * inserted at the cursor.
+ */
+-void edit_execute_key_command (WEdit *edit, int command, int char_for_insertion)
++void edit_execute_key_command (WEdit *edit, int command, mc_wint_t char_for_insertion)
+ {
+ if (command == CK_Begin_Record_Macro) {
+ edit->macro_i = 0;
+@@ -2137,7 +2261,7 @@ static const char * const shell_cmd[] =
+ all of them. It also does not check for the Undo command.
+ */
+ void
+-edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
++edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion)
+ {
+ edit->force |= REDRAW_LINE;
+
+@@ -2170,7 +2294,7 @@ edit_execute_cmd (WEdit *edit, int comma
+ }
+
+ /* An ordinary key press */
+- if (char_for_insertion >= 0) {
++ if (char_for_insertion != (mc_wint_t) -1) {
+ if (edit->overwrite) {
+ if (edit_get_byte (edit, edit->curs1) != '\n')
+ edit_delete (edit);
+--- mc/edit/edit.c.jn 2007-04-16 18:14:22.000000000 +0200
++++ mc/edit/edit.c 2007-04-16 18:26:25.000000000 +0200
+@@ -1526,7 +1526,11 @@
+ f = edit_eol (edit, offset) - 1;
+ while (s <= f) {
+ c = edit_get_byte (edit, s++);
++#ifndef UTF8
+ if (!isspace (c))
++#else
++ if (!iswspace (c))
++#endif /* UTF8 */
+ return 0;
+ }
+ return 1;
+@@ -1781,6 +1785,7 @@
+ return 2;
+ return 0x80000000UL;
+ }
++#ifndef UTF8
+ if (isupper (c))
+ c = 'A';
+ else if (islower (c))
+@@ -1791,6 +1796,18 @@
+ c = '0';
+ else if (isspace (c))
+ c = ' ';
++#else
++ if (iswupper (c))
++ c = 'A';
++ else if (iswlower (c))
++ c = 'a';
++ else if (iswalpha (c))
++ c = 'a';
++ else if (iswdigit (c))
++ c = '0';
++ else if (iswspace (c))
++ c = ' ';
++#endif /* UTF8 */
+ q = strchr (option_chars_move_whole_word, c);
+ if (!q)
+ return 0xFFFFFFFFUL;
+@@ -1815,10 +1832,18 @@
+ c2 = edit_get_byte (edit, edit->curs1);
+ if (!(my_type_of (c1) & my_type_of (c2)))
+ break;
++#ifndef UTF8
+ if (isspace (c1) && !isspace (c2))
++#else
++ if (iswspace (c1) && !iswspace (c2))
++#endif /* UTF8 */
+ break;
+ if (s)
++#ifndef UTF8
+ if (!isspace (c1) && isspace (c2))
++#else
++ if (!iswspace (c1) && iswspace (c2))
++#endif /* UTF8 */
+ break;
+ }
+ }
+@@ -1841,10 +1866,18 @@
+ c2 = edit_get_byte (edit, edit->curs1);
+ if (!(my_type_of (c1) & my_type_of (c2)))
+ break;
++#ifndef UTF8
+ if (isspace (c1) && !isspace (c2))
++#else
++ if (iswspace (c1) && !iswspace (c2))
++#endif /* UTF8 */
+ break;
+ if (s)
++#ifndef UTF8
+ if (!isspace (c1) && isspace (c2))
++#else
++ if (!iswspace (c1) && iswspace (c2))
++#endif /* UTF8 */
+ break;
+ }
+ }
+@@ -1864,7 +1897,11 @@
+ break;
+ c1 = edit_delete (edit);
+ c2 = edit_get_byte (edit, edit->curs1);
++#ifndef UTF8
+ if ((isspace (c1) == 0) != (isspace (c2) == 0))
++#else
++ if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
++#endif /* UTF8 */
+ break;
+ if (!(my_type_of (c1) & my_type_of (c2)))
+ break;
+@@ -1879,7 +1916,11 @@
+ break;
+ c1 = edit_backspace (edit);
+ c2 = edit_get_byte (edit, edit->curs1 - 1);
++#ifndef UTF8
+ if ((isspace (c1) == 0) != (isspace (c2) == 0))
++#else
++ if ((iswspace (c1) == 0) != (iswspace (c2) == 0))
++#endif /* UTF8 */
+ break;
+ if (!(my_type_of (c1) & my_type_of (c2)))
+ break;
Added: trunk/debian/patches/vfs/01_ftpfs_symlink.patch
===================================================================
--- trunk/debian/patches/vfs/01_ftpfs_symlink.patch (rev 0)
+++ trunk/debian/patches/vfs/01_ftpfs_symlink.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,34 @@
+diff --git a/vfs/direntry.c b/vfs/direntry.c
+index 3a52d22..b1dfdca 100644
+--- a/vfs/direntry.c
++++ b/vfs/direntry.c
+@@ -251,7 +251,13 @@ vfs_s_find_entry_tree (struct vfs_class *me, struct vfs_s_inode *root,
+ char * const pathref = g_strdup (a_path);
+ char *path = pathref;
+
+- canonicalize_pathname (path);
++ if (strncmp(me->name, "ftpfs", 5) != 0)
++ canonicalize_pathname (path);
++ else {
++ char *p = path + strlen (path) - 1;
++ while (p > path && *p == PATH_SEP)
++ *p-- = 0;
++ }
+
+ while (root) {
+ while (*path == PATH_SEP) /* Strip leading '/' */
+@@ -324,7 +330,13 @@ vfs_s_find_entry_linear (struct vfs_class *me, struct vfs_s_inode *root,
+ if (root->super->root != root)
+ vfs_die ("We have to use _real_ root. Always. Sorry.");
+
+- canonicalize_pathname (path);
++ if (strncmp (me->name, "ftpfs", 5) != 0)
++ canonicalize_pathname (path);
++ else {
++ char *p = path + strlen (path) - 1;
++ while (p > path && *p == PATH_SEP)
++ *p-- = 0;
++ }
+
+ if (!(flags & FL_DIR)) {
+ char *dirname, *name, *save;
Added: trunk/debian/patches/vfs/02_ignore_ftp_chmod_error.patch
===================================================================
--- trunk/debian/patches/vfs/02_ignore_ftp_chmod_error.patch (rev 0)
+++ trunk/debian/patches/vfs/02_ignore_ftp_chmod_error.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,13 @@
+diff --git a/vfs/ftpfs.c b/vfs/ftpfs.c
+index 43d363c..1b137ae 100644
+--- a/vfs/ftpfs.c
++++ b/vfs/ftpfs.c
+@@ -1526,7 +1526,7 @@ static int ftpfs_chmod (struct vfs_class *me, const char *path, int mode)
+ char buf[BUF_SMALL];
+
+ g_snprintf(buf, sizeof(buf), "SITE CHMOD %4.4o /%%s", mode & 07777);
+- return ftpfs_send_command(me, path, buf, OPT_FLUSH);
++ return ftpfs_send_command(me, path, buf, OPT_FLUSH | OPT_IGNORE_ERROR);
+ }
+
+ static int ftpfs_chown (struct vfs_class *me, const char *path, int owner, int group)
Added: trunk/debian/patches/vfs/03_dont_hang_on_errors.patch
===================================================================
--- trunk/debian/patches/vfs/03_dont_hang_on_errors.patch (rev 0)
+++ trunk/debian/patches/vfs/03_dont_hang_on_errors.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,34 @@
+diff -Nurwd mc-4.6.2~pre1.orig/vfs/fish.c mc-4.6.2~pre1/vfs/fish.c
+--- mc-4.6.2~pre1.orig/vfs/fish.c 2008-02-27 16:52:15.000000000 +0100
++++ mc-4.6.2~pre1/vfs/fish.c 2008-02-27 16:56:23.000000000 +0100
+@@ -618,16 +618,28 @@
+ g_free (name);
+ name = quoted_name;
+ fh->u.fish.append = 0;
++
++ /*
++ * Check whether the remote file is readable by using `dd' to copy
++ * a single byte from the remote file to /dev/null. If `dd' completes
++ * with exit status of 0 use `cat' to send the file contents to the
++ * standard output (i.e. over the network).
++ */
+ offset = fish_command (me, FH_SUPER, WANT_STRING,
+ "#RETR /%s\n"
++ "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
++ "then\n"
+ "ls -ln /%s 2>/dev/null | (\n"
+ "read p l u g s r\n"
+ "echo \"$s\"\n"
+ ")\n"
+ "echo '### 100'\n"
+ "cat /%s\n"
+- "echo '### 200'\n",
+- name, name, name );
++ "echo '### 200'\n"
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ name, name, name, name );
+ g_free (name);
+ if (offset != PRELIM) ERRNOR (E_REMOTE, 0);
+ fh->linear = LS_LINEAR_OPEN;
Added: trunk/debian/patches/vfs/03_fix_whitespace_via_fish.patch
===================================================================
--- trunk/debian/patches/vfs/03_fix_whitespace_via_fish.patch (rev 0)
+++ trunk/debian/patches/vfs/03_fix_whitespace_via_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,188 @@
+diff --git a/vfs/fish.c b/vfs/fish.c
+index 2a2deb6..d03917e 100644
+--- a/vfs/fish.c
++++ b/vfs/fish.c
+@@ -366,15 +366,15 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
+ dir->timestamp.tv_sec += fish_directory_timeout;
+ quoted_path = name_quote (remote_path, 0);
+ fish_command (me, super, NONE,
+- "#LIST /%s\n"
+- "if ls -1 /%s >/dev/null 2>&1 ;\n"
++ "#LIST \"/%s\"\n"
++ "if ls -1 \"/%s\" >/dev/null 2>&1 ;\n"
+ "then\n"
+- "ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
++ "ls -lQLan \"/%s\" 2>/dev/null | grep '^[^cbt]' | (\n"
+ "while read p l u g s m d y n; do\n"
+- "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
++ "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"|sed 's#\\\"##g'\n"
+ "done\n"
+ ")\n"
+- "ls -lan /%s 2>/dev/null | grep '^[cb]' | (\n"
++ "ls -lQan \"/%s\" 2>/dev/null | grep '^[cb]' | (\n"
+ "while read p l u g a i m d y n; do\n"
+ "echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
+ "done\n"
+@@ -527,16 +527,16 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ * instead of stderr. It makes impossible the use of "head || dd"
+ * algorithm for file appending case, therefore just "dd" is used for it.
+ */
+-
++ name = unescape_string(name);
+ print_vfs_message(_("fish: store %s: sending command..."), name );
+- quoted_name = name_quote (name, 0);
++ quoted_name = unescape_string (name_quote (name, 0));
+
+ /* FIXME: File size is limited to ULONG_MAX */
+ if (!fh->u.fish.append)
+ n = fish_command (me, super, WAIT_REPLY,
+- "#STOR %lu /%s\n"
++ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
+- "file=/%s\n"
++ "file=\"/%s\"\n"
+ "res=`exec 3>&1\n"
+ "(\n"
+ "head -c %lu -q - || echo DD >&3\n"
+@@ -558,10 +558,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ (unsigned long) s.st_size);
+ else
+ n = fish_command (me, super, WAIT_REPLY,
+- "#STOR %lu /%s\n"
++ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
+ "{\n"
+- "file=/%s\n"
++ "file=\"/%s\"\n"
+ "rest=%lu\n"
+ "while [ $rest -gt 0 ]\n"
+ "do\n"
+@@ -627,7 +627,7 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
+ return 0;
+ quoted_name = name_quote (name, 0);
+ g_free (name);
+- name = quoted_name;
++ name = unescape_string(quoted_name);
+ fh->u.fish.append = 0;
+
+ /*
+@@ -637,15 +637,15 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
+ * standard output (i.e. over the network).
+ */
+ offset = fish_command (me, FH_SUPER, WANT_STRING,
+- "#RETR /%s\n"
+- "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
++ "#RETR \"/%s\"\n"
++ "if dd if=\"/%s\" of=/dev/null bs=1 count=1 2>/dev/null ;\n"
+ "then\n"
+- "ls -ln /%s 2>/dev/null | (\n"
++ "ls -ln \"/%s\" 2>/dev/null | (\n"
+ "read p l u g s r\n"
+ "echo \"$s\"\n"
+ ")\n"
+ "echo '### 100'\n"
+- "cat /%s\n"
++ "cat \"//%s\"\n"
+ "echo '### 200'\n"
+ "else\n"
+ "echo '### 500'\n"
+@@ -767,6 +767,7 @@ fish_send_command(struct vfs_class *me, struct vfs_s_super *super, const char *c
+ return -1; \
+ } \
+ rpath = name_quote (crpath, 0); \
++ rpath = unescape_string(rpath); \
+ g_free (mpath);
+
+ #define POSTFIX(flags) \
+@@ -777,7 +778,7 @@ static int
+ fish_chmod (struct vfs_class *me, const char *path, int mode)
+ {
+ PREFIX
+- g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o /%s\n"
++ g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o \"/%s\"\n"
+ "chmod %4.4o \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ mode & 07777, rpath,
+@@ -811,11 +812,11 @@ static int fish_##name (struct vfs_class *me, const char *path1, const char *pat
+ return fish_send_command(me, super2, buf, OPT_FLUSH); \
+ }
+
+-FISH_OP(rename, "#RENAME /%s /%s\n"
+- "mv /%s /%s 2>/dev/null\n"
++FISH_OP(rename, "#RENAME \"/%s\" \"/%s\"\n"
++ "mv \"/%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'" )
+-FISH_OP(link, "#LINK /%s /%s\n"
+- "ln /%s /%s 2>/dev/null\n"
++FISH_OP(link, "#LINK \"/%s\" \"/%s\"\n"
++ "ln \"/%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'" )
+
+ static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
+@@ -824,8 +825,8 @@ static int fish_symlink (struct vfs_class *me, const char *setto, const char *pa
+ PREFIX
+ qsetto = name_quote (setto, 0);
+ g_snprintf(buf, sizeof(buf),
+- "#SYMLINK %s /%s\n"
+- "ln -s %s /%s 2>/dev/null\n"
++ "#SYMLINK \"%s\" \"/%s\"\n"
++ "ln -s \"%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ qsetto, rpath, qsetto, rpath);
+ g_free (qsetto);
+@@ -850,16 +851,16 @@ fish_chown (struct vfs_class *me, const char *path, int owner, int group)
+ {
+ PREFIX
+ g_snprintf (buf, sizeof(buf),
+- "#CHOWN /%s /%s\n"
+- "chown %s /%s 2>/dev/null\n"
++ "#CHOWN /%s \"/%s\"\n"
++ "chown %s \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ sowner, rpath,
+ sowner, rpath);
+ fish_send_command (me, super, buf, OPT_FLUSH);
+ /* FIXME: what should we report if chgrp succeeds but chown fails? */
+ g_snprintf (buf, sizeof(buf),
+- "#CHGRP /%s /%s\n"
+- "chgrp %s /%s 2>/dev/null\n"
++ "#CHGRP /%s \"/%s\"\n"
++ "chgrp %s \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ sgroup, rpath,
+ sgroup, rpath);
+@@ -872,8 +873,8 @@ static int fish_unlink (struct vfs_class *me, const char *path)
+ {
+ PREFIX
+ g_snprintf(buf, sizeof(buf),
+- "#DELE /%s\n"
+- "rm -f /%s 2>/dev/null\n"
++ "#DELE \"/%s\"\n"
++ "rm -f \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
+@@ -884,10 +885,9 @@ static int fish_mkdir (struct vfs_class *me, const char *path, mode_t mode)
+ PREFIX
+
+ (void) mode;
+-
+ g_snprintf(buf, sizeof(buf),
+- "#MKD /%s\n"
+- "mkdir /%s 2>/dev/null\n"
++ "#MKD \"/%s\"\n"
++ "mkdir \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
+@@ -897,8 +897,8 @@ static int fish_rmdir (struct vfs_class *me, const char *path)
+ {
+ PREFIX
+ g_snprintf(buf, sizeof(buf),
+- "#RMD /%s\n"
+- "rmdir /%s 2>/dev/null\n"
++ "#RMD \"/%s\"\n"
++ "rmdir \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
Added: trunk/debian/patches/vfs/04_error_on_copymove_over_fish.patch
===================================================================
--- trunk/debian/patches/vfs/04_error_on_copymove_over_fish.patch (rev 0)
+++ trunk/debian/patches/vfs/04_error_on_copymove_over_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,45 @@
+diff --git a/vfs/fish.c b/vfs/fish.c
+index d03917e..e0e4471 100644
+--- a/vfs/fish.c
++++ b/vfs/fish.c
+@@ -536,6 +536,7 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ n = fish_command (me, super, WAIT_REPLY,
+ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
++ "if touch \"/%s\"; then\n"
+ "file=\"/%s\"\n"
+ "res=`exec 3>&1\n"
+ "(\n"
+@@ -552,14 +553,18 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ " n=`dd bs=256 count=$cnt | tee -a \"$file\" | wc -c`\n"
+ " rest=`expr $rest - $n`\n"
+ "done\n"
+- "}; echo '### 200'\n",
+- (unsigned long) s.st_size, name,
++ "}; echo '### 200'\n"
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ (unsigned long) s.st_size, name, name,
+ quoted_name, (unsigned long) s.st_size,
+ (unsigned long) s.st_size);
+ else
+ n = fish_command (me, super, WAIT_REPLY,
+ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
++ "if touch \"/%s\"; then\n"
+ "{\n"
+ "file=\"/%s\"\n"
+ "rest=%lu\n"
+@@ -570,7 +575,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ " rest=`expr $rest - $n`\n"
+ "done\n"
+ "}; echo '### 200'\n",
+- (unsigned long) s.st_size, name,
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ (unsigned long) s.st_size, name, name,
+ quoted_name, (unsigned long) s.st_size);
+
+ g_free (quoted_name);
Added: trunk/debian/patches/vfs/04_fix_whitespace_via_fish.patch
===================================================================
--- trunk/debian/patches/vfs/04_fix_whitespace_via_fish.patch (rev 0)
+++ trunk/debian/patches/vfs/04_fix_whitespace_via_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,188 @@
+diff --git a/vfs/fish.c b/vfs/fish.c
+index 2a2deb6..d03917e 100644
+--- a/vfs/fish.c
++++ b/vfs/fish.c
+@@ -366,15 +366,15 @@ fish_dir_load(struct vfs_class *me, struct vfs_s_inode *dir, char *remote_path)
+ dir->timestamp.tv_sec += fish_directory_timeout;
+ quoted_path = name_quote (remote_path, 0);
+ fish_command (me, super, NONE,
+- "#LIST /%s\n"
+- "if ls -1 /%s >/dev/null 2>&1 ;\n"
++ "#LIST \"/%s\"\n"
++ "if ls -1 \"/%s\" >/dev/null 2>&1 ;\n"
+ "then\n"
+- "ls -lLan /%s 2>/dev/null | grep '^[^cbt]' | (\n"
++ "ls -lQLan \"/%s\" 2>/dev/null | grep '^[^cbt]' | (\n"
+ "while read p l u g s m d y n; do\n"
+- "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"\n"
++ "echo \"P$p $u.$g\nS$s\nd$m $d $y\n:$n\n\"|sed 's#\\\"##g'\n"
+ "done\n"
+ ")\n"
+- "ls -lan /%s 2>/dev/null | grep '^[cb]' | (\n"
++ "ls -lQan \"/%s\" 2>/dev/null | grep '^[cb]' | (\n"
+ "while read p l u g a i m d y n; do\n"
+ "echo \"P$p $u.$g\nE$a$i\nd$m $d $y\n:$n\n\"\n"
+ "done\n"
+@@ -527,16 +527,16 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ * instead of stderr. It makes impossible the use of "head || dd"
+ * algorithm for file appending case, therefore just "dd" is used for it.
+ */
+-
++ name = unescape_string(name);
+ print_vfs_message(_("fish: store %s: sending command..."), name );
+- quoted_name = name_quote (name, 0);
++ quoted_name = unescape_string (name_quote (name, 0));
+
+ /* FIXME: File size is limited to ULONG_MAX */
+ if (!fh->u.fish.append)
+ n = fish_command (me, super, WAIT_REPLY,
+- "#STOR %lu /%s\n"
++ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
+- "file=/%s\n"
++ "file=\"/%s\"\n"
+ "res=`exec 3>&1\n"
+ "(\n"
+ "head -c %lu -q - || echo DD >&3\n"
+@@ -558,10 +558,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ (unsigned long) s.st_size);
+ else
+ n = fish_command (me, super, WAIT_REPLY,
+- "#STOR %lu /%s\n"
++ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
+ "{\n"
+- "file=/%s\n"
++ "file=\"/%s\"\n"
+ "rest=%lu\n"
+ "while [ $rest -gt 0 ]\n"
+ "do\n"
+@@ -627,7 +627,7 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
+ return 0;
+ quoted_name = name_quote (name, 0);
+ g_free (name);
+- name = quoted_name;
++ name = unescape_string(quoted_name);
+ fh->u.fish.append = 0;
+
+ /*
+@@ -637,15 +637,15 @@ fish_linear_start (struct vfs_class *me, struct vfs_s_fh *fh, off_t offset)
+ * standard output (i.e. over the network).
+ */
+ offset = fish_command (me, FH_SUPER, WANT_STRING,
+- "#RETR /%s\n"
+- "if dd if=/%s of=/dev/null bs=1 count=1 2>/dev/null ;\n"
++ "#RETR \"/%s\"\n"
++ "if dd if=\"/%s\" of=/dev/null bs=1 count=1 2>/dev/null ;\n"
+ "then\n"
+- "ls -ln /%s 2>/dev/null | (\n"
++ "ls -ln \"/%s\" 2>/dev/null | (\n"
+ "read p l u g s r\n"
+ "echo \"$s\"\n"
+ ")\n"
+ "echo '### 100'\n"
+- "cat /%s\n"
++ "cat \"//%s\"\n"
+ "echo '### 200'\n"
+ "else\n"
+ "echo '### 500'\n"
+@@ -767,6 +767,7 @@ fish_send_command(struct vfs_class *me, struct vfs_s_super *super, const char *c
+ return -1; \
+ } \
+ rpath = name_quote (crpath, 0); \
++ rpath = unescape_string(rpath); \
+ g_free (mpath);
+
+ #define POSTFIX(flags) \
+@@ -777,7 +778,7 @@ static int
+ fish_chmod (struct vfs_class *me, const char *path, int mode)
+ {
+ PREFIX
+- g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o /%s\n"
++ g_snprintf(buf, sizeof(buf), "#CHMOD %4.4o \"/%s\"\n"
+ "chmod %4.4o \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ mode & 07777, rpath,
+@@ -811,11 +812,11 @@ static int fish_##name (struct vfs_class *me, const char *path1, const char *pat
+ return fish_send_command(me, super2, buf, OPT_FLUSH); \
+ }
+
+-FISH_OP(rename, "#RENAME /%s /%s\n"
+- "mv /%s /%s 2>/dev/null\n"
++FISH_OP(rename, "#RENAME \"/%s\" \"/%s\"\n"
++ "mv \"/%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'" )
+-FISH_OP(link, "#LINK /%s /%s\n"
+- "ln /%s /%s 2>/dev/null\n"
++FISH_OP(link, "#LINK \"/%s\" \"/%s\"\n"
++ "ln \"/%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'" )
+
+ static int fish_symlink (struct vfs_class *me, const char *setto, const char *path)
+@@ -824,8 +825,8 @@ static int fish_symlink (struct vfs_class *me, const char *setto, const char *pa
+ PREFIX
+ qsetto = name_quote (setto, 0);
+ g_snprintf(buf, sizeof(buf),
+- "#SYMLINK %s /%s\n"
+- "ln -s %s /%s 2>/dev/null\n"
++ "#SYMLINK \"%s\" \"/%s\"\n"
++ "ln -s \"%s\" \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ qsetto, rpath, qsetto, rpath);
+ g_free (qsetto);
+@@ -850,16 +851,16 @@ fish_chown (struct vfs_class *me, const char *path, int owner, int group)
+ {
+ PREFIX
+ g_snprintf (buf, sizeof(buf),
+- "#CHOWN /%s /%s\n"
+- "chown %s /%s 2>/dev/null\n"
++ "#CHOWN /%s \"/%s\"\n"
++ "chown %s \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ sowner, rpath,
+ sowner, rpath);
+ fish_send_command (me, super, buf, OPT_FLUSH);
+ /* FIXME: what should we report if chgrp succeeds but chown fails? */
+ g_snprintf (buf, sizeof(buf),
+- "#CHGRP /%s /%s\n"
+- "chgrp %s /%s 2>/dev/null\n"
++ "#CHGRP /%s \"/%s\"\n"
++ "chgrp %s \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ sgroup, rpath,
+ sgroup, rpath);
+@@ -872,8 +873,8 @@ static int fish_unlink (struct vfs_class *me, const char *path)
+ {
+ PREFIX
+ g_snprintf(buf, sizeof(buf),
+- "#DELE /%s\n"
+- "rm -f /%s 2>/dev/null\n"
++ "#DELE \"/%s\"\n"
++ "rm -f \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
+@@ -884,10 +885,9 @@ static int fish_mkdir (struct vfs_class *me, const char *path, mode_t mode)
+ PREFIX
+
+ (void) mode;
+-
+ g_snprintf(buf, sizeof(buf),
+- "#MKD /%s\n"
+- "mkdir /%s 2>/dev/null\n"
++ "#MKD \"/%s\"\n"
++ "mkdir \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
+@@ -897,8 +897,8 @@ static int fish_rmdir (struct vfs_class *me, const char *path)
+ {
+ PREFIX
+ g_snprintf(buf, sizeof(buf),
+- "#RMD /%s\n"
+- "rmdir /%s 2>/dev/null\n"
++ "#RMD \"/%s\"\n"
++ "rmdir \"/%s\" 2>/dev/null\n"
+ "echo '### 000'\n",
+ rpath, rpath);
+ POSTFIX(OPT_FLUSH);
Added: trunk/debian/patches/vfs/05_add_lzma_support.patch
===================================================================
--- trunk/debian/patches/vfs/05_add_lzma_support.patch (rev 0)
+++ trunk/debian/patches/vfs/05_add_lzma_support.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,210 @@
+diff --git a/edit/edit.c b/edit/edit.c
+index ff2b2e7..3b9c750 100644
+--- a/edit/edit.c
++++ b/edit/edit.c
+@@ -182,6 +182,7 @@ edit_load_file_fast (WEdit *edit, const char *filename)
+ static const struct edit_filters {
+ const char *read, *write, *extension;
+ } all_filters[] = {
++ { "lzma -cd %s 2>&1", "lzma > %s", ".bz2" },
+ { "bzip2 -cd %s 2>&1", "bzip2 > %s", ".bz2" },
+ { "gzip -cd %s 2>&1", "gzip > %s", ".gz" },
+ { "gzip -cd %s 2>&1", "gzip > %s", ".Z" }
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index af63f0e..dfe72bb 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -119,6 +119,11 @@ regex/\.t(ar\.bz2|bz|b2)$
+ Open=%cd %p#utar
+ View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
+
++# .tar.lzma, .tlz
++regex/\.t(ar\.lzma|lz)$
++ Open=%cd %p#utar
++ View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
++
+ # .tar.F - used in QNX
+ regex/\.tar\.F$
+ # Open=%cd %p#utar
+@@ -298,6 +303,10 @@ regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
+ Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
+ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
+
++regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
++ Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
++
+
+ ### Images ###
+
+@@ -545,6 +554,11 @@ type/^compress
+ Open=gzip -dc %f | %var{PAGER:more}
+ View=%view{ascii} gzip -dc %f 2>/dev/null
+
++# lzma
++regex/\.lzma$
++ Open=lzma -dc %f | %var{PAGER:more}
++ View=%view{ascii} lzma -dc %f 2>/dev/null
++
+
+ ### Default ###
+
+diff --git a/src/util.c b/src/util.c
+index da6d1b2..b27f3b3 100644
+--- a/src/util.c
++++ b/src/util.c
+@@ -942,7 +942,7 @@ get_current_wd (char *buffer, int size)
+ enum compression_type
+ get_compression_type (int fd)
+ {
+- unsigned char magic[4];
++ unsigned char magic[16];
+
+ /* Read the magic signature */
+ if (mc_read (fd, (char *) magic, 4) != 4)
+@@ -986,6 +986,31 @@ get_compression_type (int fd)
+ return COMPRESSION_BZIP2;
+ }
+ }
++
++ /* LZMA files; both LZMA_Alone and LZMA utils formats. The LZMA_Alone
++ * format is used by the LZMA_Alone tool from LZMA SDK. The LZMA utils
++ * format is the default format of LZMA utils 4.32.1 and later. */
++ if (magic[0] < 0xE1 || (magic[0] == 0xFF && magic[1] == 'L' &&
++ magic[2] == 'Z' && magic[3] == 'M')) {
++ if (mc_read (fd, (char *) magic + 4, 9) == 9) {
++ /* LZMA utils format */
++ if (magic[0] == 0xFF && magic[4] == 'A' && magic[5] == 0x00)
++ return COMPRESSION_LZMA;
++ /* The LZMA_Alone format has no magic bytes, thus we
++ * need to play a wizard. This can give false positives,
++ * thus the detection below should be removed when
++ * the newer LZMA utils format has got popular. */
++ if (magic[0] < 0xE1 && magic[4] < 0x20 &&
++ ((magic[10] == 0x00 && magic[11] == 0x00 &&
++ magic[12] == 0x00) ||
++ (magic[5] == 0xFF && magic[6] == 0xFF &&
++ magic[7] == 0xFF && magic[8] == 0xFF &&
++ magic[9] == 0xFF && magic[10] == 0xFF &&
++ magic[11] == 0xFF && magic[12] == 0xFF)))
++ return COMPRESSION_LZMA;
++ }
++ }
++
+ return 0;
+ }
+
+@@ -996,6 +1021,7 @@ decompress_extension (int type)
+ case COMPRESSION_GZIP: return "#ugz";
+ case COMPRESSION_BZIP: return "#ubz";
+ case COMPRESSION_BZIP2: return "#ubz2";
++ case COMPRESSION_LZMA: return "#ulzma";
+ }
+ /* Should never reach this place */
+ fprintf (stderr, "Fatal: decompress_extension called with an unknown argument\n");
+diff --git a/src/util.h b/src/util.h
+index 4e9a113..5e773f8 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -179,7 +179,8 @@ enum compression_type {
+ COMPRESSION_NONE,
+ COMPRESSION_GZIP,
+ COMPRESSION_BZIP,
+- COMPRESSION_BZIP2
++ COMPRESSION_BZIP2,
++ COMPRESSION_LZMA
+ };
+
+ /* Looks for ``magic'' bytes at the start of the VFS file to guess the
+diff --git a/vfs/extfs/iso9660.in b/vfs/extfs/iso9660.in
+index 91d1b1e..467efdb 100644
+--- a/vfs/extfs/iso9660.in
++++ b/vfs/extfs/iso9660.in
+@@ -29,6 +29,7 @@ test_iso () {
+ mcisofs_list () {
+ # left as a reminder to implement compressed image support =)
+ case "$1" in
++ *.lzma) MYCAT="lzma -dc";;
+ *.bz2) MYCAT="bzip2 -dc";;
+ *.gz) MYCAT="gzip -dc";;
+ *.z) MYCAT="gzip -dc";;
+diff --git a/vfs/extfs/lslR.in b/vfs/extfs/lslR.in
+index 273fe5e..67f5edb 100644
+--- a/vfs/extfs/lslR.in
++++ b/vfs/extfs/lslR.in
+@@ -12,6 +12,7 @@ AWK=@AWK@
+
+ mclslRfs_list () {
+ case "$1" in
++ *.lzma) MYCAT="lzma -dc";;
+ *.bz2) MYCAT="bzip2 -dc";;
+ *.gz) MYCAT="gzip -dc";;
+ *.z) MYCAT="gzip -dc";;
+diff --git a/vfs/extfs/mailfs.in b/vfs/extfs/mailfs.in
+index 7bb62f9..91cf3d7 100644
+--- a/vfs/extfs/mailfs.in
++++ b/vfs/extfs/mailfs.in
+@@ -7,6 +7,7 @@ use bytes;
+
+ $zcat="zcat"; # gunzip to stdout
+ $bzcat="bzip2 -dc"; # bunzip2 to stdout
++$lzcat="lzma -dc"; # unlzma to stdout
+ $file="file"; # "file" command
+ $TZ='GMT'; # default timezone (for Date module)
+
+@@ -182,6 +183,8 @@ if (/gzip/) {
+ exit 1 unless (open IN, "$zcat $mbox_qname|");
+ } elsif (/bzip/) {
+ exit 1 unless (open IN, "$bzcat $mbox_qname|");
++} elsif (/lzma/) {
++ exit 1 unless (open IN, "$lzcat $mbox_qname|");
+ } else {
+ exit 1 unless (open IN, "<$mbox_name");
+ }
+diff --git a/vfs/extfs/patchfs.in b/vfs/extfs/patchfs.in
+index dc3757d..62a6d0d 100644
+--- a/vfs/extfs/patchfs.in
++++ b/vfs/extfs/patchfs.in
+@@ -12,6 +12,7 @@ use POSIX;
+ use File::Temp 'tempfile';
+
+ # standard binaries
++my $lzma = 'lzma';
+ my $bzip = 'bzip2';
+ my $gzip = 'gzip';
+ my $fileutil = 'file';
+@@ -70,7 +71,9 @@ sub myin
+ my ($qfname)=(quotemeta $_[0]);
+
+ $_=`$fileutil $qfname`;
+- if (/bzip/) {
++ if (/lzma/) {
++ return "$lzma -dc $qfname";
++ } elsif (/bzip/) {
+ return "$bzip -dc $qfname";
+ } elsif (/gzip/) {
+ return "$gzip -dc $qfname";
+@@ -86,7 +89,9 @@ sub myout
+ my ($sep) = $append ? '>>' : '>';
+
+ $_=`$fileutil $qfname`;
+- if (/bzip/) {
++ if (/lzma/) {
++ return "$lzma -c $sep $qfname";
++ } elsif (/bzip/) {
+ return "$bzip -c $sep $qfname";
+ } elsif (/gzip/) {
+ return "$gzip -c $sep $qfname";
+diff --git a/vfs/extfs/sfs.ini b/vfs/extfs/sfs.ini
+index 5c3d8e2..fc77e04 100644
+--- a/vfs/extfs/sfs.ini
++++ b/vfs/extfs/sfs.ini
+@@ -10,6 +10,8 @@ bz/1 bzip < %1 > %3
+ ubz/1 bzip -d < %1 > %3
+ bz2/1 bzip2 < %1 > %3
+ ubz2/1 bzip2 -d < %1 > %3
++lzma/1 lzma < %1 > %3
++ulzma/1 lzma -d < %1 > %3
+ tar/1 tar cf %3 %1
+ tgz/1 tar czf %3 %1
+ uhtml/1 lynx -force_html -dump %1 > %3
Added: trunk/debian/patches/vfs/05_error_on_copymove_over_fish.patch
===================================================================
--- trunk/debian/patches/vfs/05_error_on_copymove_over_fish.patch (rev 0)
+++ trunk/debian/patches/vfs/05_error_on_copymove_over_fish.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,45 @@
+diff --git a/vfs/fish.c b/vfs/fish.c
+index d03917e..e0e4471 100644
+--- a/vfs/fish.c
++++ b/vfs/fish.c
+@@ -536,6 +536,7 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ n = fish_command (me, super, WAIT_REPLY,
+ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
++ "if touch \"/%s\"; then\n"
+ "file=\"/%s\"\n"
+ "res=`exec 3>&1\n"
+ "(\n"
+@@ -552,14 +553,18 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ " n=`dd bs=256 count=$cnt | tee -a \"$file\" | wc -c`\n"
+ " rest=`expr $rest - $n`\n"
+ "done\n"
+- "}; echo '### 200'\n",
+- (unsigned long) s.st_size, name,
++ "}; echo '### 200'\n"
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ (unsigned long) s.st_size, name, name,
+ quoted_name, (unsigned long) s.st_size,
+ (unsigned long) s.st_size);
+ else
+ n = fish_command (me, super, WAIT_REPLY,
+ "#STOR %lu \"/%s\"\n"
+ "echo '### 001'\n"
++ "if touch \"/%s\"; then\n"
+ "{\n"
+ "file=\"/%s\"\n"
+ "rest=%lu\n"
+@@ -570,7 +575,10 @@ fish_file_store(struct vfs_class *me, struct vfs_s_fh *fh, char *name, char *loc
+ " rest=`expr $rest - $n`\n"
+ "done\n"
+ "}; echo '### 200'\n",
+- (unsigned long) s.st_size, name,
++ "else\n"
++ "echo '### 500'\n"
++ "fi\n",
++ (unsigned long) s.st_size, name, name,
+ quoted_name, (unsigned long) s.st_size);
+
+ g_free (quoted_name);
Added: trunk/debian/patches/vfs/06_remove_obsolete_rpm_tags.patch
===================================================================
--- trunk/debian/patches/vfs/06_remove_obsolete_rpm_tags.patch (rev 0)
+++ trunk/debian/patches/vfs/06_remove_obsolete_rpm_tags.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,62 @@
+--- mc/vfs/extfs/rpm 2006-11-01 02:30:26.000000000 -0800
++++ mc/vfs/extfs/rpm.new 2007-10-18 14:39:23.000000000 -0700
+@@ -95,10 +95,6 @@ mcrpmfs_list ()
+ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+ test "`$RPM -qp --qf \"%{URL}\" \"$f\"`" = "(none)" ||
+ echo "$FILEPREF 0 $DATE INFO/URL"
+- test "`$RPM -qp --qf \"%{SERIAL}\" \"$f\"`" = "(none)" ||
+- echo "$FILEPREF 0 $DATE INFO/SERIAL"
+- test "`$RPM -qp --qf \"%{COPYRIGHT}\" \"$f\"`" = "(none)" ||
+- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
+ test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
+ echo "$FILEPREF 0 $DATE INFO/EPOCH"
+ test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
+@@ -106,8 +102,6 @@ mcrpmfs_list ()
+ else
+ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+ echo "$FILEPREF 0 $DATE INFO/URL"
+- echo "$FILEPREF 0 $DATE INFO/SERIAL"
+- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
+ echo "$FILEPREF 0 $DATE INFO/EPOCH"
+ echo "$FILEPREF 0 $DATE INFO/LICENSE"
+ fi
+@@ -156,8 +150,6 @@ mcrpmfs_copyout ()
+ INFO/PACKAGER) $RPM -qp --qf "%{PACKAGER}\n" "$f" > "$3"; exit 0;;
+ INFO/URL) $RPM -qp --qf "%{URL}\n" "$f" >"$3"; exit 0;;
+ INFO/BUILDTIME) $RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
+- INFO/SERIAL) $RPM -qp --qf "%{SERIAL}\n" "$f" >"$3"; exit 0;;
+- INFO/COPYRIGHT) $RPM -qp --qf "%{COPYRIGHT}\n" "$f" >"$3"; exit 0;;
+ INFO/EPOCH) $RPM -qp --qf "%{EPOCH}\n" "$f" >"$3"; exit 0;;
+ INFO/LICENSE) $RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
+ INFO/RPMVERSION) $RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
+--- mc/vfs/extfs/trpm 2006-11-01 02:30:26.000000000 -0800
++++ mc/vfs/extfs/trpm.new 2007-10-18 14:40:12.000000000 -0700
+@@ -85,10 +85,6 @@ mcrpmfs_list ()
+ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+ test "`$RPM -q --qf \"%{URL}\" -- "$1"`" = "(none)" ||
+ echo "$FILEPREF 0 $DATE INFO/URL"
+- test "`$RPM -q --qf \"%{SERIAL}\" -- "$1"`" = "(none)" ||
+- echo "$FILEPREF 0 $DATE INFO/SERIAL"
+- test "`$RPM -q --qf \"%{COPYRIGHT}\" -- "$1"`" = "(none)" ||
+- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
+ test "`$RPM -q --qf \"%{EPOCH}\" -- "$1"`" = "(none)" ||
+ echo "$FILEPREF 0 $DATE INFO/EPOCH"
+ test "`$RPM -q --qf \"%{LICENSE}\" -- "$1"`" = "(none)" ||
+@@ -96,8 +92,6 @@ mcrpmfs_list ()
+ else
+ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
+ echo "$FILEPREF 0 $DATE INFO/URL"
+- echo "$FILEPREF 0 $DATE INFO/SERIAL"
+- echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
+ echo "$FILEPREF 0 $DATE INFO/EPOCH"
+ echo "$FILEPREF 0 $DATE INFO/LICENSE"
+ fi
+@@ -143,8 +137,6 @@ mcrpmfs_copyout ()
+ INFO/PACKAGER) $RPM -q --qf "%{PACKAGER}\n" -- "$1" > "$3"; exit 0;;
+ INFO/URL) $RPM -q --qf "%{URL}\n" -- "$1" > "$3"; exit 0;;
+ INFO/BUILDTIME) $RPM -q --qf "%{BUILDTIME:date}\n" -- "$1" > "$3"; exit 0;;
+- INFO/SERIAL) $RPM -q --qf "%{SERIAL}\n" -- "$1" > "$3"; exit 0;;
+- INFO/COPYRIGHT) $RPM -q --qf "%{COPYRIGHT}\n" -- "$1" > "$3"; exit 0;;
+ INFO/EPOCH) $RPM -q --qf "%{EPOCH}\n" -- "$1" > "$3"; exit 0;;
+ INFO/LICENSE) $RPM -q --qf "%{LICENSE}\n" -- "$1" > "$3"; exit 0;;
+ INFO/RPMVERSION) $RPM -q --qf "%{RPMVERSION}\n" -- "$1" > "$3"; exit 0;;
Added: trunk/debian/patches/vfs/07_srpm_support.patch
===================================================================
--- trunk/debian/patches/vfs/07_srpm_support.patch (rev 0)
+++ trunk/debian/patches/vfs/07_srpm_support.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,831 @@
+diff --git a/lib/mc.ext.in b/lib/mc.ext.in
+index dfe72bb..7044ff1 100644
+--- a/lib/mc.ext.in
++++ b/lib/mc.ext.in
+@@ -197,7 +197,11 @@ regex/\.trpm$
+ View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
+
+ # RPM packages (SuSE uses *.spm for source packages)
+-regex/\.(rpm|spm)$
++regex/\.(src\.rpm|spm)$
++ Open=%cd %p#srpm
++ View=%view{ascii} if rpm --nosignature --version >/dev/null 2>&1; then RPM="rpm --nosignature" ; else RPM="rpm" ; fi ; $RPM -qivlp --scripts %f
++
++regex/\.rpm$
+ 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
+
+diff --git a/lib/mc.ext.in.orig b/lib/mc.ext.in.orig
+new file mode 100644
+index 0000000..dfe72bb
+--- /dev/null
++++ b/lib/mc.ext.in.orig
+@@ -0,0 +1,571 @@
++# Midnight Commander 3.0 extension file
++# Warning: Structure of this file has changed completely with version 3.0
++#
++# All lines starting with # or empty lines are thrown away.
++# Lines starting in the first column should have following format:
++#
++# keyword/descNL, i.e. everything after keyword/ until new line is desc
++#
++# keyword can be:
++#
++# shell (desc is, when starting with a dot, any extension (no wildcars),
++# i.e. matches all the files *desc . Example: .tar matches *.tar;
++# if it doesn't start with a dot, it matches only a file of that name)
++#
++# regex (desc is an extended regular expression)
++# Please note that we are using the GNU regex library and thus
++# \| matches the literal | and | has special meaning (or) and
++# () have special meaning and \( \) stand for literal ( ).
++#
++# type (file matches this if `file %f` matches regular expression desc
++# (the filename: part from `file %f` is removed))
++#
++# directory (matches any directory matching regular expression desc)
++#
++# include (matches an include directive)
++#
++# default (matches any file no matter what desc is)
++#
++# Other lines should start with a space or tab and should be in the format:
++#
++# keyword=commandNL (with no spaces around =), where keyword should be:
++#
++# Open (if the user presses Enter or doubleclicks it),
++#
++# View (F3), Edit (F4)
++#
++# Include is the keyword used to add any further entries from an include/
++# section
++#
++# command is any one-line shell command, with the following substitutions:
++#
++# %% -> % character
++# %p -> name of the current file (without path, but pwd is its path)
++# %f -> name of the current file. Unlike %p, if file is located on a
++# non-local virtual filesystem, i.e. either tarfs, mcfs or ftpfs,
++# then the file will be temporarily copied into a local directory
++# and %f will be the full path to this local temporal file.
++# If you don't want to get a local copy and want to get the
++# virtual fs path (like /#ftp:ftp.cvut.cz/pub/hungry/xword), then
++# use %d/%p instead of %f.
++# %d -> name of the current directory (pwd, without trailing slash)
++# %s -> "selected files", i.e. space separated list of tagged files if any
++# or name of the current file
++# %t -> list of tagged files
++# %u -> list of tagged files (they'll be untaged after the command)
++#
++# (If these 6 letters are in uppercase, they refer to the other panel.
++# But you shouldn't have to use it in this file.)
++#
++#
++# %cd -> the rest is a path mc should change into (cd won't work, since it's
++# a child process). %cd handles even vfs names.
++#
++# %view -> the command you type will be piped into mc's internal file viewer
++# if you type only the %view and no command, viewer will load %f file
++# instead (i.e. no piping, so it is different to %view cat %f)
++# %view may be directly followed by {} with a list of any of
++# ascii (Ascii mode), hex (Hex mode), nroff (color highlighting for
++# text using backspace for bold and underscore) and unform
++# (no highlighting for nroff sequences) separated by commas.
++#
++# %var -> You use it like this: %var{VAR:default}. This macro will expand
++# to the value of the VAR variable in the environment if it's set
++# otherwise the value in default will be used. This is similar to
++# the Bourne shell ${VAR-default} construct.
++#
++# Rules are applied from top to bottom, thus the order is important.
++# If some actions are missing, search continues as if this target didn't
++# match (i.e. if a file matches the first and second entry and View action
++# is missing in the first one, then on pressing F3 the View action from
++# the second entry will be used. default should catch all the actions.
++#
++# Any new entries you develop for you are always welcome if they are
++# useful on more than one system. You can send your modifications
++# by e-mail to mc-devel at gnome.org
++
++
++### Changes ###
++#
++# Reorganization: 2000-05-01 Michal Svec <rebel at penguin.cz>
++
++
++### TODO ###
++#
++# Postscript Open: ps2svga [gs -DEVICE=jpeg|zgv or something]
++# Images asciiview
++#
++# All X Apps [Nothing/Warning] if no DISPLAY
++# Not found [Default/Warning]
++# Empty Output [Default/Warning]
++# Edit: CopyOut+EDIT+CopyIn
++# Security Check gzip/bzip EDIT (mktemp)
++#
++# Maybe: Open/XOpen/GOpen/KOpen/... for Console/X/GNOME/KDE/etc.
++
++
++### Archives ###
++
++# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
++regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
++ Open=%cd %p#utar
++ View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
++
++regex/\.tar\.bz$
++ # Open=%cd %p#utar
++ View=%view{ascii} bzip -dc %f 2>/dev/null | tar tvvf -
++
++regex/\.t(ar\.bz2|bz|b2)$
++ Open=%cd %p#utar
++ View=%view{ascii} bzip2 -dc %f 2>/dev/null | tar tvvf -
++
++# .tar.lzma, .tlz
++regex/\.t(ar\.lzma|lz)$
++ Open=%cd %p#utar
++ View=%view{ascii} lzma -dc %f 2>/dev/null | tar tvvf -
++
++# .tar.F - used in QNX
++regex/\.tar\.F$
++ # Open=%cd %p#utar
++ View=%view{ascii} freeze -dc %f 2>/dev/null | tar tvvf -
++
++# .qpr/.qpk - QNX Neutrino package installer files
++regex/\.(qp[rk])$
++ Open=%cd %p#utar
++ View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
++
++# tar
++regex/\.(tar|TAR)$
++ Open=%cd %p#utar
++ View=%view{ascii} tar tvvf %f
++
++# lha
++type/^LHa\ .*archive
++ Open=%cd %p#ulha
++ View=%view{ascii} lha l %f
++
++# arj
++regex/\.a(rj|[0-9][0-9])$
++ Open=%cd %p#uarj
++ View=%view{ascii} unarj l %f
++
++# ha
++regex/\.([Hh][Aa])$
++ Open=%cd %p#uha
++ View=%view{ascii} ha lf %f
++
++# rar
++regex/\.[rR]([aA][rR]|[0-9][0-9])$
++ Open=%cd %p#urar
++ View=%view{ascii} rar v -c- %f
++
++# ALZip
++regex/\.(alz|ALZ)$
++ Open=%cd %p#ualz
++ View=%view{ascii} unalz -l %f
++
++# cpio
++shell/.cpio.Z
++ Open=%cd %p#ucpio
++ View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null
++
++shell/.cpio.gz
++ Open=%cd %p#ucpio
++ View=%view{ascii} gzip -dc '%f' | cpio -itv 2>/dev/null
++
++shell/.cpio
++ Open=%cd %p#ucpio
++ View=%view{ascii} cpio -itv <'%f' 2>/dev/null
++
++# ls-lR
++regex/(^|\.)ls-?lR(\.g?z|Z|bz2)?$
++ Open=%cd %p#lslR
++
++# patch
++regex/\.(diff|patch)(\.(bz2|gz|Z))?$
++ Open=%cd %p#patchfs
++
++# ar library
++regex/\.s?a$
++ Open=%cd %p#uar
++ #Open=%view{ascii} ar tv %f
++ View=%view{ascii} file %f && nm %f
++
++# trpm
++regex/\.trpm$
++ Open=%cd %p#trpm
++ View=%view{ascii} rpm -qivl --scripts `basename %p .trpm`
++
++# RPM packages (SuSE uses *.spm for source packages)
++regex/\.(rpm|spm)$
++ 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
++
++# deb
++regex/\.u?deb$
++ Open=%cd %p#deb
++ View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
++
++# ISO9660
++regex/\.iso$
++ Open=%cd %p#iso9660
++ View=%view{ascii} isoinfo -l -i %f
++
++# 7zip archives (they are not man pages)
++shell/.7z
++ Open=%cd %p#u7z
++ View=%view{ascii} 7za l %f 2>/dev/null
++
++# Mailboxes
++type/^ASCII\ mail\ text
++ Open=%cd %p#mailfs
++
++
++### Sources ###
++
++# C
++shell/.c
++ Open=%var{EDITOR:vi} %f
++
++# Fortran
++shell/.f
++ Open=%var{EDITOR:vi} %f
++
++# Header
++regex/\.(h|hpp)$
++ Open=%var{EDITOR:vi} %f
++
++# Object
++type/^ELF
++ #Open=%var{PAGER:more} %f
++ View=%view{ascii} file %f && nm %f
++
++# Asm
++shell/.s
++ Open=%var{EDITOR:vi} %f
++
++# C++
++regex/\.(C|cc|cpp)$
++ Open=%var{EDITOR:vi} %f
++
++
++### Documentation ###
++
++# Texinfo
++regex/\.(te?xi|texinfo)$
++
++# GNU Info page
++type/^Info\ text
++ Open=info -f %f
++
++shell/.info
++ Open=info -f %f
++
++# Manual page
++# Exception - .so libraries are not manual pages
++regex/\.(so|so\.[0-9\.]*)$
++ View=%view{ascii} file %f && nm %f
++
++regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
++ Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac
++
++# Perl pod page
++shell/.pod
++ Open=pod2man %f | nroff @MAN_FLAGS@ @MANDOC@ | %var{PAGER:more}
++ View=%view{ascii,nroff} pod2man %f | nroff @MAN_FLAGS@ @MANDOC@
++
++# Troff with me macros.
++# Exception - "read.me" is not a nroff file.
++shell/read.me
++ Open=
++ View=
++
++shell/.me
++ Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
++ View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
++
++# Troff with ms macros.
++shell/.ms
++ Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
++ View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
++
++# Manual page - compressed
++regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
++ Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
++
++regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
++ Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
++
++regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
++ Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
++
++regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.lzma$
++ Open=case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
++ View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) lzma -dc %f ;; *) lzma -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
++
++
++### Images ###
++
++type/^GIF
++ Include=image
++
++type/^JPEG
++ Include=image
++
++type/^PC\ bitmap
++ Include=image
++
++type/^PNG
++ Include=image
++
++type/^TIFF
++ Include=image
++
++type/^PBM
++ Include=image
++
++type/^PGM
++ Include=image
++
++type/^PPM
++ Include=image
++
++type/^Netpbm
++ Include=image
++
++shell/.xcf
++ Open=(gimp %f &)
++
++shell/.xbm
++ Open=bitmap %f
++
++shell/.xpm
++ Include=image
++ View=sxpm %f
++
++include/image
++ Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
++ View=%view{ascii} identify %f
++ #View=%view{ascii} asciiview %f
++
++
++### Sound files ###
++
++regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
++ Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms %f >/dev/null 2>&1 &); fi
++
++regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
++ Open=mikmod %f
++ #Open=tracker %f
++
++regex/\.([wW][aA][wW]22)$
++ Open=vplay -s 22 %f
++
++regex/\.([mM][pP]3)$
++ Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
++ View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
++
++regex/\.([oO][gG][gG])$
++ Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f >/dev/null 2>&1 &); fi
++ View=%view{ascii} ogginfo %s
++
++regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
++ Open=timidity %f
++
++regex/\.([wW][mM][aA])$
++ Open=mplayer -vo null %f
++ View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
++
++
++### Play lists ###
++
++regex/\.([mM]3[uU]|[pP][lL][sS])$
++ Open=if [ -z "$DISPLAY" ]; then mplayer -vo null -playlist %f; else (xmms -p %f >/dev/null 2>&1 &); fi
++
++
++### Video ###
++
++regex/\.([aA][vV][iI])$
++ Include=video
++
++regex/\.([aA][sS][fFxX])$
++ Include=video
++
++regex/\.([dD][iI][vV][xX])$
++ Include=video
++
++regex/\.([mM][oO][vV]|[qQ][tT])$
++ Include=video
++
++regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
++ Include=video
++
++regex/\.([vV][oO][bB])$
++ Include=video
++
++regex/\.([wW][mM][vV])$
++ Include=video
++
++regex/\.([fF][lL][iIcCvV])$
++ Include=video
++
++regex/\.([oO][gG][mM])$
++ Include=video
++
++regex/\.([rR][aA]?[mM])$
++ Open=(realplay %f >/dev/null 2>&1 &)
++
++include/video
++ Open=(mplayer %f >/dev/null 2>&1 &)
++ #Open=(gtv %f >/dev/null 2>&1 &)
++ #Open=(xanim %f >/dev/null 2>&1 &)
++
++
++### Documents ###
++
++# Postscript
++type/^PostScript
++ Open=(gv %f &)
++ View=%view{ascii} ps2ascii %f
++
++# PDF
++type/^PDF
++ Open=(xpdf %f &)
++ #Open=(acroread %f &)
++ #Open=(ghostview %f &)
++ View=%view{ascii} pdftotext %f -
++
++# The following code very ugly and should not be taken as example.
++# It should be cleaned up when the new format of mc.ext is developed.
++
++# html
++regex/\.([hH][tT][mM][lL]?)$
++ Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null
++ View=%view{ascii} lynx -dump -force_html %f
++
++# StarOffice 5.2
++shell/.sdw
++ Open=(ooffice %f &)
++
++# StarOffice 6 and OpenOffice.org formats
++regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
++ Open=(ooffice %f &)
++ View=%view{ascii} unzip -p %f content.xml | o3totxt
++
++# AbiWord
++shell/.abw
++ Open=(abiword %f &)
++
++# Microsoft Word Document
++regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
++ Open=(abiword %f >/dev/null 2>&1 &)
++ View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
++type/^Microsoft\ Word
++ Open=(abiword %f >/dev/null 2>&1 &)
++ View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
++
++# RTF document
++regex/\.([rR][tT][fF])$
++ Open=(abiword %f >/dev/null 2>&1 &)
++
++# Microsoft Excel Worksheet
++regex/\.([xX][lL][sSwW])$
++ Open=(gnumeric %f >/dev/null 2>&1 &)
++ View=%view{ascii} xls2csv %f || strings %f
++type/^Microsoft\ Excel
++ Open=(gnumeric %f >/dev/null 2>&1 &)
++ View=%view{ascii} xls2csv %f || strings %f
++
++# Use OpenOffice.org to open any MS Office documents
++type/^Microsoft\ Office\ Document
++ Open=(ooffice %f &)
++
++# Framemaker
++type/^FrameMaker
++ Open=fmclient -f %f
++
++# DVI
++regex/\.([dD][vV][iI])$
++ Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
++ View=%view{ascii} dvi2tty %f
++
++# TeX
++regex/\.([Tt][Ee][Xx])$
++ Open=%var{EDITOR:vi} %f
++
++
++### Miscellaneous ###
++
++# Makefile
++regex/[Mm]akefile$
++ Open=make -f %f %{Enter parameters}
++
++# Imakefile
++shell/Imakefile
++ Open=xmkmf -a
++
++# Makefile.PL (MakeMaker)
++regex/^Makefile.(PL|pl)$
++ Open=%var{PERL:perl} %f
++
++# dbf
++regex/\.([dD][bB][fF])$
++ Open=%view{ascii} dbview %f
++ View=%view{ascii} dbview -b %f
++
++# REXX script
++regex/\.(rexx?|cmd)$
++ Open=rexx %f %{Enter parameters};echo "Press ENTER";read y
++
++
++### Plain compressed files ###
++
++# zip
++type/^([Zz][Ii][Pp])\ archive
++ Open=%cd %p#uzip
++ View=%view{ascii} unzip -v %f
++
++# zoo
++regex/\.([Zz][Oo][Oo])$
++ Open=%cd %p#uzoo
++ View=%view{ascii} zoo l %f
++
++# gzip
++type/^gzip
++ Open=gzip -dc %f | %var{PAGER:more}
++ View=%view{ascii} gzip -dc %f 2>/dev/null
++
++# bzip2
++type/^bzip2
++ Open=bzip2 -dc %f | %var{PAGER:more}
++ View=%view{ascii} bzip2 -dc %f 2>/dev/null
++
++# bzip
++type/^bzip
++ Open=bzip -dc %f | %var{PAGER:more}
++ View=%view{ascii} bzip -dc %f 2>/dev/null
++
++# compress
++type/^compress
++ Open=gzip -dc %f | %var{PAGER:more}
++ View=%view{ascii} gzip -dc %f 2>/dev/null
++
++# lzma
++regex/\.lzma$
++ Open=lzma -dc %f | %var{PAGER:more}
++ View=%view{ascii} lzma -dc %f 2>/dev/null
++
++
++### Default ###
++
++# Default target for anything not described above
++default/*
++ Open=
++ View=
++
++
++### EOF ###
+diff --git a/vfs/extfs/Makefile.am b/vfs/extfs/Makefile.am
+index e7efbe4..ee12065 100644
+--- a/vfs/extfs/Makefile.am
++++ b/vfs/extfs/Makefile.am
+@@ -4,7 +4,7 @@ extfsdir = $(pkgdatadir)/extfs
+ 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 --git a/vfs/extfs/extfs.ini b/vfs/extfs/extfs.ini
+index 4dbdf61..0470656 100644
+--- a/vfs/extfs/extfs.ini
++++ b/vfs/extfs/extfs.ini
+@@ -17,6 +17,7 @@ uar
+
+ # Packages from popular Linux distributions
+ rpm
++srpm
+ deb
+
+ # a: - mtools filesystem
+diff --git a/vfs/extfs/srpm b/vfs/extfs/srpm
+new file mode 100644
+index 0000000..e8affa3
+--- /dev/null
++++ b/vfs/extfs/srpm
+@@ -0,0 +1,206 @@
++#! /bin/sh
++#
++# Written by Erik Troan (ewt at redhat.com) 1996
++# Jakub Jelinek (jj at sunsite.mff.cuni.cz) 1996,2004
++# Tomasz K³oczko (kloczek at rudy.mif.pg.gda.pl) 1997
++# minor changes by Wojtek Pilorz (wpilorz at bdk.lublin.pl) 1997
++# minor changes by Michele Marziani (marziani at fe.infn.it) 1997
++# bug files by Marc Merlin (marcsoft at merlins.org) 1998
++# locale bugfix by Michal Svec (rebel at penguin.cz) 2000
++# Whitespace(s) & single quote(s) in filename workaround
++# by Andrew V. Samoilov <sav at bcs.zp.ua> 2004
++# https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=64007
++#
++# (C) 1996-2004 The Free Software Foundation.
++#
++
++# override any locale for dates
++unset LC_ALL
++LC_TIME=C
++export LC_TIME
++
++if rpmbuild --version >/dev/null 2>&1; then
++ RPMBUILD="rpmbuild"
++else
++ RPMBUILD="rpm"
++fi
++
++if rpm --nosignature --version >/dev/null 2>&1; then
++ RPM="rpm --nosignature"
++ RPMBUILD="$RPMBUILD --nosignature"
++else
++ RPM="rpm"
++fi
++RPM2CPIO="rpm2cpio"
++SED="sed"
++# Surround the whole filename with single quotes and handle specially
++# \', ' and \ at the end of the string.
++SEDCMD="s/\\(\\\\\\?\\)'/'\\1\\1\\\\''/g;s/\\\\\$/'\\\\\\\\'/;s/^/'/;s/\$/'/"
++
++mcrpmfs_list ()
++{
++ # set MCFASTRPM_DFLT to 1 for faster rpm files handling by default, to 0 for
++ # slower handling
++ MCFASTRPM_DFLT=0
++ if test -z "$MCFASTRPM"; then
++ MCFASTRPM=$MCFASTRPM_DFLT
++ fi
++ f="`echo "$1" | $SED "$SEDCMD"`"
++ FILEPREF="-r--r--r-- 1 root root "
++ DESC=`$RPM -qip "$f" 2>/dev/null` || {
++ echo "$FILEPREF 0 "`date +"%b %d %H:%M"`" ERROR"
++ exit 1
++ }
++ DATE=`$RPM -qp --qf "%{BUILDTIME:date}\n" "$f" | cut -c 5-11,21-24`
++ HEADERSIZE=`echo "$DESC" | wc -c`
++ echo "-r--r--r-- 1 root root $HEADERSIZE $DATE HEADER"
++ echo "-r-xr-xr-x 1 root root 39 $DATE INSTALL"
++ echo "-r-xr-xr-x 1 root root 39 $DATE REBUILD"
++ echo "dr-xr-xr-x 3 root root 0 $DATE INFO"
++ echo "$FILEPREF 0 $DATE INFO/NAME-VERSION-RELEASE"
++ echo "$FILEPREF 0 $DATE INFO/GROUP"
++ echo "$FILEPREF 0 $DATE INFO/BUILDHOST"
++ echo "$FILEPREF 0 $DATE INFO/SOURCERPM"
++ if test "$MCFASTRPM" = 0 ; then
++ test "`$RPM -qp --qf \"%{DISTRIBUTION}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION"
++ test "`$RPM -qp --qf \"%{VENDOR}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/VENDOR"
++ test "`$RPM -qp --qf \"%{DESCRIPTION}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/DESCRIPTION"
++ test "`$RPM -qp --qf \"%{SUMMARY}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/SUMMARY"
++ if test "`$RPM -qp --qf \"%{RPMTAG_PREIN}%{RPMTAG_POSTIN}%{RPMTAG_PREUN}%{RPMTAG_POSTUN}%{VERIFYSCRIPT}\" \"$f\"`" != "(none)(none)(none)(none)(none)"; then
++ echo "dr-xr-xr-x 1 root root 0 $DATE INFO/SCRIPTS"
++ test "`$RPM -qp --qf \"%{RPMTAG_PREIN}\" \"$f\"`" = '(none)' ||
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN"
++ test "`$RPM -qp --qf \"%{RPMTAG_POSTIN}\" \"$f\"`" = '(none)' ||
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN"
++ test "`$RPM -qp --qf \"%{RPMTAG_PREUN}\" \"$f\"`" = '(none)' ||
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN"
++ test "`$RPM -qp --qf \"%{RPMTAG_POSTUN}\" \"$f\"`" = '(none)' ||
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN"
++ test "`$RPM -qp --qf \"%{VERIFYSCRIPT}\" \"$f\"`" = '(none)' ||
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
++ fi
++ else
++ echo "$FILEPREF 0 $DATE INFO/DISTRIBUTION"
++ echo "$FILEPREF 0 $DATE INFO/VENDOR"
++ echo "$FILEPREF 0 $DATE INFO/DESCRIPTION"
++ echo "$FILEPREF 0 $DATE INFO/SUMMARY"
++ echo "dr-xr-xr-x 1 root root 0 $DATE INFO/SCRIPTS"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREIN"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTIN"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/PREUN"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/POSTUN"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/VERIFYSCRIPT"
++ echo "$FILEPREF 0 $DATE INFO/SCRIPTS/ALL"
++ fi
++ if test "$MCFASTRPM" = 0 ; then
++ test "`$RPM -qp --qf \"%{PACKAGER}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
++ test "`$RPM -qp --qf \"%{URL}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/URL"
++ test "`$RPM -qp --qf \"%{SERIAL}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/SERIAL"
++ test "`$RPM -qp --qf \"%{COPYRIGHT}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
++ test "`$RPM -qp --qf \"%{EPOCH}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/EPOCH"
++ test "`$RPM -qp --qf \"%{LICENSE}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/LICENSE"
++ else
++ echo "$FILEPREF 0 $DATE INFO/PACKAGER"
++ echo "$FILEPREF 0 $DATE INFO/URL"
++ echo "$FILEPREF 0 $DATE INFO/SERIAL"
++ echo "$FILEPREF 0 $DATE INFO/COPYRIGHT"
++ echo "$FILEPREF 0 $DATE INFO/EPOCH"
++ echo "$FILEPREF 0 $DATE INFO/LICENSE"
++ fi
++ echo "$FILEPREF 0 $DATE INFO/BUILDTIME"
++ echo "$FILEPREF 0 $DATE INFO/RPMVERSION"
++ echo "$FILEPREF 0 $DATE INFO/OS"
++ echo "$FILEPREF 0 $DATE INFO/SIZE"
++ if test "$MCFASTRPM" != 0 ; then
++ $RPM -qp --qf "[%{REQUIRENAME}\n]" "$f" | grep "(none)" > /dev/null ||
++ echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
++ $RPM -qp --qf "[%{OBSOLETES}\n]" "$f" | grep "(none)" > /dev/null ||
++ echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
++ $RPM -qp --qf "[%{PROVIDES}\n]" "$f" | grep "(none)" > /dev/null ||
++ echo "$FILEPREF 0 $DATE INFO/PROVIDES"
++ $RPM -qp --qf "[%{CONFLICTS}\n]" "$f" | grep "(none)" > /dev/null ||
++ echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
++ test "`$RPM -qp --qf \"%{CHANGELOGTEXT}\" \"$f\"`" = "(none)" ||
++ echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
++ else
++ echo "$FILEPREF 0 $DATE INFO/REQUIRENAME"
++ echo "$FILEPREF 0 $DATE INFO/OBSOLETES"
++ echo "$FILEPREF 0 $DATE INFO/PROVIDES"
++ echo "$FILEPREF 0 $DATE INFO/CONFLICTS"
++ echo "$FILEPREF 0 $DATE INFO/CHANGELOG"
++ fi
++
++ echo "$FILEPREF 0 $DATE CONTENTS.cpio"
++}
++
++mcrpmfs_copyout ()
++{
++ f="`echo "$1" | $SED "$SEDCMD"`"
++ case "$2" in
++ HEADER) $RPM -qip "$f" > "$3"; exit 0;;
++ INSTALL) echo "# Run this to install this RPM package" > "$3"; exit 0;;
++ REBUILD) echo "# Run this to rebuild this RPM package" > "$3"; exit 0;;
++ ERROR) $RPM -qip "$f" > /dev/null 2> "$3"; exit 0;;
++ INFO/NAME-VERSION-RELEASE) $RPM -qp --qf "%{NAME}-%{VERSION}-%{RELEASE}\n" "$f" > "$3"; exit 0;;
++ INFO/RELEASE) $RPM -qp --qf "%{RELEASE}\n" "$f" > "$3"; exit 0;;
++ INFO/GROUP) $RPM -qp --qf "%{GROUP}\n" "$f" > "$3"; exit 0;;
++ INFO/DISTRIBUTION) $RPM -qp --qf "%{DISTRIBUTION}\n" "$f" > "$3"; exit 0;;
++ INFO/VENDOR) $RPM -qp --qf "%{VENDOR}\n" "$f" > "$3"; exit 0;;
++ INFO/BUILDHOST) $RPM -qp --qf "%{BUILDHOST}\n" "$f" > "$3"; exit 0;;
++ INFO/SOURCERPM) $RPM -qp --qf "%{SOURCERPM}\n" "$f" > "$3"; exit 0;;
++ INFO/DESCRIPTION) $RPM -qp --qf "%{DESCRIPTION}\n" "$f" > "$3"; exit 0;;
++ INFO/PACKAGER) $RPM -qp --qf "%{PACKAGER}\n" "$f" > "$3"; exit 0;;
++ INFO/URL) $RPM -qp --qf "%{URL}\n" "$f" >"$3"; exit 0;;
++ INFO/BUILDTIME) $RPM -qp --qf "%{BUILDTIME:date}\n" "$f" >"$3"; exit 0;;
++ INFO/SERIAL) $RPM -qp --qf "%{SERIAL}\n" "$f" >"$3"; exit 0;;
++ INFO/COPYRIGHT) $RPM -qp --qf "%{COPYRIGHT}\n" "$f" >"$3"; exit 0;;
++ INFO/EPOCH) $RPM -qp --qf "%{EPOCH}\n" "$f" >"$3"; exit 0;;
++ INFO/LICENSE) $RPM -qp --qf "%{LICENSE}\n" "$f" >"$3"; exit 0;;
++ INFO/RPMVERSION) $RPM -qp --qf "%{RPMVERSION}\n" "$f" >"$3"; exit 0;;
++ INFO/REQUIRENAME) $RPM -qp --qf "[%{REQUIRENAME} %{REQUIREFLAGS:depflags} %{REQUIREVERSION}\n]" "$f" >"$3"; exit 0;;
++ INFO/PROVIDES) $RPM -qp --qf "[%{PROVIDES}\n]" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/PREIN) $RPM -qp --qf "%{RPMTAG_PREIN}\n" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/POSTIN) $RPM -qp --qf "%{RPMTAG_POSTIN}\n" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/PREUN) $RPM -qp --qf "%{RPMTAG_PREUN}\n" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/POSTUN) $RPM -qp --qf "%{RPMTAG_POSTUN}\n" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/VERIFYSCRIPT) $RPM -qp --qf "%{VERIFYSCRIPT}\n" "$f" >"$3"; exit 0;;
++ INFO/SCRIPTS/ALL) $RPM -qp --scripts "$f" > "$3"; exit 0;;
++ INFO/SUMMARY) $RPM -qp --qf "%{SUMMARY}\n" "$f" > "$3"; exit 0;;
++ INFO/OS) $RPM -qp --qf "%{OS}\n" "$f" > "$3"; exit 0;;
++ INFO/CHANGELOG) $RPM -qp --qf "[* %{CHANGELOGTIME:date} %{CHANGELOGNAME}\n%{CHANGELOGTEXT}\n\n]\n" "$f" > "$3"; exit 0;;
++ INFO/SIZE) $RPM -qp --qf "%{SIZE} bytes\n" "$f" > "$3"; exit 0;;
++ INFO/OBSOLETES) $RPM -qp --qf "[%{OBSOLETENAME} %|OBSOLETEFLAGS?{%{OBSOLETEFLAGS:depflags} %{OBSOLETEVERSION}}:{}|\n]" "$f" > "$3"; exit 0;;
++ INFO/CONFLICTS) $RPM -qp --qf "[%{CONFLICTNAME} %{CONFLICTFLAGS:depflags} %{CONFLICTVERSION}\n]" "$f" >"$3"; exit 0;;
++ CONTENTS.cpio) $RPM2CPIO "$1" > "$3"; exit 0;;
++ *)
++ ;;
++ esac
++}
++
++mcrpmfs_run ()
++{
++ f="`echo "$1" | $SED "$SEDCMD"`"
++ case "$2" in
++ INSTALL) echo "Installing \"\"$f\"\""; $RPM -ivh "$f"; exit 0;;
++ REBUILD) echo "Rebuilding \"$1\""; $RPMBUILD --rebuild "$1"; exit 0;;
++ esac
++}
++
++umask 077
++case "$1" in
++ list) mcrpmfs_list "$2"; exit 0;;
++ copyout) mcrpmfs_copyout "$2" "$3" "$4"; exit 0;;
++ run) mcrpmfs_run "$2" "$3"; exit 1;;
++esac
++exit 1
Added: trunk/debian/patches/vfs/08_improved_u7z_support.patch
===================================================================
--- trunk/debian/patches/vfs/08_improved_u7z_support.patch (rev 0)
+++ trunk/debian/patches/vfs/08_improved_u7z_support.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,55 @@
+diff --git a/vfs/extfs/u7z b/vfs/extfs/u7z
+index da2272e..c722388 100644
+--- a/vfs/extfs/u7z
++++ b/vfs/extfs/u7z
+@@ -2,6 +2,7 @@
+ #
+ # extfs support for p7zip
+ # Written by Pavel Roskin <proski at gnu.org>
++# Some Bugfixes/workarounds by Sergiy Niskorodov <sgh at mail.zp.ua>
+ # Licensed under GNU GPL version 2 or later version.
+
+ P7ZIP=7za
+@@ -19,7 +20,10 @@ mcu7zip_list ()
+
+ mcu7zip_copyout ()
+ {
+- $P7ZIP e -so "$1" "$2" > "$3" 2>/dev/null
++ #first we check if we have old p7zip archive with prefix ./ in filename
++ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
++ EXFNAME=*./"$2" || EXFNAME="$2"
++ $P7ZIP e -so "$1" "$EXFNAME" > "$3" 2>/dev/null
+ }
+
+ mcu7zip_copyin ()
+@@ -31,19 +35,27 @@ mcu7zip_mkdir ()
+ {
+ dir=`mktemp -d "${MC_TMPDIR:-/tmp}/mctmpdir-u7z.XXXXXX"` || exit 1
+ mkdir -p "$dir"/"$2"
+- $P7ZIP a -w"$dir" "$1" "$2" >/dev/null 2>&1
++ $P7ZIP a -w"$dir" "$1" "$dir"/"$2" >/dev/null 2>&1
+ rm -rf "$dir"
+ }
+
+ mcu7zip_rm ()
+ {
+ # NOTE: Version 4.20 fails to delete files in subdirectories
+- $P7ZIP d "$1" "$2" >/dev/null 2>&1
++ #first we check if we have old p7zip archive with prefix ./ in filename
++ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
++ EXFNAME=*./"$2" || EXFNAME="$2"
++ $P7ZIP d "$1" "$EXFNAME" 2>&1 | grep -q E_NOTIMPL &> /dev/null && \
++ { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ }
+
+ mcu7zip_rmdir ()
+ {
+- $P7ZIP d "$1" "$2"/ >/dev/null 2>&1
++ #first we check if we have old p7zip archive with prefix ./ in filename
++ $P7ZIP l "$1" "$2" | grep -q "0 files" && \
++ EXFNAME=*./"$2" || EXFNAME="$2"
++ $P7ZIP d "$1" "$EXFNAME"/ 2>&1 | grep -q E_NOTIMPL &> /dev/null && \
++ { echo -e "Function not implemented...\n7z cannot delete from solid archive." >&2 ; exit 1 ; }
+ }
+
+ # override any locale for dates
Added: trunk/debian/patches/vfs/09_choose_correct_urar.patch
===================================================================
--- trunk/debian/patches/vfs/09_choose_correct_urar.patch (rev 0)
+++ trunk/debian/patches/vfs/09_choose_correct_urar.patch 2008-05-17 17:35:18 UTC (rev 132)
@@ -0,0 +1,15 @@
+diff --git a/vfs/extfs/urar.in b/vfs/extfs/urar.in
+index c8dbde1..6d29cd0 100644
+--- a/vfs/extfs/urar.in
++++ b/vfs/extfs/urar.in
+@@ -22,6 +22,10 @@ for dir in $PATH; do
+ fi
+ done
+
++if [ ! -x $UNRAR -a -x $RAR ]; then
++ UNRAR=$RAR
++fi
++
+ mcrarfs_list ()
+ {
+ $UNRAR v -c- "$1" | @AWK@ -v uid=`id -u` -v gid=`id -g` '
Modified: trunk/debian/rocks
===================================================================
--- trunk/debian/rocks 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/rocks 2008-05-17 17:35:18 UTC (rev 132)
@@ -1,10 +1,11 @@
# custom tweaks to cbs' debian/rules
DEB_CONFIGURE_EXTRA_FLAGS := --with-glib2 --without-ext2undel \
- --enable-charset --with-screen=slang
+ --enable-charset --with-samba --with-screen=slang
deb-extra-clean::
rm -f config.sub config.guess
+ rm -f config/config.sub config/config.guess
cd po && \
rm -f *.gmo
Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules 2008-04-09 17:51:04 UTC (rev 131)
+++ trunk/debian/rules 2008-05-17 17:35:18 UTC (rev 132)
@@ -350,6 +350,7 @@
CXXFLAGS += $(DEB_CXX_DEFAULT_OPT)
endif
+QUILT ?= /usr/bin/quilt
DEB_PATCHDIRS ?= debian/patches
DEB_PATCHES ?= $(foreach dir,$(DEB_PATCHDIRS),$(shell echo $(wildcard $(dir)/*.patch) $(wildcard $(dir)/*.diff)))
@@ -423,47 +424,15 @@
debian/stamp-patched reverse-patches:
@echo "patches: $(DEB_PATCHES)"
@set -e ; \
- DPATCHES="$(DEB_PATCHES)"; \
- [ "$@" = "reverse-patches" ] && DPATCHES="`ls -r $(DEB_PATCHES)`"; \
- for patch in $$DPATCHES; do \
- level=$(head $$patch | egrep '^#DPATCHLEVEL=' | cut -f 2 -d '='); \
- reverse=""; \
- if [ "$@" = "reverse-patches" ]; then reverse="-R"; fi; \
- success=""; \
- if [ -z "$$level" ]; then \
- echo -n "Trying "; if test -n "$$reverse"; then echo -n "reversed "; fi; echo -n "patch $$patch at level "; \
- for level in 0 1 2; do \
- if test -z "$$success"; then \
- echo -n "$$level..."; \
- if cat $$patch | patch $$reverse --dry-run -p$$level --verbose 1>$$patch.level-$$level.log 2>&1; then \
- if cat $$patch | patch $$reverse --no-backup-if-mismatch -V never -p$$level 1>$$patch.level-$$level.log 2>&1; then \
- success=yes; \
- touch debian/stamp-patch-$$(basename $$patch); \
- echo "success."; \
- fi; \
- fi; \
- fi; \
- done; \
- if test -z "$$success"; then \
- if test -z "$$reverse"; then \
- echo "failure."; \
- exit 1; \
- else \
- echo "failure (ignored)."; \
- fi \
- fi; \
+ if [ ! "$@" = "reverse-patches" ]; then \
+ ln -s debian/patches/all.series series;\
+ ln -s debian/patches/ patches; \
+ $(QUILT) --quiltrc /dev/null push -a; \
else \
- echo -n "Trying patch $$patch at level $$level..."; \
- if cat $$patch | patch $$reverse --no-backup-if-mismatch -V never -p$$level 1>$$patch.log 2>&1; then \
- touch debian/stamp-patch-$$(basename $$patch); \
- echo "success."; \
- else \
- echo "failure:"; \
- cat $$patch.log; \
- if test -z "$$reverse"; then exit 1; fi; \
- fi; \
+ $(QUILT) --quiltrc /dev/null pop -a || true \
+ rm -f series patches; \
+ rm -rf .pc; \
fi; \
- done
if [ "$@" = "debian/stamp-patched" ]; then touch debian/stamp-patched; fi
post-patches: debian/stamp-post-patches
More information about the Pkg-mc-commits
mailing list