]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/mc-4.6.1-debian_fixes-1.patch
Updated and patched squidGuard
[people/pmueller/ipfire-2.x.git] / src / patches / mc-4.6.1-debian_fixes-1.patch
1 --- mc-4.6.1.orig/debian/dirs
2 +++ mc-4.6.1/debian/dirs
3 @@ -0,0 +1,2 @@
4 +/etc/mc
5 +/usr/share/pixmaps
6 --- mc-4.6.1.orig/debian/docs
7 +++ mc-4.6.1/debian/docs
8 @@ -0,0 +1,8 @@
9 +FAQ
10 +NEWS
11 +README
12 +AUTHORS
13 +TODO
14 +AUTHORS
15 +ABOUT-NLS
16 +HACKING
17 --- mc-4.6.1.orig/debian/menu
18 +++ mc-4.6.1/debian/menu
19 @@ -0,0 +1,8 @@
20 +?package(mc):\
21 + needs="text"\
22 + section="Apps/Tools"\
23 + title="mc"\
24 + longtitle="Midnight Commander"\
25 + hints="File managers"\
26 + command="/usr/bin/mc"\
27 + icon="/usr/share/pixmaps/mc.xpm"
28 --- mc-4.6.1.orig/debian/control
29 +++ mc-4.6.1/debian/control
30 @@ -0,0 +1,21 @@
31 +Source: mc
32 +Section: utils
33 +Priority: optional
34 +Maintainer: Stefano Melchior <stefano.melchior@openlabs.it>
35 +Uploaders: Ludovic Drolez <ldrolez@debian.org>
36 +Build-Depends: debhelper (>> 4.0.0), libglib2.0-dev, libgpmg1-dev |not+linux-gnu, gettext, libslang2-dev
37 +Standards-Version: 3.7.2
38 +
39 +Package: mc
40 +Architecture: any
41 +Depends: ${shlibs:Depends}
42 +Suggests: perl, mime-support, zip, unzip, bzip2, links | w3m | lynx, arj
43 +Conflicts: mc-common, suidmanager (<< 0.52)
44 +Replaces: mc-common, manpages-pl (<= 20030210)
45 +Description: midnight commander - a powerful file manager
46 + GNU Midnight Commander is a text-mode full-screen file manager. It
47 + uses a two panel interface and a subshell for command execution. It
48 + includes an internal editor with syntax highlighting and an internal
49 + viewer with support for binary files. Also included is Virtual
50 + Filesystem (VFS), that allows files on remote systems (e.g. FTP, SSH,
51 + SMB servers) and files inside archives to be manipulated like real files.
52 --- mc-4.6.1.orig/debian/extra/icon.xpm
53 +++ mc-4.6.1/debian/extra/icon.xpm
54 @@ -0,0 +1,45 @@
55 +/* XPM */
56 +static char *icon[] = {
57 +/* columns rows colors chars-per-pixel */
58 +"32 32 7 1",
59 +" c black",
60 +". c gray20",
61 +"X c blue",
62 +"o c cyan",
63 +"O c yellow",
64 +"+ c gray80",
65 +"@ c gray90",
66 +/* pixels */
67 +"+@+@+@++@++@+@+@+@+@++@@++@++@+@",
68 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
69 +"@XXOOOOOXXoXOOXXoXXXOOOOXXoXOOX.",
70 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
71 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
72 +"@XoooooooXoXooXXoXoooooooXoXooX.",
73 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
74 +"@XoooooooXoXooXXoXoooooooXoXooX.",
75 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
76 +"@XoooooooXoXooXXoXoooooooXoXooX.",
77 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
78 +"@XoooooooXoXooXXoXoooooooXoXooX.",
79 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
80 +"@XoooooooXoXooXXoXoooooooXoXooX.",
81 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
82 +"+XoooooooXoXooXXoXoooooooXoXooX.",
83 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
84 +"@XXXXXXXXXoXXXXXoXoooooooXoXooX.",
85 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
86 +"@XXXXXXXXXoXXXXXoXoooooooXoXooX.",
87 +"+XXXXXXXXXoXXXXXoXXXXXXXXXoXXXX.",
88 +"@oooooooooooooooooooooooooooooo ",
89 +"+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
90 +"@XooooooXoXoooXXXXooooooXooXooX.",
91 +"+XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.",
92 +"+oooooooooooooooooooooooooooooo.",
93 +"@ .",
94 +"+ .",
95 +"+.+ .",
96 +"@ .",
97 +"++O++ ++++ O++O +O++O +O++ ++O+.",
98 +"+..............................."
99 +};
100 --- mc-4.6.1.orig/debian/extra/mcview-debian.1
101 +++ mc-4.6.1/debian/extra/mcview-debian.1
102 @@ -0,0 +1,19 @@
103 +.TH MCVIEW-DEBIAN 1
104 +.SH NAME
105 +mcview-debian \- mcview wrapper
106 +.br
107 +.SH DESCRIPTION
108 +This script is just a wrapper for
109 +.B mcview,
110 +(the Midnight Commander internal viewer) to use with Debian
111 +alternatives system.
112 +.SH OPTIONS
113 +Full list of supported options could be found on the
114 +.BR mcview (1)
115 +manpage.
116 +.SH SEE ALSO
117 +.BR mcview (1),
118 +.BR mc (1)
119 +.SH AUTHOR
120 +This manual page was written by Adam Byrtek <alpha@debian.org>, for
121 +the Debian GNU/Linux system.
122 --- mc-4.6.1.orig/debian/extra/mcedit-debian
123 +++ mc-4.6.1/debian/extra/mcedit-debian
124 @@ -0,0 +1,5 @@
125 +#!/bin/sh
126 +
127 +# mcedit wrapper for Debian alternatives system
128 +
129 +mcedit $@
130 --- mc-4.6.1.orig/debian/extra/mcmfmt.1
131 +++ mc-4.6.1/debian/extra/mcmfmt.1
132 @@ -0,0 +1,14 @@
133 +.TH MCMFMT 1
134 +.SH NAME
135 +mcmfmt \- sets bold and underline for mail files
136 +.br
137 +.SH "DESCRIPTION"
138 +.B mcmfmt
139 +is a program for internal use by the Midnight Commander only. It sets bold and underline for mail files.
140 +.SH OPTIONS
141 +There are no options for this program.
142 +.SH "SEE ALSO"
143 +mc(1)
144 +.SH AUTHOR
145 +This manual page was written by Paul Seelig <pseelig@goofy.zdv.uni-mainz.de>,
146 +for the Debian GNU/Linux system (but may be used by others).
147 --- mc-4.6.1.orig/debian/extra/mcview-debian
148 +++ mc-4.6.1/debian/extra/mcview-debian
149 @@ -0,0 +1,5 @@
150 +#!/bin/sh
151 +
152 +# mcview wrapper for Debian alternatives system
153 +
154 +mcview $@
155 --- mc-4.6.1.orig/debian/extra/mcedit-debian.1
156 +++ mc-4.6.1/debian/extra/mcedit-debian.1
157 @@ -0,0 +1,19 @@
158 +.TH MCEDIT-DEBIAN 1
159 +.SH NAME
160 +mcedit-debian \- mcedit wrapper
161 +.br
162 +.SH DESCRIPTION
163 +This script is just a wrapper for
164 +.B mcedit,
165 +(the Midnight Commander internal editor) to use with Debian
166 +alternatives system.
167 +.SH OPTIONS
168 +Full list of supported options could be found on the
169 +.BR mcedit (1)
170 +manpage.
171 +.SH SEE ALSO
172 +.BR mcedit (1),
173 +.BR mc (1)
174 +.SH AUTHOR
175 +This manual page was written by Adam Byrtek <alpha@debian.org>, for
176 +the Debian GNU/Linux system.
177 --- mc-4.6.1.orig/debian/links
178 +++ mc-4.6.1/debian/links
179 @@ -0,0 +1,3 @@
180 +/etc/mc/mc.ext /usr/share/mc/mc.ext
181 +/etc/mc/mc.menu /usr/share/mc/mc.menu
182 +/etc/mc/mc.lib /usr/share/mc/mc.lib
183 --- mc-4.6.1.orig/debian/rocks
184 +++ mc-4.6.1/debian/rocks
185 @@ -0,0 +1,45 @@
186 +# custom tweaks to cbs' debian/rules
187 +
188 +DEB_CONFIGURE_EXTRA_FLAGS := --with-glib2 --without-ext2undel \
189 + --enable-charset --with-samba --with-screen=slang
190 +
191 +deb-extra-clean::
192 + rm -f config.sub config.guess
193 + rm -f po/ru.gmo
194 +
195 +deb-binary-hook-mc:
196 + cp debian/extra/icon.xpm debian/mc/usr/share/pixmaps/mc.xpm
197 +
198 + cp debian/extra/mcview-debian debian/mc/usr/bin/
199 + cp debian/extra/mcedit-debian debian/mc/usr/bin/
200 +
201 + chmod a+x debian/mc/usr/share/mc/edit.spell.rc
202 + chmod a+x debian/mc/usr/share/mc/edit.indent.rc
203 + chmod a-x debian/mc/usr/share/mc/bin/*
204 +
205 + -mv debian/mc/usr/share/mc/mc.ext debian/mc/etc/mc/mc.ext
206 + -mv debian/mc/usr/share/mc/mc.menu debian/mc/etc/mc/mc.menu
207 + -mv debian/mc/usr/share/mc/mc.lib debian/mc/etc/mc/mc.lib
208 +
209 + # convert docs to UTF8
210 + cd debian/mc/usr/share/mc && \
211 + iconv -f ISO-8859-1 -t UTF-8 mc.hint > tmp && mv tmp mc.hint && \
212 + iconv -f ISO-8859-1 -t UTF-8 mc.hlp > tmp && mv tmp mc.hlp && \
213 + iconv -f ISO-8859-1 -t UTF-8 mc.hint.es > tmp && mv tmp mc.hint.es && \
214 + iconv -f ISO-8859-1 -t UTF-8 mc.hlp.es > tmp && mv tmp mc.hlp.es && \
215 + iconv -f ISO-8859-1 -t UTF-8 mc.hint.it > tmp && mv tmp mc.hint.it && \
216 + iconv -f ISO-8859-1 -t UTF-8 mc.hlp.it > tmp && mv tmp mc.hlp.it && \
217 + iconv -f ISO-8859-1 -t UTF-8 mc.hint.nl > tmp && mv tmp mc.hint.nl && \
218 + iconv -f ISO-8859-2 -t UTF-8 mc.hint.cs > tmp && mv tmp mc.hint.cs && \
219 + iconv -f ISO-8859-2 -t UTF-8 mc.hint.hu > tmp && mv tmp mc.hint.hu && \
220 + iconv -f ISO-8859-2 -t UTF-8 mc.hlp.hu > tmp && mv tmp mc.hlp.hu && \
221 + iconv -f ISO-8859-2 -t UTF-8 mc.hint.pl > tmp && mv tmp mc.hint.pl && \
222 + iconv -f ISO-8859-2 -t UTF-8 mc.hlp.pl > tmp && mv tmp mc.hlp.pl && \
223 + iconv -f ISO-8859-5 -t UTF-8 mc.hint.sr > tmp && mv tmp mc.hint.sr && \
224 + iconv -f ISO-8859-5 -t UTF-8 mc.hlp.sr > tmp && mv tmp mc.hlp.sr && \
225 + iconv -f ISO-8859-5 -t UTF-8 mc.menu.sr > tmp && mv tmp mc.menu.sr && \
226 + iconv -f koi8-r -t UTF-8 mc.hint.ru > tmp && mv tmp mc.hint.ru && \
227 + iconv -f koi8-r -t UTF-8 mc.hlp.ru > tmp && mv tmp mc.hlp.ru && \
228 + iconv -f koi8-u -t UTF-8 mc.hint.uk > tmp && mv tmp mc.hint.uk && \
229 + iconv -f big5 -t UTF-8 mc.hint.zh > tmp && mv tmp mc.hint.zh
230 +
231 --- mc-4.6.1.orig/debian/rules
232 +++ mc-4.6.1/debian/rules
233 @@ -0,0 +1,551 @@
234 +#!/usr/bin/make -f
235 +# -*- mode: makefile; coding: utf-8 -*-
236 +# Colin's Build System
237 +# Copyright © 2002 Colin Walters <walters@debian.org>
238 +# $Id: rules,v 1.3 2005/10/16 15:03:43 ldrolez Exp $
239 +
240 +####################################
241 +# DO NOT MODIFY THIS FILE DIRECTLY #
242 +####################################
243 +
244 +### Introduction to Colin's Build System #############################
245 +# This file is shared between all the packages which use Colin's Build
246 +# System. The idea is that this file contains sane defaults, and
247 +# stuff specific to a package should go into the debian/rocks Makefile
248 +# fragment. There generic hooks where you can override and add
249 +# functionality for a specific package.
250 +
251 +# The big motivating factor for CBS was originally that more and more
252 +# programs today are created using GNU configure scripts and GNU
253 +# automake, and as such they are all very similar to configure and
254 +# build. CBS takes advantage of this by doing stuff like looking for
255 +# an executable file named "configure"; if it exists, CBS tries
256 +# treating it like a GNU configure script, and passes it sane
257 +# arguments (like --prefix=/usr). This will work for like 90% of the
258 +# cases out there (including at least all my packages). But if it
259 +# doesn't work, no problem; you can customize or just completely
260 +# override it the debian/rocks file. For example, suppose that you
261 +# need to pass "--enable-foo" to the configure script. In that case,
262 +# all you need to do is create a file named debian/rocks, which
263 +# contains:
264 +
265 +# DEB_CONFIGURE_EXTRA_FLAGS := --enable-foo
266 +
267 +# And that's it! Everything else happens automagically. However,
268 +# suppose that your "configure" script isn't made by autoconf, and
269 +# instead expects the user to interactively configure the program
270 +# (e.g. Perl). In that case, you can just override the
271 +# "deb-common-configure" rule, by putting something like the following
272 +# in your debian/rocks:
273 +
274 +# deb-common-configure:
275 +# ./configure --blah --blargh < debian/answers
276 +
277 +# All of the rules which are overridable are listed below, up to the
278 +# line "-include debian/rocks". There are also a large group of
279 +# variables you may customize to affect a default rule, instead of of
280 +# just overriding the rule completely.
281 +
282 +# CBS also helps you keep up-to-date with the latest policy; when
283 +# there is a new DEB_BUILD_OPTIONS entry, or they change semantics (as
284 +# in the latest "debug" => "noopt" change), you shouldn't have to
285 +# change anything in your packages (besides rebuilding them with the
286 +# latest CBS version); CBS will just handle it.
287 +
288 +### CBS and Debhelper ################################################
289 +# Colin's Build System currently relies heavily on debhelper version
290 +# 4, so you must have a Build-Depends: debhelper (>= 4.0.0).
291 +
292 +### Single vs. Multi Binary packages #################################
293 +# If you have a single binary package, CBS tries to use the upstream
294 +# Makefile to install everything into debian/packagename, so it will
295 +# all appear in the binary package. To remove files, move them
296 +# around, just override the deb-binary-hook-<packagename> target in
297 +# the debian/rocks file, like:
298 +
299 +# deb-binary-hook-mypackage:
300 +# mv debian/mypackage/usr/sbin/myprogram debian/mypackage/usr/bin/myprogram
301 +# rm debian/mypackage/usr/share/doc/mypackage/INSTALL
302 +
303 +# If you have a multi-binary package, CBS (by default) uses the
304 +# upstream Makefile to install everything in debian/tmp. After this,
305 +# the recommended method is to use dh_install to copy these files into
306 +# the appropriate package. To do this, just create
307 +# "packagename.install" files; see the dh_install man page.
308 +
309 +### Common Problems ##################################################
310 +
311 +# Are you having problems with your package not building with the
312 +# default deb-common-build rule? This could be because of CFLAGS
313 +# issues. If it doesn't work, then your upstream's build system is
314 +# broken. You should be able to set CFLAGS to contain the
315 +# optimization and debugging settings you want, and this shouldn't
316 +# frob any -I or other internal arguments the upstream build system
317 +# needs. One way to fix this is to have upstream fix their Makefile
318 +# to do something like:
319 +
320 +# # This is the default set of optimization and debugging flags, which
321 +# # can be overridden with a CFLAGS passed to the make invocation.
322 +# CFLAGS = -g -O2
323 +# # Now add specific stuff we need.
324 +# override CFLAGS += -I. -I.. -ffrob-stuff
325 +
326 +# On a related note, if you want to have a nice, easy-to-maintain,
327 +# working build system, try to convince your upstream to switch to
328 +# automake, autoconf, and libtool.
329 +
330 +### The latest version of CBS ########################################
331 +# The canonical source for Colin's Build System is:
332 +# http://cvs.verbum.org/debian/rules
333 +
334 +# Note that you can easily update your current version by running:
335 +# debian/rules update
336 +
337 +# Are you keeping your Debian packages in CVS? In that case, it would
338 +# probably be a good idea to disable keyword expansion for this file,
339 +# so debian/rules update won't get confused. Run:
340 +# cvs admin -ko debian/rules
341 +
342 +### Hooks which are overridable ######################################
343 +
344 +## This target is called before almost anything else; in particular,
345 +## it is called even before patches are applied. This is a good place
346 +## to do stuff like generate a debian/control from debian/control.xml,
347 +## etc.
348 +deb-pre-build:
349 + if [ -x $(CURDIR)/autogen.sh ]; then \
350 + $(CURDIR)/autogen.sh || echo -n "Failed to run autogen.sh script"; \
351 + fi
352 +
353 +## This target is called after patches are applied, but before
354 +## configure scripts or anything else are run. This is a good place
355 +## to do wacky stuff like:
356 +## 'find . -name 'Makefile.in' -exec touch {} \;'.
357 +deb-post-patches:
358 + # Nothing to do by default.
359 +
360 +## This target is called after patches are applied (i.e. after
361 +## deb-post-patches). It is, as its name implies, a good place to run
362 +## GNU configure scripts or the like.
363 +deb-common-configure:
364 + if [ -x ./configure ]; then $(DEB_CONFIGURE_INVOKE) --prefix=$(DEB_CONFIGURE_PREFIX) --mandir=$(DEB_CONFIGURE_MANDIR) --infodir=$(DEB_CONFIGURE_INFODIR) --sysconfdir=$(DEB_CONFIGURE_SYSCONFDIR) --localstatedir=$(DEB_CONFIGURE_LOCALSTATEDIR) --libexecdir=$(DEB_CONFIGURE_LIBEXECDIR) --disable-maintainer-mode $(DEB_CONFIGURE_EXTRA_FLAGS) $(DEB_USER_CONFIGURE_FLAGS); fi
365 +
366 +## This target is for configuring a specific package. It is called
367 +## once for each package.
368 +deb-configure-%:
369 + # Nothing to do by default.
370 +
371 +## This is an "extra" rule, where you may prefix arbitrary commands to
372 +## the general build, but not override the default. It is called
373 +## before deb-common-build.
374 +deb-extra-pre-common-build::
375 + # Nothing to do by default.
376 +
377 +## This target is called after common configuration (but not
378 +## necessarily after package-specific configuration). Generally, this
379 +## is a good place to invoke make and the like. Note that if you do
380 +## package-specific configuration, you should likely override this
381 +## rule to do nothing, and then do package-specific building in
382 +## deb-build-<package>.
383 +deb-common-build:
384 + if [ -f Makefile ]; then \
385 + $(DEB_MAKE_ENVVARS) $(MAKE) CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" $(DEB_BUILD_MAKE_TARGET); \
386 + fi
387 +
388 +## This is an "extra" rule, where you may add arbitrary commands to
389 +## the general build, but not override the default. It is called
390 +## after deb-common-build.
391 +deb-extra-common-build:: deb-common-build
392 + # Nothing to do by default.
393 +
394 +## This target is called once for each package, after package-specific
395 +## configuration; it is for doing any building to a specific package.
396 +deb-build-%:
397 + # Nothing to do by default.
398 +
399 +## This is an "extra" rule, where you may add arbitrary commands to
400 +## the package-specific build, but not override the default. It is
401 +## called after deb-build-<package>.
402 +deb-extra-build-%: deb-build-%
403 + # Nothing to do by default.
404 +
405 +## This target is called after pre-build, and before any configuration
406 +## takes place. It is designed to automatically update
407 +## config.{sub,guess} files which are used by packages which use GNU
408 +## autoconf. You should not generally need to override this target.
409 +## You may need to set DEB_AC_AUX_DIR if upstream used the autoconf
410 +## macro AC_CONFIG_AUX_DIR.
411 +deb-autotools-setup:
412 + if [ -r /usr/share/misc/config.sub ]; then \
413 + if [ -r $(DEB_AC_AUX_DIR)/config.sub -a ! -f $(DEB_AC_AUX_DIR)/config.sub.orig-cbs ]; then \
414 + mv $(DEB_AC_AUX_DIR)/config.sub $(DEB_AC_AUX_DIR)/config.sub.orig-cbs; \
415 + cp -f /usr/share/misc/config.sub $(DEB_AC_AUX_DIR)/config.sub; \
416 + fi; \
417 + fi
418 + if [ -r /usr/share/misc/config.guess ]; then \
419 + if [ -r $(DEB_AC_AUX_DIR)/config.guess -a ! -f $(DEB_AC_AUX_DIR)/config.guess.orig-cbs ]; then \
420 + mv $(DEB_AC_AUX_DIR)/config.guess $(DEB_AC_AUX_DIR)/config.guess.orig-cbs; \
421 + cp -f /usr/share/misc/config.guess $(DEB_AC_AUX_DIR)/config.guess; \
422 + fi; \
423 + fi
424 +
425 +## This target is called during the clean process; it is designed to
426 +## undo the effects of deb-autotools-setup, so that you won't get
427 +## spurious bits in your Debian diff. You should not generally need
428 +## to override this target.
429 +deb-autotools-clean:
430 + if [ -r $(DEB_AC_AUX_DIR)/config.sub.orig-cbs ]; then \
431 + mv $(DEB_AC_AUX_DIR)/config.sub.orig-cbs $(DEB_AC_AUX_DIR)/config.sub; \
432 + fi
433 + if [ -r $(DEB_AC_AUX_DIR)/config.guess.orig-cbs ]; then \
434 + mv $(DEB_AC_AUX_DIR)/config.guess.orig-cbs $(DEB_AC_AUX_DIR)/config.guess; \
435 + fi
436 +
437 +## This target is called during the cleaning process.
438 +deb-clean:
439 + if [ -f Makefile ]; then $(MAKE) distclean || $(MAKE) clean || true; fi
440 + if test -f config.log; then \
441 + if grep -i -q 'generated by GNU Autoconf' config.log || grep -i -q 'to aid debugging if configure ' config.log; then \
442 + rm -f config.log; \
443 + fi; \
444 + fi
445 + if test -f config.status && grep -i -q 'Generated.*by configure.' config.status; then rm -f config.status; fi
446 + if test -f config.cache && grep -i -q 'shell.*script.*caches.*results.*configure' config.cache; then rm -f config.cache; fi
447 + rm -f po/it.gmo po/de.gmo
448 +
449 +## This is an "extra" rule, where you may add arbitrary commands to
450 +## the cleaning process, but not override the default.
451 +deb-extra-clean:: deb-clean
452 + # Nothing to do by default.
453 +
454 +## This target is called after the common installation step. It
455 +## should install your package into its destination, e.g. debian/tmp
456 +## (for single-binary packages, into debian/<packagename>).
457 +deb-common-install:
458 + if [ -f Makefile ]; then \
459 + if grep -q DESTDIR Makefile || grep -q -i 'generated.*by.*automake' Makefile; then \
460 + $(DEB_MAKE_ENVVARS) $(MAKE) install DESTDIR=$(DEB_DESTDIR); \
461 + else \
462 + echo "This Makefile doesn't appear to support DESTDIR; you must override $@ in debian/rocks"; \
463 + exit 1; \
464 + fi; \
465 + else \
466 + echo "No default install action, you must override $@ in debian/rocks"; \
467 + exit 1; \
468 + fi
469 +
470 +## This is an "extra" rule, where you may add arbitrary commands to
471 +## the common installation process, but not override the default.
472 +deb-extra-common-install:: deb-common-install
473 + # Nothing to do by default.
474 +
475 +## This target is called once for each package, after that package's
476 +## specific build step.
477 +deb-install-%:
478 + # Nothing to do by default.
479 +
480 +## This is an "extra" rule, where you may add arbitrary commands to
481 +## the installation process for a specific package, but not override
482 +## the default.
483 +deb-extra-install-%: deb-install-%
484 + # Nothing to do by default.
485 +
486 +## This is a sort of "catchall" rule to do post-installation cleanup.
487 +## It is called by deb-binary-<packagename> after everything should be
488 +## installed in debian/tmp or debian/<packagename>. This is a good
489 +## place to do things like move binaries from debian/tmp/usr/bin to
490 +## debian/tmp/usr/sbin, convert HTML documentation into plain text,
491 +## etc.
492 +deb-binary-hook-%:
493 + # Nothing to do by default.
494 +
495 +## This rule is called after the installation for a package. It does
496 +## all the work of installing things like changelogs, README.Debian
497 +## files, etc., and also actually builds the .deb files. It relies
498 +## heavily on Debhelper, so please see the docs for those commands to
499 +## understand how it works and to customize things more. You may
500 +## override this target if you have special needs, but it is not
501 +## recommended. It is better instead to use one of the provided
502 +## hooks, or add a hook where necessary and send in a patch for CBS.
503 +deb-binary-%:
504 + dh_installdocs $(DEB_ALL_DOCS) $(DEB_INSTALL_DOCS_$(DEB_CURPACKAGE)) -p$(DEB_CURPACKAGE)
505 + dh_installexamples $(DEB_INSTALL_EXAMPLES_$(DEB_CURPACKAGE)) -p$(DEB_CURPACKAGE)
506 + dh_installman $(DEB_INSTALL_MANPAGES_$(DEB_CURPACKAGE)) -p$(DEB_CURPACKAGE)
507 + dh_installinfo $(DEB_INSTALL_INFO_$(DEB_CURPACKAGE)) -p$(DEB_CURPACKAGE)
508 + dh_installmenu -p$(DEB_CURPACKAGE)
509 + dh_installcron -p$(DEB_CURPACKAGE)
510 + dh_installdebconf -p$(DEB_CURPACKAGE)
511 + dh_installpam -p$(DEB_CURPACKAGE)
512 + dh_installchangelogs -p$(DEB_CURPACKAGE)
513 + dh_install -p$(DEB_CURPACKAGE)
514 + $(internal_invoke) deb-binary-hook-$(DEB_CURPACKAGE)
515 + $(internal_invoke) deb-strip-$(DEB_CURPACKAGE)
516 + dh_link -p$(DEB_CURPACKAGE)
517 + dh_compress -p$(DEB_CURPACKAGE) $(foreach entry,$(DEB_COMPRESS_EXCLUDE),$(patsubst %,-X %,$(entry))) \
518 + $(foreach entry,$(DEB_COMPRESS_EXCLUDE_$(DEB_CURPACKAGE)),$(patsubst %,-X %,$(entry)))
519 + dh_fixperms -p$(DEB_CURPACKAGE) $(foreach entry,$(DEB_FIXPERMS_EXCLUDE),$(patsubst %,-X %,$(entry))) \
520 + $(foreach entry,$(DEB_FIXPERMS_EXCLUDE_$(DEB_CURPACKAGE)),$(patsubst %,-X %,$(entry)))
521 + $(internal_invoke) deb-makeshlibs-$(DEB_CURPACKAGE)
522 + $(internal_invoke) deb-post-fixperms-binary-$(DEB_CURPACKAGE)
523 + dh_installdeb -p$(DEB_CURPACKAGE)
524 + $(internal_invoke) deb-shlibdeps-$(DEB_CURPACKAGE)
525 + dh_gencontrol -p$(DEB_CURPACKAGE)
526 + dh_md5sums -p$(DEB_CURPACKAGE)
527 + dh_builddeb -p$(DEB_CURPACKAGE)
528 +
529 +## This rule is called by the default deb-binary-<package>
530 +## implementation, after all package data has been installed, and
531 +## after the deb-binary-hook-<packagename> has been called. As its
532 +## name implies, it is where you should strip binaries.
533 +deb-strip-%:
534 + dh_strip -p$(DEB_CURPACKAGE)
535 +
536 +## This rule is called by the default deb-binary-<package>
537 +## implementation, *after* permissions have been sanitized. This is
538 +## an excellent place to make binaries setuid where necessary, for
539 +## example.
540 +deb-post-fixperms-binary-%:
541 + # Nothing to do by default.
542 +
543 +## This rule is called by the default deb-binary-<package>
544 +## implementation, right before the final Debian package building
545 +## process. This is where you should generate a "shlibs" file for
546 +## your package, if necessary.
547 +deb-makeshlibs-%:
548 + dh_makeshlibs -p$(DEB_CURPACKAGE)
549 +
550 +## This rule is called by the default deb-binary-<package>
551 +## implementation, during the final Debian package building
552 +## process. This is where you should determine
553 +deb-shlibdeps-%:
554 + dh_shlibdeps -p$(DEB_CURPACKAGE) $(if $(DEB_SHLIBDEPS_LIBRARY_$(DEB_CURPACKAGE)),-L $(DEB_SHLIBDEPS_LIBRARY_$(DEB_CURPACKAGE))) $(if $(DEB_SHLIBDEPS_INCLUDE_$(DEB_CURPACKAGE))$(DEB_SHLIBDEPS_INCLUDE),-l $(DEB_SHLIBDEPS_INCLUDE_$(DEB_CURPACKAGE)):$(DEB_SHLIBDEPS_INCLUDE))
555 +
556 +-include debian/rocks
557 +
558 +### Overridable variables #######################################
559 +
560 +# Some common variables; usually you shouldn't have to set these.
561 +DEB_ARCH_PACKAGES ?= $(shell dh_listpackages -a 2>/dev/null || true)
562 +DEB_INDEP_PACKAGES ?= $(shell dh_listpackages -i 2>/dev/null || true)
563 +DEB_ALL_PACKAGES ?= $(DEB_ARCH_PACKAGES) $(DEB_INDEP_PACKAGES)
564 +DEB_SOURCE_PACKAGE ?= $(strip $(shell egrep '^Source: ' debian/control | cut -f 2 -d ':'))
565 +
566 +export DH_COMPAT=4
567 +
568 +DEB_VERSION ?= $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
569 +
570 +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
571 +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
572 +DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
573 +DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
574 +
575 +DEB_C_DEFAULT_OPT ?= -O2
576 +DEB_CXX_DEFAULT_OPT ?= $(DEB_C_DEFAULT_OPT)
577 +CFLAGS ?= -Wall -g
578 +CXXFLAGS ?= -Wall -g
579 +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
580 + CFLAGS += -O0
581 + CXXFLAGS += -O0
582 +else
583 + CFLAGS += $(DEB_C_DEFAULT_OPT)
584 + CXXFLAGS += $(DEB_CXX_DEFAULT_OPT)
585 +endif
586 +
587 +DEB_PATCHDIRS ?= debian/patches
588 +DEB_PATCHES ?= $(foreach dir,$(DEB_PATCHDIRS),$(shell echo $(wildcard $(dir)/*.patch) $(wildcard $(dir)/*.diff)))
589 +
590 +DEB_CONFIGURE_INVOKE ?= ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
591 +DEB_CONFIGURE_PREFIX ?=/usr
592 +DEB_CONFIGURE_MANDIR ?="\$${prefix}/share/man"
593 +DEB_CONFIGURE_INFODIR ?="\$${prefix}/share/info"
594 +DEB_CONFIGURE_SYSCONFDIR ?=/etc
595 +DEB_CONFIGURE_LOCALSTATEDIR ?=/var
596 +DEB_CONFIGURE_LIBEXECDIR ?="\$${prefix}/lib/$(DEB_SOURCE_PACKAGE)"
597 +DEB_CONFIGURE_EXTRA_FLAGS ?=
598 +DEB_MAKE_ENVVARS ?=
599 +DEB_BUILD_MAKE_TARGET ?=
600 +DEB_DIRS ?=
601 +DEB_CLEAN ?=
602 +DEB_CLEAN_EXCLUDE ?=
603 +DEB_ALL_DOCS ?=
604 +DEB_KEEP_CHANGELOG_NAME ?=
605 +DEB_ALL_CHANGELOG ?= $(if $(DEB_ISNATIVE),,$(shell if test -r ChangeLog; then echo ChangeLog; fi))
606 +DEB_FIXPERMS_EXCLUDE ?=
607 +DEB_COMPRESS_EXCLUDE ?=
608 +# This variable should be a colon-separated list of paths
609 +DEB_SHLIBDEPS_INCLUDE ?=
610 +DEB_EXAMPLES ?=
611 +DEB_CHANGELOGS ?=
612 +DEB_AC_AUX_DIR ?=.
613 +
614 +DEB_PHONY_RULES ?=
615 +
616 +ifeq ($(strip $(shell echo $(DEB_ALL_PACKAGES) | wc -w)),1)
617 + DEB_DESTDIR ?= `pwd`/debian/$(strip $(DEB_ALL_PACKAGES))
618 +else
619 + DEB_DESTDIR ?= `pwd`/debian/tmp
620 +endif
621 +
622 +### Other variables ##################################################
623 +
624 +DEB_ISNATIVE := $(shell dpkg-parsechangelog | egrep '^Version:' | perl -ne 'print if not /^Version:\s*.*-/;')
625 +
626 +### Internal implementation ##########################################
627 +update:
628 + @if [ -f debian/rules ]; then \
629 + curversion=`head debian/rules | perl -lne 'if (/Id: rules,v (.*?) /) { print $$1; }'`; \
630 + echo "Installed version: " $$curversion; \
631 + rm -rf debian/cbs-update ; mkdir -p debian/cbs-update && cd debian/cbs-update; \
632 + echo -n "Downloading latest version from :pserver:anoncvs@cvs.verbum.org:/cvs..."; \
633 + cvs -Q -d :pserver:anoncvs@cvs.verbum.org:/cvs co debian/rules; \
634 + echo "done."; \
635 + newversion=`head debian/rules | perl -lne 'if (/Id: rules,v (.*?) /) { print $$1; }'`; \
636 + if [ "$$newversion" != "$$curversion" ]; then \
637 + echo "Retrieving log for revisions $$curversion to $$newversion..."; \
638 + cvs -q -d :pserver:anoncvs@cvs.verbum.org:/cvs log "-r$$curversion:$$newversion" debian/rules; \
639 + else \
640 + echo "No changes."; \
641 + fi; \
642 + mv debian/rules .. ; cd .. ; rm -rf cbs-update ; chmod a+x rules; \
643 + else \
644 + echo "Couldn't find debian/rules; you must execute this target as debian/rules update"; \
645 + fi
646 +
647 +internal_invoke := debian/rules "DEB_ARCH_PACKAGES=$(DEB_ARCH_PACKAGES)" "DEB_INDEP_PACKAGES=$(DEB_INDEP_PACKAGES)" "DEB_ALL_PACKAGES=$(DEB_ALL_PACKAGES)" "DEB_VERSION=$(DEB_VERSION)" "DEB_HOST_GNU_TYPE=$(DEB_HOST_GNU_TYPE)" "DEB_BUILD_GNU_TYPE=$(DEB_BUILD_GNU_TYPE)" "DEB_DESTDIR=$(DEB_DESTDIR)" "DEB_PATCHES=$(DEB_PATCHES)"
648 +
649 +pre-build: debian/stamp-pre-build
650 +debian/stamp-pre-build:
651 + $(internal_invoke) deb-pre-build
652 + touch $@
653 +
654 +# The patch subsystem
655 +apply-patches: pre-build debian/stamp-patched
656 +debian/stamp-patched: $(DEB_PATCHES)
657 +debian/stamp-patched reverse-patches:
658 + @echo "patches: $(DEB_PATCHES)"
659 + @set -e ; \
660 + DPATCHES="$(DEB_PATCHES)"; \
661 + [ "$@" = "reverse-patches" ] && DPATCHES="`ls -r $(DEB_PATCHES)`"; \
662 + for patch in $$DPATCHES; do \
663 + level=$(head $$patch | egrep '^#DPATCHLEVEL=' | cut -f 2 -d '='); \
664 + reverse=""; \
665 + if [ "$@" = "reverse-patches" ]; then reverse="-R"; fi; \
666 + success=""; \
667 + if [ -z "$$level" ]; then \
668 + echo -n "Trying "; if test -n "$$reverse"; then echo -n "reversed "; fi; echo -n "patch $$patch at level "; \
669 + for level in 0 1 2; do \
670 + if test -z "$$success"; then \
671 + echo -n "$$level..."; \
672 + if cat $$patch | patch $$reverse --dry-run -p$$level --verbose 1>$$patch.level-$$level.log 2>&1; then \
673 + if cat $$patch | patch $$reverse --no-backup-if-mismatch -V never -p$$level 1>$$patch.level-$$level.log 2>&1; then \
674 + success=yes; \
675 + touch debian/stamp-patch-$$(basename $$patch); \
676 + echo "success."; \
677 + fi; \
678 + fi; \
679 + fi; \
680 + done; \
681 + if test -z "$$success"; then \
682 + if test -z "$$reverse"; then \
683 + echo "failure."; \
684 + exit 1; \
685 + else \
686 + echo "failure (ignored)."; \
687 + fi \
688 + fi; \
689 + else \
690 + echo -n "Trying patch $$patch at level $$level..."; \
691 + if cat $$patch | patch $$reverse --no-backup-if-mismatch -V never -p$$level 1>$$patch.log 2>&1; then \
692 + touch debian/stamp-patch-$$(basename $$patch); \
693 + echo "success."; \
694 + else \
695 + echo "failure:"; \
696 + cat $$patch.log; \
697 + if test -z "$$reverse"; then exit 1; fi; \
698 + fi; \
699 + fi; \
700 + done
701 + if [ "$@" = "debian/stamp-patched" ]; then touch debian/stamp-patched; fi
702 +
703 +post-patches: debian/stamp-post-patches
704 +debian/stamp-post-patches: apply-patches
705 + $(internal_invoke) deb-post-patches
706 + touch $@
707 +
708 +# The general targets
709 +common-configure: post-patches debian/stamp-common-configure
710 +debian/stamp-common-configure:
711 + dh_testdir
712 + $(internal_invoke) deb-autotools-setup
713 + $(internal_invoke) deb-common-configure
714 + touch $@
715 +$(patsubst %,configure-%,$(DEB_ALL_PACKAGES)) : configure-% : common-configure debian/stamp-configure-%
716 +$(patsubst %,debian/stamp-configure-%,$(DEB_ALL_PACKAGES)) : debian/stamp-configure-%: debian/stamp-patched
717 + dh_testdir
718 + $(internal_invoke) deb-configure-package-$(patsubst debian/stamp-configure-%,%,$@) DEB_CURPACKAGE=$(patsubst debian/stamp-configure-%,%,$@)
719 + touch $@
720 +
721 +# Required Debian target
722 +build: build-arch build-indep
723 +
724 +common-build: debian/stamp-common-build
725 +debian/stamp-common-build: $(patsubst %,configure-%,$(DEB_ALL_PACKAGES))
726 + dh_testdir
727 + $(internal_invoke) deb-extra-pre-common-build
728 + $(internal_invoke) deb-extra-common-build
729 + touch $@
730 +$(patsubst %,build-%,$(DEB_ALL_PACKAGES)) :: build-% : debian/stamp-build-%
731 +$(patsubst %,debian/stamp-build-%,$(DEB_ALL_PACKAGES)) : debian/stamp-build-% : common-build configure-%
732 + dh_testdir
733 + $(internal_invoke) deb-extra-build-$(patsubst debian/stamp-build-%,%,$@) DEB_CURPACKAGE=$(patsubst debian/stamp-build-%,%,$@)
734 + touch $@
735 +
736 +build-arch: $(patsubst %,build-%,$(DEB_ARCH_PACKAGES))
737 +build-indep: $(patsubst %,build-%,$(DEB_INDEP_PACKAGES))
738 +
739 +# Required Debian target
740 +clean: clean-dh-tests reverse-patches clean-impl
741 +clean-dh-tests:
742 + dh_testdir
743 + dh_testroot
744 +clean-impl:
745 + $(internal_invoke) deb-autotools-clean
746 + $(internal_invoke) deb-extra-clean
747 + for dir in $(DEB_PATCHDIRS); do rm -f $$dir/*.log; done
748 + rm -f debian/stamp-*
749 + dh_clean $(DEB_CLEAN) $(foreach entry,$(DEB_CLEAN_EXCLUDE),$(patsubst %,-X %,$(entry)))
750 +
751 +common-install: debian/stamp-common-install
752 +debian/stamp-common-install: $(patsubst %,build-%,$(DEB_ALL_PACKAGES))
753 + dh_testdir
754 + dh_clean -k
755 + dh_installdirs -A $(DEB_DIRS)
756 + $(internal_invoke) deb-extra-common-install DEB_CURPACKAGE=
757 + touch $@
758 +install-arch: $(patsubst %,install-%,$(DEB_ARCH_PACKAGES))
759 +install-indep: $(patsubst %,install-%,$(DEB_INDEP_PACKAGES))
760 +$(patsubst %,install-%,$(DEB_ALL_PACKAGES)) :: install-% : common-install build-%
761 + dh_testdir
762 + dh_testroot
763 + $(internal_invoke) deb-extra-install-$(patsubst install-%,%,$@) DEB_CURPACKAGE=$(patsubst install-%,%,$@)
764 +
765 +common-binary: debian/stamp-common-binary
766 +debian/stamp-common-binary: $(patsubst %,install-%,$(DEB_ALL_PACKAGES)) common-install
767 + dh_testdir
768 + dh_testroot
769 + dh_installchangelogs $(if $(DEB_KEEP_CHANGELOG_NAME),-k) $(DEB_ALL_CHANGELOG)
770 + touch $@
771 +
772 +# Required Debian targets
773 +binary-indep: common-binary $(patsubst %,binary-%,$(DEB_INDEP_PACKAGES))
774 +binary-arch: common-binary $(patsubst %,binary-%,$(DEB_ARCH_PACKAGES))
775 +
776 +binary-% :: common-binary install-%
777 + dh_testdir
778 + dh_testroot
779 + $(internal_invoke) deb-binary-$(patsubst binary-%,%,$@) DEB_CURPACKAGE=$(patsubst binary-%,%,$@)
780 +
781 +# Required Debian target
782 +binary: binary-indep binary-arch
783 +
784 +.PHONY: pre-build apply-patches reverse-patches post-patches common-configure build common-build build-% build-arch build-indep clean clean-dh-tests clean-impl common-install install-arch install-indep install-% common-binary binary-% binary-indep binary-arch binary deb-common-configure deb-common-build deb-clean deb-common-install deb-strip deb-makeshlibs $(DEB_PHONY_RULES)
785 --- mc-4.6.1.orig/debian/watch
786 +++ mc-4.6.1/debian/watch
787 @@ -0,0 +1,2 @@
788 +version=2
789 +http://pavelsh.pp.ru/mc/ mc-([0-9\-\.pre]+).tar.gz debian uupdate
790 --- mc-4.6.1.orig/debian/changelog
791 +++ mc-4.6.1/debian/changelog
792 @@ -0,0 +1,985 @@
793 +mc (1:4.6.1-7) unstable; urgency=medium
794 +
795 + * Fixed Anton Pak's recode patch which can cause a segfault.
796 + Closes: #382206, #382857, #400927
797 + * Mode display bug fixed. Patch added to 50_utf8-more.patch. Closes: #415097
798 + * Shift-Enter bug fixed. The line editing widget went crazy when seeing a litteral newline
799 + (Shift+enter or Ctrl-q+enter). Patch added to 50_utf8-more.patch
800 + Downloaded from https://svn.uhulinux.hu/packages/dev/mc/patches/
801 +
802 + -- Ludovic Drolez <ldrolez@debian.org> Mon, 2 Apr 2007 8:44:35 +0200
803 +
804 +mc (1:4.6.1-6) unstable; urgency=medium
805 +
806 + * debian/rules modified to fix a FTBFS during the 2nd build. Closes: #384302
807 + * added 05_symcrash.patch to fix a segfault (should be in mc's CVS). Closes: #383341
808 + * mpg123 title view fixed. Closes: #391644
809 +
810 + -- Ludovic Drolez <ldrolez@debian.org> Thu, 24 Aug 2006 22:19:03 +0200
811 +
812 +mc (1:4.6.1-5) unstable; urgency=low
813 +
814 + * Removed the Ctrl-t accelerator from 60_recode.patch. Closes: #380417
815 + * Modified 47_mc.menu.patch to use 'editor' instead of the hardcoded 'vi'
816 + so that mc makes use of /etc/alternatives. Closes: #373144
817 + * .tar view fixed in 01_mc.ext.in.mime.patch. Closes: #381353
818 + * still 68 bugs in the BTS...
819 +
820 + -- Ludovic Drolez <ldrolez@debian.org> Mon, 31 Jul 2006 22:25:47 +0200
821 +
822 +mc (1:4.6.1-4) unstable; urgency=medium
823 +
824 + * added 52_utf8-8bits-slang2.patch. Closes: #359016, #378786
825 + * added 55_mc-utf8-look-and-feel.patch : nicer look and feel
826 + * added 60_recode.patch : a patch to choose the charset from mc
827 + * 77 bugs should still remain after this upload... If you have some time please join
828 + the Debian MC team.
829 +
830 + -- Ludovic Drolez <ldrolez@debian.org> Thu, 12 Jul 2006 20:00:00 +0200
831 +
832 +mc (1:4.6.1-3) unstable; urgency=low
833 +
834 + * Changelog removed. Closes: #317707
835 + * Lowered the alternative priority on 'view' and 'edit'. Closes: #367991
836 + * Patched the UTF8 patch to allow compiling mc without UTF8. Closes: #367187
837 + * html files can be opened with links, w3m or lynx. Closes: #332910
838 + * added 04_off64t.patch to fix problems with tar archives
839 + larger than 2GB. Already added in mc's CVS. Closes: #324755
840 + * in 50_utf8-more.patch added a small patch for a problem in the status
841 + line with UTF-8 locales. Closes: #360427
842 + * 78 bugs should still remain after this upload...
843 +
844 + -- Ludovic Drolez <ldrolez@debian.org> Thu, 22 Jun 2006 16:55:12 +0200
845 +
846 +mc (1:4.6.1-2) unstable; urgency=medium
847 +
848 + * mc with UTF-8 support upload. Closes: #354691, #309398, #126077, #242194
849 + * added Ubuntu UTF-8 patches: 48_utf8-slang2.patch
850 + Many thanks to Leonard den Ottolander and Sebastian Droge
851 + * removed 27_menu-generation.patch because of UTF-8 problems
852 + * convert help and hint files to UTF-8 in the Debian makefile
853 + * 49_64bit.patch: patch to solve some 64bit problems from Gentoo
854 + * use arj instead of unarj. Closes: #340089
855 +
856 + -- Ludovic Drolez <ldrolez@debian.org> Mon, 20 Mar 2006 23:41:40 +0200
857 +
858 +mc (1:4.6.1-1) unstable; urgency=low
859 +
860 + * New upstream release. Closes: #321805, #298345
861 + getgrouplist() is not used anymore. Closes: #313401
862 + * View jpegs with /usr/bin/exif. Closes: #207655
863 + * Handle .ipk like .tgz. Closes: #323927
864 + * Filter for .mo files. Closes: #318077
865 + * Obsolete patches: 07_mc-tar-name-length-fix.patch,
866 + 24_mc-complete-show-all-fix.patch, 33_mc-iconv-error.patch.
867 + * 79 bugs should still remain after this upload...
868 +
869 + -- Ludovic Drolez <ldrolez@debian.org> Mon, 5 Sep 2005 22:02:24 +0200
870 +
871 +mc (1:4.6.0-4.6.1-pre4-2) unstable; urgency=low
872 +
873 + * Build against libslang2-dev. Closes: #315241
874 + * Added 07_mc-tar-name-length-fix.patch. Closes: #315597
875 + * Modified 35_mc.ext.in.patch to improve to deb vfs view. Closes: #198691
876 + * Added 09_de.po.patch to fix some typos in mc's de.po. Closes: #313796, #309957
877 + * Combined 35_mc.ext.in.patch, 04_dpkg_and_apt_vfs.patch, 01_mime.patch,
878 + 41_antiword_mc.ext.patch
879 + to 01_mc.ext.in.mime.patch to fix build problems.
880 +
881 + -- Ludovic Drolez <ldrolez@debian.org> Tue, 21 Jun 2005 20:01:31 +0200
882 +
883 +mc (1:4.6.0-4.6.1-pre4-1) unstable; urgency=low
884 +
885 + * New upstream release. Closes: #309630
886 + 20_german_translation.patch, 23_php.singlequote_fix.patch,
887 + 30_mc-spaceprompt1.patch, 43_AUTHORS.patch, 32_lang-with-env.patch removed
888 + * Build with debian slang1-dev
889 + * Do not remove /etc/mc/mc.ini. Closes: #198954
890 +
891 + -- Ludovic Drolez <ldrolez@debian.org> Wed, 18 May 2005 23:15:05 +0200
892 +
893 +mc (1:4.6.0-4.6.1-pre3-3) unstable; urgency=medium
894 +
895 + * urgency=medium because of 3 important bugs introduced by the last upload.
896 + * removed 46_dotdotdir.patch to fix the tar bug. Closes: #308546
897 + * replaced the iconv patch, 33_mc-iconv-error.patch, with a new
898 + one provided by Roland Illig. Closes: #308296
899 + * added cxx.syntax by copying the old c.syntax to it. Closes: #308794
900 + * removed the useless 44_str_unconst.patch.
901 +
902 + -- Ludovic Drolez <ldrolez@debian.org> Wed, 11 May 2005 22:57:44 +0200
903 +
904 +mc (1:4.6.0-4.6.1-pre3-2) unstable; urgency=medium
905 +
906 + * Urgency set to medium because of LOTS of annoying bugs fixed and
907 + the segfault in mcedit.
908 + * Fixed German po translation with upstream, 20_german_translation.patch.
909 + Closes: #253869
910 + * Added Antiword to view .doc files, 41_antiword_mc.ext.patch
911 + Closes: #305649
912 + * Added menu entry for Debian source packages, 47_mc.menu.diff
913 + Closes: #307344
914 + * Fixed Samba enabling. Closes: #264890
915 + * Fixed Build-Depend on libgpm for GNU/non-Linux. Closes: #226987
916 + * Added colored syntax for man pages by Michelle Konzack,
917 + 13_syntax.patch. Closes: #298322
918 + * Improved shell syntax highlighting by Michelle Konzack: 18_sh_syntax.patch.
919 + Closes: #299210
920 + * Improved php syntax HL with 23_php.singlequote_fix.patch
921 + * Fixed colored syntax highlighting and hostname in the title bar,
922 + 22_main.c.patch
923 + * Fixed tar file system glitch for "tar -cvzlf file.tgz / /home/"
924 + Closes: #89350
925 + * Fixed problems with View and Edit when used with LANG=hu_HU. Closes: #103242
926 + * Fixed unprintable control sequences in PS1 cause broken prompt
927 + Closes: #83447
928 + * Fixed: mcedit: subshell changes directory. Closes: #208867
929 + * Fixed the #utar archive content viewer missing files. Closes: #228934
930 + * Enabled charset conversion feature. Closes: #109956, #167986
931 + * Added new keybinding by Vitja Makarov with 42_keybindings-0.2.2.patch
932 + * Added const_cast to be replaced by str_unconst, 44_str_unconst.patch
933 + by Roland Illig.
934 + * Improved symlink handling in ftpfs (45_ftpfs_symlink*.patch) by P.Tsekov.
935 + * Parent directory's patch by Leonard den Ottolander with 46_dotdotdir.patch
936 + * Fixed user@hostname in the term emulation title bar.
937 + * Added new menu generation patch by Roland Illig
938 + with 27_menu-generation.patch
939 + * Fixed: possible data loss when quota exedeed by Jindrich Novy.
940 + * Fixed uarj bug from Savannah with 29_uarj_bug.patch (Savannah #12406).
941 + * Added patch to view inside udebs by Mantas Kriauciunas, 35_mc.ext.in.patch
942 + (Sannavah #3899)
943 + * Added "space on prompt bugfix" by Jindrich Novy with
944 + 30_mc-spaceprompt1.patch. Closes: #305859
945 + * Added Bad error checking after iconv() call patch by Jindrich Novy with
946 + 33_mc-iconv-error.patch
947 + * Added syntax patches for c vs. cxx with 32_c-vs-cxx.patch
948 + * Added syntax patches for scripts starting with /usr/bin/env with
949 + 32_lang-with-env.patch
950 + * Added a substitute for --enable-maintainer-mode with 36_developer_mode.patch
951 + by Roland Illig.
952 + * Fixed mc core dumps when not find "context default" section in syntax section
953 + with 37_mcedit-segv.patch by Ian Zagorskih.
954 + * Added the ext2 quote fixing hunks by Leonard den Ottolander.
955 + * Added AUTHORS patch, 43_AUTHORS.patch, by Leonard den Ottolander.
956 + * Added mcedit position remember bugfix by Christian Hamar with
957 + 31_mc_filepos_bugfix_461pre4a.patch
958 + * Added fix for End key in viewer by Jindrich Makovicka with 40_view.c.patch
959 + * Added Vietnamese translation with 26_vietnamese_po.patch
960 + * Fixed 11_extfs_missing.patch because of problems with .jar files.
961 + Closes: #299932.
962 + * added zip, unzip, bzip2 to 'Suggests'.
963 +
964 + -- Ludovic Drolez <ldrolez@debian.org> Sun, 6 Mar 2005 12:06:32 +0100
965 +
966 +mc (1:4.6.0-4.6.1-pre3-1) unstable; urgency=high
967 +
968 + * New maintainers: Stefano Melchior and Ludovic Drolez (closes: #282301).
969 + * Urgency set to high because of security bug fixes.
970 + * Missing quoting in ext2 and i18n fix.
971 + * Samba lib warning (netmask.c) fixed by 12_netmask_c.patch.
972 + * Security upload to handle DSA 639 (references: CAN-2004-1004,
973 + CAN-2004-1005, CAN-2004-1009, CAN-2004-1090, CAN-2004-1091, CAN-2004-1092,
974 + CAN-2004-1093, CAN-2004-1174, CAN-2004-1175, CAN-2004-1176),
975 + Fixed upstream in the pre3 release (Closes: #295261).
976 + * Pre3 release includes fix for CAN-2004-0226 (closes: #286395).
977 + * Fixed ftp filesystem impossibility to list dirs when password contains #
978 + (closes: #92121).
979 + * Fixed subshell impossibility to be started (closes: #241891).
980 + * Fixed CAN-2004-0494 (closes: #267596).
981 + * Fixed buffer overflow and format string vulnerabilities (closes: #295259).
982 + * Italian hotkey translation changed (closes: #231071).
983 + * New upstream pre-release.
984 +
985 + -- Ludovic Drolez <ldrolez@debian.org> Mon, 17 Feb 2005 22:45:32 +0100
986 +
987 +mc (1:4.6.0-4.6.1-pre1-3) unstable; urgency=low
988 +
989 + * Polish documentation fix no longer needed.
990 +
991 + -- Adam Byrtek <alpha@debian.org> Wed, 5 May 2004 00:08:26 +0200
992 +
993 +mc (1:4.6.0-4.6.1-pre1-2) unstable; urgency=high
994 +
995 + * Security upload to handle DSA-497-1 (references: CAN-2004-0226,
996 + CAN-2004-0231, CAN-2004-0232). Patch by Jakub Jelinek ported to
997 + 4.6.1-pre1 by Adam Byrtek.
998 +
999 + -- Adam Byrtek <alpha@debian.org> Tue, 4 May 2004 09:28:26 +0200
1000 +
1001 +mc (1:4.6.0-4.6.1-pre1-1) unstable; urgency=high
1002 +
1003 + * Security upload to fix buffer overflow, 4.6.1 final will be there
1004 + soon (closes: #226737).
1005 + * --without-x configure flag removed as mc now libX11 is loaded
1006 + dynamically using gmodule, if possible.
1007 +
1008 + -- Adam Byrtek <alpha@debian.org> Thu, 15 Jan 2004 15:55:52 +0100
1009 +
1010 +mc (1:4.6.0-5) unstable; urgency=low
1011 +
1012 + * Fix segfault when TERM is unset (closes: #191867).
1013 + * Removed conflict with gmc, which works with 4.6.0. Note that gmc
1014 + installation still requires some --force (closes: #192493).
1015 + * Files in /var/log are no longer treated as manpages
1016 + (closes: #179350).
1017 +
1018 + -- Adam Byrtek <alpha@debian.org> Tue, 17 Jun 2003 15:37:05 +0200
1019 +
1020 +mc (1:4.6.0-4) unstable; urgency=low
1021 +
1022 + * Standard `awk' detected first by configure, not the specific
1023 + implmentation (closes: #181972).
1024 + * Polish translation breakage fixed (closes: #183275).
1025 +
1026 + -- Adam Byrtek <alpha@debian.org> Wed, 19 Mar 2003 22:17:16 +0100
1027 +
1028 +mc (1:4.6.0-3) unstable; urgency=low
1029 +
1030 + * `mcview' and `mcedit' added as alternatives for `editor' and `view'
1031 + (closes: #116518).
1032 +
1033 + -- Adam Byrtek <alpha@debian.org> Tue, 11 Feb 2003 22:05:00 +0100
1034 +
1035 +mc (1:4.6.0-2) unstable; urgency=low
1036 +
1037 + * Control field 'Replaces: manpages-pl' added to replace Polish
1038 + manual from this package with official one (closes: #180442).
1039 + * 'Replaces: mc-common' added to make upgrade smoother.
1040 + * 'Conflicts: suidmanager' because mc used to use it, but it is now
1041 + deprecated (closes: #180431).
1042 + * Doesn't depend on libgpm when compiling on HURD.
1043 +
1044 + * README.Debian now mentions -P syntax changes (close: #180551).
1045 +
1046 + -- Adam Byrtek <alpha@debian.org> Tue, 11 Feb 2003 13:55:47 +0100
1047 +
1048 +mc (1:4.6.0-1) unstable; urgency=low
1049 +
1050 + * New upstream release.
1051 + * First 4.6.0 official upload, and package takeover.
1052 +
1053 + -- Adam Byrtek <alpha@debian.org> Wed, 5 Feb 2003 20:34:46 +0100
1054 +
1055 +mc (4.6.0-pre3-1) unstable; urgency=low
1056 +
1057 + * New upstream prerelease.
1058 +
1059 + -- Adam Byrtek <alpha@debian.org> Wed, 22 Jan 2003 09:54:58 +0100
1060 +
1061 +mc (4.6.0-pre2-2) unstable; urgency=low
1062 +
1063 + * Patches checked, unneccesary removed, others reviewed.
1064 +
1065 + -- Adam Byrtek <alpha@debian.org> Wed, 15 Jan 2003 00:35:20 +0100
1066 +
1067 +mc (4.6.0-pre2-1) unstable; urgency=low
1068 +
1069 + * New upstream release (gmc, mc-common packages removed).
1070 + * New maintainer, some cleanups.
1071 + * Menu icon added (credits for the icon go to BigVax, bigvax@mail.ru).
1072 + * New description (taken from freshmeat.net).
1073 +
1074 + -- Adam Byrtek <alpha@debian.org> Sun, 29 Dec 2002 16:18:18 +0100
1075 +
1076 +mc (4.5.55-1.2) unstable; urgency=low
1077 +
1078 + * Non-maintainer upload.
1079 + * Make /etc/CORBA/servers/gmc.gnorba a conffile (closes: #132831).
1080 + * Correct spelling mistakes in descriptions (closes: #124680, #125121).
1081 + * Update convert-metadata.db to deal with libgnome32 linking against db3
1082 + rather than db2, and add a new debconf question prompting the admin to
1083 + run it. I've left the db1->db2 question there temporarily for historical
1084 + and translation interest (closes: #103102).
1085 + * Upgrades from slink need both libdb2-util and libdb3-util. Fortunately,
1086 + they can coexist. I'll leave it up to the maintainers what to do about
1087 + this after the woody release.
1088 +
1089 + -- Colin Watson <cjwatson@debian.org> Sat, 16 Feb 2002 23:09:34 +0000
1090 +
1091 +mc (4.5.55-1.1) unstable; urgency=low
1092 +
1093 + * Non-maintainer upload, with Martin's permission.
1094 + * Build-depend on docbook-utils, not cygnus-stylesheets (closes: #123161).
1095 + * Remove bashism in debian/rules (closes: #126733).
1096 + * Depend on perl rather than on dummy packages (closes: #113208).
1097 +
1098 + -- Colin Watson <cjwatson@debian.org> Tue, 15 Jan 2002 01:20:08 +0000
1099 +
1100 +mc (4.5.55-1) unstable; urgency=low
1101 +
1102 + * New upstream release
1103 + * Enable mouse for Eterm TERM value
1104 + * mc.ext stabilized again upstream, so make it more Debian compliant
1105 + again, closes: #105935, #98827
1106 + * gmc documentation is fixed, closes: #107936
1107 + * Fix german locale, closes: #108302
1108 +
1109 + -- Martin Bialasinski <martinb@debian.org> Sun, 2 Sep 2001 17:07:56 +0200
1110 +
1111 +mc (4.5.54-2) unstable; urgency=low
1112 +
1113 + * Use new config.guess and config.sub to allow compilation on hppa
1114 +
1115 + -- Martin Bialasinski <martinb@debian.org> Fri, 13 Jul 2001 23:47:18 +0200
1116 +
1117 +mc (4.5.54-1) unstable; urgency=low
1118 +
1119 + * New upstream release, closes: #99127
1120 + * make gzip, compress, bzip, bzip2 entries in mc.ext more specific
1121 + closes: #97242, #103800, #102512, #97896, #96649, #104111
1122 + (Oskar Liljeblad)
1123 + * Updated syntax highlighting for debian files, closes: #93228
1124 + (Lenart Janos)
1125 + * Fix regexp for rexx files in mc.ext, closes: #98432 (Michel Casabona)
1126 + * Build fixes for the hurd, closes: #101542, #101543 (Marcus Brinkmann)
1127 + * Danish translation for the debconf template, closes: #100335
1128 + (Jesper R. Meyer)
1129 + * Dutch translation for the debconf template, closes: #95738
1130 + (Thomas J. Zeeman)
1131 + * Spanish translation for the debconf template, closes: #102903
1132 + (Carlos Valdivia Yague)
1133 +
1134 + -- Martin Bialasinski <martinb@debian.org> Sun, 8 Jul 2001 12:19:24 +0200
1135 +
1136 +mc (4.5.51-16) unstable; urgency=low
1137 +
1138 + * Update zu the uzip extfs
1139 +
1140 + -- Martin Bialasinski <martinb@debian.org> Sun, 4 Mar 2001 20:57:25 +0100
1141 +
1142 +mc (4.5.51-15) unstable; urgency=low
1143 +
1144 + * Update uzip extfs, closes: #86913
1145 + * Fix compilation, closes: #87414
1146 +
1147 + -- Martin Bialasinski <martinb@debian.org> Wed, 28 Feb 2001 19:32:44 +0100
1148 +
1149 +mc (4.5.51-14) unstable; urgency=low
1150 +
1151 + * Translations for the gmc debconf template, thanks to
1152 + fr by Thomas Morin, closes: #83765
1153 + sv by Andre Dahlqvist, closes: #83677
1154 +
1155 + -- Martin Bialasinski <martinb@debian.org> Sat, 3 Feb 2001 21:55:27 +0100
1156 +
1157 +mc (4.5.51-13) unstable; urgency=high
1158 +
1159 + * Added libgnorba-dev to the build-depends. It is not pulled in by
1160 + libgnome-dev on the m68k autobuilder, closes: #81200
1161 + * Fixed dependancy on perl (lintian)
1162 + * Fix for devfs in cons.saver, closes: #57557
1163 + * Patch for proxy support in ftpfs from Mandrake
1164 + * [gmc] Disabled checking of owner on file rename as a dirty fix
1165 + closes: #80544
1166 + * [gmc] Don't let the use confirm twice that he wants to exit,
1167 + closes: #48523
1168 + * Updated FAQ to reflect rename of mc mailinglists
1169 + * Fix security bug using quick patch by Andrew V. Samoilov
1170 + see http://www.securityfocus.com/vdb/?id=2016
1171 + * Statoverride adaption
1172 +
1173 + -- Martin Bialasinski <martinb@debian.org> Thu, 11 Jan 2001 20:07:02 +0100
1174 +
1175 +mc (4.5.51-12) unstable; urgency=high
1176 +
1177 + * Added build-depends
1178 + * Recompiled with latest glibc, closes: #74905, #74906, #75134, #77172
1179 + * Added menu hints, closes: #80014, #80038
1180 + * Fix problems with file selection code, closes: #79639
1181 + Thanks to Alexander Viro
1182 +
1183 + -- Martin Bialasinski <martinb@debian.org> Thu, 21 Dec 2000 14:48:35 +0100
1184 +
1185 +mc (4.5.51-11) unstable; urgency=high
1186 +
1187 + * Security fix for cons.saver, bugtraq id 1945
1188 + serious local DoS possibility
1189 +
1190 + -- Martin Bialasinski <martinb@debian.org> Wed, 15 Nov 2000 20:05:20 +0100
1191 +
1192 +mc (4.5.51-10) unstable; urgency=low
1193 +
1194 + * Fix for ftpfs, closes: #61239
1195 +
1196 + -- Martin Bialasinski <martinb@debian.org> Sun, 12 Nov 2000 20:37:50 +0100
1197 +
1198 +mc (4.5.51-9) unstable; urgency=low
1199 +
1200 + * Upstream patch to fix storing on root directory on a ftp server
1201 +
1202 + -- Martin Bialasinski <martinb@debian.org> Wed, 8 Nov 2000 01:01:40 +0100
1203 +
1204 +mc (4.5.51-8) unstable; urgency=low
1205 +
1206 + * Small fix to the .deb entry in mc.ext to make it work with new
1207 + and old tar
1208 + * New uzip extfs by Oskar Liljeblad, closes: #75353
1209 +
1210 + -- Martin Bialasinski <martinb@debian.org> Sat, 4 Nov 2000 00:05:08 +0100
1211 +
1212 +mc (4.5.51-7) unstable; urgency=low
1213 +
1214 + * Quote pathname on C-x p and C-x P, closes: #72632
1215 + Thanks to Lois Lefort (sorry, missed the report somehow)
1216 +
1217 + -- Martin Bialasinski <martinb@debian.org> Sat, 21 Oct 2000 14:50:12 +0200
1218 +
1219 +mc (4.5.51-6) unstable; urgency=low
1220 +
1221 + * Changed F3 view of .deb and .rpm files like done on advanced mc,
1222 + changed dependancies a bit to suit this
1223 + * Correcting small spelling error (#21825 in the GNOME BTS)
1224 + * Make mouse work in rxvt, closes: #74400
1225 +
1226 + -- Martin Bialasinski <martinb@debian.org> Wed, 18 Oct 2000 20:22:45 +0200
1227 +
1228 +mc (4.5.51-5) unstable; urgency=low
1229 +
1230 + * Upstream patch to fix %e behaviour on opening files for edit in gmc
1231 +
1232 + -- Martin Bialasinski <martinb@debian.org> Wed, 4 Oct 2000 22:27:04 +0200
1233 +
1234 +mc (4.5.51-4) unstable; urgency=low
1235 +
1236 + * Fix typo in mc.ext and mc-gnome.ext, thanks to Robert Luberda
1237 + Closes: #71788
1238 +
1239 + -- Martin Bialasinski <martinb@debian.org> Sat, 16 Sep 2000 09:33:57 +0200
1240 +
1241 +mc (4.5.51-3) unstable; urgency=low
1242 +
1243 + * Fix to the patchfs by Loic Lefort, Closes: #71430
1244 + * Fix filelocations in the manpages
1245 + * Add the patchfs to mc.ext, so you can enter a (compressed)
1246 + patch with <RET>
1247 +
1248 + -- Martin Bialasinski <martinb@debian.org> Fri, 15 Sep 2000 00:16:50 +0200
1249 +
1250 +mc (4.5.51-2) unstable; urgency=low
1251 +
1252 + * Fixed some strange problems with the patches, Closes: #69516
1253 +
1254 + -- Martin Bialasinski <martinb@debian.org> Mon, 21 Aug 2000 01:13:21 +0200
1255 +
1256 +mc (4.5.51-1) unstable; urgency=low
1257 +
1258 + * New upstream release, closes: #62261, #64975
1259 + * Fixed description, closes: #62260
1260 + * Moved locales data into mc-common, closes: #67577
1261 + * Move documentation to /usr/share/doc and make a symlink in
1262 + /usr/share/gnome/help
1263 + * Fix gmc doc-base description, closes: #68671
1264 + * Don't install a wrong manpage
1265 +
1266 + -- Martin Bialasinski <martinb@debian.org> Mon, 14 Aug 2000 23:39:48 +0200
1267 +
1268 +mc (4.5.42-16) unstable; urgency=low
1269 +
1270 + * Fix path in doc-base and create a missing symlink
1271 +
1272 + -- Martin Bialasinski <martinb@debian.org> Sun, 26 Mar 2000 22:52:15 +0200
1273 +
1274 +mc (4.5.42-15) unstable; urgency=low
1275 +
1276 + * Fix usage of debconf. Don't issue the warning on new installs
1277 + * Move convert.metadata.db from /usr/lib/mc to /usr/bin
1278 +
1279 + -- Martin Bialasinski <martinb@debian.org> Sun, 26 Mar 2000 14:37:36 +0200
1280 +
1281 +mc (4.5.42-14) unstable; urgency=low
1282 +
1283 + * make convert-metadata.db executable in the postinst
1284 +
1285 + -- Martin Bialasinski <martinb@debian.org> Sun, 19 Mar 2000 23:43:44 +0100
1286 +
1287 +mc (4.5.42-13) unstable; urgency=low
1288 +
1289 + * Changed the undelfs example in mc.sgml and mc.1.in as well
1290 + * Fix build from source bug, closes: #60289
1291 +
1292 + -- Martin Bialasinski <martinb@debian.org> Mon, 13 Mar 2000 18:19:34 +0100
1293 +
1294 +mc (4.5.42-12) unstable; urgency=low
1295 +
1296 + * Fix problem with hex view, roll-over on first position.
1297 + Patch by Loic Lefort
1298 +
1299 + -- Martin Bialasinski <martinb@debian.org> Mon, 13 Mar 2000 12:17:16 +0100
1300 +
1301 +mc (4.5.42-11) frozen unstable; urgency=low
1302 +
1303 + * [gmc] Let the admin know that he must run convert-metadata.db
1304 + via debconf. Closes: #58707
1305 +
1306 + -- Martin Bialasinski <martinb@debian.org> Sun, 12 Mar 2000 20:27:56 +0100
1307 +
1308 +mc (4.5.42-10) frozen unstable; urgency=low
1309 +
1310 + * Fixed documentation bug, closes: #60045
1311 + * Fixed terminfo searchpath in internal slang, closes: #56272
1312 + * [gmc] added dependancy on eject and made some comments in README.Debian,
1313 + closes: #59214
1314 +
1315 + -- Martin Bialasinski <martinb@debian.org> Sun, 12 Mar 2000 01:16:41 +0100
1316 +
1317 +mc (4.5.42-9) frozen unstable; urgency=low
1318 +
1319 + * convert-metadata.db : set gid and egid before setting uid and euid. Doh!
1320 + * Helpfile mentioned non-existing file. Closes: #56053
1321 + * Fix small typo in mc.ext.in, part of #55897
1322 + * Upload with full sources due to the change in the packaging method
1323 +
1324 + -- Martin Bialasinski <martinb@debian.org> Mon, 6 Mar 2000 16:06:37 +0100
1325 +
1326 +mc (4.5.42-8) frozen unstable; urgency=low
1327 +
1328 + * Switched to the Multipatch System the X packages use.
1329 + * Patch from Andrew V. Samoilov, so the display is correct
1330 + when selecting more than 2GB of files, closes: #53980, #58920
1331 + * Added "or" and "and" keywords to perl sytnax file - patch by
1332 + Tomasz Wegrzanowski, closes: #58437
1333 + * Fix german translation, closes: #55401
1334 + partly closes #56117
1335 + * compile with --with-netrc
1336 +
1337 + -- Martin Bialasinski <martinb@debian.org> Wed, 1 Mar 2000 01:50:05 +0100
1338 +
1339 +mc (4.5.42-7) unstable; urgency=low
1340 +
1341 + * Fixes missing esac in mc.menu, thanks to Michel Casabona
1342 + Closes: #54108
1343 +
1344 + -- Martin Bialasinski <martinb@debian.org> Wed, 12 Jan 2000 21:22:47 +0100
1345 +
1346 +mc (4.5.42-6) unstable; urgency=low
1347 +
1348 + * Fixes a y2k bug in the apt and dpkg vfs, closes: #54037
1349 +
1350 + -- Martin Bialasinski <martinb@debian.org> Wed, 5 Jan 2000 17:39:43 +0100
1351 +
1352 +mc (4.5.42-5) unstable; urgency=low
1353 +
1354 + * [gmc] Added dependancy on libdb-util* for convert-metadata.db
1355 +
1356 + -- Martin Bialasinski <martinb@debian.org> Tue, 4 Jan 2000 14:20:05 +0100
1357 +
1358 +mc (4.5.42-4) unstable; urgency=low
1359 +
1360 + * [gmc] Revised patch for the icon handling, closes: #53814
1361 +
1362 + -- Martin Bialasinski <martinb@debian.org> Sat, 1 Jan 2000 17:53:13 +0100
1363 +
1364 +mc (4.5.42-3) unstable; urgency=low
1365 +
1366 + * [gmc] Applied patch for icon misplacement, closes: #51571
1367 + * SEP, closes #52250
1368 + * Fixed lintian warnings about copyright file location
1369 +
1370 + -- Martin Bialasinski <martinb@debian.org> Mon, 27 Dec 1999 18:43:18 +0100
1371 +
1372 +mc (4.5.42-2) unstable; urgency=low
1373 +
1374 + * New version of the apt/dpkg vfs
1375 +
1376 + -- Martin Bialasinski <martinb@debian.org> Mon, 20 Dec 1999 11:18:26 +0100
1377 +
1378 +mc (4.5.42-1) unstable; urgency=low
1379 +
1380 + * New upstream release
1381 + * [gmc] Remove notice how to fix broken desktop icons from postinst
1382 + * enable NLS
1383 +
1384 + -- Martin Bialasinski <martinb@debian.org> Wed, 8 Dec 1999 12:22:13 +0100
1385 +
1386 +mc (4.5.40-8) unstable; urgency=low
1387 +
1388 + * Small fix to the apt and dpkg vfs.
1389 +
1390 + -- Martin Bialasinski <martinb@debian.org> Fri, 3 Dec 1999 18:16:41 +0100
1391 +
1392 +mc (4.5.40-7) unstable; urgency=low
1393 +
1394 + * Really fixes all zip,jar archive problems,
1395 + thanks again to Oskar Liljeblad. Closes: #50528, #51779
1396 + * Amazing new vfs by Piotr Roszatycki <dexter@fnet.pl>, a
1397 + dpkg and apt frontend! See README.Debian for info.
1398 + Closes: #46694
1399 +
1400 + -- Martin Bialasinski <martinb@debian.org> Fri, 3 Dec 1999 00:11:07 +0100
1401 +
1402 +mc (4.5.40-6) unstable; urgency=low
1403 +
1404 + * Fixed problem with ~/.gnome/metadata.db
1405 + libc switch from DB 1.85 to DB 2, so the file has to be recreated.
1406 + Shipping a conversion script as /usr/lib/mc/convert-metadata.db
1407 + Closes: #47115, #46491
1408 + * Don't wait for upstream to include the new Debian logo, Closes: #46502
1409 +
1410 + -- Martin Bialasinski <martinb@debian.org> Tue, 30 Nov 1999 21:24:35 +0100
1411 +
1412 +mc (4.5.40-5) unstable; urgency=low
1413 +
1414 + * Patch for mc.ext by Tomasz Wegrzanowski <maniek@beer.com>
1415 + to use sensible-* Closes: #50210
1416 + * Patch for mc.ext by Oskar Liljeblad <osk@hem.passagen.se>
1417 + to use run-mailcap Closes: #50732
1418 + * Missing closing bracket in uzip.in (thanks to Andreas Wappel),
1419 + fixed the other repored problems. Closes: #48003
1420 + (Also #50528, #50452, but has to be checked)
1421 + * Using a better fix for the tar problem in the deb vfs
1422 +
1423 + -- Martin Bialasinski <martinb@debian.org> Thu, 25 Nov 1999 23:45:20 +0100
1424 +
1425 +mc (4.5.40-4) unstable; urgency=low
1426 +
1427 + * Use mc's own slang, which has some modifications.
1428 + Closes: #47487
1429 + * mc doesn't have a mtools vfs for some time now, closes: #26821
1430 + * Included syntax highlighting definitions for debian/changelog,
1431 + debian/rules, debian/control and sources.list, closes: #47403
1432 + Thanks to Radovan Garabik <garabik@melkor.dnp.fmph.uniba.sk>
1433 +
1434 + -- Martin Bialasinski <martinb@debian.org> Sat, 31 Oct 1999 13:59:54 +0200
1435 +
1436 +mc (4.5.40-3) unstable; urgency=low
1437 +
1438 + * Recompiled with slang 1.3 - Fixes the dreadful
1439 + "right border is not cleaned" and other display bugs.
1440 + Closes: #34315, #40496, #41166, #47328 and part of #47197
1441 +
1442 + -- Martin Bialasinski <martinb@debian.org> Thu, 14 Oct 1999 19:03:32 +0200
1443 +
1444 +mc (4.5.40-2) unstable; urgency=low
1445 +
1446 + * Added conflicts to the versions before mc-common was introduced
1447 +
1448 + -- Martin Bialasinski <martinb@debian.org> Sat, 2 Oct 1999 12:34:06 +0200
1449 +
1450 +mc (4.5.40-1) unstable; urgency=low
1451 +
1452 + * New upstream release
1453 +
1454 + -- Martin Bialasinski <martinb@debian.org> Thu, 30 Sep 1999 00:51:33 +0200
1455 +
1456 +mc (4.5.39-1) unstable; urgency=low
1457 +
1458 + * New upstream version
1459 + * Uploading as a co-maintainer
1460 + * New package setup
1461 + - mc-common, mc and gmc
1462 + - mc and gmc don't conflict anymore
1463 + Closes: #43761
1464 + * Using debhelper, no more fhs problems, closes: #45962
1465 + * Applied fixes for new tar format (without leading ./)
1466 + Closes: #45473, #45432, #45145, #45131, #44965, #45340
1467 + * Suidregister only in the mc package, closes: #45014
1468 + * smbfs was removed before, closes: #45481, #45267, #45339
1469 + * Added xterm-color to the list of color capable TERMs in mc.ini
1470 + * Added note in README about fixing ~/.mc/ini to enable colored mc
1471 + Closes: #26820
1472 + * Added TODO and upstream changelogs to the packages
1473 +
1474 + -- Martin Bialasinski <martinb@debian.org> Tue, 28 Sep 1999 03:09:32 +0200
1475 +
1476 +mc (4.5.38-4) unstable; urgency=low
1477 +
1478 + * add -f to the rm's in debian/rules (Close: #45650)
1479 +
1480 + -- Michael Bramer <grisu@debian.org> Fri, 24 Sep 1999 07:58:57 +0200
1481 +
1482 +mc (4.5.38-3) unstable; urgency=low
1483 +
1484 + * remove mc.real to mc and remove the --with-samba option. I must
1485 + work with the sources.
1486 + Sorry, for the last problems.
1487 +
1488 + -- Michael Bramer <grisu@debian.org> Sun, 19 Sep 1999 14:25:57 +0200
1489 +
1490 +mc (4.5.38-2) unstable; urgency=low
1491 +
1492 + * add .real to mc in /usr/bin/mc
1493 +
1494 + -- Michael Bramer <grisu@debian.org> Wed, 15 Sep 1999 13:23:44 +0200
1495 +
1496 +mc (4.5.38-1) unstable; urgency=low
1497 +
1498 + * add patch from viro@math.psu.edu (Close:#29176)
1499 + * add --with-samba to configure
1500 + * move /usr/bin/mc to /usr/bin/mc.real and add the
1501 + script /usr/bin/mc (Close:#43168)
1502 + * recompiled with slang1-dev 1.2.2-3 (Close:#44359)
1503 + * add link from /usr/bin/mcedit to /usr/bin/mc (Close:#40943)
1504 + * new upstream version
1505 +
1506 + -- Michael Bramer <grisu@debian.org> Tue, 7 Sep 1999 22:34:18 +0200
1507 +
1508 +mc (4.5.37-2) unstable; urgency=low
1509 +
1510 + * rebuild with newer gpm. (now should use /var/run/gpmctl and not
1511 + /dev/gpmctl)
1512 +
1513 + -- Michael Bramer <grisu@debian.org> Wed, 4 Aug 1999 11:41:32 +0200
1514 +
1515 +mc (4.5.37-1) unstable; urgency=low
1516 +
1517 + * new upstream version
1518 +
1519 + -- Michael Bramer <grisu@debian.org> Tue, 3 Aug 1999 22:29:21 +0200
1520 +
1521 +mc (4.5.33-6) unstable; urgency=low
1522 +
1523 + * set auto_save_setup to no in mc.ini
1524 +
1525 + -- Michael Bramer <grisu@debian.org> Sat, 3 Jul 1999 11:32:50 +0200
1526 +
1527 +mc (4.5.33-5) unstable; urgency=low
1528 +
1529 + * add link from /usr/lib/mc/mc.ini to /etc/mc/
1530 +
1531 + -- Michael Bramer <grisu@debian.org> Sat, 3 Jul 1999 09:02:00 +0200
1532 +
1533 +mc (4.5.33-4) unstable; urgency=low
1534 +
1535 + * add 'AWK="awk"' in debian/rules
1536 + * remove /usr/etc/mc (change rules and Makefiles.in's) (close: 37070)
1537 + * remove changelog_intl.gz (close: 36683)
1538 + * remove README.debian (close: 36682)
1539 + * add 'color_terminals=linux,xterm-debian,screen' in debian/addons/mc.ini
1540 + (close: 26820)
1541 + * move /usr/lib/mc/term/ to /urs/doc/mc/ (close: 26022)
1542 +
1543 + -- Michael Bramer <grisu@debian.org> Fri, 2 Jul 1999 14:54:14 +0200
1544 +
1545 +mc (4.5.33-3) unstable; urgency=low
1546 +
1547 + * Add 'Provides: mc' in gmc-package controlfile (close: #35005)
1548 +
1549 + -- Michael Bramer <grisu@debian.org> Tue, 29 Jun 1999 23:52:56 +0200
1550 +
1551 +mc (4.5.33-2) unstable; urgency=low
1552 +
1553 + * now compiled with the installed package e2fslibs-dev (close: 40335)
1554 +
1555 + -- Michael Bramer <grisu@debian.org> Tue, 29 Jun 1999 00:44:50 +0200
1556 +
1557 +mc (4.5.33-1) unstable; urgency=low
1558 +
1559 + * new upstream version
1560 +
1561 + -- Michael Bramer <grisu@debian.org> Wed, 9 Jun 1999 05:02:23 +0200
1562 +
1563 +mc (4.5.30-2) unstable; urgency=low
1564 +
1565 + * Patch from Martin Bialasinski <martin@internet-treff.uni-koeln.de> close:#36246
1566 +
1567 + -- Michael Bramer <grisu@debian.org> Mon, 19 Apr 1999 12:19:25 +0200
1568 +
1569 +mc (4.5.30-1) unstable; urgency=low
1570 +
1571 + * new upstream version
1572 +
1573 + -- Michael Bramer <grisu@debian.org> Wed, 14 Apr 1999 17:41:15 +0200
1574 +
1575 +mc (4.5.25-1) unstable; urgency=low
1576 +
1577 + * change the download source to:
1578 + ftp://ftp.sunsite.org.uk/packages/gnome/sources/mc
1579 + * add --sysconfdir=/etc in the rule file
1580 + * new upstream version (with my patches :-)
1581 +
1582 + -- Michael Bramer <grisu@debian.org> Tue, 16 Mar 1999 13:38:32 +0100
1583 +
1584 +mc (4.5.22-1) unstable; urgency=low
1585 +
1586 + * change ee to eeyes in lib/mc-gnome.ext.in
1587 + * new upstream version
1588 +
1589 + -- Michael Bramer <grisu@debian.org> Thu, 4 Mar 1999 23:47:37 +0100
1590 +
1591 +mc (4.5.21-1) unstable; urgency=low
1592 +
1593 + * remove usr/share/pixmaps/ from mc
1594 + (from the 'first' 4.5.21-1 upload in gnome-staging)
1595 + * remove usr/bin/plain-gmc from mc
1596 + (from the 'first' 4.5.21-1 upload in gnome-staging)
1597 + * add patch from viro@math.psu.edu close:29176
1598 + * new config files: mc.global and mc-gnome.ext
1599 + * add link from /usr/lib/etc/mc.global to /etc/mc/mc.global
1600 + * add links from /usr/lib/mc/* to /etc/mc/
1601 + * new upstream version
1602 + * add a '-f' to -rm gnome/gmc in debian/rule
1603 + * change 'ee' in 'eeyes' in lib/mc-gnome.ext
1604 + * add the conffiles in the gmc-package
1605 +
1606 + -- Michael Bramer <grisu@debian.org> Sat, 27 Feb 1999 00:11:28 +0100
1607 +
1608 +mc (4.5.1-1.1) frozen; urgency=medium
1609 +
1610 + * NMU in behalf of Michael Bramer as he has not got a pure slink system
1611 + * Fixes Bug#33341, priority important (buffer overrun) for slink
1612 +
1613 + -- Martin Bialasinski <martinb@debian.org> Wed, 17 Feb 1999 00:26:48 +0100
1614 +
1615 +mc (4.5.1-1) unstable; urgency=low
1616 +
1617 + * new (beta) version
1618 +
1619 + -- Michael Bramer <grisu@debian.org> Thu, 22 Oct 1998 19:48:42 +0200
1620 +
1621 +mc (4.1.36-1) unstable; urgency=low
1622 +
1623 + * change from +Z to -Z for zsh (close:#26428)
1624 + * add Suggests:rpm (close:#26137)
1625 + * remove /usr/doc/mc/README.edit (close:#26047)
1626 + * add patch from Patrik Rak in deb.in (close:#25838)
1627 + * add link from /usr/lib/mc/mc.ext to /etc/mc/mc.ext (close#25719)
1628 + * New upsteam release
1629 +
1630 + -- Michael Bramer <grisu@debian.org> Thu, 15 Oct 1998 11:41:11 +0200
1631 +
1632 +mc (4.1.35-6) unstable; urgency=low
1633 +
1634 + * don't print debug-code in gnome/*.c (#25587)
1635 + * move usr/doc/mc/changelog_src.gz to usr/doc/mc/changelog.gz
1636 + * Change menue from Apps/Misc to Apps/Tools
1637 +
1638 + -- Michael Bramer <grisu@debian.org> Wed, 26 Aug 1998 10:23:43 +0200
1639 +
1640 +mc (4.1.35-5) unstable; urgency=low
1641 +
1642 + * make the menufiles in the new format
1643 + * change from ee to eeyes for *.jpeg etc. in mc.ext
1644 +
1645 + -- Michael Bramer <grisu@debian.org> Tue, 25 Aug 1998 18:35:11 +0200
1646 +
1647 +mc (4.1.35-4) unstable; urgency=low
1648 +
1649 + * add to debstd the -u option
1650 + * make a new build with gonme0.27 and co.
1651 +
1652 + -- Michael Bramer <grisu@debian.org> Mon, 17 Aug 1998 13:07:11 +0200
1653 +
1654 +mc (4.1.35-3) unstable; urgency=low
1655 +
1656 + * add all changelog-files in /usr/doc/[g]mc
1657 + * make for gmc a /usr/doc/gmc/
1658 + * add a '!' in the first line from mcfn_install.in, now: #!/bin/sh
1659 + * typo in the Description (thanks to joey)
1660 + * don't print debug-code in gdesktop.c (#25587)
1661 +
1662 + -- Michael Bramer <grisu@debian.org> Mon, 10 Aug 1998 23:29:33 +0200
1663 +
1664 +mc (4.1.35-2) unstable; urgency=low
1665 +
1666 + * the multi-package is not nice, but it should work
1667 + * add gmc support in a multi-binary-package
1668 + * new maintainer
1669 +
1670 + -- Michael Bramer <grisu@debian.org> Fri, 31 Jul 1998 13:04:28 +0200
1671 +
1672 +mc (4.1.35-1) frozen unstable; urgency=low
1673 +
1674 + * New upsteam release fixes a bug introduced by last version,
1675 + which made the history input lines stop working. Since this
1676 + is one of the essential useability features of MC which will
1677 + most certainly provoke bug reports this here should still go
1678 + into frozen.
1679 +
1680 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Tue, 26 May 1998 05:00:05 +0100
1681 +
1682 +mc (4.1.34-1) frozen unstable; urgency=low
1683 +
1684 + * New upsteam release really fixes Bug#20727 and some bugs no one
1685 + has even bothered to report until now. :-)
1686 + * Added "--without-gnome" and "--disable-nls" flags to debian/rules.
1687 + The internationalized Gnome version of MC is becoming pretty mature,
1688 + but will not go into frozen, sorry.
1689 +
1690 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Fri, 15 May 1998 21:36:56 +0100
1691 +
1692 +mc (4.1.28-3) frozen unstable; urgency=low
1693 +
1694 + * Rebuild using ss-dev, comerr-dev and e2fslibs-dev closing Bug#21749
1695 +
1696 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Tue, 28 Apr 1998 22:32:15 +0100
1697 +
1698 +mc (4.1.28-2) frozen unstable; urgency=low
1699 +
1700 + * Changed debian/postinst to address and close Bug#20871. I wonder why
1701 + this didn't show up earlier?
1702 +
1703 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Wed, 08 Apr 1998 21:29:51 +0100
1704 +
1705 +mc (4.1.28-1) frozen unstable; urgency=low
1706 +
1707 + * New upstream release.
1708 + * Compiled with ext2undel feature closing Bug#20752.
1709 + * Fixes an upstream bug which made MC crash when trying to copy an
1710 + unreadable file via FTP.
1711 +
1712 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Mon, 06 Apr 1998 17:23:15 +0100
1713 +
1714 +mc (4.1.27-1) unstable; urgency=low
1715 +
1716 + * New upstream release.
1717 +
1718 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Fri, 27 Feb 1998 07:44:29 +0100
1719 +
1720 +mc (4.1.26-1) unstable; urgency=low
1721 +
1722 + * New upstream release.
1723 + * Updated to standards version 2.4.0.0
1724 + * Updated postal address of FSF in copyright file
1725 + * Added manual page for 'mcmfmt'.
1726 + * Adapted control file to place package in section "utils"
1727 + with priority "optional".
1728 +
1729 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Fri, 20 Feb 1998 03:41:38 +0100
1730 +
1731 +mc (4.1.24-1) unstable; urgency=low
1732 +
1733 + * New upstream release version
1734 + * Binary package now smaller because upstream maintainer truncated
1735 + the src/Changelog file which has grown far too large over time. ;-)
1736 + * Changed "Architecture: i386" to "Architecture: any" in control file.
1737 + This addresses and closes bug #17226 as reported by James Troup.
1738 +
1739 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Thu, 22 Jan 1998 18:32:55 +0100
1740 +
1741 +mc (4.1.22-2) unstable; urgency=low
1742 +
1743 + * Adapted debian/changelog to reflect official Debian release history
1744 + * Added debian/menu file from former maintainer
1745 + * Closing supposedly outdated bugs #9868, #14744, #14768, #16050
1746 + and #11968 due to increase of upstream version number.
1747 +
1748 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Fri, 16 Jan 1998 23:41:32 +0100
1749 +
1750 +mc (4.1.22-1) unstable; urgency=low
1751 +
1752 + * New maintainer
1753 + * New upstream version
1754 +
1755 + -- Paul Seelig <pseelig@goofy.zdv.uni-mainz.de> Fri, 16 Jan 1998 17:41:32 +0100
1756 +
1757 +mc (4.1.9-1) unstable; urgency=low
1758 +
1759 + * Upgraded to latest upstream release (Bugs #13145, #14012).
1760 + * Use pristine source.
1761 + * Wrote patch to build with libc6.
1762 + * Orphaned the package (Unfixed since 6 months).
1763 + * Recommends file (Bug #7338).
1764 + * #11864 sould be fixed (libgpmg problem).
1765 + * Depend on login-970616-1 and don't install cons.saver suid root
1766 + (Bug #13440).
1767 + * Corrected debian/rules (make clean shouldn't fail).
1768 +
1769 + -- Vincent Renardias <vincent@waw.com> Mon, 10 Nov 1997 00:05:02 +0100
1770 +
1771 +mc (3.5.17-1) unstable; urgency=low
1772 +
1773 + * Upgraded to latest upstream release
1774 + * Sources converted to new format
1775 +
1776 + -- Fernando Alegre <alegre@debian.org> Mon, 24 Feb 1997 12:56:43 +0100
1777 +
1778 --- mc-4.6.1.orig/debian/slang.c
1779 +++ mc-4.6.1/debian/slang.c
1780 @@ -0,0 +1,19 @@
1781 +#include <stdio.h>
1782 +#include <slang.h>
1783 +
1784 +void main(void)
1785 +{
1786 + SLtt_get_terminfo ();
1787 + SLang_init_tty (-1, 0, 0);
1788 + SLsmg_init_smg ();
1789 +
1790 + /* do stuff .... */
1791 + SLsmg_write_nchars("éàç", 3);
1792 + SLsmg_printf (" éàç ");
1793 + SLsmg_write_char ('à');
1794 + SLsmg_refresh();
1795 + sleep(5);
1796 +
1797 + SLsmg_reset_smg ();
1798 + SLang_reset_tty ();
1799 +}
1800 --- mc-4.6.1.orig/debian/mc.postinst
1801 +++ mc-4.6.1/debian/mc.postinst
1802 @@ -0,0 +1,14 @@
1803 +#! /bin/sh
1804 +
1805 +set -e
1806 +
1807 +case "$1" in
1808 + configure|abort-upgrade)
1809 + update-alternatives --install /usr/bin/view view /usr/bin/mcview-debian 25 \
1810 + --slave /usr/share/man/man1/view.1.gz view.1.gz /usr/share/man/man1/mcview.1.gz
1811 + update-alternatives --install /usr/bin/editor editor /usr/bin/mcedit-debian 25 \
1812 + --slave /usr/share/man/man1/editor.1.gz editor.1.gz /usr/share/man/man1/mcedit.1.gz
1813 + ;;
1814 +esac
1815 +
1816 +#DEBHELPER#
1817 --- mc-4.6.1.orig/debian/manpages
1818 +++ mc-4.6.1/debian/manpages
1819 @@ -0,0 +1,3 @@
1820 +debian/extra/mcmfmt.1
1821 +debian/extra/mcedit-debian.1
1822 +debian/extra/mcview-debian.1
1823 --- mc-4.6.1.orig/debian/mc.postrm
1824 +++ mc-4.6.1/debian/mc.postrm
1825 @@ -0,0 +1,12 @@
1826 +#! /bin/sh
1827 +
1828 +set -e
1829 +
1830 +case "$1" in
1831 + purge)
1832 + rm -f /etc/mc/mc.lib /etc/mc/mc.ext /etc/mc/mc.menu
1833 + rmdir /etc/mc 2>/dev/null || true
1834 + ;;
1835 +esac
1836 +
1837 +#DEBHELPER#
1838 --- mc-4.6.1.orig/debian/README.Debian
1839 +++ mc-4.6.1/debian/README.Debian
1840 @@ -0,0 +1,34 @@
1841 +mc for Debian
1842 +-------------
1843 +
1844 + Debian mc package patches: http://alioth.debian.org/projects/pkg-mc/
1845 +
1846 +
1847 + The 4.6.1-pre3 introduces the charset and samba enabling in the mc package
1848 + compilation.
1849 +
1850 + The current is a pre-release for 4.6.1 where the aim is to include as
1851 + many bug fixes as possible. In particular DSA 639-1 vulnerabilities.
1852 +
1853 + -- Stefano Melchior <stefano.melchior@openlabs.it> Mon, 31 Jan 2005 23:50:45 +0100
1854 +
1855 + Starting with version 4.6.0 Midnight Commander doesn't include any
1856 + GUI interface. The GNOME interface has been removed so that the
1857 + developers could concentrate on the text edition of the program. If
1858 + you need a GUI file manager, there are many of them available in the
1859 + Debian archive - pick one and use it.
1860 +
1861 + Because of some issues a method to stay in the last working directory
1862 + after exit has changed with 4.6.0. See the description of the -P
1863 + option in the Options section of the manual and new wrapper scripts
1864 + in /usr/share/mc/bin/.
1865 +
1866 + If you want to learn some interesting usage tips, you should read the
1867 + Midnight Commander FAQ (/usr/share/doc/mc/FAQ, also available through
1868 + the Debian doc-base interface).
1869 +
1870 + Midnight Commander supports apt and dpkg archive managment through
1871 + it's ExtFS feature. Just "cd #apt" or "cd #dpkg" at the mc command
1872 + line and try it.
1873 +
1874 + -- Adam Byrtek <alpha@debian.org> Wed, 5 Feb 2003 20:34:46 +0100
1875 --- mc-4.6.1.orig/debian/patches/13_syntax.patch
1876 +++ mc-4.6.1/debian/patches/13_syntax.patch
1877 @@ -0,0 +1,13 @@
1878 +--- syntax/Syntax Sun Mar 6 14:11:31 2005
1879 ++++ syntax/Syntax Sun Mar 6 19:00:44 2005
1880 +@@ -41,8 +41,9 @@
1881 + file ..\*\\.(rb|RB)$ Ruby\sProgram ^#!\s\*/.\*/ruby
1882 + include ruby.syntax
1883 +
1884 +-file ..\*\\.(man|[0-9n]|[0-9]x)$ NROFF\sSource
1885 ++file ..\*\\.(man|[0-9n]|[0-9](x|ncurses|ssl|p|pm|menu|form|vga|t|td))$ NROFF\sSource
1886 + include nroff.syntax
1887 ++
1888 +
1889 + file ..\*\\.(htm|html|HTM|HTML)$ HTML\sFile
1890 + include html.syntax
1891 --- mc-4.6.1.orig/debian/patches/48_utf8-slang2.patch
1892 +++ mc-4.6.1/debian/patches/48_utf8-slang2.patch
1893 @@ -0,0 +1,5119 @@
1894 +diff -Naur mc-4.6.1-old/edit/edit.c mc-4.6.1/edit/edit.c
1895 +--- mc-4.6.1-old/edit/edit.c 2005-05-27 16:19:18.000000000 +0200
1896 ++++ mc-4.6.1/edit/edit.c 2005-10-28 10:08:07.736247264 +0200
1897 +@@ -93,7 +93,7 @@
1898 +
1899 + #ifndef NO_INLINE_GETBYTE
1900 +
1901 +-int edit_get_byte (WEdit * edit, long byte_index)
1902 ++mc_wchar_t edit_get_byte (WEdit * edit, long byte_index)
1903 + {
1904 + unsigned long p;
1905 + if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
1906 +@@ -125,7 +125,7 @@
1907 +
1908 + edit->curs1 = 0;
1909 + edit->curs2 = 0;
1910 +- edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE);
1911 ++ edit->buffers2[0] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
1912 + }
1913 +
1914 + /*
1915 +@@ -152,7 +152,7 @@
1916 + }
1917 +
1918 + if (!edit->buffers2[buf2])
1919 +- edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE);
1920 ++ edit->buffers2[buf2] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
1921 +
1922 + mc_read (file,
1923 + (char *) edit->buffers2[buf2] + EDIT_BUF_SIZE -
1924 +@@ -162,7 +162,7 @@
1925 + for (buf = buf2 - 1; buf >= 0; buf--) {
1926 + /* edit->buffers2[0] is already allocated */
1927 + if (!edit->buffers2[buf])
1928 +- edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE);
1929 ++ edit->buffers2[buf] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
1930 + mc_read (file, (char *) edit->buffers2[buf], EDIT_BUF_SIZE);
1931 + }
1932 +
1933 +@@ -242,9 +242,44 @@
1934 + {
1935 + int c;
1936 + long i = 0;
1937 +- while ((c = fgetc (f)) >= 0) {
1938 ++#ifndef UTF8
1939 ++ while ((c = fgetc (f)) != EOF) {
1940 + edit_insert (edit, c);
1941 + i++;
1942 ++#else /* UTF8 */
1943 ++ unsigned char buf[MB_LEN_MAX];
1944 ++ int charpos = 0;
1945 ++ mbstate_t mbs;
1946 ++
1947 ++ while ((c = fgetc (f)) != EOF) {
1948 ++ mc_wchar_t wc;
1949 ++ int size;
1950 ++ int j;
1951 ++
1952 ++ buf[charpos++] = c;
1953 ++
1954 ++ memset (&mbs, 0, sizeof (mbs));
1955 ++ size = mbrtowc(&wc, (char *)buf, charpos, &mbs);
1956 ++
1957 ++ if (size == -2)
1958 ++ continue; /* incomplete */
1959 ++
1960 ++ else if (size >= 0) {
1961 ++ edit_insert (edit, wc);
1962 ++ i++;
1963 ++ charpos = 0;
1964 ++ continue;
1965 ++ }
1966 ++ else {
1967 ++
1968 ++ /* invalid */
1969 ++#ifdef __STDC_ISO_10646__
1970 ++ for (j=0; j<charpos; j++)
1971 ++ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[j]);
1972 ++#endif
1973 ++ charpos = 0;
1974 ++ }
1975 ++#endif /* UTF8 */
1976 + }
1977 + return i;
1978 + }
1979 +@@ -252,9 +287,32 @@
1980 + long edit_write_stream (WEdit * edit, FILE * f)
1981 + {
1982 + long i;
1983 ++#ifndef UTF8
1984 + for (i = 0; i < edit->last_byte; i++)
1985 + if (fputc (edit_get_byte (edit, i), f) < 0)
1986 + break;
1987 ++#else /* UTF8 */
1988 ++ for (i = 0; i < edit->last_byte; i++) {
1989 ++ mc_wchar_t wc = edit_get_byte (edit, i);
1990 ++ int res;
1991 ++ char tmpbuf[MB_LEN_MAX];
1992 ++ mbstate_t mbs;
1993 ++
1994 ++ memset (&mbs, 0, sizeof (mbs));
1995 ++
1996 ++#ifdef __STDC_ISO_10646__
1997 ++ if (wc >= BINARY_CHAR_OFFSET && wc < (BINARY_CHAR_OFFSET + 256)) {
1998 ++ res = 1;
1999 ++ tmpbuf[0] = (char) (wc - BINARY_CHAR_OFFSET);
2000 ++ } else
2001 ++#endif
2002 ++ res = wcrtomb(tmpbuf, wc, &mbs);
2003 ++ if (res > 0) {
2004 ++ if (fwrite(tmpbuf, res, 1, f) != 1)
2005 ++ break;
2006 ++ }
2007 ++ }
2008 ++#endif /* UTF8 */
2009 + return i;
2010 + }
2011 +
2012 +@@ -294,12 +352,46 @@
2013 + int i, file, blocklen;
2014 + long current = edit->curs1;
2015 + unsigned char *buf;
2016 ++#ifdef UTF8
2017 ++ mbstate_t mbs;
2018 ++ int bufstart = 0;
2019 ++
2020 ++ memset (&mbs, 0, sizeof (mbs));
2021 ++#endif /* UTF8 */
2022 + if ((file = mc_open (filename, O_RDONLY | O_BINARY)) == -1)
2023 + return 0;
2024 + buf = g_malloc (TEMP_BUF_LEN);
2025 ++#ifndef UTF8
2026 + while ((blocklen = mc_read (file, (char *) buf, TEMP_BUF_LEN)) > 0) {
2027 + for (i = 0; i < blocklen; i++)
2028 + edit_insert (edit, buf[i]);
2029 ++#else /* UTF8 */
2030 ++ while ((blocklen = mc_read (file, (char *) buf + bufstart, TEMP_BUF_LEN - bufstart)) > 0) {
2031 ++ blocklen += bufstart;
2032 ++ bufstart = 0;
2033 ++ for (i = 0; i < blocklen; ) {
2034 ++ mc_wchar_t wc;
2035 ++ int j;
2036 ++ int size = mbrtowc(&wc, (char *)buf + i, blocklen - i, &mbs);
2037 ++ if (size == -2) { /*incomplete char*/
2038 ++ bufstart = blocklen - i;
2039 ++ memcpy(buf, buf+i, bufstart);
2040 ++ i = blocklen;
2041 ++ memset (&mbs, 0, sizeof (mbs));
2042 ++ }
2043 ++ else if (size <= 0) {
2044 ++#ifdef __STDC_ISO_10646__
2045 ++ edit_insert (edit, BINARY_CHAR_OFFSET + (mc_wchar_t)buf[i]);
2046 ++#endif
2047 ++ memset (&mbs, 0, sizeof (mbs));
2048 ++ i++; /* skip broken char */
2049 ++ }
2050 ++ else {
2051 ++ edit_insert (edit, wc);
2052 ++ i+=size;
2053 ++ }
2054 ++ }
2055 ++#endif /* UTF8 */
2056 + }
2057 + edit_cursor_move (edit, current - edit->curs1);
2058 + g_free (buf);
2059 +@@ -393,7 +485,11 @@
2060 + static int
2061 + edit_load_file (WEdit *edit)
2062 + {
2063 ++#ifndef UTF8
2064 + int fast_load = 1;
2065 ++#else /* UTF8 */
2066 ++ int fast_load = 0; /* can't be used with multibyte characters */
2067 ++#endif /* UTF8 */
2068 +
2069 + /* Cannot do fast load if a filter is used */
2070 + if (edit_find_filter (edit->filename) >= 0)
2071 +@@ -540,7 +636,7 @@
2072 + edit_set_filename (edit, filename);
2073 + edit->stack_size = START_STACK_SIZE;
2074 + edit->stack_size_mask = START_STACK_SIZE - 1;
2075 +- edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (long));
2076 ++ edit->undo_stack = g_malloc ((edit->stack_size + 10) * sizeof (struct action));
2077 + if (edit_load_file (edit)) {
2078 + /* edit_load_file already gives an error message */
2079 + if (to_free)
2080 +@@ -565,7 +661,9 @@
2081 + edit_move_display (edit, line - 1);
2082 + edit_move_to_line (edit, line - 1);
2083 + }
2084 +-
2085 ++#ifdef UTF8
2086 ++ edit->charpoint = 0;
2087 ++#endif
2088 + return edit;
2089 + }
2090 +
2091 +@@ -693,13 +789,23 @@
2092 + {
2093 + unsigned long sp = edit->stack_pointer;
2094 + unsigned long spm1;
2095 +- long *t;
2096 ++
2097 ++ struct action *t;
2098 ++ mc_wchar_t ch = 0;
2099 ++
2100 ++ if (c == CHAR_INSERT || c == CHAR_INSERT_AHEAD) {
2101 ++ va_list ap;
2102 ++ va_start (ap, c);
2103 ++ ch = va_arg (ap, mc_wint_t);
2104 ++ va_end (ap);
2105 ++ }
2106 ++
2107 + /* first enlarge the stack if necessary */
2108 + if (sp > edit->stack_size - 10) { /* say */
2109 + if (option_max_undo < 256)
2110 + option_max_undo = 256;
2111 + if (edit->stack_size < (unsigned long) option_max_undo) {
2112 +- t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (long));
2113 ++ t = g_realloc (edit->undo_stack, (edit->stack_size * 2 + 10) * sizeof (struct action));
2114 + if (t) {
2115 + edit->undo_stack = t;
2116 + edit->stack_size <<= 1;
2117 +@@ -714,7 +820,7 @@
2118 + #ifdef FAST_MOVE_CURSOR
2119 + if (c == CURS_LEFT_LOTS || c == CURS_RIGHT_LOTS) {
2120 + va_list ap;
2121 +- edit->undo_stack[sp] = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
2122 ++ edit->undo_stack[sp].flags = c == CURS_LEFT_LOTS ? CURS_LEFT : CURS_RIGHT;
2123 + edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
2124 + va_start (ap, c);
2125 + c = -(va_arg (ap, int));
2126 +@@ -725,12 +831,14 @@
2127 + && spm1 != edit->stack_bottom
2128 + && ((sp - 2) & edit->stack_size_mask) != edit->stack_bottom) {
2129 + int d;
2130 +- if (edit->undo_stack[spm1] < 0) {
2131 +- d = edit->undo_stack[(sp - 2) & edit->stack_size_mask];
2132 +- if (d == c) {
2133 +- if (edit->undo_stack[spm1] > -1000000000) {
2134 ++ mc_wchar_t d_ch;
2135 ++ if (edit->undo_stack[spm1].flags < 0) {
2136 ++ d = edit->undo_stack[(sp - 2) & edit->stack_size_mask].flags;
2137 ++ d_ch = edit->undo_stack[(sp - 2) & edit->stack_size_mask].ch;
2138 ++ if (d == c && d_ch == ch) {
2139 ++ if (edit->undo_stack[spm1].flags > -1000000000) {
2140 + if (c < KEY_PRESS) /* --> no need to push multiple do-nothings */
2141 +- edit->undo_stack[spm1]--;
2142 ++ edit->undo_stack[spm1].flags--;
2143 + return;
2144 + }
2145 + }
2146 +@@ -738,19 +846,20 @@
2147 + #ifndef NO_STACK_CURSMOVE_ANIHILATION
2148 + else if ((c == CURS_LEFT && d == CURS_RIGHT)
2149 + || (c == CURS_RIGHT && d == CURS_LEFT)) { /* a left then a right anihilate each other */
2150 +- if (edit->undo_stack[spm1] == -2)
2151 ++ if (edit->undo_stack[spm1].flags == -2)
2152 + edit->stack_pointer = spm1;
2153 + else
2154 +- edit->undo_stack[spm1]++;
2155 ++ edit->undo_stack[spm1].flags++;
2156 + return;
2157 + }
2158 + #endif
2159 + } else {
2160 +- d = edit->undo_stack[spm1];
2161 +- if (d == c) {
2162 ++ d = edit->undo_stack[spm1].flags;
2163 ++ d_ch = edit->undo_stack[spm1].ch;
2164 ++ if (d == c && d_ch == ch) {
2165 + if (c >= KEY_PRESS)
2166 + return; /* --> no need to push multiple do-nothings */
2167 +- edit->undo_stack[sp] = -2;
2168 ++ edit->undo_stack[sp].flags = -2;
2169 + goto check_bottom;
2170 + }
2171 + #ifndef NO_STACK_CURSMOVE_ANIHILATION
2172 +@@ -762,7 +871,9 @@
2173 + #endif
2174 + }
2175 + }
2176 +- edit->undo_stack[sp] = c;
2177 ++ edit->undo_stack[sp].flags = c;
2178 ++ edit->undo_stack[sp].ch = ch;
2179 ++
2180 + check_bottom:
2181 +
2182 + edit->stack_pointer = (edit->stack_pointer + 1) & edit->stack_size_mask;
2183 +@@ -775,10 +886,10 @@
2184 + (((unsigned long) c + 1) & edit->stack_size_mask) == edit->stack_bottom)
2185 + do {
2186 + edit->stack_bottom = (edit->stack_bottom + 1) & edit->stack_size_mask;
2187 +- } while (edit->undo_stack[edit->stack_bottom] < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
2188 ++ } while (edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS && edit->stack_bottom != edit->stack_pointer);
2189 +
2190 + /*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: */
2191 +- if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom] < KEY_PRESS)
2192 ++ if (edit->stack_pointer != edit->stack_bottom && edit->undo_stack[edit->stack_bottom].flags < KEY_PRESS)
2193 + edit->stack_bottom = edit->stack_pointer = 0;
2194 + }
2195 +
2196 +@@ -787,30 +898,30 @@
2197 + then the file should be as it was when he loaded up. Then set edit->modified to 0.
2198 + */
2199 + static long
2200 +-pop_action (WEdit * edit)
2201 ++pop_action (WEdit * edit, struct action *c)
2202 + {
2203 +- long c;
2204 + unsigned long sp = edit->stack_pointer;
2205 + if (sp == edit->stack_bottom) {
2206 +- return STACK_BOTTOM;
2207 ++ c->flags = STACK_BOTTOM;
2208 ++ return c->flags;
2209 + }
2210 + sp = (sp - 1) & edit->stack_size_mask;
2211 +- if ((c = edit->undo_stack[sp]) >= 0) {
2212 +-/* edit->undo_stack[sp] = '@'; */
2213 ++ *c = edit->undo_stack[sp];
2214 ++ if (edit->undo_stack[sp].flags >= 0) {
2215 + edit->stack_pointer = (edit->stack_pointer - 1) & edit->stack_size_mask;
2216 +- return c;
2217 ++ return c->flags;
2218 + }
2219 + if (sp == edit->stack_bottom) {
2220 + return STACK_BOTTOM;
2221 + }
2222 +- c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
2223 +- if (edit->undo_stack[sp] == -2) {
2224 +-/* edit->undo_stack[sp] = '@'; */
2225 ++ *c = edit->undo_stack[(sp - 1) & edit->stack_size_mask];
2226 ++
2227 ++ if (edit->undo_stack[sp].flags == -2) {
2228 + edit->stack_pointer = sp;
2229 + } else
2230 +- edit->undo_stack[sp]++;
2231 ++ edit->undo_stack[sp].flags++;
2232 +
2233 +- return c;
2234 ++ return c->flags;
2235 + }
2236 +
2237 + /* is called whenever a modification is made by one of the four routines below */
2238 +@@ -831,7 +942,7 @@
2239 + */
2240 +
2241 + void
2242 +-edit_insert (WEdit *edit, int c)
2243 ++edit_insert (WEdit *edit, mc_wchar_t c)
2244 + {
2245 + /* check if file has grown to large */
2246 + if (edit->last_byte >= SIZE_LIMIT)
2247 +@@ -869,12 +980,11 @@
2248 + /* add a new buffer if we've reached the end of the last one */
2249 + if (!(edit->curs1 & M_EDIT_BUF_SIZE))
2250 + edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] =
2251 +- g_malloc (EDIT_BUF_SIZE);
2252 ++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2253 +
2254 + /* perform the insertion */
2255 +- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->
2256 +- curs1 & M_EDIT_BUF_SIZE]
2257 +- = (unsigned char) c;
2258 ++ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE]
2259 ++ [edit->curs1 & M_EDIT_BUF_SIZE] = c;
2260 +
2261 + /* update file length */
2262 + edit->last_byte++;
2263 +@@ -885,7 +995,7 @@
2264 +
2265 +
2266 + /* same as edit_insert and move left */
2267 +-void edit_insert_ahead (WEdit * edit, int c)
2268 ++void edit_insert_ahead (WEdit * edit, mc_wchar_t c)
2269 + {
2270 + if (edit->last_byte >= SIZE_LIMIT)
2271 + return;
2272 +@@ -908,7 +1018,7 @@
2273 + edit->last_get_rule += (edit->last_get_rule >= edit->curs1);
2274 +
2275 + if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
2276 +- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
2277 ++ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2278 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
2279 +
2280 + edit->last_byte++;
2281 +@@ -918,7 +1028,7 @@
2282 +
2283 + int edit_delete (WEdit * edit)
2284 + {
2285 +- int p;
2286 ++ mc_wint_t p;
2287 + if (!edit->curs2)
2288 + return 0;
2289 +
2290 +@@ -942,7 +1052,7 @@
2291 + edit->total_lines--;
2292 + edit->force |= REDRAW_AFTER_CURSOR;
2293 + }
2294 +- edit_push_action (edit, p + 256);
2295 ++ edit_push_action (edit, CHAR_INSERT_AHEAD, p);
2296 + if (edit->curs1 < edit->start_display) {
2297 + edit->start_display--;
2298 + if (p == '\n')
2299 +@@ -956,7 +1066,7 @@
2300 + static int
2301 + edit_backspace (WEdit * edit)
2302 + {
2303 +- int p;
2304 ++ mc_wint_t p;
2305 + if (!edit->curs1)
2306 + return 0;
2307 +
2308 +@@ -980,7 +1090,7 @@
2309 + edit->total_lines--;
2310 + edit->force |= REDRAW_AFTER_CURSOR;
2311 + }
2312 +- edit_push_action (edit, p);
2313 ++ edit_push_action (edit, CHAR_INSERT, p);
2314 +
2315 + if (edit->curs1 < edit->start_display) {
2316 + edit->start_display--;
2317 +@@ -993,10 +1103,18 @@
2318 +
2319 + #ifdef FAST_MOVE_CURSOR
2320 +
2321 +-static void memqcpy (WEdit * edit, unsigned char *dest, unsigned char *src, int n)
2322 ++static void memqcpy (WEdit * edit, mc_wchar_t *dest, mc_wchar_t *src, int n)
2323 + {
2324 + unsigned long next;
2325 ++#ifndef UTF8
2326 + while ((next = (unsigned long) memccpy (dest, src, '\n', n))) {
2327 ++#else /* UTF8 */
2328 ++ while (n) {
2329 ++ next = 0;
2330 ++ while (next < n && src[next]!='\n') next++;
2331 ++ if (next < n) next++;
2332 ++ wmemcpy (dest, src, next)
2333 ++#endif /* UTF8 */
2334 + edit->curs_line--;
2335 + next -= (unsigned long) dest;
2336 + n -= next;
2337 +@@ -1009,7 +1127,7 @@
2338 + edit_move_backward_lots (WEdit *edit, long increment)
2339 + {
2340 + int r, s, t;
2341 +- unsigned char *p;
2342 ++ mc_wchar_t *p;
2343 +
2344 + if (increment > edit->curs1)
2345 + increment = edit->curs1;
2346 +@@ -1049,7 +1167,7 @@
2347 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
2348 + else
2349 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
2350 +- g_malloc (EDIT_BUF_SIZE);
2351 ++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2352 + } else {
2353 + g_free (p);
2354 + }
2355 +@@ -1087,7 +1205,7 @@
2356 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] = p;
2357 + else
2358 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE] =
2359 +- g_malloc (EDIT_BUF_SIZE);
2360 ++ g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2361 + } else {
2362 + g_free (p);
2363 + }
2364 +@@ -1119,7 +1237,7 @@
2365 +
2366 + c = edit_get_byte (edit, edit->curs1 - 1);
2367 + if (!((edit->curs2 + 1) & M_EDIT_BUF_SIZE))
2368 +- edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
2369 ++ edit->buffers2[(edit->curs2 + 1) >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2370 + edit->buffers2[edit->curs2 >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (edit->curs2 & M_EDIT_BUF_SIZE) - 1] = c;
2371 + edit->curs2++;
2372 + c = edit->buffers1[(edit->curs1 - 1) >> S_EDIT_BUF_SIZE][(edit->curs1 - 1) & M_EDIT_BUF_SIZE];
2373 +@@ -1144,7 +1262,7 @@
2374 +
2375 + c = edit_get_byte (edit, edit->curs1);
2376 + if (!(edit->curs1 & M_EDIT_BUF_SIZE))
2377 +- edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE);
2378 ++ edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE] = g_malloc (EDIT_BUF_SIZE * sizeof(mc_wchar_t));
2379 + edit->buffers1[edit->curs1 >> S_EDIT_BUF_SIZE][edit->curs1 & M_EDIT_BUF_SIZE] = c;
2380 + edit->curs1++;
2381 + c = edit->buffers2[(edit->curs2 - 1) >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - ((edit->curs2 - 1) & M_EDIT_BUF_SIZE) - 1];
2382 +@@ -1251,7 +1369,7 @@
2383 + q = edit->last_byte + 2;
2384 +
2385 + for (col = 0, p = current; p < q; p++) {
2386 +- int c;
2387 ++ mc_wchar_t c;
2388 + if (cols != -10) {
2389 + if (col == cols)
2390 + return p;
2391 +@@ -1269,7 +1387,7 @@
2392 + } else if (c < 32 || c == 127)
2393 + col += 2; /* Caret notation for control characters */
2394 + else
2395 +- col++;
2396 ++ col += wcwidth(c);
2397 + }
2398 + return col;
2399 + }
2400 +@@ -1402,7 +1520,7 @@
2401 + is_blank (WEdit *edit, long offset)
2402 + {
2403 + long s, f;
2404 +- int c;
2405 ++ mc_wchar_t c;
2406 + s = edit_bol (edit, offset);
2407 + f = edit_eol (edit, offset) - 1;
2408 + while (s <= f) {
2409 +@@ -1774,13 +1892,13 @@
2410 + static void
2411 + edit_do_undo (WEdit * edit)
2412 + {
2413 +- long ac;
2414 ++ struct action ac;
2415 + long count = 0;
2416 +
2417 + edit->stack_disable = 1; /* don't record undo's onto undo stack! */
2418 +
2419 +- while ((ac = pop_action (edit)) < KEY_PRESS) {
2420 +- switch ((int) ac) {
2421 ++ while (pop_action (edit, &ac) < KEY_PRESS) {
2422 ++ switch ((int) ac.flags) {
2423 + case STACK_BOTTOM:
2424 + goto done_undo;
2425 + case CURS_RIGHT:
2426 +@@ -1801,31 +1919,33 @@
2427 + case COLUMN_OFF:
2428 + column_highlighting = 0;
2429 + break;
2430 ++ case CHAR_INSERT:
2431 ++ edit_insert (edit, ac.ch);
2432 ++ break;
2433 ++ case CHAR_INSERT_AHEAD:
2434 ++ edit_insert_ahead (edit, ac.ch);
2435 ++ break;
2436 + }
2437 +- if (ac >= 256 && ac < 512)
2438 +- edit_insert_ahead (edit, ac - 256);
2439 +- if (ac >= 0 && ac < 256)
2440 +- edit_insert (edit, ac);
2441 +
2442 +- if (ac >= MARK_1 - 2 && ac < MARK_2 - 2) {
2443 +- edit->mark1 = ac - MARK_1;
2444 ++ if (ac.flags >= MARK_1 - 2 && ac.flags < MARK_2 - 2) {
2445 ++ edit->mark1 = ac.flags - MARK_1;
2446 + edit->column1 = edit_move_forward3 (edit, edit_bol (edit, edit->mark1), 0, edit->mark1);
2447 +- } else if (ac >= MARK_2 - 2 && ac < KEY_PRESS) {
2448 +- edit->mark2 = ac - MARK_2;
2449 ++ } else if (ac.flags >= MARK_2 - 2 && ac.flags < KEY_PRESS) {
2450 ++ edit->mark2 = ac.flags - MARK_2;
2451 + edit->column2 = edit_move_forward3 (edit, edit_bol (edit, edit->mark2), 0, edit->mark2);
2452 + }
2453 + if (count++)
2454 + edit->force |= REDRAW_PAGE; /* more than one pop usually means something big */
2455 + }
2456 +
2457 +- if (edit->start_display > ac - KEY_PRESS) {
2458 +- edit->start_line -= edit_count_lines (edit, ac - KEY_PRESS, edit->start_display);
2459 ++ if (edit->start_display > ac.flags - KEY_PRESS) {
2460 ++ edit->start_line -= edit_count_lines (edit, ac.flags - KEY_PRESS, edit->start_display);
2461 + edit->force |= REDRAW_PAGE;
2462 +- } else if (edit->start_display < ac - KEY_PRESS) {
2463 +- edit->start_line += edit_count_lines (edit, edit->start_display, ac - KEY_PRESS);
2464 ++ } else if (edit->start_display < ac.flags - KEY_PRESS) {
2465 ++ edit->start_line += edit_count_lines (edit, edit->start_display, ac.flags - KEY_PRESS);
2466 + edit->force |= REDRAW_PAGE;
2467 + }
2468 +- edit->start_display = ac - KEY_PRESS; /* see push and pop above */
2469 ++ edit->start_display = ac.flags - KEY_PRESS; /* see push and pop above */
2470 + edit_update_curs_row (edit);
2471 +
2472 + done_undo:;
2473 +@@ -2102,7 +2222,7 @@
2474 + * passed as -1. Commands are executed, and char_for_insertion is
2475 + * inserted at the cursor.
2476 + */
2477 +-void edit_execute_key_command (WEdit *edit, int command, int char_for_insertion)
2478 ++void edit_execute_key_command (WEdit *edit, int command, mc_wint_t char_for_insertion)
2479 + {
2480 + if (command == CK_Begin_Record_Macro) {
2481 + edit->macro_i = 0;
2482 +@@ -2137,7 +2257,7 @@
2483 + all of them. It also does not check for the Undo command.
2484 + */
2485 + void
2486 +-edit_execute_cmd (WEdit *edit, int command, int char_for_insertion)
2487 ++edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion)
2488 + {
2489 + edit->force |= REDRAW_LINE;
2490 +
2491 +@@ -2170,7 +2290,7 @@
2492 + }
2493 +
2494 + /* An ordinary key press */
2495 +- if (char_for_insertion >= 0) {
2496 ++ if (char_for_insertion != (mc_wint_t) -1) {
2497 + if (edit->overwrite) {
2498 + if (edit_get_byte (edit, edit->curs1) != '\n')
2499 + edit_delete (edit);
2500 +diff -Naur mc-4.6.1-old/edit/editcmd.c mc-4.6.1/edit/editcmd.c
2501 +--- mc-4.6.1-old/edit/editcmd.c 2005-05-27 16:19:18.000000000 +0200
2502 ++++ mc-4.6.1/edit/editcmd.c 2005-10-28 10:08:07.687254712 +0200
2503 +@@ -46,7 +46,7 @@
2504 + #define edit_get_save_file(f,h) input_expand_dialog (h, _(" Enter file name: "), f)
2505 +
2506 + struct selection {
2507 +- unsigned char * text;
2508 ++ mc_wchar_t *text;
2509 + int len;
2510 + };
2511 +
2512 +@@ -69,12 +69,16 @@
2513 + #define MAX_REPL_LEN 1024
2514 +
2515 + static int edit_save_cmd (WEdit *edit);
2516 +-static unsigned char *edit_get_block (WEdit *edit, long start,
2517 ++static mc_wchar_t *edit_get_block (WEdit *edit, long start,
2518 + long finish, int *l);
2519 +
2520 +-static inline int my_lower_case (int c)
2521 ++static inline mc_wchar_t my_lower_case (mc_wchar_t c)
2522 + {
2523 ++#ifndef UTF8
2524 + return tolower(c & 0xFF);
2525 ++#else
2526 ++ return towlower(c);
2527 ++#endif
2528 + }
2529 +
2530 + static const char *strcasechr (const unsigned char *s, int c)
2531 +@@ -108,11 +112,11 @@
2532 + #endif /* !HAVE_MEMMOVE */
2533 +
2534 + /* #define itoa MY_itoa <---- this line is now in edit.h */
2535 +-static char *
2536 ++static mc_wchar_t *
2537 + MY_itoa (int i)
2538 + {
2539 +- static char t[14];
2540 +- char *s = t + 13;
2541 ++ static mc_wchar_t t[14];
2542 ++ mc_wchar_t *s = t + 13;
2543 + int j = i;
2544 + *s-- = 0;
2545 + do {
2546 +@@ -196,6 +200,48 @@
2547 + doupdate();
2548 + }
2549 +
2550 ++#ifdef UTF8
2551 ++
2552 ++static size_t
2553 ++wchar_write(int fd, mc_wchar_t *buf, size_t len)
2554 ++{
2555 ++ char *tmpbuf = g_malloc(len + MB_LEN_MAX);
2556 ++ mbstate_t mbs;
2557 ++ size_t i;
2558 ++ size_t outlen = 0;
2559 ++ size_t res;
2560 ++
2561 ++ for (i = 0; i < len; i++) {
2562 ++ if (outlen >= len) {
2563 ++ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
2564 ++ g_free(tmpbuf);
2565 ++ return -1;
2566 ++ }
2567 ++ outlen = 0;
2568 ++ }
2569 ++ memset (&mbs, 0, sizeof (mbs));
2570 ++#ifdef __STDC_ISO_10646__
2571 ++ if (buf[i] >= BINARY_CHAR_OFFSET && buf[i] < (BINARY_CHAR_OFFSET + 256)) {
2572 ++ res = 1;
2573 ++ tmpbuf[outlen] = (char) (buf[i] - BINARY_CHAR_OFFSET);
2574 ++
2575 ++ } else
2576 ++#endif
2577 ++ res = wcrtomb(tmpbuf + outlen, buf[i], &mbs);
2578 ++ if (res > 0) {
2579 ++ outlen += res;
2580 ++ }
2581 ++ }
2582 ++ if ((res = mc_write(fd, tmpbuf, outlen)) != outlen) {
2583 ++ g_free(tmpbuf);
2584 ++ return -1;
2585 ++ }
2586 ++ g_free(tmpbuf);
2587 ++ return len;
2588 ++}
2589 ++
2590 ++#endif /* UTF8 */
2591 ++
2592 + /* If 0 (quick save) then a) create/truncate <filename> file,
2593 + b) save to <filename>;
2594 + if 1 (safe save) then a) save to <tempnam>,
2595 +@@ -303,32 +349,48 @@
2596 + buf = 0;
2597 + filelen = edit->last_byte;
2598 + while (buf <= (edit->curs1 >> S_EDIT_BUF_SIZE) - 1) {
2599 ++#ifndef UTF8
2600 + if (mc_write (fd, (char *) edit->buffers1[buf], EDIT_BUF_SIZE)
2601 ++#else /* UTF8 */
2602 ++ if (wchar_write (fd, edit->buffers1[buf], EDIT_BUF_SIZE)
2603 ++#endif /* UTF8 */
2604 + != EDIT_BUF_SIZE) {
2605 + mc_close (fd);
2606 + goto error_save;
2607 + }
2608 + buf++;
2609 + }
2610 ++#ifndef UTF8
2611 + if (mc_write
2612 + (fd, (char *) edit->buffers1[buf],
2613 ++#else /* UTF8 */
2614 ++ if (wchar_write
2615 ++ (fd, edit->buffers1[buf],
2616 ++#endif /* UTF8 */
2617 + edit->curs1 & M_EDIT_BUF_SIZE) !=
2618 + (edit->curs1 & M_EDIT_BUF_SIZE)) {
2619 + filelen = -1;
2620 + } else if (edit->curs2) {
2621 + edit->curs2--;
2622 + buf = (edit->curs2 >> S_EDIT_BUF_SIZE);
2623 +- if (mc_write
2624 +- (fd,
2625 +- (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
2626 ++#ifndef UTF8
2627 ++ if (mc_write(fd, (char *) edit->buffers2[buf] + EDIT_BUF_SIZE -
2628 ++#else /* UTF8 */
2629 ++ if (wchar_write(fd, edit->buffers2[buf] + EDIT_BUF_SIZE -
2630 ++#endif /* UTF8 */
2631 + (edit->curs2 & M_EDIT_BUF_SIZE) - 1,
2632 + 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) !=
2633 + 1 + (edit->curs2 & M_EDIT_BUF_SIZE)) {
2634 + filelen = -1;
2635 + } else {
2636 + while (--buf >= 0) {
2637 ++#ifndef UTF8
2638 + if (mc_write
2639 + (fd, (char *) edit->buffers2[buf],
2640 ++#else /* UTF8 */
2641 ++ if (wchar_write
2642 ++ (fd, edit->buffers2[buf],
2643 ++#endif /* UTF8 */
2644 + EDIT_BUF_SIZE) != EDIT_BUF_SIZE) {
2645 + filelen = -1;
2646 + break;
2647 +@@ -643,13 +705,21 @@
2648 + if (!n || n == EOF)
2649 + break;
2650 + n = 0;
2651 ++#ifndef UTF8
2652 + while (fscanf (f, "%hd %hd, ", &macro[n].command, &macro[n].ch))
2653 ++#else /* UTF8 */
2654 ++ while (fscanf (f, "%hd %lu, ", &macro[n].command, &macro[n].ch))
2655 ++#endif /* UTF8 */
2656 + n++;
2657 + fscanf (f, ";\n");
2658 + if (s != k) {
2659 + fprintf (g, ("key '%d 0': "), s);
2660 + for (i = 0; i < n; i++)
2661 ++#ifndef UTF8
2662 + fprintf (g, "%hd %hd, ", macro[i].command, macro[i].ch);
2663 ++#else /* UTF8 */
2664 ++ fprintf (g, "%hd %lu, ", macro[i].command, macro[i].ch);
2665 ++#endif /* UTF8 */
2666 + fprintf (g, ";\n");
2667 + }
2668 + }
2669 +@@ -685,7 +755,11 @@
2670 + if (f) {
2671 + fprintf (f, ("key '%d 0': "), s);
2672 + for (i = 0; i < n; i++)
2673 ++#ifndef UTF8
2674 + fprintf (f, "%hd %hd, ", macro[i].command, macro[i].ch);
2675 ++#else /* UTF8 */
2676 ++ fprintf (f, "%hd %lu, ", macro[i].command, macro[i].ch);
2677 ++#endif /* UTF8 */
2678 + fprintf (f, ";\n");
2679 + fclose (f);
2680 + if (saved_macros_loaded) {
2681 +@@ -734,10 +808,18 @@
2682 + saved_macro[i++] = s;
2683 + if (!found) {
2684 + *n = 0;
2685 ++#ifndef UTF8
2686 + while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %hd, ", &macro[*n].command, &macro[*n].ch))
2687 ++#else /* UTF8 */
2688 ++ while (*n < MAX_MACRO_LENGTH && 2 == fscanf (f, "%hd %lu, ", &macro[*n].command, &macro[*n].ch))
2689 ++#endif /* UTF8 */
2690 + (*n)++;
2691 + } else {
2692 ++#ifndef UTF8
2693 + while (2 == fscanf (f, "%hd %hd, ", &dummy.command, &dummy.ch));
2694 ++#else /* UTF8 */
2695 ++ while (2 == fscanf (f, "%hd %lu, ", &dummy.command, &dummy.ch));
2696 ++#endif /* UTF8 */
2697 + }
2698 + fscanf (f, ";\n");
2699 + if (s == k)
2700 +@@ -886,7 +968,7 @@
2701 + #define space_width 1
2702 +
2703 + static void
2704 +-edit_insert_column_of_text (WEdit * edit, unsigned char *data, int size, int width)
2705 ++edit_insert_column_of_text (WEdit * edit, mc_wchar_t *data, int size, int width)
2706 + {
2707 + long cursor;
2708 + int i, col;
2709 +@@ -934,7 +1016,7 @@
2710 + {
2711 + long start_mark, end_mark, current = edit->curs1;
2712 + int size, x;
2713 +- unsigned char *copy_buf;
2714 ++ mc_wchar_t *copy_buf;
2715 +
2716 + edit_update_curs_col (edit);
2717 + x = edit->curs_col;
2718 +@@ -979,7 +1061,7 @@
2719 + {
2720 + long count;
2721 + long current;
2722 +- unsigned char *copy_buf;
2723 ++ mc_wchar_t *copy_buf;
2724 + long start_mark, end_mark;
2725 + int deleted = 0;
2726 + int x = 0;
2727 +@@ -1040,7 +1122,7 @@
2728 + edit_push_action (edit, COLUMN_ON);
2729 + column_highlighting = 0;
2730 + } else {
2731 +- copy_buf = g_malloc (end_mark - start_mark);
2732 ++ copy_buf = g_malloc ((end_mark - start_mark) * sizeof(mc_wchar_t));
2733 + edit_cursor_move (edit, start_mark - edit->curs1);
2734 + edit_scroll_screen_over_cursor (edit);
2735 + count = start_mark;
2736 +@@ -1371,7 +1453,11 @@
2737 + /* This function is a modification of mc-3.2.10/src/view.c:regexp_view_search() */
2738 + /* returns -3 on error in pattern, -1 on not found, found_len = 0 if either */
2739 + static int
2740 ++#ifndef UTF8
2741 + string_regexp_search (char *pattern, char *string, int len, int match_type,
2742 ++#else /* UTF8 */
2743 ++string_regexp_search (char *pattern, mc_wchar_t *wstring, int match_type,
2744 ++#endif /* UTF8 */
2745 + int match_bol, int icase, int *found_len, void *d)
2746 + {
2747 + static regex_t r;
2748 +@@ -1380,6 +1466,11 @@
2749 + regmatch_t *pmatch;
2750 + static regmatch_t s[1];
2751 +
2752 ++#ifdef UTF8
2753 ++ char *string;
2754 ++ int i;
2755 ++#endif /* UTF8 */
2756 ++
2757 + pmatch = (regmatch_t *) d;
2758 + if (!pmatch)
2759 + pmatch = s;
2760 +@@ -1399,13 +1490,51 @@
2761 + old_type = match_type;
2762 + old_icase = icase;
2763 + }
2764 ++
2765 ++#ifdef UTF8
2766 ++ string = wchar_to_mbstr(wstring);
2767 ++ if (string == NULL)
2768 ++ return -1;
2769 ++#endif /* UTF8 */
2770 ++
2771 + if (regexec
2772 + (&r, string, d ? NUM_REPL_ARGS : 1, pmatch,
2773 + ((match_bol
2774 + || match_type != match_normal) ? 0 : REG_NOTBOL)) != 0) {
2775 + *found_len = 0;
2776 ++
2777 ++#ifdef UTF8
2778 ++ g_free(string);
2779 ++#endif /* UTF8 */
2780 ++
2781 + return -1;
2782 + }
2783 ++
2784 ++#ifdef UTF8
2785 ++ for (i = 0; i < (d ? NUM_REPL_ARGS : 1); i++) {
2786 ++ char tmp;
2787 ++ int new_o;
2788 ++
2789 ++ if (pmatch[i].rm_so < 0)
2790 ++ continue;
2791 ++ tmp = string[pmatch[i].rm_so];
2792 ++ string[pmatch[i].rm_so] = 0;
2793 ++ new_o = mbstrlen(string);
2794 ++ string[pmatch[i].rm_so] = tmp;
2795 ++ pmatch[i].rm_so = new_o;
2796 ++
2797 ++ if (pmatch[i].rm_eo < 0)
2798 ++ continue;
2799 ++ tmp = string[pmatch[i].rm_eo];
2800 ++ string[pmatch[i].rm_eo] = 0;
2801 ++ new_o = mbstrlen(string);
2802 ++ string[pmatch[i].rm_eo] = tmp;
2803 ++ pmatch[i].rm_eo = new_o;
2804 ++ }
2805 ++
2806 ++ g_free(string);
2807 ++#endif /* UTF8 */
2808 ++
2809 + *found_len = pmatch[0].rm_eo - pmatch[0].rm_so;
2810 + return (pmatch[0].rm_so);
2811 + }
2812 +@@ -1413,13 +1542,29 @@
2813 + /* thanks to Liviu Daia <daia@stoilow.imar.ro> for getting this
2814 + (and the above) routines to work properly - paul */
2815 +
2816 ++#ifndef UTF8
2817 + typedef int (*edit_getbyte_fn) (WEdit *, long);
2818 ++#else /* UTF8 */
2819 ++typedef mc_wchar_t (*edit_getbyte_fn) (WEdit *, long);
2820 ++#endif /* UTF8 */
2821 +
2822 + static long
2823 ++#ifndef UTF8
2824 + 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)
2825 ++#else /* UTF8 */
2826 ++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)
2827 ++#endif /* UTF8 */
2828 + {
2829 + long p, q = 0;
2830 +- long l = strlen ((char *) exp), f = 0;
2831 ++ long f = 0;
2832 ++
2833 ++#ifndef UTF8
2834 ++ long l = strlen ((char *) exp);
2835 ++#else /* UTF8 */
2836 ++ mc_wchar_t *exp = mbstr_to_wchar((char *)exp_mb);
2837 ++ mc_wchar_t *exp_backup = exp;
2838 ++ long l = wcslen(exp);
2839 ++#endif /* UTF8 */
2840 + int n = 0;
2841 +
2842 + for (p = 0; p < l; p++) /* count conversions... */
2843 +@@ -1428,19 +1573,22 @@
2844 + n++;
2845 +
2846 + if (replace_scanf || replace_regexp) {
2847 +- int c;
2848 +- unsigned char *buf;
2849 +- unsigned char mbuf[MAX_REPL_LEN * 2 + 3];
2850 ++ mc_wint_t c;
2851 ++ mc_wchar_t *buf;
2852 ++ mc_wchar_t mbuf[MAX_REPL_LEN * 2 + 3];
2853 +
2854 + replace_scanf = (!replace_regexp); /* can't have both */
2855 +
2856 + buf = mbuf;
2857 +
2858 + if (replace_scanf) {
2859 +- unsigned char e[MAX_REPL_LEN];
2860 +- if (n >= NUM_REPL_ARGS)
2861 +- return -3;
2862 +-
2863 ++ mc_wchar_t e[MAX_REPL_LEN];
2864 ++ if (n >= NUM_REPL_ARGS) {
2865 ++#ifdef UTF8
2866 ++ g_free(exp_backup);
2867 ++#endif /* UTF8 */
2868 ++ return -3;
2869 ++ }
2870 + if (replace_case) {
2871 + for (p = start; p < last_byte && p < start + MAX_REPL_LEN; p++)
2872 + buf[p - start] = (*get_byte) (data, p);
2873 +@@ -1454,20 +1602,36 @@
2874 + }
2875 +
2876 + buf[(q = p - start)] = 0;
2877 ++#ifndef UTF8
2878 + strcpy ((char *) e, (char *) exp);
2879 + strcat ((char *) e, "%n");
2880 ++#else /* UTF8 */
2881 ++ wcscpy (e, exp);
2882 ++ wcscat (e, L"%n");
2883 ++#endif /* UTF8 */
2884 + exp = e;
2885 +
2886 + while (q) {
2887 + *((int *) sargs[n]) = 0; /* --> here was the problem - now fixed: good */
2888 ++#ifndef UTF8
2889 + if (n == sscanf ((char *) buf, (char *) exp, SCANF_ARGS)) {
2890 ++#else /* UTF8 */
2891 ++ if (n == swscanf (buf, exp, SCANF_ARGS)) {
2892 ++#endif /* UTF8 */
2893 + if (*((int *) sargs[n])) {
2894 + *len = *((int *) sargs[n]);
2895 ++#ifdef UTF8
2896 ++ g_free(exp_backup);
2897 ++#endif /* UTF8 */
2898 + return start;
2899 + }
2900 + }
2901 +- if (once_only)
2902 ++ if (once_only) {
2903 ++#ifdef UTF8
2904 ++ g_free(exp_backup);
2905 ++#endif /* UTF8 */
2906 + return -2;
2907 ++ }
2908 + if (q + start < last_byte) {
2909 + if (replace_case) {
2910 + buf[q] = (*get_byte) (data, q + start);
2911 +@@ -1481,7 +1645,11 @@
2912 + start++;
2913 + buf++; /* move the window along */
2914 + if (buf == mbuf + MAX_REPL_LEN) { /* the window is about to go past the end of array, so... */
2915 ++#ifndef UTF8
2916 + memmove (mbuf, buf, strlen ((char *) buf) + 1); /* reset it */
2917 ++#else /* UTF8 */
2918 ++ wmemmove (mbuf, buf, (wcslen (buf) + 1)); /* reset it */
2919 ++#endif /* UTF8 */
2920 + buf = mbuf;
2921 + }
2922 + q--;
2923 +@@ -1507,10 +1675,17 @@
2924 +
2925 + buf = mbuf;
2926 + while (q) {
2927 ++#ifndef UTF8
2928 + found_start = string_regexp_search ((char *) exp, (char *) buf, q, match_normal, match_bol, !replace_case, len, d);
2929 ++#else /* UTF8 */
2930 ++ found_start = string_regexp_search ((char *) exp_mb, buf, match_normal, match_bol, !replace_case, len, d);
2931 ++#endif /* UTF8 */
2932 +
2933 + if (found_start <= -2) { /* regcomp/regexec error */
2934 + *len = 0;
2935 ++#ifdef UTF8
2936 ++ g_free (exp_backup);
2937 ++#endif /* UTF8 */
2938 + return -3;
2939 + }
2940 + else if (found_start == -1) /* not found: try next line */
2941 +@@ -1521,15 +1696,27 @@
2942 + match_bol = 0;
2943 + continue;
2944 + }
2945 +- else /* found */
2946 ++ else { /* found */
2947 ++#ifdef UTF8
2948 ++ g_free(exp_backup);
2949 ++#endif /* UTF8 */
2950 + return (start + offset - q + found_start);
2951 ++ }
2952 + }
2953 +- if (once_only)
2954 ++ if (once_only) {
2955 ++#ifdef UTF8
2956 ++ g_free(exp_backup);
2957 ++#endif /* UTF8 */
2958 + return -2;
2959 ++ }
2960 +
2961 + if (buf[q - 1] != '\n') { /* incomplete line: try to recover */
2962 + buf = mbuf + MAX_REPL_LEN / 2;
2963 ++#ifndef UTF8
2964 + q = strlen ((const char *) buf);
2965 ++#else /* UTF8 */
2966 ++ q = wcslen (buf);
2967 ++#endif /* UTF8 */
2968 + memmove (mbuf, buf, q);
2969 + p = start + q;
2970 + move_win = 1;
2971 +@@ -1539,36 +1726,59 @@
2972 + }
2973 + }
2974 + } else {
2975 ++#ifndef UTF8
2976 + *len = strlen ((const char *) exp);
2977 ++#else /* UTF8 */
2978 ++ *len = wcslen (exp);
2979 ++#endif /* UTF8 */
2980 + if (replace_case) {
2981 + for (p = start; p <= last_byte - l; p++) {
2982 +- if ((*get_byte) (data, p) == (unsigned char)exp[0]) { /* check if first char matches */
2983 ++ if ((*get_byte) (data, p) == exp[0]) { /* check if first char matches */
2984 + for (f = 0, q = 0; q < l && f < 1; q++)
2985 +- if ((*get_byte) (data, q + p) != (unsigned char)exp[q])
2986 ++ if ((*get_byte) (data, q + p) != exp[q])
2987 + f = 1;
2988 +- if (f == 0)
2989 ++ if (f == 0) {
2990 ++#ifdef UTF8
2991 ++ g_free (exp_backup);
2992 ++#endif /* UTF8 */
2993 + return p;
2994 ++ }
2995 + }
2996 +- if (once_only)
2997 ++ if (once_only) {
2998 ++#ifdef UTF8
2999 ++ g_free(exp_backup);
3000 ++#endif /* UTF8 */
3001 + return -2;
3002 ++ }
3003 + }
3004 + } else {
3005 + for (p = 0; exp[p] != 0; p++)
3006 + exp[p] = my_lower_case (exp[p]);
3007 +
3008 + for (p = start; p <= last_byte - l; p++) {
3009 +- if (my_lower_case ((*get_byte) (data, p)) == (unsigned char)exp[0]) {
3010 ++ if (my_lower_case ((*get_byte) (data, p)) == exp[0]) {
3011 + for (f = 0, q = 0; q < l && f < 1; q++)
3012 +- if (my_lower_case ((*get_byte) (data, q + p)) != (unsigned char)exp[q])
3013 ++ if (my_lower_case ((*get_byte) (data, q + p)) != exp[q])
3014 + f = 1;
3015 +- if (f == 0)
3016 ++ if (f == 0) {
3017 ++#ifdef UTF8
3018 ++ g_free (exp_backup);
3019 ++#endif /* UTF8 */
3020 + return p;
3021 ++ }
3022 + }
3023 +- if (once_only)
3024 ++ if (once_only) {
3025 ++#ifdef UTF8
3026 ++ g_free (exp_backup);
3027 ++#endif /* UTF8 */
3028 + return -2;
3029 ++ }
3030 + }
3031 + }
3032 + }
3033 ++#ifdef UTF8
3034 ++ g_free (exp_backup);
3035 ++#endif /* UTF8 */
3036 + return -2;
3037 + }
3038 +
3039 +@@ -1582,9 +1792,14 @@
3040 +
3041 + while ((p = edit_find_string (p, exp, len, last_byte, get_byte, data, once_only, d)) >= 0) {
3042 + if (replace_whole) {
3043 ++#ifndef UTF8
3044 + /*If the bordering chars are not in option_whole_chars_search then word is whole */
3045 + if (!strcasechr (option_whole_chars_search, (*get_byte) (data, p - 1))
3046 + && !strcasechr (option_whole_chars_search, (*get_byte) (data, p + *len)))
3047 ++#else /* UTF8 */
3048 ++ if (!iswalnum((*get_byte) (data, p - 1))
3049 ++ && !iswalnum((*get_byte) (data, p + *len)))
3050 ++#endif /* UTF8 */
3051 + return p;
3052 + if (once_only)
3053 + return -2;
3054 +@@ -1616,6 +1831,7 @@
3055 +
3056 + #define is_digit(x) ((x) >= '0' && (x) <= '9')
3057 +
3058 ++#ifndef UTF8
3059 + #define snprint(v) { \
3060 + *p1++ = *p++; \
3061 + *p1 = '\0'; \
3062 +@@ -1623,33 +1839,48 @@
3063 + if (n >= (size_t) (e - s)) goto nospc; \
3064 + s += n; \
3065 + }
3066 ++#else /* UTF8 */
3067 ++#define snprint(v) { \
3068 ++ *p1++ = *p++; \
3069 ++ *p1 = '\0'; \
3070 ++ n = swprintf(s, e-s, q1,v); \
3071 ++ if (n >= (size_t) (e - s)) goto nospc; \
3072 ++ s += n; \
3073 ++ }
3074 ++#endif /* UTF8 */
3075 +
3076 + /* this function uses the sprintf command to do a vprintf */
3077 + /* it takes pointers to arguments instead of the arguments themselves */
3078 + /* The return value is the number of bytes written excluding '\0'
3079 + if successfull, -1 if the resulting string would be too long and
3080 + -2 if the format string is errorneous. */
3081 +-static int snprintf_p (char *str, size_t size, const char *fmt,...)
3082 +- __attribute__ ((format (printf, 3, 4)));
3083 +-
3084 +-static int snprintf_p (char *str, size_t size, const char *fmt,...)
3085 ++static int snprintf_p (mc_wchar_t *str, size_t size, const mc_wchar_t *fmt,...)
3086 + {
3087 + va_list ap;
3088 + size_t n;
3089 +- const char *q, *p;
3090 +- char *s = str, *e = str + size;
3091 +- char q1[40];
3092 +- char *p1;
3093 ++ const mc_wchar_t *q, *p;
3094 ++ mc_wchar_t *s = str, *e = str + size;
3095 ++ mc_wchar_t q1[40];
3096 ++
3097 ++ mc_wchar_t *p1;
3098 + int nargs = 0;
3099 +
3100 + va_start (ap, fmt);
3101 + p = q = fmt;
3102 +
3103 ++#ifndef UTF8
3104 + while ((p = strchr (p, '%'))) {
3105 ++#else /* UTF8 */
3106 ++ while ((p = wcschr (p, L'%'))) {
3107 ++#endif /* UTF8 */
3108 + n = p - q;
3109 + if (n >= (size_t) (e - s))
3110 + goto nospc;
3111 ++#ifndef UTF8
3112 + memcpy (s, q, n); /* copy stuff between format specifiers */
3113 ++#else /* UTF8 */
3114 ++ wmemcpy (s, q, n); /* copy stuff between format specifiers */
3115 ++#endif /* UTF8 */
3116 + s += n;
3117 + q = p;
3118 + p1 = q1;
3119 +@@ -1677,45 +1908,78 @@
3120 + *p1++ = *p++;
3121 + if (*p == '*') {
3122 + p++;
3123 ++#ifndef UTF8
3124 + strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
3125 + p1 += strlen (p1);
3126 ++#else /* UTF8 */
3127 ++ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace field width with a number */
3128 ++ p1 += wcslen (p1);
3129 ++#endif /* UTF8 */
3130 + } else {
3131 +- while (is_digit (*p) && p1 < q1 + 20)
3132 ++#ifndef UTF8
3133 ++ while (is_digit (*p)
3134 ++#else /* UTF8 */
3135 ++ while (iswdigit (*p)
3136 ++#endif /* UTF8 */
3137 ++ && p1 < q1 + 20)
3138 + *p1++ = *p++;
3139 +- if (is_digit (*p))
3140 ++#ifndef UTF8
3141 ++ if (is_digit (*p))
3142 ++#else /* UTF8 */
3143 ++ if (iswdigit (*p))
3144 ++#endif /* UTF8 */
3145 + goto err;
3146 + }
3147 + if (*p == '.')
3148 + *p1++ = *p++;
3149 + if (*p == '*') {
3150 + p++;
3151 ++#ifndef UTF8
3152 + strcpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
3153 + p1 += strlen (p1);
3154 ++#else /* UTF8 */
3155 ++ wcscpy (p1, MY_itoa (*va_arg (ap, int *))); /* replace precision with a number */
3156 ++ p1 += wcslen (p1);
3157 ++#endif /* UTF8 */
3158 + } else {
3159 +- while (is_digit (*p) && p1 < q1 + 32)
3160 ++#ifndef UTF8
3161 ++ while (is_digit (*p)
3162 ++#else /* UTF8 */
3163 ++ while (iswdigit (*p)
3164 ++#endif /* UTF8 */
3165 ++ && p1 < q1 + 32)
3166 + *p1++ = *p++;
3167 +- if (is_digit (*p))
3168 ++#ifndef UTF8
3169 ++ if (is_digit (*p))
3170 ++#else /* UTF8 */
3171 ++ if (iswdigit (*p))
3172 ++#endif /* UTF8 */
3173 + goto err;
3174 + }
3175 + /* flags done, now get argument */
3176 + if (*p == 's') {
3177 ++#ifndef UTF8
3178 + snprint (va_arg (ap, char *));
3179 ++#else /* UTF8 */
3180 ++ *p1++ = 'l';
3181 ++ snprint (va_arg (ap, mc_wchar_t *));
3182 ++#endif /* UTF8 */
3183 + } else if (*p == 'h') {
3184 +- if (strchr ("diouxX", *p))
3185 ++ if (*p < 128 && strchr ("diouxX", *p))
3186 + snprint (*va_arg (ap, short *));
3187 + } else if (*p == 'l') {
3188 + *p1++ = *p++;
3189 +- if (strchr ("diouxX", *p))
3190 ++ if (*p < 128 && strchr ("diouxX", *p))
3191 + snprint (*va_arg (ap, long *));
3192 +- } else if (strchr ("cdiouxX", *p)) {
3193 ++ } else if (*p < 128 && strchr ("cdiouxX", *p)) {
3194 + snprint (*va_arg (ap, int *));
3195 + } else if (*p == 'L') {
3196 + *p1++ = *p++;
3197 +- if (strchr ("EefgG", *p))
3198 ++ if (*p < 128 && strchr ("EefgG", *p))
3199 + snprint (*va_arg (ap, double *)); /* should be long double */
3200 +- } else if (strchr ("EefgG", *p)) {
3201 ++ } else if (*p < 128 && strchr ("EefgG", *p)) {
3202 + snprint (*va_arg (ap, double *));
3203 +- } else if (strchr ("DOU", *p)) {
3204 ++ } else if (*p < 128 && strchr ("DOU", *p)) {
3205 + snprint (*va_arg (ap, long *));
3206 + } else if (*p == 'p') {
3207 + snprint (*va_arg (ap, void **));
3208 +@@ -1724,10 +1988,17 @@
3209 + q = p;
3210 + }
3211 + va_end (ap);
3212 ++#ifndef UTF8
3213 + n = strlen (q);
3214 + if (n >= (size_t) (e - s))
3215 + return -1;
3216 + memcpy (s, q, n + 1);
3217 ++#else /* UTF8 */
3218 ++ n = wcslen (q);
3219 ++ if (n >= (size_t) (e - s))
3220 ++ return -1;
3221 ++ wmemcpy (s, q, n + 1);
3222 ++#endif /* UTF8 */
3223 + return s + n - str;
3224 + nospc:
3225 + va_end (ap);
3226 +@@ -1902,8 +2173,11 @@
3227 + }
3228 + }
3229 + if (replace_yes) { /* delete then insert new */
3230 ++#ifdef UTF8
3231 ++ mc_wchar_t *winput2 = mbstr_to_wchar(exp2);
3232 ++#endif /* UTF8 */
3233 + if (replace_scanf || replace_regexp) {
3234 +- char repl_str[MAX_REPL_LEN + 2];
3235 ++ mc_wchar_t repl_str[MAX_REPL_LEN + 2];
3236 + int ret = 0;
3237 +
3238 + /* we need to fill in sargs just like with scanf */
3239 +@@ -1912,17 +2186,25 @@
3240 + for (k = 1;
3241 + k < NUM_REPL_ARGS && pmatch[k].rm_eo >= 0;
3242 + k++) {
3243 ++#ifndef UTF8
3244 + unsigned char *t;
3245 ++#else /* UTF8 */
3246 ++ mc_wchar_t *t;
3247 ++#endif
3248 +
3249 + if (pmatch[k].rm_eo - pmatch[k].rm_so > 255) {
3250 + ret = -1;
3251 + break;
3252 + }
3253 ++#ifndef UTF8
3254 + t = (unsigned char *) &sargs[k - 1][0];
3255 ++#else /* UTF8 */
3256 ++ t = (mc_wchar_t *) &sargs[k - 1][0];
3257 ++#endif /* UTF8 */
3258 + for (j = 0;
3259 + j < pmatch[k].rm_eo - pmatch[k].rm_so
3260 + && j < 255; j++, t++)
3261 +- *t = (unsigned char) edit_get_byte (edit,
3262 ++ *t = edit_get_byte (edit,
3263 + edit->
3264 + search_start
3265 + -
3266 +@@ -1939,13 +2221,22 @@
3267 + sargs[k - 1][0] = 0;
3268 + }
3269 + if (!ret)
3270 ++#ifndef UTF8
3271 + ret = snprintf_p (repl_str, MAX_REPL_LEN + 2, exp2, PRINTF_ARGS);
3272 ++#else /* UTF8 */
3273 ++ ret = snprintf_p (repl_str, MAX_REPL_LEN + 2, winput2, PRINTF_ARGS);
3274 ++#endif /* UTF8 */
3275 + if (ret >= 0) {
3276 + times_replaced++;
3277 + while (i--)
3278 + edit_delete (edit);
3279 ++#ifndef UTF8
3280 + while (repl_str[++i])
3281 + edit_insert (edit, repl_str[i]);
3282 ++#else /* UTF8 */
3283 ++ while (winput2[++i])
3284 ++ edit_insert (edit, winput2[i]);
3285 ++#endif /* UTF8 */
3286 + } else {
3287 + edit_error_dialog (_(" Replace "),
3288 + ret == -2
3289 +@@ -1957,10 +2248,18 @@
3290 + times_replaced++;
3291 + while (i--)
3292 + edit_delete (edit);
3293 ++#ifndef UTF8
3294 + while (exp2[++i])
3295 + edit_insert (edit, exp2[i]);
3296 ++#else /* UTF8 */
3297 ++ while (winput2[++i])
3298 ++ edit_insert (edit, winput2[i]);
3299 ++#endif
3300 + }
3301 + edit->found_len = i;
3302 ++#ifdef UTF8
3303 ++ g_free (winput2);
3304 ++#endif /* UTF8 */
3305 + }
3306 + /* so that we don't find the same string again */
3307 + if (replace_backwards) {
3308 +@@ -2132,16 +2431,17 @@
3309 + #define TEMP_BUF_LEN 1024
3310 +
3311 + /* Return a null terminated length of text. Result must be g_free'd */
3312 +-static unsigned char *
3313 ++static mc_wchar_t *
3314 + edit_get_block (WEdit *edit, long start, long finish, int *l)
3315 + {
3316 +- unsigned char *s, *r;
3317 +- r = s = g_malloc (finish - start + 1);
3318 ++ mc_wchar_t *s, *r;
3319 ++ r = s = g_malloc ((finish - start + 1) * sizeof(mc_wchar_t));
3320 + if (column_highlighting) {
3321 + *l = 0;
3322 + /* copy from buffer, excluding chars that are out of the column 'margins' */
3323 + while (start < finish) {
3324 +- int c, x;
3325 ++ mc_wchar_t c;
3326 ++ int x;
3327 + x = edit_move_forward3 (edit, edit_bol (edit, start), 0,
3328 + start);
3329 + c = edit_get_byte (edit, start);
3330 +@@ -2174,11 +2474,15 @@
3331 + return 0;
3332 +
3333 + if (column_highlighting) {
3334 +- unsigned char *block, *p;
3335 ++ mc_wchar_t *block, *p;
3336 + int r;
3337 + p = block = edit_get_block (edit, start, finish, &len);
3338 + while (len) {
3339 ++#ifndef UTF8
3340 + r = mc_write (file, p, len);
3341 ++#else /* UTF8 */
3342 ++ r = wchar_write (file, p, len);
3343 ++#endif /* UTF8 */
3344 + if (r < 0)
3345 + break;
3346 + p += r;
3347 +@@ -2186,15 +2490,19 @@
3348 + }
3349 + g_free (block);
3350 + } else {
3351 +- unsigned char *buf;
3352 ++ mc_wchar_t *buf;
3353 + int i = start, end;
3354 + len = finish - start;
3355 +- buf = g_malloc (TEMP_BUF_LEN);
3356 ++ buf = g_malloc (TEMP_BUF_LEN * sizeof(mc_wchar_t));
3357 + while (start != finish) {
3358 + end = min (finish, start + TEMP_BUF_LEN);
3359 + for (; i < end; i++)
3360 + buf[i - start] = edit_get_byte (edit, i);
3361 ++#ifndef UTF8
3362 + len -= mc_write (file, (char *) buf, end - start);
3363 ++#else /* UTF8 */
3364 ++ len -= wchar_write (file, buf, end - start);
3365 ++#endif /* UTF8 */
3366 + start = end;
3367 + }
3368 + g_free (buf);
3369 +@@ -2531,17 +2839,20 @@
3370 +
3371 + /* prints at the cursor */
3372 + /* returns the number of chars printed */
3373 ++#ifndef UTF8
3374 + int edit_print_string (WEdit * e, const char *s)
3375 ++#else /* UTF8 */
3376 ++int edit_print_wstring (WEdit * e, mc_wchar_t *s)
3377 ++#endif /* UTF8 */
3378 + {
3379 + int i = 0;
3380 + while (s[i])
3381 +- edit_execute_cmd (e, -1, (unsigned char) s[i++]);
3382 ++ edit_execute_cmd (e, -1, s[i++]);
3383 + e->force |= REDRAW_COMPLETELY;
3384 + edit_update_screen (e);
3385 + return i;
3386 + }
3387 +
3388 +-
3389 + static void pipe_mail (WEdit *edit, char *to, char *subject, char *cc)
3390 + {
3391 + FILE *p = 0;
3392 +@@ -2635,15 +2946,20 @@
3393 + /* find first character of current word */
3394 + static int edit_find_word_start (WEdit *edit, long *word_start, int *word_len)
3395 + {
3396 +- int i, c, last;
3397 ++ int i;
3398 ++ mc_wint_t c, last;
3399 +
3400 + /* return if at begin of file */
3401 + if (edit->curs1 <= 0)
3402 + return 0;
3403 +
3404 +- c = (unsigned char) edit_get_byte (edit, edit->curs1 - 1);
3405 ++ c = edit_get_byte (edit, edit->curs1 - 1);
3406 + /* return if not at end or in word */
3407 ++#ifndef UTF8
3408 + if (isspace (c) || !(isalnum (c) || c == '_'))
3409 ++#else /* UTF8 */
3410 ++ if (iswspace (c) || !(iswalnum (c) || c == '_'))
3411 ++#endif /* UTF8 */
3412 + return 0;
3413 +
3414 + /* search start of word to be completed */
3415 +@@ -2653,11 +2969,19 @@
3416 + return 0;
3417 +
3418 + last = c;
3419 +- c = (unsigned char) edit_get_byte (edit, edit->curs1 - i);
3420 ++ c = edit_get_byte (edit, edit->curs1 - i);
3421 +
3422 ++#ifndef UTF8
3423 + if (!(isalnum (c) || c == '_')) {
3424 ++#else /* UTF8 */
3425 ++ if (!(iswalnum (c) || c == '_')) {
3426 ++#endif /* UTF8 */
3427 + /* return if word starts with digit */
3428 ++#ifndef UTF8
3429 + if (isdigit (last))
3430 ++#else /* UTF8 */
3431 ++ if (iswdigit (last))
3432 ++#endif /* UTF8 */
3433 + return 0;
3434 +
3435 + *word_start = edit->curs1 - (i - 1); /* start found */
3436 +@@ -2690,7 +3014,7 @@
3437 + int *num)
3438 + {
3439 + int len, max_len = 0, i, skip;
3440 +- char *bufpos;
3441 ++ mc_wchar_t *bufpos;
3442 +
3443 + /* collect max MAX_WORD_COMPLETIONS completions */
3444 + while (*num < MAX_WORD_COMPLETIONS) {
3445 +@@ -2711,9 +3035,16 @@
3446 + buffers1[start >> S_EDIT_BUF_SIZE][start & M_EDIT_BUF_SIZE];
3447 + skip = 0;
3448 + for (i = 0; i < *num; i++) {
3449 ++#ifndef UTF8
3450 + if (strncmp
3451 + (&compl[i].text[word_len], &bufpos[word_len],
3452 +- max (len, compl[i].len) - word_len) == 0) {
3453 ++ max (len,
3454 ++#else /* UTF8 */
3455 ++ if (wcsncmp
3456 ++ ((wchar_t *) &compl[i].text[word_len],
3457 ++ (wchar_t *) &bufpos[word_len], max (len,
3458 ++#endif /* UTF8 */
3459 ++ compl[i].len) - word_len) == 0) {
3460 + skip = 1;
3461 + break; /* skip it, already added */
3462 + }
3463 +@@ -2721,7 +3052,7 @@
3464 + if (skip)
3465 + continue;
3466 +
3467 +- compl[*num].text = g_malloc (len + 1);
3468 ++ compl[*num].text = g_malloc ((len + 1) * sizeof(mc_wchar_t));
3469 + compl[*num].len = len;
3470 + for (i = 0; i < len; i++)
3471 + compl[*num].text[i] = *(bufpos + i);
3472 +@@ -2735,6 +3066,18 @@
3473 + return max_len;
3474 + }
3475 +
3476 ++#ifdef UTF8
3477 ++int edit_print_string (WEdit * e, const char *s)
3478 ++{
3479 ++ int i;
3480 ++ mc_wchar_t *ws = mbstr_to_wchar(s);
3481 ++ i = edit_print_wstring (e, ws);
3482 ++ g_free(ws);
3483 ++ return i;
3484 ++}
3485 ++
3486 ++#endif /* UTF8 */
3487 ++
3488 +
3489 + /* let the user select its preferred completion */
3490 + static void
3491 +@@ -2747,6 +3090,10 @@
3492 + WListbox *compl_list;
3493 + int compl_dlg_h; /* completion dialog height */
3494 + int compl_dlg_w; /* completion dialog width */
3495 ++#ifdef UTF8
3496 ++ char *mbtext;
3497 ++#endif /* UTF8 */
3498 ++
3499 +
3500 + /* calculate the dialog metrics */
3501 + compl_dlg_h = num_compl + 2;
3502 +@@ -2782,8 +3129,16 @@
3503 + add_widget (compl_dlg, compl_list);
3504 +
3505 + /* fill the listbox with the completions */
3506 ++#ifndef UTF8
3507 + for (i = 0; i < num_compl; i++)
3508 + listbox_add_item (compl_list, 0, 0, compl[i].text, NULL);
3509 ++#else /* UTF8 */
3510 ++ for (i = 0; i < num_compl; i++) {
3511 ++ mbtext = wchar_to_mbstr(compl[i].text);
3512 ++ listbox_add_item (compl_list, 0, 0, mbtext, NULL);
3513 ++ g_free(mbtext);
3514 ++ }
3515 ++#endif /* UTF8 */
3516 +
3517 + /* pop up the dialog */
3518 + run_dlg (compl_dlg);
3519 +@@ -2791,9 +3146,17 @@
3520 + /* apply the choosen completion */
3521 + if (compl_dlg->ret_value == B_ENTER) {
3522 + listbox_get_current (compl_list, &curr, NULL);
3523 +- if (curr)
3524 ++ if (curr){
3525 ++#ifndef UTF8
3526 + for (curr += word_len; *curr; curr++)
3527 + edit_insert (edit, *curr);
3528 ++#else /* UTF8 */
3529 ++ mc_wchar_t *wc, *wccurr = mbstr_to_wchar(curr);
3530 ++ for (wc = wccurr + word_len; *wc; wc++)
3531 ++ edit_insert (edit, *wc);
3532 ++ g_free(wccurr);
3533 ++#endif /* UTF8 */
3534 ++ }
3535 + }
3536 +
3537 + /* destroy dialog before return */
3538 +@@ -2810,8 +3173,9 @@
3539 + {
3540 + int word_len = 0, i, num_compl = 0, max_len;
3541 + long word_start = 0;
3542 +- char *bufpos;
3543 +- char *match_expr;
3544 ++ mc_wchar_t *bufpos;
3545 ++ mc_wchar_t *match_expr;
3546 ++ char *mbmatch_expr;
3547 + struct selection compl[MAX_WORD_COMPLETIONS]; /* completions */
3548 +
3549 + /* don't want to disturb another search */
3550 +@@ -2828,16 +3192,32 @@
3551 + /* prepare match expression */
3552 + bufpos = &edit->buffers1[word_start >> S_EDIT_BUF_SIZE]
3553 + [word_start & M_EDIT_BUF_SIZE];
3554 ++
3555 ++ match_expr = g_malloc((word_len + 14) * sizeof(mc_wchar_t));
3556 ++#ifndef UTF8
3557 + match_expr = g_strdup_printf ("%.*s[a-zA-Z_0-9]+", word_len, bufpos);
3558 ++#else /* UTF8 */
3559 ++ wcsncpy (match_expr, bufpos, word_len);
3560 ++ match_expr[word_len] = '\0';
3561 ++ wcscat (match_expr, L"[a-zA-Z_0-9]+");
3562 ++#endif /* UTF8 */
3563 +
3564 + /* init search: backward, regexp, whole word, case sensitive */
3565 + edit_set_search_parameters (0, 1, 1, 1, 1);
3566 +
3567 + /* collect the possible completions */
3568 + /* start search from curs1 down to begin of file */
3569 ++#ifndef UTF8
3570 + max_len =
3571 + edit_collect_completions (edit, word_start, word_len, match_expr,
3572 + (struct selection *) &compl, &num_compl);
3573 ++#else /* UTF8 */
3574 ++ mbmatch_expr = wchar_to_mbstr(match_expr);
3575 ++ max_len =
3576 ++ edit_collect_completions (edit, word_start, word_len, mbmatch_expr,
3577 ++ (struct selection *) &compl, &num_compl);
3578 ++ g_free(mbmatch_expr);
3579 ++#endif /* UTF8 */
3580 +
3581 + if (num_compl > 0) {
3582 + /* insert completed word if there is only one match */
3583 +diff -Naur mc-4.6.1-old/edit/editdraw.c mc-4.6.1/edit/editdraw.c
3584 +--- mc-4.6.1-old/edit/editdraw.c 2005-05-27 16:19:18.000000000 +0200
3585 ++++ mc-4.6.1/edit/editdraw.c 2005-10-28 10:08:07.657259272 +0200
3586 +@@ -48,7 +48,7 @@
3587 +
3588 + static void status_string (WEdit * edit, char *s, int w)
3589 + {
3590 +- char byte_str[16];
3591 ++ char byte_str[32];
3592 +
3593 + /*
3594 + * If we are at the end of file, print <EOF>,
3595 +@@ -56,11 +56,16 @@
3596 + * as decimal and as hex.
3597 + */
3598 + if (edit->curs1 < edit->last_byte) {
3599 +- unsigned char cur_byte = edit_get_byte (edit, edit->curs1);
3600 ++ mc_wchar_t cur_byte = edit_get_byte (edit, edit->curs1);
3601 ++#ifndef UTF8
3602 + g_snprintf (byte_str, sizeof (byte_str), "%c %3d 0x%02X",
3603 + is_printable (cur_byte) ? cur_byte : '.',
3604 +- (int) cur_byte,
3605 +- (unsigned) cur_byte);
3606 ++#else /* UTF8 */
3607 ++ g_snprintf (byte_str, sizeof(byte_str), "%lc %3d 0x%02X",
3608 ++ iswprint(cur_byte) ? cur_byte : '.',
3609 ++#endif /* UTF8 */
3610 ++ (int) cur_byte,
3611 ++ (unsigned) cur_byte);
3612 + } else {
3613 + strcpy (byte_str, "<EOF>");
3614 + }
3615 +@@ -183,11 +188,16 @@
3616 + #define lowlevel_set_color(x) attrset(MY_COLOR_PAIR(color))
3617 + #endif
3618 +
3619 ++struct line_s {
3620 ++ mc_wchar_t ch;
3621 ++ unsigned int style;
3622 ++};
3623 ++
3624 + static void
3625 + print_to_widget (WEdit *edit, long row, int start_col, int start_col_real,
3626 +- long end_col, unsigned int line[])
3627 ++ long end_col, struct line_s line[])
3628 + {
3629 +- unsigned int *p;
3630 ++ struct line_s *p;
3631 +
3632 + int x = start_col_real + EDIT_TEXT_HORIZONTAL_OFFSET;
3633 + int x1 = start_col + EDIT_TEXT_HORIZONTAL_OFFSET;
3634 +@@ -201,9 +211,9 @@
3635 + edit_move (x1 + FONT_OFFSET_X, y + FONT_OFFSET_Y);
3636 + p = line;
3637 +
3638 +- while (*p) {
3639 ++ while (p->ch) {
3640 + int style;
3641 +- int textchar;
3642 ++ mc_wchar_t textchar;
3643 + int color;
3644 +
3645 + if (cols_to_skip) {
3646 +@@ -212,9 +222,9 @@
3647 + continue;
3648 + }
3649 +
3650 +- style = *p & 0xFF00;
3651 +- textchar = *p & 0xFF;
3652 +- color = *p >> 16;
3653 ++ style = p->style & 0xFF00;
3654 ++ textchar = p->ch;
3655 ++ color = p->style >> 16;
3656 +
3657 + if (style & MOD_ABNORMAL) {
3658 + /* Non-printable - use black background */
3659 +@@ -228,8 +238,11 @@
3660 + } else {
3661 + lowlevel_set_color (color);
3662 + }
3663 +-
3664 ++#ifdef UTF8
3665 ++ SLsmg_write_char(textchar);
3666 ++#else
3667 + addch (textchar);
3668 ++#endif
3669 + p++;
3670 + }
3671 + }
3672 +@@ -239,11 +252,11 @@
3673 + edit_draw_this_line (WEdit *edit, long b, long row, long start_col,
3674 + long end_col)
3675 + {
3676 +- static unsigned int line[MAX_LINE_LEN];
3677 +- unsigned int *p = line;
3678 ++ struct line_s line[MAX_LINE_LEN];
3679 ++ struct line_s *p = line;
3680 + long m1 = 0, m2 = 0, q, c1, c2;
3681 + int col, start_col_real;
3682 +- unsigned int c;
3683 ++ mc_wint_t c;
3684 + int color;
3685 + int i, book_mark = -1;
3686 +
3687 +@@ -265,66 +278,96 @@
3688 +
3689 + if (row <= edit->total_lines - edit->start_line) {
3690 + while (col <= end_col - edit->start_col) {
3691 +- *p = 0;
3692 ++ p->ch = 0;
3693 ++ p->style = 0;
3694 + if (q == edit->curs1)
3695 +- *p |= MOD_CURSOR;
3696 ++ p->style |= MOD_CURSOR;
3697 + if (q >= m1 && q < m2) {
3698 + if (column_highlighting) {
3699 + int x;
3700 + x = edit_move_forward3 (edit, b, 0, q);
3701 + if (x >= c1 && x < c2)
3702 +- *p |= MOD_MARKED;
3703 ++ p->style |= MOD_MARKED;
3704 + } else
3705 +- *p |= MOD_MARKED;
3706 ++ p->style |= MOD_MARKED;
3707 + }
3708 + if (q == edit->bracket)
3709 +- *p |= MOD_BOLD;
3710 ++ p->style |= MOD_BOLD;
3711 + if (q >= edit->found_start
3712 + && q < edit->found_start + edit->found_len)
3713 +- *p |= MOD_BOLD;
3714 ++ p->style |= MOD_BOLD;
3715 + c = edit_get_byte (edit, q);
3716 + /* we don't use bg for mc - fg contains both */
3717 + if (book_mark == -1) {
3718 + edit_get_syntax_color (edit, q, &color);
3719 +- *p |= color << 16;
3720 ++ p->style |= color << 16;
3721 + } else {
3722 +- *p |= book_mark << 16;
3723 ++ p->style |= book_mark << 16;
3724 + }
3725 + q++;
3726 + switch (c) {
3727 + case '\n':
3728 + col = end_col - edit->start_col + 1; /* quit */
3729 +- *(p++) |= ' ';
3730 ++ p->ch = ' ';
3731 ++ p++;
3732 + break;
3733 + case '\t':
3734 + i = TAB_SIZE - ((int) col % TAB_SIZE);
3735 +- *p |= ' ';
3736 +- c = *(p++) & ~MOD_CURSOR;
3737 ++ p->ch = ' ';
3738 ++ c = p->style & ~MOD_CURSOR;
3739 ++ p++;
3740 + col += i;
3741 +- while (--i)
3742 +- *(p++) = c;
3743 ++ while (--i) {
3744 ++ p->ch = ' '; p->style = c;
3745 ++ p++;
3746 ++ }
3747 + break;
3748 + default:
3749 + c = convert_to_display_c (c);
3750 +
3751 + /* Caret notation for control characters */
3752 + if (c < 32) {
3753 +- *(p++) = '^' | MOD_ABNORMAL;
3754 +- *(p++) = (c + 0x40) | MOD_ABNORMAL;
3755 ++ p->ch = '^';
3756 ++ p->style = MOD_ABNORMAL;
3757 ++ p++;
3758 ++ p->ch = c + 0x40;
3759 ++ p->style = MOD_ABNORMAL;
3760 + col += 2;
3761 + break;
3762 + }
3763 + if (c == 127) {
3764 +- *(p++) = '^' | MOD_ABNORMAL;
3765 +- *(p++) = '?' | MOD_ABNORMAL;
3766 ++ p->ch = '^';
3767 ++ p->style = MOD_ABNORMAL;
3768 ++ p++;
3769 ++ p->ch = '?';
3770 ++ p->style = MOD_ABNORMAL;
3771 ++ p++;
3772 + col += 2;
3773 + break;
3774 + }
3775 +
3776 +- if (is_printable (c)) {
3777 +- *(p++) |= c;
3778 ++#ifndef UTF8
3779 ++ if (is_printable (c)
3780 ++#else /* UTF8 */
3781 ++ if (iswprint (c)
3782 ++#ifdef __STDC_ISO_10646__
3783 ++ && (c < BINARY_CHAR_OFFSET || c >= (BINARY_CHAR_OFFSET + 256))
3784 ++#endif
3785 ++#endif /* UTF8 */
3786 ++ ) {
3787 ++ p->ch = c;
3788 ++ p++;
3789 ++
3790 ++#ifdef UTF8
3791 ++ i = wcwidth(c);
3792 ++ if (i > 1) {
3793 ++ col += i - 1;
3794 ++ }
3795 ++#endif /* UTF8 */
3796 + } else {
3797 +- *(p++) = '.' | MOD_ABNORMAL;
3798 ++ p->ch = '.';
3799 ++ p->style = MOD_ABNORMAL;
3800 ++ p++;
3801 + }
3802 + col++;
3803 + break;
3804 +@@ -334,7 +377,7 @@
3805 + } else {
3806 + start_col_real = start_col = 0;
3807 + }
3808 +- *p = 0;
3809 ++ p->ch = 0;
3810 +
3811 + print_to_widget (edit, row, start_col, start_col_real, end_col, line);
3812 + }
3813 +diff -Naur mc-4.6.1-old/edit/edit.h mc-4.6.1/edit/edit.h
3814 +--- mc-4.6.1-old/edit/edit.h 2005-05-27 16:19:18.000000000 +0200
3815 ++++ mc-4.6.1/edit/edit.h 2005-10-28 10:08:07.768242400 +0200
3816 +@@ -39,6 +39,27 @@
3817 +
3818 + #include "../src/global.h"
3819 +
3820 ++#include "src/tty.h"
3821 ++
3822 ++#ifdef UTF8
3823 ++#include <wchar.h>
3824 ++#include <wctype.h>
3825 ++
3826 ++#define mc_wchar_t wchar_t
3827 ++#define mc_wint_t wint_t
3828 ++
3829 ++#else
3830 ++
3831 ++#define mc_wchar_t unsigned char
3832 ++#define mc_wint_t int
3833 ++
3834 ++#endif
3835 ++
3836 ++
3837 ++/* unicode private use area */
3838 ++#define BINARY_CHAR_OFFSET 0xFFE00
3839 ++
3840 ++
3841 + #define N_menus 5
3842 +
3843 + #define SEARCH_DIALOG_OPTION_NO_SCANF 1
3844 +@@ -99,6 +120,8 @@
3845 + #define START_STACK_SIZE 32
3846 +
3847 + /* Some codes that may be pushed onto or returned from the undo stack */
3848 ++#define CHAR_INSERT 65
3849 ++#define CHAR_INSERT_AHEAD 66
3850 + #define CURS_LEFT 601
3851 + #define CURS_RIGHT 602
3852 + #define DELCHAR 603
3853 +@@ -118,7 +141,7 @@
3854 +
3855 + struct macro {
3856 + short command;
3857 +- short ch;
3858 ++ mc_wchar_t ch;
3859 + };
3860 +
3861 + struct WEdit;
3862 +@@ -132,26 +155,8 @@
3863 + void menu_save_mode_cmd (void);
3864 + int edit_raw_key_query (const char *heading, const char *query, int cancel);
3865 + int edit_file (const char *_file, int line);
3866 +-int edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch);
3867 +-
3868 +-#ifndef NO_INLINE_GETBYTE
3869 +-int edit_get_byte (WEdit * edit, long byte_index);
3870 +-#else
3871 +-static inline int edit_get_byte (WEdit * edit, long byte_index)
3872 +-{
3873 +- unsigned long p;
3874 +- if (byte_index >= (edit->curs1 + edit->curs2) || byte_index < 0)
3875 +- return '\n';
3876 +-
3877 +- if (byte_index >= edit->curs1) {
3878 +- p = edit->curs1 + edit->curs2 - byte_index - 1;
3879 +- return edit->buffers2[p >> S_EDIT_BUF_SIZE][EDIT_BUF_SIZE - (p & M_EDIT_BUF_SIZE) - 1];
3880 +- } else {
3881 +- return edit->buffers1[byte_index >> S_EDIT_BUF_SIZE][byte_index & M_EDIT_BUF_SIZE];
3882 +- }
3883 +-}
3884 +-#endif
3885 +-
3886 ++int edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch);
3887 ++mc_wchar_t edit_get_byte (WEdit * edit, long byte_index);
3888 + int edit_count_lines (WEdit * edit, long current, int upto);
3889 + long edit_move_forward (WEdit * edit, long current, int lines, long upto);
3890 + long edit_move_forward3 (WEdit * edit, long current, int cols, long upto);
3891 +@@ -176,11 +181,11 @@
3892 + void edit_delete_line (WEdit * edit);
3893 +
3894 + int edit_delete (WEdit * edit);
3895 +-void edit_insert (WEdit * edit, int c);
3896 ++void edit_insert (WEdit * edit, mc_wchar_t c);
3897 + int edit_cursor_move (WEdit * edit, long increment);
3898 + void edit_push_action (WEdit * edit, long c, ...);
3899 + void edit_push_key_press (WEdit * edit);
3900 +-void edit_insert_ahead (WEdit * edit, int c);
3901 ++void edit_insert_ahead (WEdit * edit, mc_wchar_t c);
3902 + long edit_write_stream (WEdit * edit, FILE * f);
3903 + char *edit_get_write_filter (const char *writename, const char *filename);
3904 + int edit_save_confirm_cmd (WEdit * edit);
3905 +@@ -212,7 +217,7 @@
3906 + int eval_marks (WEdit * edit, long *start_mark, long *end_mark);
3907 + void edit_status (WEdit * edit);
3908 + void edit_execute_key_command (WEdit *edit, int command,
3909 +- int char_for_insertion);
3910 ++ mc_wint_t char_for_insertion);
3911 + void edit_update_screen (WEdit * edit);
3912 + int edit_print_string (WEdit * e, const char *s);
3913 + void edit_move_to_line (WEdit * e, long line);
3914 +@@ -256,7 +261,7 @@
3915 + void format_paragraph (WEdit *edit, int force);
3916 +
3917 + /* either command or char_for_insertion must be passed as -1 */
3918 +-void edit_execute_cmd (WEdit *edit, int command, int char_for_insertion);
3919 ++void edit_execute_cmd (WEdit *edit, int command, mc_wint_t char_for_insertion);
3920 +
3921 + #define get_sys_error(s) (s)
3922 +
3923 +diff -Naur mc-4.6.1-old/edit/editkeys.c mc-4.6.1/edit/editkeys.c
3924 +--- mc-4.6.1-old/edit/editkeys.c 2005-05-27 16:19:18.000000000 +0200
3925 ++++ mc-4.6.1/edit/editkeys.c 2005-10-28 10:08:07.659258968 +0200
3926 +@@ -162,10 +162,10 @@
3927 + * 'command' is one of the editor commands from editcmddef.h.
3928 + */
3929 + int
3930 +-edit_translate_key (WEdit *edit, long x_key, int *cmd, int *ch)
3931 ++edit_translate_key (WEdit *edit, long x_key, int *cmd, mc_wint_t *ch)
3932 + {
3933 + int command = CK_Insert_Char;
3934 +- int char_for_insertion = -1;
3935 ++ mc_wint_t char_for_insertion = -1;
3936 + int i = 0;
3937 + static const long *key_map;
3938 +
3939 +@@ -242,9 +242,30 @@
3940 + /* an ordinary insertable character */
3941 + if (x_key < 256) {
3942 + int c = convert_from_input_c (x_key);
3943 +-
3944 ++#ifdef UTF8
3945 ++ mbstate_t mbs;
3946 ++ int res;
3947 ++ mc_wchar_t wc;
3948 ++
3949 ++ memset (&mbs, 0, sizeof (mbs));
3950 ++
3951 ++ if (edit->charpoint >= MB_CUR_MAX) edit->charpoint = 0;
3952 ++
3953 ++ edit->charbuf[edit->charpoint++] = c;
3954 ++
3955 ++ res = mbrtowc(&wc, (char *)edit->charbuf, edit->charpoint, &mbs);
3956 ++ if (res < 0) {
3957 ++ if (res != -2) edit->charpoint = 0; /* broken multibyte char, skip */
3958 ++ return 0;
3959 ++ }
3960 ++ edit->charpoint = 0;
3961 ++
3962 ++ if (iswprint (wc)) {
3963 ++ char_for_insertion = wc;
3964 ++#else
3965 + if (is_printable (c)) {
3966 + char_for_insertion = c;
3967 ++#endif /* UTF8 */
3968 + goto fin;
3969 + }
3970 + }
3971 +@@ -285,7 +306,7 @@
3972 + *cmd = command;
3973 + *ch = char_for_insertion;
3974 +
3975 +- if (command == CK_Insert_Char && char_for_insertion == -1) {
3976 ++ if (command == CK_Insert_Char && char_for_insertion == (mc_wint_t)-1) {
3977 + /* unchanged, key has no function here */
3978 + return 0;
3979 + }
3980 +diff -Naur mc-4.6.1-old/edit/editwidget.c mc-4.6.1/edit/editwidget.c
3981 +--- mc-4.6.1-old/edit/editwidget.c 2005-05-27 16:19:18.000000000 +0200
3982 ++++ mc-4.6.1/edit/editwidget.c 2005-10-28 10:08:07.664258208 +0200
3983 +@@ -337,7 +337,8 @@
3984 +
3985 + case WIDGET_KEY:
3986 + {
3987 +- int cmd, ch;
3988 ++ int cmd;
3989 ++ mc_wint_t ch;
3990 +
3991 + /* first check alt-f, alt-e, alt-s, etc for drop menus */
3992 + if (edit_drop_hotkey_menu (e, parm))
3993 +diff -Naur mc-4.6.1-old/edit/edit-widget.h mc-4.6.1/edit/edit-widget.h
3994 +--- mc-4.6.1-old/edit/edit-widget.h 2003-10-29 09:54:47.000000000 +0100
3995 ++++ mc-4.6.1/edit/edit-widget.h 2005-10-28 10:08:07.750245136 +0200
3996 +@@ -24,6 +24,11 @@
3997 + unsigned char border;
3998 + };
3999 +
4000 ++struct action {
4001 ++ mc_wchar_t ch;
4002 ++ long flags;
4003 ++};
4004 ++
4005 + struct WEdit {
4006 + Widget widget;
4007 +
4008 +@@ -36,8 +41,17 @@
4009 + /* dynamic buffers and cursor position for editor: */
4010 + long curs1; /* position of the cursor from the beginning of the file. */
4011 + long curs2; /* position from the end of the file */
4012 ++#ifndef UTF8
4013 + unsigned char *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
4014 + unsigned char *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
4015 ++#else /* UTF8 */
4016 ++ mc_wchar_t *buffers1[MAXBUFF + 1]; /* all data up to curs1 */
4017 ++ mc_wchar_t *buffers2[MAXBUFF + 1]; /* all data from end of file down to curs2 */
4018 ++
4019 ++ unsigned char charbuf[MB_LEN_MAX];
4020 ++ int charpoint;
4021 ++#endif /* UTF8 */
4022 ++
4023 +
4024 + /* search variables */
4025 + long search_start; /* First character to start searching from */
4026 +@@ -81,7 +95,7 @@
4027 +
4028 + /* undo stack and pointers */
4029 + unsigned long stack_pointer;
4030 +- long *undo_stack;
4031 ++ struct action *undo_stack;
4032 + unsigned long stack_size;
4033 + unsigned long stack_size_mask;
4034 + unsigned long stack_bottom;
4035 +diff -Naur mc-4.6.1-old/edit/wordproc.c mc-4.6.1/edit/wordproc.c
4036 +--- mc-4.6.1-old/edit/wordproc.c 2005-05-27 16:19:18.000000000 +0200
4037 ++++ mc-4.6.1/edit/wordproc.c 2005-10-28 10:08:07.668257600 +0200
4038 +@@ -24,7 +24,12 @@
4039 +
4040 + #define tab_width option_tab_spacing
4041 +
4042 ++#ifndef UTF8
4043 + #define NO_FORMAT_CHARS_START "-+*\\,.;:&>"
4044 ++#else /* UTF8 */
4045 ++#define NO_FORMAT_CHARS_START L"-+*\\,.;:&>"
4046 ++#endif /* UTF8 */
4047 ++
4048 + #define FONT_MEAN_WIDTH 1
4049 +
4050 + static long
4051 +@@ -41,14 +46,21 @@
4052 + p = edit_move_forward (edit, p, line - l, 0);
4053 +
4054 + p = edit_bol (edit, p);
4055 ++
4056 ++#ifndef UTF8
4057 + while (strchr ("\t ", edit_get_byte (edit, p)))
4058 ++#else /* UTF8 */
4059 ++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
4060 ++#endif /* UTF8 */
4061 ++
4062 + p++;
4063 + return p;
4064 + }
4065 +
4066 + static int bad_line_start (WEdit * edit, long p)
4067 + {
4068 +- int c;
4069 ++ mc_wint_t c;
4070 ++
4071 + c = edit_get_byte (edit, p);
4072 + if (c == '.') { /* `...' is acceptable */
4073 + if (edit_get_byte (edit, p + 1) == '.')
4074 +@@ -62,7 +74,13 @@
4075 + return 0; /* `---' is acceptable */
4076 + return 1;
4077 + }
4078 ++
4079 ++#ifndef UTF8
4080 + if (strchr (NO_FORMAT_CHARS_START, c))
4081 ++#else /* UTF8 */
4082 ++ if (wcschr (NO_FORMAT_CHARS_START, c))
4083 ++#endif /* UTF8 */
4084 ++
4085 + return 1;
4086 + return 0;
4087 + }
4088 +@@ -115,33 +133,37 @@
4089 + i - edit->curs_line, 0));
4090 + }
4091 +
4092 +-static unsigned char *
4093 ++static mc_wchar_t *
4094 + get_paragraph (WEdit *edit, long p, long q, int indent, int *size)
4095 + {
4096 +- unsigned char *s, *t;
4097 ++ mc_wchar_t *s, *t;
4098 + #if 0
4099 +- t = g_malloc ((q - p) + 2 * (q - p) / option_word_wrap_line_length +
4100 +- 10);
4101 ++ t = g_malloc (((q - p) + 2 * (q - p) / option_word_wrap_line_length +
4102 ++ 10) * sizeof(mc_wchar_t));
4103 + #else
4104 +- t = g_malloc (2 * (q - p) + 100);
4105 ++ t = g_malloc ((2 * (q - p) + 100) * sizeof(mc_wchar_t));
4106 + #endif
4107 + if (!t)
4108 + return 0;
4109 + for (s = t; p < q; p++, s++) {
4110 + if (indent)
4111 + if (edit_get_byte (edit, p - 1) == '\n')
4112 ++#ifndef UTF8
4113 + while (strchr ("\t ", edit_get_byte (edit, p)))
4114 ++#else /* UTF8 */
4115 ++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
4116 ++#endif /* UTF8 */
4117 + p++;
4118 + *s = edit_get_byte (edit, p);
4119 + }
4120 +- *size = (unsigned long) s - (unsigned long) t;
4121 ++ *size = s - t;
4122 + t[*size] = '\n';
4123 + return t;
4124 + }
4125 +
4126 +-static void strip_newlines (unsigned char *t, int size)
4127 ++static void strip_newlines (mc_wchar_t *t, int size)
4128 + {
4129 +- unsigned char *p = t;
4130 ++ mc_wchar_t *p = t;
4131 + while (size--) {
4132 + *p = *p == '\n' ? ' ' : *p;
4133 + p++;
4134 +@@ -158,7 +180,7 @@
4135 + {
4136 + return x += tab_width - x % tab_width;
4137 + }
4138 +-static int line_pixel_length (unsigned char *t, long b, int l)
4139 ++static int line_pixel_length (mc_wchar_t *t, long b, int l)
4140 + {
4141 + int x = 0, c, xn = 0;
4142 + for (;;) {
4143 +@@ -182,7 +204,7 @@
4144 + }
4145 +
4146 + /* find the start of a word */
4147 +-static int next_word_start (unsigned char *t, int q, int size)
4148 ++static int next_word_start (mc_wchar_t *t, int q, int size)
4149 + {
4150 + int i;
4151 + for (i = q;; i++) {
4152 +@@ -203,7 +225,7 @@
4153 + }
4154 +
4155 + /* find the start of a word */
4156 +-static int word_start (unsigned char *t, int q, int size)
4157 ++static int word_start (mc_wchar_t *t, int q, int size)
4158 + {
4159 + int i = q;
4160 + if (t[q] == ' ' || t[q] == '\t')
4161 +@@ -222,7 +244,7 @@
4162 + }
4163 +
4164 + /* replaces ' ' with '\n' to properly format a paragraph */
4165 +-static void format_this (unsigned char *t, int size, int indent)
4166 ++static void format_this (mc_wchar_t *t, int size, int indent)
4167 + {
4168 + int q = 0, ww;
4169 + strip_newlines (t, size);
4170 +@@ -250,7 +272,7 @@
4171 + }
4172 + }
4173 +
4174 +-static void replace_at (WEdit * edit, long q, int c)
4175 ++static void replace_at (WEdit * edit, long q, mc_wint_t c)
4176 + {
4177 + edit_cursor_move (edit, q - edit->curs1);
4178 + edit_delete (edit);
4179 +@@ -258,18 +280,27 @@
4180 + }
4181 +
4182 + /* replaces a block of text */
4183 +-static void put_paragraph (WEdit * edit, unsigned char *t, long p, long q, int indent, int size)
4184 ++static void put_paragraph (WEdit * edit, mc_wchar_t *t, long p, long q, int indent, int size)
4185 + {
4186 + long cursor;
4187 +- int i, c = 0;
4188 ++ int i;
4189 ++ mc_wchar_t c = 0;
4190 + cursor = edit->curs1;
4191 + if (indent)
4192 ++#ifndef UTF8
4193 + while (strchr ("\t ", edit_get_byte (edit, p)))
4194 ++#else /* UTF8 */
4195 ++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
4196 ++#endif /* UTF8 */
4197 + p++;
4198 + for (i = 0; i < size; i++, p++) {
4199 + if (i && indent) {
4200 + if (t[i - 1] == '\n' && c == '\n') {
4201 ++#ifndef UTF8
4202 + while (strchr ("\t ", edit_get_byte (edit, p)))
4203 ++#else /* UTF8 */
4204 ++ while (wcschr (L"\t ", edit_get_byte (edit, p)))
4205 ++#endif /* UTF8 */
4206 + p++;
4207 + } else if (t[i - 1] == '\n') {
4208 + long curs;
4209 +@@ -281,7 +312,11 @@
4210 + p = edit->curs1;
4211 + } else if (c == '\n') {
4212 + edit_cursor_move (edit, p - edit->curs1);
4213 ++#ifndef UTF8
4214 + while (strchr ("\t ", edit_get_byte (edit, p))) {
4215 ++#else /* UTF8 */
4216 ++ while (wcschr (L"\t ", edit_get_byte (edit, p))) {
4217 ++#endif /* UTF8 */
4218 + edit_delete (edit);
4219 + if (cursor > edit->curs1)
4220 + cursor--;
4221 +@@ -314,7 +349,7 @@
4222 + {
4223 + long p, q;
4224 + int size;
4225 +- unsigned char *t;
4226 ++ mc_wchar_t *t;
4227 + int indent = 0;
4228 + if (option_word_wrap_line_length < 2)
4229 + return;
4230 +@@ -324,17 +359,25 @@
4231 + q = end_paragraph (edit, force);
4232 + indent = test_indent (edit, p, q);
4233 + t = get_paragraph (edit, p, q, indent, &size);
4234 +- if (!t)
4235 ++ if (!t)
4236 + return;
4237 + if (!force) {
4238 + int i;
4239 ++#ifndef UTF8
4240 + if (strchr (NO_FORMAT_CHARS_START, *t)) {
4241 ++#else /* UTF8 */
4242 ++ if (wcschr (NO_FORMAT_CHARS_START, *t)) {
4243 ++#endif /* UTF8 */
4244 + g_free (t);
4245 + return;
4246 + }
4247 + for (i = 0; i < size - 1; i++) {
4248 + if (t[i] == '\n') {
4249 ++#ifndef UTF8
4250 + if (strchr (NO_FORMAT_CHARS_START "\t ", t[i + 1])) {
4251 ++#else /* UTF8 */
4252 ++ if (wcschr (NO_FORMAT_CHARS_START "\t", t[i + 1])) {
4253 ++#endif /* UTF8 */
4254 + g_free (t);
4255 + return;
4256 + }
4257 +diff -Naur mc-4.6.1-old/src/achown.c mc-4.6.1/src/achown.c
4258 +--- mc-4.6.1-old/src/achown.c 2005-07-23 18:52:02.000000000 +0200
4259 ++++ mc-4.6.1/src/achown.c 2005-10-28 10:08:08.094192848 +0200
4260 +@@ -583,6 +583,12 @@
4261 + b_att[2] = button_new (XTRACT (6));
4262 + b_user = button_new (XTRACT (5));
4263 + b_group = button_new (XTRACT (4));
4264 ++#ifdef UTF8
4265 ++ if (SLsmg_Is_Unicode) {
4266 ++ b_user->text = g_realloc (b_user->text, MB_CUR_MAX * 15 + 1);
4267 ++ b_group->text = g_realloc (b_group->text, MB_CUR_MAX * 15 + 1);
4268 ++ }
4269 ++#endif
4270 +
4271 + add_widget (ch_dlg, b_group);
4272 + add_widget (ch_dlg, b_user);
4273 +diff -Naur mc-4.6.1-old/src/boxes.c mc-4.6.1/src/boxes.c
4274 +--- mc-4.6.1-old/src/boxes.c 2005-05-27 16:19:18.000000000 +0200
4275 ++++ mc-4.6.1/src/boxes.c 2005-10-28 10:08:08.079195128 +0200
4276 +@@ -150,23 +150,23 @@
4277 + display_title = _(display_title);
4278 + for (i = 0; i < LIST_TYPES; i++) {
4279 + displays[i] = _(displays[i]);
4280 +- if ((l = strlen (displays[i])) > maxlen)
4281 ++ if ((l = mbstrlen (displays[i])) > maxlen)
4282 + maxlen = l;
4283 + }
4284 +
4285 +- i = strlen (ok_button) + 5;
4286 +- l = strlen (cancel_button) + 3;
4287 ++ i = mbstrlen (ok_button) + 5;
4288 ++ l = mbstrlen (cancel_button) + 3;
4289 + l = max (i, l);
4290 +
4291 + i = maxlen + l + 16;
4292 + if (i > DISPLAY_X)
4293 + DISPLAY_X = i;
4294 +
4295 +- i = strlen (user_mini_status) + 13;
4296 ++ i = mbstrlen (user_mini_status) + 13;
4297 + if (i > DISPLAY_X)
4298 + DISPLAY_X = i;
4299 +
4300 +- i = strlen (display_title) + 10;
4301 ++ i = mbstrlen (display_title) + 10;
4302 + if (i > DISPLAY_X)
4303 + DISPLAY_X = i;
4304 +
4305 +@@ -285,20 +285,20 @@
4306 + int maxlen = 0;
4307 + for (i = SORT_TYPES - 1; i >= 0; i--) {
4308 + sort_orders_names[i] = _(sort_orders[i].sort_name);
4309 +- r = strlen (sort_orders_names[i]);
4310 ++ r = mbstrlen (sort_orders_names[i]);
4311 + if (r > maxlen)
4312 + maxlen = r;
4313 + }
4314 +
4315 + check_pos = maxlen + 9;
4316 +
4317 +- r = strlen (reverse_label) + 4;
4318 +- i = strlen (case_label) + 4;
4319 ++ r = mbstrlen (reverse_label) + 4;
4320 ++ i = mbstrlen (case_label) + 4;
4321 + if (i > r)
4322 + r = i;
4323 +
4324 +- l = strlen (ok_button) + 6;
4325 +- i = strlen (cancel_button) + 4;
4326 ++ l = mbstrlen (ok_button) + 6;
4327 ++ i = mbstrlen (cancel_button) + 4;
4328 + if (i > l)
4329 + l = i;
4330 +
4331 +@@ -307,7 +307,7 @@
4332 + if (i > SORT_X)
4333 + SORT_X = i;
4334 +
4335 +- i = strlen (sort_title) + 6;
4336 ++ i = mbstrlen (sort_title) + 6;
4337 + if (i > SORT_X)
4338 + SORT_X = i;
4339 +
4340 +@@ -402,7 +402,7 @@
4341 + while (i--)
4342 + {
4343 + conf_widgets [i].text = _(conf_widgets [i].text);
4344 +- l1 = strlen (conf_widgets [i].text) + 3;
4345 ++ l1 = mbstrlen (conf_widgets [i].text) + 3;
4346 + if (l1 > maxlen)
4347 + maxlen = l1;
4348 + }
4349 +@@ -417,8 +417,8 @@
4350 + * And this for the case when buttons with some space to the right
4351 + * do not fit within 2/6
4352 + */
4353 +- l1 = strlen (conf_widgets [0].text) + 3;
4354 +- i = strlen (conf_widgets [1].text) + 5;
4355 ++ l1 = mbstrlen (conf_widgets [0].text) + 3;
4356 ++ i = mbstrlen (conf_widgets [1].text) + 5;
4357 + if (i > l1)
4358 + l1 = i;
4359 +
4360 +@@ -489,11 +489,11 @@
4361 + {
4362 + display_widgets [i].text = _(display_widgets[i].text);
4363 + display_bits_str [i] = _(display_bits_str [i]);
4364 +- l1 = strlen (display_bits_str [i]);
4365 ++ l1 = mbstrlen (display_bits_str [i]);
4366 + if (l1 > maxlen)
4367 + maxlen = l1;
4368 + }
4369 +- l1 = strlen (display_widgets [2].text);
4370 ++ l1 = mbstrlen (display_widgets [2].text);
4371 + if (l1 > maxlen)
4372 + maxlen = l1;
4373 +
4374 +@@ -501,8 +501,8 @@
4375 + display_bits.xlen = (maxlen + 5) * 6 / 4;
4376 +
4377 + /* See above confirm_box */
4378 +- l1 = strlen (display_widgets [0].text) + 3;
4379 +- i = strlen (display_widgets [1].text) + 5;
4380 ++ l1 = mbstrlen (display_widgets [0].text) + 3;
4381 ++ i = mbstrlen (display_widgets [1].text) + 5;
4382 + if (i > l1)
4383 + l1 = i;
4384 +
4385 +@@ -597,7 +597,7 @@
4386 +
4387 + cpname = _("&Select");
4388 + add_widget (dbits_dlg,
4389 +- button_new (4, DISPX - 8 - strlen (cpname), B_USER,
4390 ++ button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER,
4391 + NORMAL_BUTTON, cpname, sel_charset_button));
4392 +
4393 + return dbits_dlg;
4394 +@@ -803,7 +803,7 @@
4395 + quick_widgets [1].y_divisions =
4396 + quick_widgets [0].y_divisions = Quick_input.ylen = 5;
4397 +
4398 +- len = strlen (quick_widgets [1].text);
4399 ++ len = mbstrlen (quick_widgets [1].text);
4400 +
4401 + quick_widgets [0].relative_x =
4402 + quick_widgets [1].relative_x + len + 1;
4403 +@@ -962,7 +962,7 @@
4404 + {
4405 + job_buttons [i].name = _(job_buttons [i].name);
4406 +
4407 +- len = strlen (job_buttons [i].name) + 4;
4408 ++ len = mbstrlen (job_buttons [i].name) + 4;
4409 + JOBS_X = max (JOBS_X, startx + len + 3);
4410 +
4411 + job_buttons [i].xpos = startx;
4412 +@@ -971,7 +971,7 @@
4413 +
4414 + /* Last button - Ok a.k.a. Cancel :) */
4415 + job_buttons [n_buttons - 1].xpos =
4416 +- JOBS_X - strlen (job_buttons [n_buttons - 1].name) - 7;
4417 ++ JOBS_X - mbstrlen (job_buttons [n_buttons - 1].name) - 7;
4418 +
4419 + i18n_flag = 1;
4420 + }
4421 +@@ -1029,7 +1029,7 @@
4422 +
4423 + while (i--)
4424 + {
4425 +- l1 = strlen (labs [i] = _(labs [i]));
4426 ++ l1 = mbstrlen (labs [i] = _(labs [i]));
4427 + if (l1 > maxlen)
4428 + maxlen = l1;
4429 + }
4430 +@@ -1039,7 +1039,7 @@
4431 +
4432 + for (i = sizeof(buts)/sizeof(buts[0]), l1 = 0; i--; )
4433 + {
4434 +- l1 += strlen (buts [i] = _(buts [i]));
4435 ++ l1 += mbstrlen (buts [i] = _(buts [i]));
4436 + }
4437 + l1 += 15;
4438 + if (l1 > dialog_x)
4439 +@@ -1048,7 +1048,7 @@
4440 + ilen = dialog_x - 7 - maxlen; /* for the case of very long buttons :) */
4441 + istart = dialog_x - 3 - ilen;
4442 +
4443 +- b2 = dialog_x - (strlen(buts[1]) + 6);
4444 ++ b2 = dialog_x - (mbstrlen(buts[1]) + 6);
4445 +
4446 + i18n_flag = 1;
4447 + }
4448 +diff -Naur mc-4.6.1-old/src/dialog.c mc-4.6.1/src/dialog.c
4449 +--- mc-4.6.1-old/src/dialog.c 2005-05-27 16:19:18.000000000 +0200
4450 ++++ mc-4.6.1/src/dialog.c 2005-10-28 10:08:07.891223704 +0200
4451 +@@ -162,7 +162,7 @@
4452 +
4453 + if (h->title) {
4454 + attrset (HOT_NORMALC);
4455 +- dlg_move (h, space, (h->cols - strlen (h->title)) / 2);
4456 ++ dlg_move (h, space, (h->cols - mbstrlen (h->title)) / 2);
4457 + addstr (h->title);
4458 + }
4459 + }
4460 +diff -Naur mc-4.6.1-old/src/file.c mc-4.6.1/src/file.c
4461 +--- mc-4.6.1-old/src/file.c 2005-05-27 16:19:18.000000000 +0200
4462 ++++ mc-4.6.1/src/file.c 2005-10-28 10:08:08.002206832 +0200
4463 +@@ -165,15 +165,20 @@
4464 + do_transform_source (FileOpContext *ctx, const unsigned char *source)
4465 + {
4466 + size_t j, k, l, len;
4467 +- unsigned const char *fnsource = x_basename (source);
4468 ++ unsigned const char *fnsource = g_strdup (x_basename (source));
4469 + int next_reg;
4470 + enum CaseConvs case_conv = NO_CONV;
4471 + static unsigned char fntarget[MC_MAXPATHLEN];
4472 +
4473 ++#ifdef UTF8
4474 ++ fix_utf8(fnsource);
4475 ++#endif
4476 ++
4477 + len = strlen (fnsource);
4478 + j = re_match (&ctx->rx, fnsource, len, 0, &ctx->regs);
4479 + if (j != len) {
4480 + transform_error = FILE_SKIP;
4481 ++ g_free(fnsource);
4482 + return NULL;
4483 + }
4484 + for (next_reg = 1, j = 0, k = 0; j < strlen (ctx->dest_mask); j++) {
4485 +@@ -217,6 +222,7 @@
4486 + || ctx->regs.start[next_reg] < 0) {
4487 + message (1, MSG_ERROR, _(" Invalid target mask "));
4488 + transform_error = FILE_ABORT;
4489 ++ g_free(fnsource);
4490 + return NULL;
4491 + }
4492 + for (l = (size_t) ctx->regs.start[next_reg];
4493 +@@ -231,6 +237,7 @@
4494 + }
4495 + }
4496 + fntarget[k] = 0;
4497 ++ g_free(fnsource);
4498 + return fntarget;
4499 + }
4500 +
4501 +diff -Naur mc-4.6.1-old/src/filegui.c mc-4.6.1/src/filegui.c
4502 +--- mc-4.6.1-old/src/filegui.c 2005-05-27 16:19:18.000000000 +0200
4503 ++++ mc-4.6.1/src/filegui.c 2005-10-28 10:08:08.140185856 +0200
4504 +@@ -69,6 +69,7 @@
4505 + #include "filegui.h"
4506 + #include "key.h" /* get_event */
4507 + #include "util.h" /* strip_password() */
4508 ++#include "tty.h"
4509 +
4510 + /* }}} */
4511 +
4512 +@@ -564,8 +565,8 @@
4513 + * longest of "Overwrite..." labels
4514 + * (assume "Target date..." are short enough)
4515 + */
4516 +- l1 = max (strlen (rd_widgets[6].text),
4517 +- strlen (rd_widgets[11].text));
4518 ++ l1 = max (mbstrlen (rd_widgets[6].text),
4519 ++ mbstrlen (rd_widgets[11].text));
4520 +
4521 + /* longest of button rows */
4522 + i = sizeof (rd_widgets) / sizeof (rd_widgets[0]);
4523 +@@ -576,7 +577,7 @@
4524 + l2 = max (l2, l);
4525 + l = 0;
4526 + }
4527 +- l += strlen (rd_widgets[i].text) + 4;
4528 ++ l += mbstrlen (rd_widgets[i].text) + 4;
4529 + }
4530 + }
4531 + l2 = max (l2, l); /* last row */
4532 +@@ -594,12 +595,12 @@
4533 + l = l1;
4534 + }
4535 + rd_widgets[i].xpos = l;
4536 +- l += strlen (rd_widgets[i].text) + 4;
4537 ++ l += mbstrlen (rd_widgets[i].text) + 4;
4538 + }
4539 + }
4540 + /* Abort button is centered */
4541 + rd_widgets[1].xpos =
4542 +- (rd_xlen - strlen (rd_widgets[1].text) - 3) / 2;
4543 ++ (rd_xlen - mbstrlen (rd_widgets[1].text) - 3) / 2;
4544 + }
4545 + #endif /* ENABLE_NLS */
4546 +
4547 +@@ -618,7 +619,7 @@
4548 +
4549 + ADD_RD_LABEL (ui, 0,
4550 + name_trunc (ui->replace_filename,
4551 +- rd_trunc - strlen (rd_widgets[0].text)), 0);
4552 ++ rd_trunc - mbstrlen (rd_widgets[0].text)), 0);
4553 + ADD_RD_BUTTON (1);
4554 +
4555 + ADD_RD_BUTTON (2);
4556 +@@ -805,36 +806,36 @@
4557 + if (fmd_widgets[i].text[0] != '\0')
4558 + fmd_widgets[i].text = _(fmd_widgets[i].text);
4559 +
4560 +- len = strlen (fmd_widgets[FMCB11].text)
4561 +- + strlen (fmd_widgets[FMCB21].text) + 15;
4562 ++ len = mbstrlen (fmd_widgets[FMCB11].text)
4563 ++ + mbstrlen (fmd_widgets[FMCB21].text) + 15;
4564 + fmd_xlen = max (fmd_xlen, len);
4565 +
4566 +- len = strlen (fmd_widgets[FMCB12].text)
4567 +- + strlen (fmd_widgets[FMCB22].text) + 15;
4568 ++ len = mbstrlen (fmd_widgets[FMCB12].text)
4569 ++ + mbstrlen (fmd_widgets[FMCB22].text) + 15;
4570 + fmd_xlen = max (fmd_xlen, len);
4571 +
4572 +- len = strlen (fmd_widgets[FMBRGT].text)
4573 +- + strlen (fmd_widgets[FMBLFT].text) + 11;
4574 ++ len = mbstrlen (fmd_widgets[FMBRGT].text)
4575 ++ + mbstrlen (fmd_widgets[FMBLFT].text) + 11;
4576 +
4577 + #ifdef FMBMID
4578 +- len += strlen (fmd_widgets[FMBMID].text) + 6;
4579 ++ len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
4580 + #endif
4581 +
4582 + fmd_xlen = max (fmd_xlen, len + 4);
4583 +
4584 + len = (fmd_xlen - (len + 6)) / 2;
4585 + i = fmd_widgets[FMBLFT].relative_x = len + 3;
4586 +- i += strlen (fmd_widgets[FMBLFT].text) + 8;
4587 ++ i += mbstrlen (fmd_widgets[FMBLFT].text) + 8;
4588 +
4589 + #ifdef FMBMID
4590 + fmd_widgets[FMBMID].relative_x = i;
4591 +- i += strlen (fmd_widgets[FMBMID].text) + 6;
4592 ++ i += mbstrlen (fmd_widgets[FMBMID].text) + 6;
4593 + #endif
4594 +
4595 + fmd_widgets[FMBRGT].relative_x = i;
4596 +
4597 + #define chkbox_xpos(i) \
4598 +- fmd_widgets [i].relative_x = fmd_xlen - strlen (fmd_widgets [i].text) - 6
4599 ++ fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6
4600 +
4601 + chkbox_xpos (FMCB0);
4602 + chkbox_xpos (FMCB21);
4603 +@@ -856,7 +857,7 @@
4604 +
4605 + char *
4606 + file_mask_dialog (FileOpContext *ctx, FileOperation operation, const char *text,
4607 +- const char *def_text, int only_one, int *do_background)
4608 ++ const char *def_text_orig, int only_one, int *do_background)
4609 + {
4610 + int source_easy_patterns = easy_patterns;
4611 + char *source_mask, *orig_mask, *dest_dir, *tmpdest;
4612 +@@ -865,12 +866,20 @@
4613 + struct stat buf;
4614 + int val;
4615 + QuickDialog Quick_input;
4616 +-
4617 ++ char *def_text;
4618 + g_return_val_if_fail (ctx != NULL, NULL);
4619 ++
4620 ++ def_text = g_strdup(def_text_orig);
4621 ++
4622 + #if 0
4623 + message (1, __FUNCTION__, "text = `%s' \n def_text = `%s'", text,
4624 + def_text);
4625 + #endif
4626 ++
4627 ++#ifdef UTF8
4628 ++ fix_utf8(def_text);
4629 ++#endif
4630 ++
4631 + fmd_init_i18n (FALSE);
4632 +
4633 + /* Set up the result pointers */
4634 +@@ -929,6 +938,7 @@
4635 + orig_mask = source_mask;
4636 + if (!dest_dir || !*dest_dir) {
4637 + g_free (source_mask);
4638 ++ g_free(def_text);
4639 + return dest_dir;
4640 + }
4641 + if (source_easy_patterns) {
4642 +@@ -982,5 +992,6 @@
4643 + }
4644 + if (val == B_USER)
4645 + *do_background = 1;
4646 ++ g_free(def_text);
4647 + return dest_dir;
4648 + }
4649 +diff -Naur mc-4.6.1-old/src/find.c mc-4.6.1/src/find.c
4650 +--- mc-4.6.1-old/src/find.c 2005-05-27 16:19:18.000000000 +0200
4651 ++++ mc-4.6.1/src/find.c 2005-10-28 10:08:08.049199688 +0200
4652 +@@ -205,7 +205,7 @@
4653 + int l1, maxlen = 0;
4654 +
4655 + while (i--) {
4656 +- l1 = strlen (labs[i] = _(labs[i]));
4657 ++ l1 = mbstrlen (labs[i] = _(labs[i]));
4658 + if (l1 > maxlen)
4659 + maxlen = l1;
4660 + }
4661 +@@ -214,7 +214,7 @@
4662 + FIND_X = i;
4663 +
4664 + for (i = sizeof (buts) / sizeof (buts[0]), l1 = 0; i--;) {
4665 +- l1 += strlen (buts[i] = _(buts[i]));
4666 ++ l1 += mbstrlen (buts[i] = _(buts[i]));
4667 + }
4668 + l1 += 21;
4669 + if (l1 > FIND_X)
4670 +@@ -223,8 +223,8 @@
4671 + ilen = FIND_X - 7 - maxlen; /* for the case of very long buttons :) */
4672 + istart = FIND_X - 3 - ilen;
4673 +
4674 +- b1 = b0 + strlen (buts[0]) + 7;
4675 +- b2 = FIND_X - (strlen (buts[2]) + 6);
4676 ++ b1 = b0 + mbstrlen (buts[0]) + 7;
4677 ++ b2 = FIND_X - (mbstrlen (buts[2]) + 6);
4678 +
4679 + i18n_flag = 1;
4680 + case_label = _(case_label);
4681 +@@ -813,7 +813,7 @@
4682 + if (!i18n_flag) {
4683 + register int i = sizeof (fbuts) / sizeof (fbuts[0]);
4684 + while (i--)
4685 +- fbuts[i].len = strlen (fbuts[i].text = _(fbuts[i].text)) + 3;
4686 ++ fbuts[i].len = mbstrlen (fbuts[i].text = _(fbuts[i].text)) + 3;
4687 + fbuts[2].len += 2; /* DEFPUSH_BUTTON */
4688 + i18n_flag = 1;
4689 + }
4690 +diff -Naur mc-4.6.1-old/src/global.h mc-4.6.1/src/global.h
4691 +--- mc-4.6.1-old/src/global.h 2004-09-25 15:46:23.000000000 +0200
4692 ++++ mc-4.6.1/src/global.h 2005-10-28 10:11:08.071832088 +0200
4693 +@@ -146,6 +146,13 @@
4694 + # define N_(String) (String)
4695 + #endif /* !ENABLE_NLS */
4696 +
4697 ++#include <slang.h>
4698 ++#if SLANG_VERSION >= 20000
4699 ++#define UTF8 1
4700 ++#define SLsmg_Is_Unicode SLsmg_is_utf8_mode()
4701 ++void SLsmg_write_nwchars(wchar_t *s, size_t n);
4702 ++#endif
4703 ++
4704 + #include "fs.h"
4705 + #include "util.h"
4706 +
4707 +diff -Naur mc-4.6.1-old/src/help.c mc-4.6.1/src/help.c
4708 +--- mc-4.6.1-old/src/help.c 2005-05-27 16:19:18.000000000 +0200
4709 ++++ mc-4.6.1/src/help.c 2005-10-28 10:09:53.961098632 +0200
4710 +@@ -445,10 +445,28 @@
4711 + #ifndef HAVE_SLANG
4712 + addch (acs_map [c]);
4713 + #else
4714 ++#if defined(UTF8) && SLANG_VERSION < 20000
4715 ++ SLsmg_draw_object (h->y + line + 2, h->x + col + 2, acs_map [c]);
4716 ++#else
4717 + SLsmg_draw_object (h->y + line + 2, h->x + col + 2, c);
4718 ++#endif /* UTF8 */
4719 + #endif
4720 ++ } else {
4721 ++#ifdef UTF8
4722 ++ if (SLsmg_Is_Unicode) {
4723 ++ int len;
4724 ++ mbstate_t mbs;
4725 ++ wchar_t wc;
4726 ++ memset (&mbs, 0, sizeof (mbs));
4727 ++ len = mbrtowc(&wc, p, MB_CUR_MAX, &mbs);
4728 ++ if (len <= 0) len = 1; /* skip broken multibyte chars */
4729 ++
4730 ++ SLsmg_write_char(wc);
4731 ++ p += len - 1;
4732 + } else
4733 ++#endif
4734 + addch (c);
4735 ++ }
4736 + col++;
4737 + break;
4738 + }
4739 +@@ -771,6 +789,12 @@
4740 + message (1, MSG_ERROR, _(" Cannot open file %s \n %s "), filename ? filename : hlpfile,
4741 + unix_error_string (errno));
4742 + }
4743 ++ else
4744 ++ {
4745 ++ char *conv = utf8_to_local(data);
4746 ++ g_free(data);
4747 ++ data = conv;
4748 ++ }
4749 +
4750 + if (!filename)
4751 + g_free (hlpfile);
4752 +diff -Naur mc-4.6.1-old/src/hotlist.c mc-4.6.1/src/hotlist.c
4753 +--- mc-4.6.1-old/src/hotlist.c 2005-05-27 16:19:18.000000000 +0200
4754 ++++ mc-4.6.1/src/hotlist.c 2005-10-28 10:08:07.918219600 +0200
4755 +@@ -555,7 +555,7 @@
4756 +
4757 + row = hotlist_but [i].y;
4758 + ++count [row];
4759 +- len [row] += strlen (hotlist_but [i].text) + 5;
4760 ++ len [row] += mbstrlen (hotlist_but [i].text) + 5;
4761 + if (hotlist_but [i].flags == DEFPUSH_BUTTON)
4762 + len [row] += 2;
4763 + }
4764 +@@ -580,12 +580,12 @@
4765 + /* not first int the row */
4766 + if (!strcmp (hotlist_but [i].text, cancel_but))
4767 + hotlist_but [i].x =
4768 +- cols - strlen (hotlist_but [i].text) - 13;
4769 ++ cols - mbstrlen (hotlist_but [i].text) - 13;
4770 + else
4771 + hotlist_but [i].x = cur_x [row];
4772 + }
4773 +
4774 +- cur_x [row] += strlen (hotlist_but [i].text) + 2
4775 ++ cur_x [row] += mbstrlen (hotlist_but [i].text) + 2
4776 + + (hotlist_but [i].flags == DEFPUSH_BUTTON ? 5 : 3);
4777 + }
4778 + }
4779 +@@ -814,7 +814,7 @@
4780 + for (i = 0; i < 3; i++)
4781 + {
4782 + qw [i].text = _(qw [i].text);
4783 +- l[i] = strlen (qw [i].text) + 3;
4784 ++ l[i] = mbstrlen (qw [i].text) + 3;
4785 + }
4786 + space = (len - 4 - l[0] - l[1] - l[2]) / 4;
4787 +
4788 +@@ -860,7 +860,7 @@
4789 + static int i18n_flag = 0;
4790 + #endif /* ENABLE_NLS */
4791 +
4792 +- len = max (strlen (header), (size_t) msglen (text1, &lines1));
4793 ++ len = max ((int) mbstrlen (header), (size_t) msglen (text1, &lines1));
4794 + len = max (len, (size_t) msglen (text2, &lines2)) + 4;
4795 + len = max (len, 64);
4796 +
4797 +@@ -955,7 +955,7 @@
4798 + static int i18n_flag = 0;
4799 + #endif /* ENABLE_NLS */
4800 +
4801 +- len = max (strlen (header), (size_t) msglen (label, &lines)) + 4;
4802 ++ len = max ((int) mbstrlen (header), (size_t) msglen (label, &lines)) + 4;
4803 + len = max (len, 64);
4804 +
4805 + #ifdef ENABLE_NLS
4806 +@@ -1011,7 +1011,7 @@
4807 + {
4808 + char *prompt, *label;
4809 + const char *cp = _("Label for \"%s\":");
4810 +- int l = strlen (cp);
4811 ++ int l = mbstrlen (cp);
4812 + char *label_string = g_strdup (current_panel->cwd);
4813 +
4814 + strip_password (label_string, 1);
4815 +diff -Naur mc-4.6.1-old/src/layout.c mc-4.6.1/src/layout.c
4816 +--- mc-4.6.1-old/src/layout.c 2005-05-27 16:19:18.000000000 +0200
4817 ++++ mc-4.6.1/src/layout.c 2005-10-28 10:08:07.947215192 +0200
4818 +@@ -362,36 +362,36 @@
4819 +
4820 + while (i--) {
4821 + s_split_direction[i] = _(s_split_direction[i]);
4822 +- l1 = strlen (s_split_direction[i]) + 7;
4823 ++ l1 = mbstrlen (s_split_direction[i]) + 7;
4824 + if (l1 > first_width)
4825 + first_width = l1;
4826 + }
4827 +
4828 + for (i = 0; i <= 8; i++) {
4829 + check_options[i].text = _(check_options[i].text);
4830 +- l1 = strlen (check_options[i].text) + 7;
4831 ++ l1 = mbstrlen (check_options[i].text) + 7;
4832 + if (l1 > first_width)
4833 + first_width = l1;
4834 + }
4835 +
4836 +- l1 = strlen (title1) + 1;
4837 ++ l1 = mbstrlen (title1) + 1;
4838 + if (l1 > first_width)
4839 + first_width = l1;
4840 +
4841 +- l1 = strlen (title2) + 1;
4842 ++ l1 = mbstrlen (title2) + 1;
4843 + if (l1 > first_width)
4844 + first_width = l1;
4845 +
4846 +
4847 +- second_width = strlen (title3) + 1;
4848 ++ second_width = mbstrlen (title3) + 1;
4849 + for (i = 0; i < 6; i++) {
4850 + check_options[i].text = _(check_options[i].text);
4851 +- l1 = strlen (check_options[i].text) + 7;
4852 ++ l1 = mbstrlen (check_options[i].text) + 7;
4853 + if (l1 > second_width)
4854 + second_width = l1;
4855 + }
4856 + if (console_flag) {
4857 +- l1 = strlen (output_lines_label) + 13;
4858 ++ l1 = mbstrlen (output_lines_label) + 13;
4859 + if (l1 > second_width)
4860 + second_width = l1;
4861 + }
4862 +@@ -405,14 +405,14 @@
4863 + *
4864 + * Now the last thing to do - properly space buttons...
4865 + */
4866 +- l1 = 11 + strlen (ok_button) /* 14 - all brackets and inner space */
4867 +- +strlen (save_button) /* notice: it is 3 char less because */
4868 +- +strlen (cancel_button); /* of '&' char in button text */
4869 ++ l1 = 11 + mbstrlen (ok_button) /* 14 - all brackets and inner space */
4870 ++ +mbstrlen (save_button) /* notice: it is 3 char less because */
4871 ++ +mbstrlen (cancel_button); /* of '&' char in button text */
4872 +
4873 + i = (first_width + second_width - l1) / 4;
4874 + b1 = 5 + i;
4875 +- b2 = b1 + strlen (ok_button) + i + 6;
4876 +- b3 = b2 + strlen (save_button) + i + 4;
4877 ++ b2 = b1 + mbstrlen (ok_button) + i + 6;
4878 ++ b3 = b2 + mbstrlen (save_button) + i + 4;
4879 +
4880 + i18n_layt_flag = 1;
4881 + }
4882 +@@ -684,7 +684,7 @@
4883 + panel_do_cols (0);
4884 + panel_do_cols (1);
4885 +
4886 +- promptl = strlen (prompt);
4887 ++ promptl = mbstrlen (prompt);
4888 +
4889 + widget_set_size (&the_menubar->widget, 0, 0, 1, COLS);
4890 +
4891 +diff -Naur mc-4.6.1-old/src/learn.c mc-4.6.1/src/learn.c
4892 +--- mc-4.6.1-old/src/learn.c 2005-05-27 16:19:18.000000000 +0200
4893 ++++ mc-4.6.1/src/learn.c 2005-10-28 10:08:07.787239512 +0200
4894 +@@ -236,7 +236,7 @@
4895 + learn_but[0].x = 78 / 2 + 4;
4896 +
4897 + learn_but[1].text = _(learn_but[1].text);
4898 +- learn_but[1].x = 78 / 2 - (strlen (learn_but[1].text) + 9);
4899 ++ learn_but[1].x = 78 / 2 - (mbstrlen (learn_but[1].text) + 9);
4900 +
4901 + learn_title = _(learn_title);
4902 + i18n_flag = 1;
4903 +diff -Naur mc-4.6.1-old/src/main.c mc-4.6.1/src/main.c
4904 +--- mc-4.6.1-old/src/main.c 2005-07-23 18:52:02.000000000 +0200
4905 ++++ mc-4.6.1/src/main.c 2005-10-28 10:08:07.816235104 +0200
4906 +@@ -1609,7 +1609,11 @@
4907 + if (xterm_flag && xterm_title) {
4908 + p = s = g_strdup (strip_home_and_password (current_panel->cwd));
4909 + do {
4910 ++#ifndef UTF8
4911 + if (!is_printable (*s))
4912 ++#else /* UTF8 */
4913 ++ if (*s < ' ')
4914 ++#endif /* UTF8 */
4915 + *s = '?';
4916 + } while (*++s);
4917 + fprintf (stdout, "\33]0;mc - %s\7", p);
4918 +diff -Naur mc-4.6.1-old/src/menu.c mc-4.6.1/src/menu.c
4919 +--- mc-4.6.1-old/src/menu.c 2005-05-27 16:19:18.000000000 +0200
4920 ++++ mc-4.6.1/src/menu.c 2005-10-28 10:08:08.110190416 +0200
4921 +@@ -20,6 +20,8 @@
4922 + #include <stdarg.h>
4923 + #include <sys/types.h>
4924 + #include <ctype.h>
4925 ++#include <wchar.h>
4926 ++
4927 + #include "global.h"
4928 + #include "tty.h"
4929 + #include "menu.h"
4930 +@@ -50,33 +52,96 @@
4931 + {
4932 + Menu *menu;
4933 + const char *cp;
4934 ++ int wlen = 0;
4935 ++ mbstate_t s;
4936 +
4937 + menu = (Menu *) g_malloc (sizeof (*menu));
4938 + menu->count = count;
4939 + menu->max_entry_len = 20;
4940 + menu->entries = entries;
4941 ++ menu->name = g_strdup (name);
4942 ++ menu_scan_hotkey (menu);
4943 ++#ifdef UTF8
4944 ++ menu->wentries = NULL;
4945 ++ menu->wname = NULL;
4946 ++ if (SLsmg_Is_Unicode) {
4947 ++ const char *str = menu->name;
4948 ++ memset (&s, 0, sizeof (s));
4949 ++ wlen = mbsrtowcs (NULL, &str, -1, &s);
4950 ++ if (wlen > 0)
4951 ++ ++wlen;
4952 ++ else {
4953 ++ wlen = 0;
4954 ++ memset (&s, 0, sizeof (s));
4955 ++ }
4956 ++ }
4957 ++#endif
4958 +
4959 + if (entries != (menu_entry*) NULL) {
4960 + register menu_entry* mp;
4961 + for (mp = entries; count--; mp++) {
4962 + if (mp->text[0] != '\0') {
4963 ++ int len;
4964 + #ifdef ENABLE_NLS
4965 + mp->text = _(mp->text);
4966 + #endif /* ENABLE_NLS */
4967 + cp = strchr (mp->text,'&');
4968 +
4969 ++#ifdef UTF8
4970 ++ if (SLsmg_Is_Unicode) {
4971 ++ len = mbstrlen(mp->text) + 1;
4972 ++ wlen += len;
4973 ++ menu->max_entry_len = max (len - 1, menu->max_entry_len);
4974 ++ } else
4975 ++#endif
4976 ++ len = strlen (mp->text);
4977 ++
4978 + if (cp != NULL && *(cp+1) != '\0') {
4979 + mp->hot_key = tolower (*(cp+1));
4980 +- menu->max_entry_len = max ((int) (strlen (mp->text) - 1),
4981 +- menu->max_entry_len);
4982 ++ menu->max_entry_len = max (len - 1, menu->max_entry_len);
4983 + } else {
4984 +- menu->max_entry_len = max ((int) strlen (mp->text),
4985 +- menu->max_entry_len);
4986 ++ menu->max_entry_len = max (len, menu->max_entry_len);
4987 + }
4988 + }
4989 + }
4990 + }
4991 +
4992 ++#ifdef UTF8
4993 ++ if (wlen) {
4994 ++ wchar_t *wp;
4995 ++ const char *str;
4996 ++ int len;
4997 ++
4998 ++ menu->wentries = (wchar_t **)
4999 ++ g_malloc (sizeof (wchar_t *) * menu->count
5000 ++ + wlen * sizeof (wchar_t));
5001 ++ wp = (wchar_t *) (menu->wentries + menu->count);
5002 ++ str = menu->name;
5003 ++ len = mbsrtowcs (wp, &str, wlen, &s);
5004 ++ if (len > 0) {
5005 ++ menu->wname = wp;
5006 ++ wlen -= len + 1;
5007 ++ wp += len + 1;
5008 ++ } else
5009 ++ memset (&s, 0, sizeof (s));
5010 ++ if (menu->entries != NULL)
5011 ++ for (count = 0; count < menu->count; ++count)
5012 ++ if (menu->entries[count].text[0] != '\0') {
5013 ++ str = menu->entries[count].text;
5014 ++ menu->wentries[count] = wp;
5015 ++ len = mbsrtowcs (wp, &str, wlen, &s);
5016 ++ if (len > 0) {
5017 ++ wlen -= len + 1;
5018 ++ wp += len + 1;
5019 ++ } else {
5020 ++ memset (&s, 0, sizeof (s));
5021 ++ *wp++ = L'\0';
5022 ++ --wlen;
5023 ++ }
5024 ++ }
5025 ++ }
5026 ++#endif
5027 ++
5028 + menu->name = g_strdup (name);
5029 + menu_scan_hotkey(menu);
5030 + menu->start_x = 0;
5031 +@@ -109,8 +174,26 @@
5032 + const unsigned char *text;
5033 +
5034 + addch((unsigned char)menu->entries [idx].first_letter);
5035 +- for (text = menu->entries [idx].text; *text; text++)
5036 +- {
5037 ++#ifdef UTF8
5038 ++ if (menu->wentries) {
5039 ++ wchar_t *wtext, *wp;
5040 ++
5041 ++ for (wtext = wp = menu->wentries [idx]; *wtext; wtext++) {
5042 ++ if (*wtext == L'&') {
5043 ++ if (wtext > wp)
5044 ++ SLsmg_write_nwchars (wp, wtext - wp);
5045 ++ attrset (color == MENU_SELECTED_COLOR ?
5046 ++ MENU_HOTSEL_COLOR : MENU_HOT_COLOR);
5047 ++ SLsmg_write_nwchars (++wtext, 1);
5048 ++ attrset (color);
5049 ++ wp = wtext + 1;
5050 ++ }
5051 ++ }
5052 ++ if (wtext > wp)
5053 ++ SLsmg_write_nwchars (wp, wtext - wp);
5054 ++ } else
5055 ++#endif
5056 ++ for (text = menu->entries [idx].text; *text; text++) {
5057 + if (*text != '&')
5058 + addch(*text);
5059 + else {
5060 +@@ -119,7 +202,7 @@
5061 + addch(*(++text));
5062 + attrset(color);
5063 + }
5064 +- }
5065 ++ }
5066 + }
5067 + widget_move (&menubar->widget, y, x + 1);
5068 + }
5069 +@@ -167,7 +250,13 @@
5070 + if (menubar->active)
5071 + attrset(i == menubar->selected?MENU_SELECTED_COLOR:SELECTED_COLOR);
5072 + widget_move (&menubar->widget, 0, menubar->menu [i]->start_x);
5073 +- printw ("%s", menubar->menu [i]->name);
5074 ++#ifdef UTF8
5075 ++ if (menubar->menu [i]->wname)
5076 ++ SLsmg_write_nwchars (menubar->menu [i]->wname,
5077 ++ wcslen (menubar->menu [i]->wname));
5078 ++ else
5079 ++#endif
5080 ++ printw ("%s", menubar->menu [i]->name);
5081 + }
5082 +
5083 + if (menubar->dropped)
5084 +@@ -489,7 +578,13 @@
5085 +
5086 + for (i = 0; i < items; i++)
5087 + {
5088 +- int len = strlen(menubar->menu[i]->name);
5089 ++ int len;
5090 ++#ifdef UTF8
5091 ++ if (menubar->menu[i]->wname)
5092 ++ len = wcslen (menubar->menu[i]->wname);
5093 ++ else
5094 ++#endif
5095 ++ len = strlen(menubar->menu[i]->name);
5096 + menubar->menu[i]->start_x = start_x;
5097 + start_x += len + gap;
5098 + }
5099 +@@ -502,7 +597,13 @@
5100 + for (i = 0; i < items; i++)
5101 + {
5102 + /* preserve length here, to be used below */
5103 +- gap -= (menubar->menu[i]->start_x = strlen(menubar->menu[i]->name));
5104 ++#ifdef UTF8
5105 ++ if (menubar->menu[i]->wname)
5106 ++ menubar->menu[i]->start_x = wcslen (menubar->menu[i]->wname);
5107 ++ else
5108 ++#endif
5109 ++ menubar->menu[i]->start_x = strlen (menubar->menu[i]->name);
5110 ++ gap -= menubar->menu[i]->start_x;
5111 + }
5112 +
5113 + gap /= (items - 1);
5114 +@@ -526,6 +627,9 @@
5115 + void
5116 + destroy_menu (Menu *menu)
5117 + {
5118 ++#ifdef UTF8
5119 ++ g_free (menu->wentries);
5120 ++#endif
5121 + g_free (menu->name);
5122 + g_free (menu->help_node);
5123 + g_free (menu);
5124 +diff -Naur mc-4.6.1-old/src/menu.h mc-4.6.1/src/menu.h
5125 +--- mc-4.6.1-old/src/menu.h 2004-09-18 16:30:59.000000000 +0200
5126 ++++ mc-4.6.1/src/menu.h 2005-10-28 10:08:07.949214888 +0200
5127 +@@ -21,6 +21,8 @@
5128 + menu_entry *entries;
5129 + int start_x; /* position relative to menubar start */
5130 + char *help_node;
5131 ++ wchar_t **wentries;
5132 ++ wchar_t *wname;
5133 + } Menu;
5134 +
5135 + extern int menubar_visible;
5136 +diff -Naur mc-4.6.1-old/src/myslang.h mc-4.6.1/src/myslang.h
5137 +--- mc-4.6.1-old/src/myslang.h 2004-10-12 06:32:04.000000000 +0200
5138 ++++ mc-4.6.1/src/myslang.h 2005-10-28 10:08:07.831232824 +0200
5139 +@@ -11,6 +11,10 @@
5140 + #endif /* HAVE_SLANG_SLANG_H */
5141 + #endif
5142 +
5143 ++#ifdef UTF8
5144 ++# include <wchar.h>
5145 ++#endif
5146 ++
5147 + enum {
5148 + KEY_BACKSPACE = 400,
5149 + KEY_END, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT,
5150 +diff -Naur mc-4.6.1-old/src/option.c mc-4.6.1/src/option.c
5151 +--- mc-4.6.1-old/src/option.c 2005-05-27 16:19:18.000000000 +0200
5152 ++++ mc-4.6.1/src/option.c 2005-10-28 10:08:08.121188744 +0200
5153 +@@ -124,12 +124,12 @@
5154 + title2 = _(" Pause after run... ");
5155 + title3 = _(" Other options ");
5156 +
5157 +- first_width = strlen (title1) + 1;
5158 +- second_width = strlen (title3) + 1;
5159 ++ first_width = mbstrlen (title1) + 1;
5160 ++ second_width = mbstrlen (title3) + 1;
5161 +
5162 + for (i = 0; check_options[i].text; i++) {
5163 + check_options[i].text = _(check_options[i].text);
5164 +- l1 = strlen (check_options[i].text) + 7;
5165 ++ l1 = mbstrlen (check_options[i].text) + 7;
5166 + if (i >= OTHER_OPTIONS) {
5167 + if (l1 > first_width)
5168 + first_width = l1;
5169 +@@ -142,23 +142,23 @@
5170 + i = PAUSE_OPTIONS;
5171 + while (i--) {
5172 + pause_options[i] = _(pause_options[i]);
5173 +- l1 = strlen (pause_options[i]) + 7;
5174 ++ l1 = mbstrlen (pause_options[i]) + 7;
5175 + if (l1 > first_width)
5176 + first_width = l1;
5177 + }
5178 +
5179 +- l1 = strlen (title2) + 1;
5180 ++ l1 = mbstrlen (title2) + 1;
5181 + if (l1 > first_width)
5182 + first_width = l1;
5183 +
5184 +- l1 = 11 + strlen (ok_button)
5185 +- + strlen (save_button)
5186 +- + strlen (cancel_button);
5187 ++ l1 = 11 + mbstrlen (ok_button)
5188 ++ + mbstrlen (save_button)
5189 ++ + mbstrlen (cancel_button);
5190 +
5191 + i = (first_width + second_width - l1) / 4;
5192 + b1 = 5 + i;
5193 +- b2 = b1 + strlen (ok_button) + i + 6;
5194 +- b3 = b2 + strlen (save_button) + i + 4;
5195 ++ b2 = b1 + mbstrlen (ok_button) + i + 6;
5196 ++ b3 = b2 + mbstrlen (save_button) + i + 4;
5197 +
5198 + i18n_config_flag = 1;
5199 + }
5200 +diff -Naur mc-4.6.1-old/src/panelize.c mc-4.6.1/src/panelize.c
5201 +--- mc-4.6.1-old/src/panelize.c 2005-05-27 16:19:18.000000000 +0200
5202 ++++ mc-4.6.1/src/panelize.c 2005-10-28 10:08:07.933217320 +0200
5203 +@@ -127,7 +127,7 @@
5204 + i = sizeof (panelize_but) / sizeof (panelize_but[0]);
5205 + while (i--) {
5206 + panelize_but[i].text = _(panelize_but[i].text);
5207 +- maxlen += strlen (panelize_but[i].text) + 5;
5208 ++ maxlen += mbstrlen (panelize_but[i].text) + 5;
5209 + }
5210 + maxlen += 10;
5211 +
5212 +@@ -136,11 +136,11 @@
5213 + panelize_cols = max (panelize_cols, maxlen);
5214 +
5215 + panelize_but[2].x =
5216 +- panelize_but[3].x + strlen (panelize_but[3].text) + 7;
5217 ++ panelize_but[3].x + mbstrlen (panelize_but[3].text) + 7;
5218 + panelize_but[1].x =
5219 +- panelize_but[2].x + strlen (panelize_but[2].text) + 5;
5220 ++ panelize_but[2].x + mbstrlen (panelize_but[2].text) + 5;
5221 + panelize_but[0].x =
5222 +- panelize_cols - strlen (panelize_but[0].text) - 8 - BX;
5223 ++ panelize_cols - mbstrlen (panelize_but[0].text) - 8 - BX;
5224 +
5225 + #endif /* ENABLE_NLS */
5226 +
5227 +diff -Naur mc-4.6.1-old/src/screen.c mc-4.6.1/src/screen.c
5228 +--- mc-4.6.1-old/src/screen.c 2005-05-27 16:19:18.000000000 +0200
5229 ++++ mc-4.6.1/src/screen.c 2005-10-28 10:08:07.987209112 +0200
5230 +@@ -169,22 +169,59 @@
5231 + static const char *
5232 + string_file_name (file_entry *fe, int len)
5233 + {
5234 +- static char buffer [BUF_SMALL];
5235 + size_t i;
5236 ++#ifdef UTF8
5237 ++ static char buffer [BUF_SMALL * 4];
5238 ++ mbstate_t s;
5239 ++ int mbmax = MB_CUR_MAX;
5240 ++ const char *str = fe->fname;
5241 +
5242 +- for (i = 0; i < sizeof(buffer) - 1; i++) {
5243 +- char c;
5244 ++ memset (&s, 0, sizeof (s));
5245 ++#else
5246 ++ static char buffer [BUF_SMALL];
5247 ++#endif
5248 +
5249 +- c = fe->fname[i];
5250 ++#ifdef UTF8
5251 ++ if (SLsmg_Is_Unicode)
5252 ++ for (i = 0; i < sizeof (buffer) - 1; i++) {
5253 ++ wchar_t wc;
5254 ++ int len;
5255 +
5256 +- if (!c)
5257 +- break;
5258 ++ len = mbrtowc (&wc, str, mbmax, &s);
5259 ++ if (!len)
5260 ++ break;
5261 ++ if (len < 0) {
5262 ++ memset (&s, 0, sizeof (s));
5263 ++ buffer[i] = '?';
5264 ++ str++;
5265 ++ continue;
5266 ++ }
5267 ++ if (!is_printable (wc)) {
5268 ++ buffer[i] = '?';
5269 ++ str++;
5270 ++ continue;
5271 ++ }
5272 ++ if (i >= sizeof (buffer) - len)
5273 ++ break;
5274 ++ memcpy (buffer + i, str, len);
5275 ++ i += len - 1;
5276 ++ str += len;
5277 ++ }
5278 ++ else
5279 ++#endif
5280 ++ for (i = 0; i < sizeof(buffer) - 1; i++) {
5281 ++ char c;
5282 +
5283 +- if (!is_printable(c))
5284 +- c = '?';
5285 ++ c = fe->fname[i];
5286 +
5287 +- buffer[i] = c;
5288 +- }
5289 ++ if (!c)
5290 ++ break;
5291 ++
5292 ++ if (!is_printable(c))
5293 ++ c = '?';
5294 ++
5295 ++ buffer[i] = c;
5296 ++ }
5297 +
5298 + buffer[i] = 0;
5299 + return buffer;
5300 +@@ -425,42 +462,6 @@
5301 + { "dot", 1, 0, J_RIGHT, " ", 0, string_dot, NULL },
5302 + };
5303 +
5304 +-static char *
5305 +-to_buffer (char *dest, int just_mode, int len, const char *txt)
5306 +-{
5307 +- int txtlen = strlen (txt);
5308 +- int still, over;
5309 +-
5310 +- /* Fill buffer with spaces */
5311 +- memset (dest, ' ', len);
5312 +-
5313 +- still = (over=(txtlen > len)) ? (txtlen - len) : (len - txtlen);
5314 +-
5315 +- switch (HIDE_FIT(just_mode)){
5316 +- case J_LEFT:
5317 +- still = 0;
5318 +- break;
5319 +- case J_CENTER:
5320 +- still /= 2;
5321 +- break;
5322 +- case J_RIGHT:
5323 +- default:
5324 +- break;
5325 +- }
5326 +-
5327 +- if (over){
5328 +- if (IS_FIT(just_mode))
5329 +- strcpy (dest, name_trunc(txt, len));
5330 +- else
5331 +- strncpy (dest, txt+still, len);
5332 +- } else
5333 +- strncpy (dest+still, txt, txtlen);
5334 +-
5335 +- dest[len] = '\0';
5336 +-
5337 +- return (dest + len);
5338 +-}
5339 +-
5340 + static int
5341 + file_compute_color (int attr, file_entry *fe)
5342 + {
5343 +@@ -514,14 +515,18 @@
5344 +
5345 + /* Formats the file number file_index of panel in the buffer dest */
5346 + static void
5347 +-format_file (char *dest, int limit, WPanel *panel, int file_index, int width, int attr, int isstatus)
5348 ++format_file (WPanel *panel, int file_index, int width, int attr, int isstatus)
5349 + {
5350 + int color, length, empty_line;
5351 + const char *txt;
5352 +- char *old_pos;
5353 +- char *cdest = dest;
5354 + format_e *format, *home;
5355 + file_entry *fe;
5356 ++#ifdef UTF8
5357 ++ char buffer[BUF_MEDIUM * sizeof (wchar_t)];
5358 ++#else
5359 ++ char buffer[BUF_MEDIUM];
5360 ++#endif
5361 ++ int txtwidth;
5362 +
5363 + length = 0;
5364 + empty_line = (file_index >= panel->count);
5365 +@@ -539,34 +544,137 @@
5366 + break;
5367 +
5368 + if (format->string_fn){
5369 +- int len;
5370 ++ int len, still, over, perm, txtlen, wide;
5371 +
5372 + if (empty_line)
5373 + txt = " ";
5374 + else
5375 + txt = (*format->string_fn)(fe, format->field_len);
5376 +
5377 +- old_pos = cdest;
5378 +-
5379 + len = format->field_len;
5380 + if (len + length > width)
5381 + len = width - length;
5382 +- if (len + (cdest - dest) > limit)
5383 +- len = limit - (cdest - dest);
5384 ++ if (len >= BUF_MEDIUM)
5385 ++ len = BUF_MEDIUM - 1;
5386 + if (len <= 0)
5387 + break;
5388 +- cdest = to_buffer (cdest, format->just_mode, len, txt);
5389 +- length += len;
5390 +
5391 +- attrset (color);
5392 ++ perm = 0;
5393 ++ if (permission_mode) {
5394 ++ if (!strcmp(format->id, "perm"))
5395 ++ perm = 1;
5396 ++ else if (!strcmp(format->id, "mode"))
5397 ++ perm = 2;
5398 ++ }
5399 ++
5400 ++ wide = 0;
5401 ++#ifdef UTF8
5402 ++ if (SLsmg_Is_Unicode && !empty_line && !perm) {
5403 ++ mbstate_t s;
5404 ++ const char *str = txt;
5405 ++
5406 ++ memset (&s, 0, sizeof (s));
5407 ++ txtlen = mbsrtowcs ((wchar_t *) buffer, &str,
5408 ++ sizeof (buffer) / sizeof (wchar_t), &s);
5409 ++ if (txtlen < 0) {
5410 ++ txt = " ";
5411 ++ txtlen = 1;
5412 ++ } else {
5413 ++ wide = 1;
5414 ++ txtwidth = wcswidth((wchar_t*)buffer, txtlen);
5415 ++ }
5416 ++ } else
5417 ++#endif
5418 ++ {
5419 ++ txtlen = strlen (txt);
5420 ++ txtwidth = txtlen;
5421 ++ }
5422 ++
5423 ++ over = txtwidth > len;
5424 ++ still = over ? txtlen - len : len - txtlen;
5425 +
5426 +- if (permission_mode && !strcmp(format->id, "perm"))
5427 +- add_permission_string (old_pos, format->field_len, fe, attr, color, 0);
5428 +- else if (permission_mode && !strcmp(format->id, "mode"))
5429 +- add_permission_string (old_pos, format->field_len, fe, attr, color, 1);
5430 +- else
5431 +- addstr (old_pos);
5432 ++ switch (HIDE_FIT(format->just_mode)) {
5433 ++ case J_LEFT:
5434 ++ still = 0;
5435 ++ break;
5436 ++ case J_CENTER:
5437 ++ still /= 2;
5438 ++ break;
5439 ++ case J_RIGHT:
5440 ++ default:
5441 ++ break;
5442 ++ }
5443 ++
5444 ++ attrset (color);
5445 ++
5446 ++ if (wide) {
5447 ++#ifdef UTF8
5448 ++ if (over) {
5449 ++ if (IS_FIT (format->just_mode)) {
5450 ++ int n1 = 0;
5451 ++ int width1 = 0;
5452 ++ int n2 = 0;
5453 ++ int width2 = 0;
5454 ++ int len1 = len / 2;
5455 ++ int len2;
5456 ++
5457 ++ while (1) {
5458 ++ int w = wcwidth(((wchar_t *) buffer)[n1]);
5459 ++ if (width1 + w <= len1) {
5460 ++ width1 += w;
5461 ++ n1++;
5462 ++ }
5463 ++ else
5464 ++ break;
5465 ++ }
5466 ++ len2 = len - width1 - 1;
5467 ++
5468 ++ while (1) {
5469 ++ int w = wcwidth(((wchar_t *) buffer)[txtlen - n2 - 1]);
5470 ++ if (width2 + w <= len2) {
5471 ++ width2 += w;
5472 ++ n2++;
5473 ++ }
5474 ++ else
5475 ++ break;
5476 ++ }
5477 ++
5478 ++
5479 ++ SLsmg_write_nwchars ((wchar_t *) buffer, n1);
5480 ++ SLsmg_write_nwchars (L"~", 1);
5481 ++ printw ("%*s", len - width1 - width2 - 1, "");
5482 ++ SLsmg_write_nwchars (((wchar_t *) buffer)
5483 ++ + txtlen - n2, n2);
5484 ++ } else
5485 ++ SLsmg_write_nwchars ((wchar_t *) buffer, len);
5486 ++ } else {
5487 ++ printw ("%*s", still, "");
5488 ++ SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
5489 ++ printw ("%*s", len - txtwidth - still, "");
5490 ++ }
5491 ++#endif
5492 ++ } else {
5493 ++ if (over) {
5494 ++ if (IS_FIT (format->just_mode))
5495 ++ strcpy (buffer, name_trunc(txt, len));
5496 ++ else
5497 ++ memcpy (buffer, txt + still, len);
5498 ++ } else {
5499 ++ memset (buffer, ' ', still);
5500 ++ memcpy (buffer + still, txt, txtlen);
5501 ++ memset (buffer + still + txtlen, ' ',
5502 ++ len - txtlen - still);
5503 ++ }
5504 ++ buffer[len] = '\0';
5505 +
5506 ++ if (perm)
5507 ++ add_permission_string (buffer, format->field_len, fe,
5508 ++ attr, color, perm - 1);
5509 ++ else
5510 ++ addstr (buffer);
5511 ++ }
5512 ++
5513 ++ length += len;
5514 + } else {
5515 + if (attr == SELECTED || attr == MARKED_SELECTED)
5516 + attrset (SELECTED_COLOR);
5517 +@@ -589,7 +697,6 @@
5518 + {
5519 + int second_column = 0;
5520 + int width, offset;
5521 +- char buffer [BUF_MEDIUM];
5522 +
5523 + offset = 0;
5524 + if (!isstatus && panel->split){
5525 +@@ -618,7 +725,7 @@
5526 + widget_move (&panel->widget, file_index - panel->top_file + 2, 1);
5527 + }
5528 +
5529 +- format_file (buffer, sizeof(buffer), panel, file_index, width, attr, isstatus);
5530 ++ format_file (panel, file_index, width, attr, isstatus);
5531 +
5532 + if (!isstatus && panel->split){
5533 + if (second_column)
5534 +@@ -1068,6 +1175,12 @@
5535 + int side, width;
5536 +
5537 + const char *txt;
5538 ++#ifdef UTF8
5539 ++ char buffer[30 * sizeof (wchar_t)];
5540 ++ mbstate_t s;
5541 ++
5542 ++ memset (&s, 0, sizeof (s));
5543 ++#endif
5544 + if (!panel->split)
5545 + adjust_top_file (panel);
5546 +
5547 +@@ -1092,16 +1205,37 @@
5548 + if (format->string_fn){
5549 + txt = format->title;
5550 +
5551 ++ attrset (MARKED_COLOR);
5552 ++ width -= format->field_len;
5553 ++#ifdef UTF8
5554 ++ if (SLsmg_Is_Unicode) {
5555 ++ const char *str = txt;
5556 ++ header_len = mbsrtowcs ((wchar_t *) buffer, &str,
5557 ++ sizeof (buffer) / sizeof (wchar_t),
5558 ++ &s);
5559 ++ if (header_len < 0) {
5560 ++ memset (&s, 0, sizeof (s));
5561 ++ printw ("%*s", format->field_len, "");
5562 ++ continue;
5563 ++ }
5564 ++ if (header_len > format->field_len)
5565 ++ header_len = format->field_len;
5566 ++ spaces = (format->field_len - header_len) / 2;
5567 ++ extra = (format->field_len - header_len) % 2;
5568 ++ printw ("%*s", spaces, "");
5569 ++ SLsmg_write_nwchars ((wchar_t *) buffer, header_len);
5570 ++ printw ("%*s", spaces + extra, "");
5571 ++ continue;
5572 ++ }
5573 ++#endif
5574 + header_len = strlen (txt);
5575 + if (header_len > format->field_len)
5576 + header_len = format->field_len;
5577 +
5578 +- attrset (MARKED_COLOR);
5579 + spaces = (format->field_len - header_len) / 2;
5580 + extra = (format->field_len - header_len) % 2;
5581 + printw ("%*s%.*s%*s", spaces, "",
5582 + header_len, txt, spaces+extra, "");
5583 +- width -= 2 * spaces + extra + header_len;
5584 + } else {
5585 + attrset (NORMAL_COLOR);
5586 + one_vline ();
5587 +diff -Naur mc-4.6.1-old/src/slint.c mc-4.6.1/src/slint.c
5588 +--- mc-4.6.1-old/src/slint.c 2005-05-27 16:19:18.000000000 +0200
5589 ++++ mc-4.6.1/src/slint.c 2005-10-28 10:08:35.422038384 +0200
5590 +@@ -180,6 +180,9 @@
5591 + struct sigaction act, oact;
5592 +
5593 + SLtt_get_terminfo ();
5594 ++#if SLANG_VERSION >= 20000
5595 ++ SLutf8_enable (-1);
5596 ++#endif
5597 +
5598 + /*
5599 + * If the terminal in not in terminfo but begins with a well-known
5600 +diff -Naur mc-4.6.1-old/src/util.c mc-4.6.1/src/util.c
5601 +--- mc-4.6.1-old/src/util.c 2005-05-27 16:19:18.000000000 +0200
5602 ++++ mc-4.6.1/src/util.c 2005-10-28 10:19:11.683311968 +0200
5603 +@@ -32,7 +32,11 @@
5604 + #include <stdarg.h>
5605 + #include <string.h>
5606 + #include <ctype.h>
5607 ++#include <iconv.h>
5608 ++#include <langinfo.h>
5609 ++#include <errno.h>
5610 +
5611 ++#include "tty.h"
5612 + #include "global.h"
5613 + #include "profile.h"
5614 + #include "main.h" /* mc_home */
5615 +@@ -44,9 +48,22 @@
5616 + #include "charsets.h"
5617 + #endif
5618 +
5619 ++#ifdef UTF8
5620 ++#include <wctype.h>
5621 ++#include <wchar.h>
5622 ++#endif
5623 ++
5624 + static const char app_text [] = "Midnight-Commander";
5625 + int easy_patterns = 1;
5626 +
5627 ++#if SLANG_VERSION >= 20000
5628 ++void SLsmg_write_nwchars(wchar_t *s, size_t n)
5629 ++{
5630 ++ while(n--)
5631 ++ SLsmg_write_char(*s++);
5632 ++}
5633 ++#endif
5634 ++
5635 + extern void str_replace(char *s, char from, char to)
5636 + {
5637 + for (; *s != '\0'; s++) {
5638 +@@ -77,9 +94,106 @@
5639 + return (c > 31 && c != 127 && c != 155);
5640 + }
5641 +
5642 ++size_t
5643 ++mbstrlen (const char *str)
5644 ++{
5645 ++#ifdef UTF8
5646 ++ if (SLsmg_Is_Unicode) {
5647 ++ size_t width = 0;
5648 ++
5649 ++ for (; *str; str++) {
5650 ++ wchar_t c;
5651 ++ size_t len;
5652 ++
5653 ++ len = mbrtowc (&c, str, MB_CUR_MAX, NULL);
5654 ++
5655 ++ if (len == (size_t)(-1) || len == (size_t)(-2)) break;
5656 ++
5657 ++ if (len > 0) {
5658 ++ int wcsize = wcwidth(c);
5659 ++ width += wcsize > 0 ? wcsize : 0;
5660 ++ str += len-1;
5661 ++ }
5662 ++ }
5663 ++
5664 ++ return width;
5665 ++ } else
5666 ++#endif
5667 ++ return strlen (str);
5668 ++}
5669 ++
5670 ++#ifdef UTF8
5671 ++
5672 ++void
5673 ++fix_utf8(char *str)
5674 ++{
5675 ++ mbstate_t mbs;
5676 ++
5677 ++ char *p = str;
5678 ++
5679 ++ while (*p) {
5680 ++ int len;
5681 ++ memset (&mbs, 0, sizeof (mbs));
5682 ++ len = mbrlen(p, MB_CUR_MAX, &mbs);
5683 ++ if (len == -1) {
5684 ++ *p = '?';
5685 ++ p++;
5686 ++ } else if (len > 0) {
5687 ++ p += len;
5688 ++ } else {
5689 ++ p++;
5690 ++ }
5691 ++ }
5692 ++}
5693 ++#endif
5694 ++
5695 ++
5696 ++
5697 ++#ifdef UTF8
5698 ++wchar_t *
5699 ++mbstr_to_wchar (const char *str)
5700 ++{
5701 ++ int len = mbstrlen(str);
5702 ++ wchar_t *buf = g_malloc((len+1) * sizeof(wchar_t));
5703 ++ mbstate_t mbs;
5704 ++ memset (&mbs, 0, sizeof (mbs));
5705 ++ mbsrtowcs (buf, &str, len, &mbs);
5706 ++ buf[len] = 0;
5707 ++ return buf;
5708 ++}
5709 ++
5710 ++char *
5711 ++wchar_to_mbstr (const wchar_t *wstr)
5712 ++{
5713 ++ mbstate_t mbs;
5714 ++ const wchar_t *wstr2;
5715 ++ char * string;
5716 ++ int len;
5717 ++
5718 ++ memset (&mbs, 0, sizeof (mbs));
5719 ++ wstr2 = wstr;
5720 ++ len = wcsrtombs(NULL, &wstr2, 0, &mbs);
5721 ++ if (len <= 0)
5722 ++ return NULL;
5723 ++
5724 ++ string = g_malloc(len + 1);
5725 ++
5726 ++ wstr2 = wstr;
5727 ++ wcsrtombs(string, &wstr2, len, &mbs);
5728 ++ string[len] = 0;
5729 ++ return string;
5730 ++}
5731 ++#endif
5732 ++
5733 ++
5734 ++
5735 + int
5736 + is_printable (int c)
5737 + {
5738 ++#ifdef UTF8
5739 ++ if (SLsmg_Is_Unicode)
5740 ++ return iswprint (c);
5741 ++#endif
5742 + c &= 0xff;
5743 +
5744 + #ifdef HAVE_CHARSET
5745 +@@ -97,7 +211,7 @@
5746 + #endif /* !HAVE_CHARSET */
5747 + }
5748 +
5749 +-/* Returns the message dimensions (lines and columns) */
5750 ++/* Returns the message dimensions columns */
5751 + int msglen (const char *text, int *lines)
5752 + {
5753 + int max = 0;
5754 +@@ -108,8 +222,18 @@
5755 + line_len = 0;
5756 + (*lines)++;
5757 + } else {
5758 +- line_len++;
5759 +- if (line_len > max)
5760 ++#ifdef UTF8
5761 ++ size_t len;
5762 ++ wchar_t c;
5763 ++
5764 ++ len = mbrtowc (&c, text, MB_CUR_MAX, NULL);
5765 ++ if (len > 0 && len != (size_t)(-1) && len != (size_t)(-2)) {
5766 ++ int wcsize = wcwidth(c);
5767 ++ line_len += wcsize > 0 ? wcsize-1 : -1;
5768 ++ text += len-1;
5769 ++ }
5770 ++#endif
5771 ++ if (++line_len > max)
5772 + max = line_len;
5773 + }
5774 + }
5775 +@@ -201,7 +325,24 @@
5776 + *d++ = '\\';
5777 + break;
5778 + }
5779 ++#ifndef UTF8
5780 + *d = *s;
5781 ++#else /* UTF8 */
5782 ++ {
5783 ++ mbstate_t mbs;
5784 ++ int len;
5785 ++ memset (&mbs, 0, sizeof (mbs));
5786 ++ len = mbrlen(s, MB_CUR_MAX, &mbs);
5787 ++ if (len > 0) {
5788 ++ while (len-- > 1)
5789 ++ *d++ = *s++;
5790 ++ *d = *s;
5791 ++ } else {
5792 ++ *d = '?';
5793 ++ }
5794 ++
5795 ++ }
5796 ++#endif /* UTF8 */
5797 + }
5798 + *d = '\0';
5799 + return ret;
5800 +@@ -222,25 +363,90 @@
5801 + name_trunc (const char *txt, int trunc_len)
5802 + {
5803 + static char x[MC_MAXPATHLEN + MC_MAXPATHLEN];
5804 +- int txt_len;
5805 ++ int txt_len, first, skip;
5806 + char *p;
5807 ++ const char *str;
5808 +
5809 + if ((size_t) trunc_len > sizeof (x) - 1) {
5810 + trunc_len = sizeof (x) - 1;
5811 + }
5812 +- txt_len = strlen (txt);
5813 +- if (txt_len <= trunc_len) {
5814 +- strcpy (x, txt);
5815 +- } else {
5816 +- int y = (trunc_len / 2) + (trunc_len % 2);
5817 +- strncpy (x, txt, y);
5818 +- strncpy (x + y, txt + txt_len - (trunc_len / 2), trunc_len / 2);
5819 +- x[y] = '~';
5820 +- }
5821 +- x[trunc_len] = 0;
5822 +- for (p = x; *p; p++)
5823 +- if (!is_printable (*p))
5824 +- *p = '?';
5825 ++ txt_len = mbstrlen (txt);
5826 ++ first = 0;
5827 ++ skip = 0;
5828 ++ if (txt_len > trunc_len) {
5829 ++ first = trunc_len / 2;
5830 ++ skip = txt_len - trunc_len + 1;
5831 ++ }
5832 ++
5833 ++#ifdef UTF8
5834 ++ if (SLsmg_Is_Unicode) {
5835 ++ mbstate_t s;
5836 ++ int mbmax;
5837 ++
5838 ++ str = txt;
5839 ++ memset (&s, 0, sizeof (s));
5840 ++ mbmax = MB_CUR_MAX;
5841 ++ p = x;
5842 ++ while (p < x + sizeof (x) - 1 && trunc_len) {
5843 ++ wchar_t wc;
5844 ++ int len;
5845 ++
5846 ++ len = mbrtowc (&wc, str, mbmax, &s);
5847 ++ if (!len)
5848 ++ break;
5849 ++ if (len < 0) {
5850 ++ memset (&s, 0, sizeof (s));
5851 ++ *p = '?';
5852 ++ len = 1;
5853 ++ str++;
5854 ++ } else if (!is_printable (wc)) {
5855 ++ *p = '?';
5856 ++ str += len;
5857 ++ len = 1;
5858 ++ } else if (p >= x + sizeof (x) - len)
5859 ++ break;
5860 ++ else {
5861 ++ memcpy (p, str, len);
5862 ++ str += len;
5863 ++ }
5864 ++ if (first) {
5865 ++ --trunc_len;
5866 ++ --first;
5867 ++ p += len;
5868 ++ if (!first && p < x + sizeof (x) - 1 && trunc_len) {
5869 ++ *p++ = '~';
5870 ++ --trunc_len;
5871 ++ }
5872 ++ } else if (skip)
5873 ++ --skip;
5874 ++ else {
5875 ++ --trunc_len;
5876 ++ p += len;
5877 ++ }
5878 ++ }
5879 ++ } else
5880 ++#endif
5881 ++ {
5882 ++ str = txt;
5883 ++ p = x;
5884 ++ while (p < x + sizeof (x) - 1) {
5885 ++ if (*str == '\0')
5886 ++ break;
5887 ++ else if (!is_printable (*str))
5888 ++ *p++ = '?';
5889 ++ else
5890 ++ *p++ = *str;
5891 ++ ++str;
5892 ++ if (first) {
5893 ++ --first;
5894 ++ if (!first) {
5895 ++ *p++ = '~';
5896 ++ str += skip;
5897 ++ }
5898 ++ }
5899 ++ }
5900 ++ }
5901 ++ *p = '\0';
5902 + return x;
5903 + }
5904 +
5905 +@@ -650,11 +856,66 @@
5906 + }
5907 +
5908 + char *
5909 ++utf8_to_local(char *str)
5910 ++{
5911 ++ iconv_t cd;
5912 ++ size_t buflen;
5913 ++ char *output;
5914 ++ int retry = 1;
5915 ++
5916 ++ if (str == NULL)
5917 ++ return NULL;
5918 ++ else
5919 ++ buflen = strlen(str);
5920 ++
5921 ++ cd = iconv_open (nl_langinfo(CODESET), "UTF-8");
5922 ++ if (cd == (iconv_t) -1) {
5923 ++ return g_strdup(str);
5924 ++ }
5925 ++
5926 ++ output = g_malloc(buflen + 1);
5927 ++
5928 ++ while (retry)
5929 ++ {
5930 ++ char *wrptr = output;
5931 ++ char *inptr = str;
5932 ++ size_t insize = buflen;
5933 ++ size_t avail = buflen;
5934 ++ size_t nconv;
5935 ++
5936 ++ nconv = iconv (cd, &inptr, &insize, &wrptr, &avail);
5937 ++ if (nconv == (size_t) -1)
5938 ++ {
5939 ++ if (errno == E2BIG)
5940 ++ {
5941 ++ buflen *= 2;
5942 ++ g_free(output);
5943 ++ output = g_malloc(buflen + 1);
5944 ++ }
5945 ++ else
5946 ++ {
5947 ++ g_free(output);
5948 ++ return g_strdup(str);
5949 ++ }
5950 ++ }
5951 ++ else {
5952 ++ retry = 0;
5953 ++ *wrptr = 0;
5954 ++ }
5955 ++ }
5956 ++
5957 ++ iconv_close (cd);
5958 ++
5959 ++ return output;
5960 ++}
5961 ++
5962 ++char *
5963 + load_mc_home_file (const char *filename, char **allocated_filename)
5964 + {
5965 + char *hintfile_base, *hintfile;
5966 + char *lang;
5967 + char *data;
5968 ++ char *conv_data;
5969 +
5970 + hintfile_base = concat_dir_and_file (mc_home, filename);
5971 + lang = guess_message_value ();
5972 +@@ -687,7 +948,10 @@
5973 + else
5974 + g_free (hintfile);
5975 +
5976 +- return data;
5977 ++ conv_data = utf8_to_local(data);
5978 ++ g_free(data);
5979 ++
5980 ++ return conv_data;
5981 + }
5982 +
5983 + /* Check strftime() results. Some systems (i.e. Solaris) have different
5984 +@@ -695,12 +959,14 @@
5985 + size_t i18n_checktimelength (void)
5986 + {
5987 + size_t length, a, b;
5988 +- char buf [MAX_I18NTIMELENGTH + 1];
5989 ++ char buf [4 * MAX_I18NTIMELENGTH + 1];
5990 + time_t testtime = time (NULL);
5991 +
5992 +- a = strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
5993 +- b = strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
5994 +-
5995 ++ strftime (buf, sizeof(buf)-1, _("%b %e %H:%M"), localtime(&testtime));
5996 ++ a = mbstrlen (buf);
5997 ++ strftime (buf, sizeof(buf)-1, _("%b %e %Y"), localtime(&testtime));
5998 ++ b = mbstrlen (buf);
5999 ++
6000 + length = max (a, b);
6001 +
6002 + /* Don't handle big differences. Use standard value (email bug, please) */
6003 +@@ -712,15 +978,12 @@
6004 +
6005 + const char *file_date (time_t when)
6006 + {
6007 +- static char timebuf [MAX_I18NTIMELENGTH + 1];
6008 ++ static char timebuf [4 * MAX_I18NTIMELENGTH + 1];
6009 + time_t current_time = time ((time_t) 0);
6010 +- static size_t i18n_timelength = 0;
6011 + static const char *fmtyear, *fmttime;
6012 + const char *fmt;
6013 +
6014 +- if (i18n_timelength == 0){
6015 +- i18n_timelength = i18n_checktimelength() + 1;
6016 +-
6017 ++ if (fmtyear == NULL) {
6018 + /* strftime() format string for old dates */
6019 + fmtyear = _("%b %e %Y");
6020 + /* strftime() format string for recent dates */
6021 +@@ -740,7 +1003,7 @@
6022 + else
6023 + fmt = fmttime;
6024 +
6025 +- strftime (timebuf, i18n_timelength, fmt, localtime(&when));
6026 ++ strftime (timebuf, sizeof (timebuf) - 1, fmt, localtime(&when));
6027 + return timebuf;
6028 + }
6029 +
6030 +@@ -863,10 +1126,27 @@
6031 + r++;
6032 + continue;
6033 + }
6034 +-
6035 ++#ifndef UTF8
6036 + if (is_printable(*r))
6037 + *w++ = *r;
6038 + ++r;
6039 ++#else /* UTF8 */
6040 ++ {
6041 ++ mbstate_t mbs;
6042 ++ int len;
6043 ++ memset (&mbs, 0, sizeof (mbs));
6044 ++ len = mbrlen(r, MB_CUR_MAX, &mbs);
6045 ++
6046 ++ if (len > 0 && (unsigned char)*r >= ' ')
6047 ++ while (len--)
6048 ++ *w++ = *r++;
6049 ++ else {
6050 ++ if (len == -1)
6051 ++ *w++ = '?';
6052 ++ r++;
6053 ++ }
6054 ++ }
6055 ++#endif /* UTF8 */
6056 + }
6057 + *w = 0;
6058 + return s;
6059 +diff -Naur mc-4.6.1-old/src/util.h mc-4.6.1/src/util.h
6060 +--- mc-4.6.1-old/src/util.h 2005-01-13 20:20:47.000000000 +0100
6061 ++++ mc-4.6.1/src/util.h 2005-10-28 10:08:07.852229632 +0200
6062 +@@ -93,6 +93,13 @@
6063 + char *get_group (int);
6064 + char *get_owner (int);
6065 +
6066 ++void fix_utf8(char *str);
6067 ++size_t mbstrlen (const char *);
6068 ++wchar_t *mbstr_to_wchar (const char *);
6069 ++char *wchar_to_mbstr (const wchar_t *);
6070 ++char *utf8_to_local(char *str);
6071 ++
6072 ++
6073 + #define MAX_I18NTIMELENGTH 14
6074 + #define MIN_I18NTIMELENGTH 10
6075 + #define STD_I18NTIMELENGTH 12
6076 +diff -Naur mc-4.6.1-old/src/view.c mc-4.6.1/src/view.c
6077 +--- mc-4.6.1-old/src/view.c 2005-05-27 16:19:18.000000000 +0200
6078 ++++ mc-4.6.1/src/view.c 2005-10-28 10:08:08.023203640 +0200
6079 +@@ -36,6 +36,10 @@
6080 + #include <errno.h>
6081 + #include <limits.h>
6082 +
6083 ++#ifdef UTF8
6084 ++#include <wctype.h>
6085 ++#endif /* UTF8 */
6086 ++
6087 + #include "global.h"
6088 + #include "tty.h"
6089 + #include "cmd.h" /* For view_other_cmd */
6090 +@@ -793,7 +797,7 @@
6091 +
6092 + if (!i18n_adjust) {
6093 + file_label = _("File: %s");
6094 +- i18n_adjust = strlen (file_label) - 2;
6095 ++ i18n_adjust = mbstrlen (file_label) - 2;
6096 + }
6097 +
6098 + if (w < i18n_adjust + 6)
6099 +@@ -849,7 +853,11 @@
6100 + widget_erase ((Widget *) view);
6101 + }
6102 +
6103 ++#ifndef UTF8
6104 + #define view_add_character(view,c) addch (c)
6105 ++#else /* UTF8 */
6106 ++#define view_add_character(view,c) SLsmg_write_char(c)
6107 ++#endif /* UTF8 */
6108 + #define view_add_one_vline() one_vline()
6109 + #define view_add_string(view,s) addstr (s)
6110 + #define view_gotoyx(v,r,c) widget_move (v,r,c)
6111 +@@ -1071,6 +1079,12 @@
6112 + if (view->growing_buffer && from == view->last_byte)
6113 + get_byte (view, from);
6114 + for (; row < height && from < view->last_byte; from++) {
6115 ++#ifdef UTF8
6116 ++ mbstate_t mbs;
6117 ++ char mbbuf[MB_LEN_MAX];
6118 ++ int mblen;
6119 ++ wchar_t wc;
6120 ++#endif /* UTF8 */
6121 + c = get_byte (view, from);
6122 + if ((c == '\n') || (col >= width && view->wrap_mode)) {
6123 + col = frame_shift;
6124 +@@ -1084,7 +1098,37 @@
6125 + col = ((col - frame_shift) / 8) * 8 + 8 + frame_shift;
6126 + continue;
6127 + }
6128 ++#ifndef UTF8
6129 + if (view->viewer_nroff_flag && c == '\b') {
6130 ++#else /* UTF8 */
6131 ++ mblen = 1;
6132 ++ mbbuf[0] = convert_to_display_c (c);
6133 ++
6134 ++ while (mblen < MB_LEN_MAX) {
6135 ++ int res;
6136 ++ memset (&mbs, 0, sizeof (mbs));
6137 ++ res = mbrtowc (&wc, mbbuf, mblen, &mbs);
6138 ++ if (res <= 0 && res != -2) {
6139 ++ wc = '.';
6140 ++ mblen = 1;
6141 ++ break;
6142 ++ }
6143 ++ if (res == mblen)
6144 ++ break;
6145 ++
6146 ++ mbbuf[mblen] = convert_to_display_c (get_byte (view, from + mblen));
6147 ++ mblen++;
6148 ++ }
6149 ++
6150 ++ if (mblen == MB_LEN_MAX) {
6151 ++ wc = '.';
6152 ++ mblen = 1;
6153 ++ }
6154 ++
6155 ++ from += mblen - 1;
6156 ++
6157 ++ if (view->viewer_nroff_flag && wc == '\b') {
6158 ++#endif /* UTF8 */
6159 + int c_prev;
6160 + int c_next;
6161 +
6162 +@@ -1122,12 +1166,23 @@
6163 + && col < width - view->start_col) {
6164 + view_gotoyx (view, row, col + view->start_col);
6165 +
6166 ++#ifndef UTF8
6167 + c = convert_to_display_c (c);
6168 +-
6169 + if (!is_printable (c))
6170 + c = '.';
6171 +-
6172 + view_add_character (view, c);
6173 ++#else /* UTF8 */
6174 ++ if (!iswprint (wc))
6175 ++ wc = '.';
6176 ++ view_add_character (view, wc);
6177 ++
6178 ++ {
6179 ++ int cw = wcwidth(wc);
6180 ++ if (cw > 1)
6181 ++ col+= cw - 1;
6182 ++ }
6183 ++#endif /* UTF8 */
6184 ++
6185 + }
6186 + col++;
6187 + if (boldflag != MARK_NORMAL) {
6188 +diff -Naur mc-4.6.1-old/src/widget.c mc-4.6.1/src/widget.c
6189 +--- mc-4.6.1-old/src/widget.c 2005-05-27 16:19:19.000000000 +0200
6190 ++++ mc-4.6.1/src/widget.c 2005-10-28 10:08:07.888224160 +0200
6191 +@@ -33,6 +33,9 @@
6192 + #include <ctype.h>
6193 + #include "global.h"
6194 + #include "tty.h"
6195 ++#ifdef UTF8
6196 ++#include <wctype.h>
6197 ++#endif /* UTF8 */
6198 + #include "color.h"
6199 + #include "mouse.h"
6200 + #include "dialog.h"
6201 +@@ -148,6 +151,11 @@
6202 + if (b->hotpos >= 0) {
6203 + attrset ((b->selected) ? HOT_FOCUSC : HOT_NORMALC);
6204 + widget_move (&b->widget, 0, b->hotpos + off);
6205 ++#ifdef UTF8
6206 ++ if (SLsmg_Is_Unicode)
6207 ++ SLsmg_write_nwchars (&b->hotwc, 1);
6208 ++ else
6209 ++#endif
6210 + addch ((unsigned char) b->text[b->hotpos]);
6211 + }
6212 + return MSG_HANDLED;
6213 +@@ -179,7 +187,7 @@
6214 + static int
6215 + button_len (const char *text, unsigned int flags)
6216 + {
6217 +- int ret = strlen (text);
6218 ++ int ret = mbstrlen (text);
6219 + switch (flags){
6220 + case DEFPUSH_BUTTON:
6221 + ret += 6;
6222 +@@ -202,14 +210,36 @@
6223 + * the button text is g_malloc()ed, we can safely change and shorten it.
6224 + */
6225 + static void
6226 +-button_scan_hotkey (WButton *b)
6227 ++scan_hotkey (char *text, int *hotposp, int *hotkeyp, wchar_t *hotwcp)
6228 + {
6229 +- char *cp = strchr (b->text, '&');
6230 ++ char *cp = strchr (text, '&');
6231 +
6232 + if (cp != NULL && cp[1] != '\0') {
6233 +- g_strlcpy (cp, cp + 1, strlen (cp));
6234 +- b->hotkey = tolower (*cp);
6235 +- b->hotpos = cp - b->text;
6236 ++#ifdef UTF8
6237 ++ if (SLsmg_Is_Unicode) {
6238 ++ mbstate_t s;
6239 ++ int len;
6240 ++
6241 ++ *cp = '\0';
6242 ++ memset (&s, 0, sizeof (s));
6243 ++ len = mbrtowc (hotwcp, cp + 1, MB_CUR_MAX, &s);
6244 ++ if (len > 0) {
6245 ++ *hotposp = mbstrlen (text);
6246 ++ if (*hotposp < 0) {
6247 ++ *hotposp = -1;
6248 ++ } else {
6249 ++ /* FIXME */
6250 ++ *hotkeyp = tolower (*hotwcp);
6251 ++ }
6252 ++ }
6253 ++ } else
6254 ++#endif
6255 ++ {
6256 ++ *hotkeyp = tolower (cp[1]);
6257 ++ *hotposp = cp - text;
6258 ++ }
6259 ++
6260 ++ memmove (cp, cp + 1, strlen (cp + 1) + 1);
6261 + }
6262 + }
6263 +
6264 +@@ -231,22 +261,23 @@
6265 + widget_want_hotkey (b->widget, 1);
6266 + b->hotkey = 0;
6267 + b->hotpos = -1;
6268 ++ b->hotwc = L'\0';
6269 +
6270 +- button_scan_hotkey(b);
6271 ++ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
6272 + return b;
6273 + }
6274 +
6275 + void
6276 + button_set_text (WButton *b, const char *text)
6277 + {
6278 +- g_free (b->text);
6279 ++ g_free (b->text);
6280 + b->text = g_strdup (text);
6281 + b->widget.cols = button_len (text, b->flags);
6282 +- button_scan_hotkey(b);
6283 ++ scan_hotkey(b->text, &b->hotpos, &b->hotkey, &b->hotwc);
6284 + dlg_redraw (b->widget.parent);
6285 + }
6286 +
6287 +-\f
6288 ++
6289 + /* Radio button widget */
6290 + static int radio_event (Gpm_Event *event, WRadio *r);
6291 +
6292 +@@ -320,16 +351,37 @@
6293 + widget_move (&r->widget, i, 0);
6294 +
6295 + printw ("(%c) ", (r->sel == i) ? '*' : ' ');
6296 +- for (cp = r->texts[i]; *cp; cp++) {
6297 +- if (*cp == '&') {
6298 +- attrset ((i == r->pos && msg == WIDGET_FOCUS)
6299 +- ? HOT_FOCUSC : HOT_NORMALC);
6300 +- addch (*++cp);
6301 +- attrset ((i == r->pos
6302 +- && msg == WIDGET_FOCUS) ? FOCUSC : NORMALC);
6303 ++ cp = strchr (r->texts[i], '&');
6304 ++ if (cp != NULL) {
6305 ++#ifdef UTF8
6306 ++ mbstate_t s;
6307 ++ wchar_t wc;
6308 ++ int len;
6309 ++#endif
6310 ++ printw ("%.*s", (int) ((char *) cp - r->texts[i]),
6311 ++ r->texts[i]);
6312 ++ attrset ((i == r->pos && msg == WIDGET_FOCUS)
6313 ++ ? HOT_FOCUSC : HOT_NORMALC);
6314 ++#ifdef UTF8
6315 ++ if (SLsmg_Is_Unicode) {
6316 ++ memset (&s, 0, sizeof (s));
6317 ++ len = mbrtowc (&wc, cp + 1, MB_CUR_MAX, &s);
6318 ++ ++cp;
6319 ++ if (len > 0) {
6320 ++ printw ("%.*s", len, cp);
6321 ++ cp += len;
6322 ++ }
6323 + } else
6324 +- addch (*cp);
6325 +- }
6326 ++#endif
6327 ++ {
6328 ++ addch (*++cp);
6329 ++ ++cp;
6330 ++ }
6331 ++ attrset ((i == r->pos && msg == WIDGET_FOCUS)
6332 ++ ? FOCUSC : NORMALC);
6333 ++ } else
6334 ++ cp = r->texts[i];
6335 ++ addstr ((char *) cp);
6336 + }
6337 + return MSG_HANDLED;
6338 +
6339 +@@ -365,7 +417,7 @@
6340 + /* Compute the longest string */
6341 + max = 0;
6342 + for (i = 0; i < count; i++){
6343 +- m = strlen (texts [i]);
6344 ++ m = mbstrlen (texts [i]);
6345 + if (m > max)
6346 + max = m;
6347 + }
6348 +@@ -426,6 +478,11 @@
6349 + if (c->hotpos >= 0) {
6350 + attrset ((msg == WIDGET_FOCUS) ? HOT_FOCUSC : HOT_NORMALC);
6351 + widget_move (&c->widget, 0, +c->hotpos + 4);
6352 ++#ifdef UTF8
6353 ++ if (SLsmg_Is_Unicode)
6354 ++ SLsmg_write_nwchars (&c->hotwc, 1);
6355 ++ else
6356 ++#endif
6357 + addch ((unsigned char) c->text[c->hotpos]);
6358 + }
6359 + return MSG_HANDLED;
6360 +@@ -460,32 +517,18 @@
6361 + check_new (int y, int x, int state, const char *text)
6362 + {
6363 + WCheck *c = g_new (WCheck, 1);
6364 +- const char *s;
6365 +- char *t;
6366 +
6367 +- init_widget (&c->widget, y, x, 1, strlen (text),
6368 ++ init_widget (&c->widget, y, x, 1, mbstrlen (text),
6369 + (callback_fn)check_callback,
6370 + (mouse_h) check_event);
6371 + c->state = state ? C_BOOL : 0;
6372 + c->text = g_strdup (text);
6373 + c->hotkey = 0;
6374 + c->hotpos = -1;
6375 ++ c->hotwc = L'\0';
6376 + widget_want_hotkey (c->widget, 1);
6377 +
6378 +- /* Scan for the hotkey */
6379 +- for (s = text, t = c->text; *s; s++, t++){
6380 +- if (*s != '&'){
6381 +- *t = *s;
6382 +- continue;
6383 +- }
6384 +- s++;
6385 +- if (*s){
6386 +- c->hotkey = tolower (*s);
6387 +- c->hotpos = t - c->text;
6388 +- }
6389 +- *t = *s;
6390 +- }
6391 +- *t = 0;
6392 ++ scan_hotkey (c->text, &c->hotpos, &c->hotkey, &c->hotwc);
6393 + return c;
6394 + }
6395 +
6396 +@@ -527,7 +570,7 @@
6397 + }
6398 + widget_move (&l->widget, y, 0);
6399 + printw ("%s", p);
6400 +- xlen = l->widget.cols - strlen (p);
6401 ++ xlen = l->widget.cols - mbstrlen (p);
6402 + if (xlen > 0)
6403 + printw ("%*s", xlen, " ");
6404 + if (!q)
6405 +@@ -561,7 +604,7 @@
6406 + if (text){
6407 + label->text = g_strdup (text);
6408 + if (label->auto_adjust_cols) {
6409 +- newcols = strlen (text);
6410 ++ newcols = mbstrlen (text);
6411 + if (newcols > label->widget.cols)
6412 + label->widget.cols = newcols;
6413 + }
6414 +@@ -585,7 +628,7 @@
6415 + if (!text || strchr(text, '\n'))
6416 + width = 1;
6417 + else
6418 +- width = strlen (text);
6419 ++ width = mbstrlen (text);
6420 +
6421 + l = g_new (WLabel, 1);
6422 + init_widget (&l->widget, y, x, 1, width,
6423 +@@ -734,13 +777,69 @@
6424 + /* Pointer to killed data */
6425 + static char *kill_buffer = 0;
6426 +
6427 ++#ifdef UTF8
6428 ++static int
6429 ++charpos(WInput *in, int idx)
6430 ++{
6431 ++ int i, pos, l, len;
6432 ++ mbstate_t mbs;
6433 ++ memset (&mbs, 0, sizeof (mbs));
6434 ++ i = 0;
6435 ++ pos = 0;
6436 ++ len = strlen(in->buffer);
6437 ++
6438 ++ while (in->buffer[pos]) {
6439 ++ if (i == idx)
6440 ++ return pos;
6441 ++ l = mbrlen(in->buffer + pos, len - pos, &mbs);
6442 ++ if (l <= 0)
6443 ++ return pos;
6444 ++ pos+=l;
6445 ++ i++;
6446 ++ };
6447 ++ return pos;
6448 ++}
6449 ++
6450 ++static int
6451 ++charcolumn(WInput *in, int idx)
6452 ++{
6453 ++ int i, pos, l, width, len;
6454 ++ mbstate_t mbs;
6455 ++ memset (&mbs, 0, sizeof (mbs));
6456 ++ i = 0;
6457 ++ pos = 0; width = 0;
6458 ++ len = strlen(in->buffer);
6459 ++
6460 ++ while (in->buffer[pos]) {
6461 ++ wchar_t wc;
6462 ++ if (i == idx)
6463 ++ return width;
6464 ++ l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs);
6465 ++ if (l <= 0)
6466 ++ return width;
6467 ++ pos += l; width += wcwidth(wc);
6468 ++ i++;
6469 ++ };
6470 ++ return width;
6471 ++}
6472 ++#else
6473 ++#define charpos(in, idx) (idx)
6474 ++#define charcolumn(in, idx) (idx)
6475 ++#endif /* UTF8 */
6476 ++
6477 + void
6478 + update_input (WInput *in, int clear_first)
6479 + {
6480 + int has_history = 0;
6481 + int i, j;
6482 +- unsigned char c;
6483 +- int buf_len = strlen (in->buffer);
6484 ++ int buf_len = mbstrlen (in->buffer);
6485 ++#ifndef UTF8
6486 ++ unsigned char c;
6487 ++#else /* UTF8 */
6488 ++ wchar_t c;
6489 ++ mbstate_t mbs;
6490 ++ memset (&mbs, 0, sizeof (mbs));
6491 ++#endif /* UTF8 */
6492 +
6493 + if (should_show_history_button (in))
6494 + has_history = HISTORY_BUTTON_WIDTH;
6495 +@@ -750,7 +849,7 @@
6496 +
6497 + /* Make the point visible */
6498 + if ((in->point < in->first_shown) ||
6499 +- (in->point >= in->first_shown+in->field_len - has_history)){
6500 ++ (charcolumn(in, in->point) >= charcolumn(in, in->first_shown) + in->field_len - has_history)){
6501 + in->first_shown = in->point - (in->field_len / 3);
6502 + if (in->first_shown < 0)
6503 + in->first_shown = 0;
6504 +@@ -770,14 +869,29 @@
6505 + addch (' ');
6506 + widget_move (&in->widget, 0, 0);
6507 +
6508 ++#ifndef UTF8
6509 + for (i = 0, j = in->first_shown; i < in->field_len - has_history && in->buffer [j]; i++){
6510 + c = in->buffer [j++];
6511 + c = is_printable (c) ? c : '.';
6512 +- if (in->is_password)
6513 ++#else /* UTF8 */
6514 ++ for (i = 0, j = in->first_shown; (i < in->field_len - has_history) && (j < buf_len); i++,j++){
6515 ++ char * chp = in->buffer + charpos(in,j);
6516 ++ size_t res = mbrtowc(&c, chp, strlen(chp), &mbs);
6517 ++ c = (res && iswprint (c)) ? 0 : '.';
6518 ++#endif /* UTF8 */
6519 ++ if (in->is_password)
6520 + c = '*';
6521 ++#ifndef UTF8
6522 + addch (c);
6523 ++#else /* UTF8 */
6524 ++ if (c) {
6525 ++ addch (c);
6526 ++ }
6527 ++ else
6528 ++ SLsmg_write_nchars (chp, res);
6529 ++#endif /* UTF8 */
6530 + }
6531 +- widget_move (&in->widget, 0, in->point - in->first_shown);
6532 ++ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
6533 +
6534 + if (clear_first)
6535 + in->first = 0;
6536 +@@ -919,7 +1033,7 @@
6537 + show_hist (GList *history, int widget_x, int widget_y)
6538 + {
6539 + GList *hi, *z;
6540 +- size_t maxlen = strlen (i18n_htitle ()), i, count = 0;
6541 ++ size_t maxlen = mbstrlen (i18n_htitle ()), i, count = 0;
6542 + int x, y, w, h;
6543 + char *q, *r = 0;
6544 + Dlg_head *query_dlg;
6545 +@@ -932,7 +1046,7 @@
6546 + z = g_list_first (history);
6547 + hi = z;
6548 + while (hi) {
6549 +- if ((i = strlen ((char *) hi->data)) > maxlen)
6550 ++ if ((i = mbstrlen ((char *) hi->data)) > maxlen)
6551 + maxlen = i;
6552 + count++;
6553 + hi = g_list_next (hi);
6554 +@@ -1104,35 +1218,83 @@
6555 + in->need_push = 1;
6556 + in->buffer [0] = 0;
6557 + in->point = 0;
6558 ++ in->charpoint = 0;
6559 + in->mark = 0;
6560 + free_completions (in);
6561 + update_input (in, 0);
6562 + }
6563 +
6564 ++static void
6565 ++move_buffer_backward (WInput *in, int point)
6566 ++{
6567 ++ int i, pos, len;
6568 ++ int str_len = mbstrlen (in->buffer);
6569 ++ if (point >= str_len) return;
6570 ++
6571 ++ pos = charpos(in,point);
6572 ++ len = charpos(in,point + 1) - pos;
6573 ++
6574 ++ for (i = pos; in->buffer [i + len - 1]; i++)
6575 ++ in->buffer [i] = in->buffer [i + len];
6576 ++}
6577 ++
6578 + static cb_ret_t
6579 + insert_char (WInput *in, int c_code)
6580 + {
6581 + size_t i;
6582 ++#ifdef UTF8
6583 ++ mbstate_t mbs;
6584 ++ int res;
6585 ++
6586 ++ memset (&mbs, 0, sizeof (mbs));
6587 ++#else
6588 ++ in->charpoint = 0;
6589 ++#endif /* UTF8 */
6590 +
6591 + if (c_code == -1)
6592 + return MSG_NOT_HANDLED;
6593 +
6594 ++#ifdef UTF8
6595 ++ if (in->charpoint >= MB_CUR_MAX) return 1;
6596 ++
6597 ++ in->charbuf[in->charpoint++] = c_code;
6598 ++
6599 ++ res = mbrlen((char *)in->charbuf, in->charpoint, &mbs);
6600 ++ if (res < 0) {
6601 ++ if (res != -2) in->charpoint = 0; /* broken multibyte char, skip */
6602 ++ return 1;
6603 ++ }
6604 ++
6605 ++#endif /* UTF8 */
6606 + in->need_push = 1;
6607 +- if (strlen (in->buffer)+1 == (size_t) in->current_max_len){
6608 ++ if (strlen (in->buffer) + 1 + in->charpoint >= (size_t) in->current_max_len){
6609 + /* Expand the buffer */
6610 +- char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len);
6611 ++ char *narea = g_realloc (in->buffer, in->current_max_len + in->field_len + in->charpoint);
6612 + if (narea){
6613 + in->buffer = narea;
6614 +- in->current_max_len += in->field_len;
6615 ++ in->current_max_len += in->field_len + in->charpoint;
6616 + }
6617 + }
6618 ++#ifndef UTF8
6619 + if (strlen (in->buffer)+1 < (size_t) in->current_max_len){
6620 + size_t l = strlen (&in->buffer [in->point]);
6621 + for (i = l+1; i > 0; i--)
6622 + in->buffer [in->point+i] = in->buffer [in->point+i-1];
6623 + in->buffer [in->point] = c_code;
6624 ++#else /* UTF8 */
6625 ++ if (strlen (in->buffer) + in->charpoint < in->current_max_len){
6626 ++ size_t ins_point = charpos(in,in->point); /* bytes from begin */
6627 ++ /* move chars */
6628 ++ size_t rest_bytes = strlen (in->buffer + ins_point);
6629 ++
6630 ++ for (i = rest_bytes + 1; i > 0; i--)
6631 ++ in->buffer [ins_point + i + in->charpoint - 1] = in->buffer [ins_point + i - 1];
6632 ++
6633 ++ memcpy(in->buffer + ins_point, in->charbuf, in->charpoint);
6634 ++#endif /* UTF8 */
6635 + in->point++;
6636 + }
6637 ++ in->charpoint = 0;
6638 + return MSG_HANDLED;
6639 + }
6640 +
6641 +@@ -1140,12 +1302,14 @@
6642 + beginning_of_line (WInput *in)
6643 + {
6644 + in->point = 0;
6645 ++ in->charpoint = 0;
6646 + }
6647 +
6648 + static void
6649 + end_of_line (WInput *in)
6650 + {
6651 +- in->point = strlen (in->buffer);
6652 ++ in->point = mbstrlen (in->buffer);
6653 ++ in->charpoint = 0;
6654 + }
6655 +
6656 + static void
6657 +@@ -1153,18 +1317,21 @@
6658 + {
6659 + if (in->point)
6660 + in->point--;
6661 ++ in->charpoint = 0;
6662 + }
6663 +
6664 + static void
6665 + forward_char (WInput *in)
6666 + {
6667 +- if (in->buffer [in->point])
6668 ++ if (in->buffer [charpos(in,in->point)])
6669 + in->point++;
6670 ++ in->charpoint = 0;
6671 + }
6672 +
6673 + static void
6674 + forward_word (WInput *in)
6675 + {
6676 ++#ifndef UTF8
6677 + unsigned char *p = in->buffer+in->point;
6678 +
6679 + while (*p && (isspace (*p) || ispunct (*p)))
6680 +@@ -1172,11 +1339,39 @@
6681 + while (*p && isalnum (*p))
6682 + p++;
6683 + in->point = p - in->buffer;
6684 ++#else /* UTF8 */
6685 ++ mbstate_t mbs;
6686 ++ int len = mbstrlen (in->buffer);
6687 ++ memset (&mbs, 0, sizeof (mbs));
6688 ++
6689 ++ while (in->point < len) {
6690 ++ wchar_t c;
6691 ++ char *p = in->buffer + charpos(in,in->point);
6692 ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
6693 ++ if (res <= 0 || !(iswspace (c) || iswpunct (c)))
6694 ++ break;
6695 ++ in->point++;
6696 ++ }
6697 ++
6698 ++ memset (&mbs, 0, sizeof (mbs));
6699 ++
6700 ++ while (in->point < len) {
6701 ++ wchar_t c;
6702 ++ char *p = in->buffer + charpos(in,in->point);
6703 ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
6704 ++ if (res <= 0 || !iswalnum (c))
6705 ++ break;
6706 ++ in->point++;
6707 ++ }
6708 ++
6709 ++ in->charpoint = 0;
6710 ++#endif /* UTF8 */
6711 + }
6712 +
6713 + static void
6714 + backward_word (WInput *in)
6715 + {
6716 ++#ifndef UTF8
6717 + unsigned char *p = in->buffer+in->point;
6718 +
6719 + while (p-1 > in->buffer-1 && (isspace (*(p-1)) || ispunct (*(p-1))))
6720 +@@ -1184,6 +1379,32 @@
6721 + while (p-1 > in->buffer-1 && isalnum (*(p-1)))
6722 + p--;
6723 + in->point = p - in->buffer;
6724 ++#else /* UTF8 */
6725 ++ mbstate_t mbs;
6726 ++
6727 ++ memset (&mbs, 0, sizeof (mbs));
6728 ++ while (in->point > 0) {
6729 ++ wchar_t c;
6730 ++ char *p = in->buffer + charpos(in,in->point);
6731 ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
6732 ++ if (*p && (res <= 0 || !(iswspace (c) || iswpunct (c))))
6733 ++ break;
6734 ++ in->point--;
6735 ++ }
6736 ++
6737 ++ memset (&mbs, 0, sizeof (mbs));
6738 ++
6739 ++ while (in->point > 0) {
6740 ++ wchar_t c;
6741 ++ char *p = in->buffer + charpos(in,in->point);
6742 ++ size_t res = mbrtowc(&c, p, strlen(p), &mbs);
6743 ++ if (*p && (res <= 0 || !iswalnum (c)))
6744 ++ break;
6745 ++ in->point--;
6746 ++ }
6747 ++
6748 ++ in->charpoint = 0;
6749 ++#endif /* UTF8 */
6750 + }
6751 +
6752 + static void
6753 +@@ -1216,8 +1437,9 @@
6754 +
6755 + if (!in->point)
6756 + return;
6757 +- for (i = in->point; in->buffer [i-1]; i++)
6758 +- in->buffer [i-1] = in->buffer [i];
6759 ++
6760 ++ move_buffer_backward(in, in->point - 1);
6761 ++ in->charpoint = 0;
6762 + in->need_push = 1;
6763 + in->point--;
6764 + }
6765 +@@ -1225,10 +1447,8 @@
6766 + static void
6767 + delete_char (WInput *in)
6768 + {
6769 +- int i;
6770 +-
6771 +- for (i = in->point; in->buffer [i]; i++)
6772 +- in->buffer [i] = in->buffer [i+1];
6773 ++ move_buffer_backward(in, in->point);
6774 ++ in->charpoint = 0;
6775 + in->need_push = 1;
6776 + }
6777 +
6778 +@@ -1243,6 +1463,9 @@
6779 +
6780 + g_free (kill_buffer);
6781 +
6782 ++ first=charpos(in,first);
6783 ++ last=charpos(in,last);
6784 ++
6785 + kill_buffer = g_strndup(in->buffer+first,last-first);
6786 + }
6787 +
6788 +@@ -1251,11 +1474,13 @@
6789 + {
6790 + int first = min (x_first, x_last);
6791 + int last = max (x_first, x_last);
6792 +- size_t len = strlen (&in->buffer [last]) + 1;
6793 ++ size_t len;
6794 +
6795 + in->point = first;
6796 + in->mark = first;
6797 +- memmove (&in->buffer [first], &in->buffer [last], len);
6798 ++ len = strlen (&in->buffer [charpos(in,last)]) + 1;
6799 ++ memmove (&in->buffer [charpos(in,first)], &in->buffer [charpos(in,last)], len);
6800 ++ in->charpoint = 0;
6801 + in->need_push = 1;
6802 + }
6803 +
6804 +@@ -1272,6 +1497,8 @@
6805 + copy_region (in, old_point, new_point);
6806 + delete_region (in, old_point, new_point);
6807 + in->need_push = 1;
6808 ++ in->charpoint = 0;
6809 ++ in->charpoint = 0;
6810 + }
6811 +
6812 + static void
6813 +@@ -1315,16 +1542,20 @@
6814 +
6815 + if (!kill_buffer)
6816 + return;
6817 ++ in->charpoint = 0;
6818 + for (p = kill_buffer; *p; p++)
6819 + insert_char (in, *p);
6820 ++ in->charpoint = 0;
6821 + }
6822 +
6823 + static void
6824 + kill_line (WInput *in)
6825 + {
6826 ++ int chp = charpos(in,in->point);
6827 + g_free (kill_buffer);
6828 +- kill_buffer = g_strdup (&in->buffer [in->point]);
6829 +- in->buffer [in->point] = 0;
6830 ++ kill_buffer = g_strdup (&in->buffer [chp]);
6831 ++ in->buffer [chp] = 0;
6832 ++ in->charpoint = 0;
6833 + }
6834 +
6835 + void
6836 +@@ -1334,9 +1565,10 @@
6837 + g_free (in->buffer);
6838 + in->buffer = g_strdup (text); /* was in->buffer->text */
6839 + in->current_max_len = strlen (in->buffer) + 1;
6840 +- in->point = strlen (in->buffer);
6841 ++ in->point = mbstrlen (in->buffer);
6842 + in->mark = 0;
6843 + in->need_push = 1;
6844 ++ in->charpoint = 0;
6845 + }
6846 +
6847 + static void
6848 +@@ -1461,6 +1693,7 @@
6849 + *in->buffer = 0;
6850 + in->point = 0;
6851 + in->first = 0;
6852 ++ in->charpoint = 0;
6853 + }
6854 +
6855 + cb_ret_t
6856 +@@ -1489,7 +1722,11 @@
6857 + }
6858 + }
6859 + if (!input_map [i].fn){
6860 ++#ifndef UTF8
6861 + if (c_code > 255 || !is_printable (c_code))
6862 ++#else /* UTF8 */
6863 ++ if (c_code > 255)
6864 ++#endif /* UTF8 */
6865 + return MSG_NOT_HANDLED;
6866 + if (in->first){
6867 + port_region_marked_for_delete (in);
6868 +@@ -1523,6 +1760,9 @@
6869 + if (pos != in->point)
6870 + free_completions (in);
6871 + in->point = pos;
6872 ++#ifdef UTF8
6873 ++ in->charpoint = 0;
6874 ++#endif /* UTF8 */
6875 + update_input (in, 1);
6876 + }
6877 +
6878 +@@ -1562,7 +1802,7 @@
6879 + return MSG_HANDLED;
6880 +
6881 + case WIDGET_CURSOR:
6882 +- widget_move (&in->widget, 0, in->point - in->first_shown);
6883 ++ widget_move (&in->widget, 0, charcolumn(in, in->point) - charcolumn(in, in->first_shown));
6884 + return MSG_HANDLED;
6885 +
6886 + case WIDGET_DESTROY:
6887 +@@ -1584,7 +1824,7 @@
6888 + && should_show_history_button (in)) {
6889 + do_show_hist (in);
6890 + } else {
6891 +- in->point = strlen (in->buffer);
6892 ++ in->point = mbstrlen (in->buffer);
6893 + if (event->x - in->first_shown - 1 < in->point)
6894 + in->point = event->x - in->first_shown - 1;
6895 + if (in->point < 0)
6896 +@@ -1642,7 +1882,8 @@
6897 + in->is_password = 0;
6898 +
6899 + strcpy (in->buffer, def_text);
6900 +- in->point = strlen (in->buffer);
6901 ++ in->point = mbstrlen (in->buffer);
6902 ++ in->charpoint = 0;
6903 + return in;
6904 + }
6905 +
6906 +diff -Naur mc-4.6.1-old/src/widget.h mc-4.6.1/src/widget.h
6907 +--- mc-4.6.1-old/src/widget.h 2004-08-29 20:46:16.000000000 +0200
6908 ++++ mc-4.6.1/src/widget.h 2005-10-28 10:08:08.064197408 +0200
6909 +@@ -25,6 +25,7 @@
6910 + char *text; /* text of button */
6911 + int hotkey; /* hot KEY */
6912 + int hotpos; /* offset hot KEY char in text */
6913 ++ wchar_t hotwc;
6914 + bcback callback; /* Callback function */
6915 + } WButton;
6916 +
6917 +@@ -43,6 +44,7 @@
6918 + char *text; /* text of check button */
6919 + int hotkey; /* hot KEY */
6920 + int hotpos; /* offset hot KEY char in text */
6921 ++ wchar_t hotwc;
6922 + } WCheck;
6923 +
6924 + typedef struct WGauge {
6925 +@@ -58,16 +60,20 @@
6926 +
6927 + typedef struct {
6928 + Widget widget;
6929 +- int point; /* cursor position in the input line */
6930 +- int mark; /* The mark position */
6931 +- int first_shown; /* Index of the first shown character */
6932 +- int current_max_len; /* Maximum length of input line */
6933 +- int field_len; /* Length of the editing field */
6934 ++ int point; /* cursor position in the input line (mb chars) */
6935 ++ int mark; /* The mark position (mb chars) */
6936 ++ int first_shown; /* Index of the first shown character (mb chars) */
6937 ++ int current_max_len; /* Maximum length of input line (bytes) */
6938 ++ int field_len; /* Length of the editing field (mb chars) */
6939 + int color; /* color used */
6940 + int first; /* Is first keystroke? */
6941 + int disable_update; /* Do we want to skip updates? */
6942 + int is_password; /* Is this a password input line? */
6943 + unsigned char *buffer; /* pointer to editing buffer */
6944 ++#ifdef UTF8
6945 ++ unsigned char charbuf[MB_LEN_MAX];
6946 ++#endif /* UTF8 */
6947 ++ int charpoint;
6948 + GList *history; /* The history */
6949 + int need_push; /* need to push the current Input on hist? */
6950 + char **completions; /* Possible completions array */
6951 +diff -Naur mc-4.6.1-old/src/wtools.c mc-4.6.1/src/wtools.c
6952 +--- mc-4.6.1-old/src/wtools.c 2005-05-27 16:19:19.000000000 +0200
6953 ++++ mc-4.6.1/src/wtools.c 2005-10-28 10:08:08.036201664 +0200
6954 +@@ -48,11 +48,11 @@
6955 + /* Adjust sizes */
6956 + lines = (lines > LINES - 6) ? LINES - 6 : lines;
6957 +
6958 +- if (title && (cols < (len = strlen (title) + 2)))
6959 ++ if (title && (cols < (len = mbstrlen (title) + 2)))
6960 + cols = len;
6961 +
6962 + /* no &, but 4 spaces around button for brackets and such */
6963 +- if (cols < (len = strlen (cancel_string) + 3))
6964 ++ if (cols < (len = mbstrlen (cancel_string) + 3))
6965 + cols = len;
6966 +
6967 + cols = cols > COLS - 6 ? COLS - 6 : cols;
6968 +@@ -123,7 +123,7 @@
6969 + va_start (ap, count);
6970 + for (i = 0; i < count; i++) {
6971 + char *cp = va_arg (ap, char *);
6972 +- win_len += strlen (cp) + 6;
6973 ++ win_len += mbstrlen (cp) + 6;
6974 + if (strchr (cp, '&') != NULL)
6975 + win_len--;
6976 + }
6977 +@@ -131,7 +131,7 @@
6978 + }
6979 +
6980 + /* count coordinates */
6981 +- cols = 6 + max (win_len, max ((int) strlen (header), msglen (text, &lines)));
6982 ++ cols = 6 + max (win_len, max ((int) mbstrlen (header), msglen (text, &lines)));
6983 + lines += 4 + (count > 0 ? 2 : 0);
6984 + xpos = COLS / 2 - cols / 2;
6985 + ypos = LINES / 3 - (lines - 3) / 2;
6986 +@@ -146,7 +146,7 @@
6987 + va_start (ap, count);
6988 + for (i = 0; i < count; i++) {
6989 + cur_name = va_arg (ap, char *);
6990 +- xpos = strlen (cur_name) + 6;
6991 ++ xpos = mbstrlen (cur_name) + 6;
6992 + if (strchr (cur_name, '&') != NULL)
6993 + xpos--;
6994 +
6995 +@@ -457,7 +457,7 @@
6996 + g_strlcpy (histname + 3, header, 61);
6997 + quick_widgets[2].histname = histname;
6998 +
6999 +- len = max ((int) strlen (header), msglen (text, &lines)) + 4;
7000 ++ len = max ((int) mbstrlen (header), msglen (text, &lines)) + 4;
7001 + len = max (len, 64);
7002 +
7003 + /* The special value of def_text is used to identify password boxes
7004 +@@ -477,7 +477,7 @@
7005 + */
7006 + quick_widgets[0].relative_x = len / 2 + 4;
7007 + quick_widgets[1].relative_x =
7008 +- len / 2 - (strlen (_(quick_widgets[1].text)) + 9);
7009 ++ len / 2 - (mbstrlen (_(quick_widgets[1].text)) + 9);
7010 + quick_widgets[0].x_divisions = quick_widgets[1].x_divisions = len;
7011 + #endif /* ENABLE_NLS */
7012 +
7013 --- mc-4.6.1.orig/debian/patches/03_conffiles_in_mans.patch
7014 +++ mc-4.6.1/debian/patches/03_conffiles_in_mans.patch
7015 @@ -0,0 +1,90 @@
7016 +diff -urN mc-4.6.0-pre3.orig/doc/mc.1.in mc-4.6.0-pre3/doc/mc.1.in
7017 +--- mc-4.6.0-pre3.orig/doc/mc.1.in 2003-01-14 21:01:34.000000000 +0100
7018 ++++ mc-4.6.0-pre3/doc/mc.1.in 2003-01-14 21:59:38.000000000 +0100
7019 +@@ -1337,7 +1337,7 @@
7020 + but only if it is owned by user or root and is not world-writable.
7021 + If no such file found, ~/.mc/menu is tried in the same way,
7022 + and otherwise mc uses the default system-wide menu
7023 +-@prefix@/share/mc/mc.menu.
7024 ++/etc/mc/mc.menu.
7025 + .PP
7026 + The format of the menu file is very simple. Lines that start with
7027 + anything but space or tab are considered entries for the menu (in
7028 +@@ -1855,7 +1855,7 @@
7029 + At startup the Midnight Commander will try to load initialization
7030 + information from the ~/.mc/ini file. If this file doesn't exist, it will
7031 + load the information from the system-wide configuration file, located in
7032 +-@prefix@/share/mc/mc.ini. If the system-wide configuration file doesn't
7033 ++/etc/mc/mc.ini. If the system-wide configuration file doesn't
7034 + exist, MC uses the default settings.
7035 + .PP
7036 + The
7037 +@@ -3045,7 +3045,7 @@
7038 + .IP
7039 + The help file for the program.
7040 + .PP
7041 +-.I @prefix@/share/mc/mc.ext
7042 ++.I /etc/mc/mc.ext
7043 + .IP
7044 + The default system-wide extensions file.
7045 + .PP
7046 +@@ -3054,12 +3054,12 @@
7047 + User's own extension, view configuration and edit configuration
7048 + file. They override the contents of the system wide files if present.
7049 + .PP
7050 +-.I @prefix@/share/mc/mc.ini
7051 ++.I /etc/mc/mc.ini
7052 + .IP
7053 + The default system-wide setup for the Midnight Commander, used only if
7054 + the user doesn't have his own ~/.mc/ini file.
7055 + .PP
7056 +-.I @prefix@/share/mc/mc.lib
7057 ++.I /etc/mc/mc.lib
7058 + .IP
7059 + Global settings for the Midnight Commander. Settings in this file
7060 + affect all users, whether they have ~/.mc/ini or not. Currently, only
7061 +@@ -3077,7 +3077,7 @@
7062 + .IP
7063 + This file contains the hints (cookies) displayed by the program.
7064 + .PP
7065 +-.I @prefix@/share/mc/mc.menu
7066 ++.I /etc/mc/mc.menu
7067 + .IP
7068 + This file contains the default system-wide applications menu.
7069 + .PP
7070 +diff -urN mc-4.6.0-pre3.orig/doc/mcedit.1.in mc-4.6.0-pre3/doc/mcedit.1.in
7071 +--- mc-4.6.0-pre3.orig/doc/mcedit.1.in 2003-01-20 15:18:36.000000000 +0100
7072 ++++ mc-4.6.0-pre3/doc/mcedit.1.in 2003-01-23 18:57:57.000000000 +0100
7073 +@@ -436,12 +436,12 @@
7074 + .IP
7075 + The help file for the program.
7076 + .PP
7077 +-.I @prefix@/share/mc/mc.ini
7078 ++.I /etc/mc/mc.ini
7079 + .IP
7080 + The default system-wide setup for GNU Midnight Commander, used only if
7081 + the user's own ~/.mc/ini file is missing.
7082 + .PP
7083 +-.I @prefix@/share/mc/mc.lib
7084 ++.I /etc/mc/mc.lib
7085 + .IP
7086 + Global settings for the Midnight Commander. Settings in this file
7087 + affect all users, whether they have ~/.mc/ini or not.
7088 +diff -urN mc-4.6.0-pre3.orig/doc/mcview.1.in mc-4.6.0-pre3/doc/mcview.1.in
7089 +--- mc-4.6.0-pre3.orig/doc/mcview.1.in 2003-01-20 15:18:36.000000000 +0100
7090 ++++ mc-4.6.0-pre3/doc/mcview.1.in 2003-01-23 18:58:24.000000000 +0100
7091 +@@ -65,12 +65,12 @@
7092 + .IP
7093 + The help file for the program.
7094 + .PP
7095 +-.I @prefix@/share/mc/mc.ini
7096 ++.I /etc/mc/mc.ini
7097 + .IP
7098 + The default system-wide setup for GNU Midnight Commander, used only if
7099 + the user's own ~/.mc/ini file is missing.
7100 + .PP
7101 +-.I @prefix@/share/mc/mc.lib
7102 ++.I /etc/mc/mc.lib
7103 + .IP
7104 + Global settings for the Midnight Commander. Settings in this file
7105 + affect all users, whether they have ~/.mc/ini or not.
7106 --- mc-4.6.1.orig/debian/patches/55_mc-utf8-look-and-feel.patch
7107 +++ mc-4.6.1/debian/patches/55_mc-utf8-look-and-feel.patch
7108 @@ -0,0 +1,204 @@
7109 +--- mc-4.6.1/src/main.c.laf 2005-11-24 16:55:06.000000000 +0100
7110 ++++ mc-4.6.1/src/main.c 2005-11-24 16:56:27.000000000 +0100
7111 +@@ -274,6 +274,9 @@
7112 + /* The user's shell */
7113 + const char *shell = NULL;
7114 +
7115 ++/* Is the LANG UTF-8 ? */
7116 ++gboolean is_utf8 = FALSE;
7117 ++
7118 + /* mc_home: The home of MC */
7119 + char *mc_home = NULL;
7120 +
7121 +@@ -2167,6 +2170,16 @@ main (int argc, char *argv[])
7122 + /* if on, it displays the information that files have been moved to ~/.mc */
7123 + int show_change_notice = 0;
7124 +
7125 ++ /* Check whether we have UTF-8 locale */
7126 ++ char *lang = getenv("LANG");
7127 ++ size_t len = 0;
7128 ++
7129 ++ if ( lang )
7130 ++ len = strlen(lang);
7131 ++
7132 ++ if ( len >= 5 && !strcasecmp(&lang[len-5],"UTF-8") )
7133 ++ is_utf8 = TRUE;
7134 ++
7135 + /* We had LC_CTYPE before, LC_ALL includs LC_TYPE as well */
7136 + setlocale (LC_ALL, "");
7137 + bindtextdomain ("mc", LOCALEDIR);
7138 +--- mc-4.6.1a/src/main.h.laf 2005-11-24 16:55:06.000000000 +0100
7139 ++++ mc-4.6.1a/src/main.h 2005-11-24 16:55:06.000000000 +0100
7140 +@@ -64,6 +64,7 @@
7141 + extern int only_leading_plus_minus;
7142 + extern int output_starts_shell;
7143 + extern int midnight_shutdown;
7144 ++extern gboolean is_utf8;
7145 + extern char cmd_buf [512];
7146 + extern const char *shell;
7147 +
7148 +--- mc-4.6.1a/src/widget.c.laf 2005-11-24 16:55:06.000000000 +0100
7149 ++++ mc-4.6.1a/src/widget.c 2005-11-24 16:55:06.000000000 +0100
7150 +@@ -1948,52 +1948,86 @@ input_new (int y, int x, int color, int
7151 + return in;
7152 + }
7153 +
7154 +-\f
7155 +-/* Listbox widget */
7156 +-
7157 +-/* Should draw the scrollbar, but currently draws only
7158 +- * indications that there is more information
7159 +- */
7160 +-static int listbox_cdiff (WLEntry *s, WLEntry *e);
7161 ++/* Vertical scrollbar widget */
7162 +
7163 +-static void
7164 +-listbox_drawscroll (WListbox *l)
7165 ++void
7166 ++vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
7167 ++ int selected, int count, gboolean color)
7168 + {
7169 + int line;
7170 +- int i, top;
7171 +- int max_line = l->height-1;
7172 +-
7173 ++ int i;
7174 ++
7175 + /* Are we at the top? */
7176 +- widget_move (&l->widget, 0, l->width);
7177 +- if (l->list == l->top)
7178 +- one_vline ();
7179 ++ widget_move (&widget, tpad, width);
7180 ++#ifndef UTF8
7181 ++ if (!selected)
7182 ++ one_vline ();
7183 + else
7184 +- addch ('^');
7185 ++ addch ('^');
7186 ++#else
7187 ++ if (color) attrset (MARKED_COLOR);
7188 ++ if (is_utf8)
7189 ++ SLsmg_write_string("▲");
7190 ++ else
7191 ++ addch ('^');
7192 ++ if (color) attrset (NORMAL_COLOR);
7193 ++#endif
7194 +
7195 + /* Are we at the bottom? */
7196 +- widget_move (&l->widget, max_line, l->width);
7197 +- top = listbox_cdiff (l->list, l->top);
7198 +- if ((top + l->height == l->count) || l->height >= l->count)
7199 +- one_vline ();
7200 ++ widget_move (&widget, height-1-bpad, width);
7201 ++#ifndef UTF8
7202 ++ if (selected == count-1)
7203 ++ one_vline ();
7204 ++ else
7205 ++ addch ('v');
7206 ++#else
7207 ++ if (color) attrset (MARKED_COLOR);
7208 ++ if (is_utf8)
7209 ++ SLsmg_write_string("▼");
7210 + else
7211 +- addch ('v');
7212 ++ addch('v');
7213 ++ if (color) attrset (NORMAL_COLOR);
7214 ++#endif
7215 +
7216 + /* Now draw the nice relative pointer */
7217 +- if (l->count)
7218 +- line = 1+ ((l->pos * (l->height-2)) / l->count);
7219 ++ if (count > 1)
7220 ++ line = tpad + 1 + ((selected * (height-3-tpad-bpad)) / (count-1));
7221 + else
7222 +- line = 0;
7223 +-
7224 +- for (i = 1; i < max_line; i++){
7225 +- widget_move (&l->widget, i, l->width);
7226 +- if (i != line)
7227 +- one_vline ();
7228 +- else
7229 +- addch ('*');
7230 ++ line = 0;
7231 ++
7232 ++ for (i = tpad + 1; i < height-1-bpad; i++){
7233 ++ widget_move (&widget, i, width);
7234 ++ if (i != line)
7235 ++#ifndef UTF8
7236 ++ one_vline ();
7237 ++ else
7238 ++ addch ('*');
7239 ++#else
7240 ++ if (is_utf8)
7241 ++ SLsmg_write_string("▒");
7242 ++ else
7243 ++ one_vline();
7244 ++ else {
7245 ++ if (color) attrset (MARKED_COLOR);
7246 ++ if (is_utf8)
7247 ++ SLsmg_write_string("●");
7248 ++ else
7249 ++ addch('*');
7250 ++ if (color) attrset (NORMAL_COLOR);
7251 ++ }
7252 ++#endif
7253 + }
7254 + }
7255 +-
7256 +-static void
7257 ++
7258 ++\f
7259 ++/* Listbox widget */
7260 ++
7261 ++/* Should draw the scrollbar, but currently draws only
7262 ++ * indications that there is more information
7263 ++ */
7264 ++static int listbox_cdiff (WLEntry *s, WLEntry *e);
7265 ++
7266 ++void
7267 + listbox_draw (WListbox *l, int focused)
7268 + {
7269 + WLEntry *e;
7270 +@@ -2034,7 +2068,7 @@ listbox_draw (WListbox *l, int focused)
7271 + if (!l->scrollbar)
7272 + return;
7273 + attrset (normalc);
7274 +- listbox_drawscroll (l);
7275 ++ vscrollbar (l->widget, l->height, l->width, 0, 0, l->pos, l->count, FALSE);
7276 + }
7277 +
7278 + /* Returns the number of items between s and e,
7279 +--- mc-4.6.1a/src/screen.c.laf 2005-11-24 16:55:06.000000000 +0100
7280 ++++ mc-4.6.1a/src/screen.c 2005-11-24 16:55:06.000000000 +0100
7281 +@@ -888,6 +888,9 @@ show_dir (WPanel *panel)
7282 + }
7283 + #endif /* HAVE_SLANG */
7284 +
7285 ++ vscrollbar (panel->widget, panel->widget.lines, panel->widget.cols-1, 2, 2,
7286 ++ panel->selected, panel->count, TRUE);
7287 ++
7288 + if (panel->active)
7289 + attrset (REVERSE_COLOR);
7290 +
7291 +@@ -1504,7 +1507,7 @@ use_display_format (WPanel *panel, const
7292 + panel->dirty = 1;
7293 +
7294 + /* Status needn't to be split */
7295 +- usable_columns = ((panel->widget.cols-2)/((isstatus)
7296 ++ usable_columns = ((panel->widget.cols-3)/((isstatus)
7297 + ? 1
7298 + : (panel->split+1))) - (!isstatus && panel->split);
7299 +
7300 +--- mc-4.6.1a/src/widget.h.laf 2005-11-24 16:55:06.000000000 +0100
7301 ++++ mc-4.6.1a/src/widget.h 2005-11-24 16:55:06.000000000 +0100
7302 +@@ -170,6 +170,10 @@ void button_set_text (WButton *b, const
7303 + /* Listbox manager */
7304 + WLEntry *listbox_get_data (WListbox *l, int pos);
7305 +
7306 ++/* Vertical scrollbar */
7307 ++void vscrollbar (Widget widget, int height, int width, int tpad, int bpad,
7308 ++ int selected, int count, gboolean color);
7309 ++
7310 + /* search text int listbox entries */
7311 + WLEntry *listbox_search_text (WListbox *l, const char *text);
7312 + void listbox_select_entry (WListbox *l, WLEntry *dest);
7313 --- mc-4.6.1.orig/debian/patches/26_vietnamese_po.patch
7314 +++ mc-4.6.1/debian/patches/26_vietnamese_po.patch
7315 @@ -0,0 +1,4459 @@
7316 +--- /dev/null 2005-03-28 19:01:57.000000000 +0200
7317 ++++ po/vi.po 2005-04-03 00:46:14.000000000 +0200
7318 +@@ -0,0 +1,4456 @@
7319 ++# Vietnamese translation of Midnight Commander
7320 ++# Copyright (C) 1998-2003, 2005 Free Software Foundation, Inc.
7321 ++# First translator(s): Phan Vinh Thinh <teppi@vnlinux.org>, 2005.
7322 ++#
7323 ++#
7324 ++msgid ""
7325 ++msgstr ""
7326 ++"Project-Id-Version: mc 4.6.1\n"
7327 ++"Report-Msgid-Bugs-To: \n"
7328 ++"POT-Creation-Date: 2003-12-24 12:16-0500\n"
7329 ++"PO-Revision-Date: 2005-03-29 01:20+0300\n"
7330 ++"Last-Translator: Phan Vinh Thinh <teppi@vnlinux.org>\n"
7331 ++"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net>\n"
7332 ++"MIME-Version: 1.0\n"
7333 ++"Content-Type: text/plain; charset=UTF-8\n"
7334 ++"Content-Transfer-Encoding: 8bit\n"
7335 ++"X-Generator: KBabel 1.9.1\n"
7336 ++
7337 ++#: edit/edit.c:146 edit/edit.c:277 edit/edit.c:285 edit/edit.c:333
7338 ++#: edit/edit.c:348 edit/edit.c:359 edit/edit.c:375 edit/edit.c:2665
7339 ++#: edit/editcmd.c:282 edit/editcmd.c:290 edit/editcmd.c:1719 src/wtools.c:120
7340 ++#: src/wtools.c:275
7341 ++msgid "Error"
7342 ++msgstr "Lỗi"
7343 ++
7344 ++#: edit/edit.c:149 edit/edit.c:336
7345 ++msgid " Cannot open file for reading: "
7346 ++msgstr " Không thể mở tập tin để đọc: "
7347 ++
7348 ++#: edit/edit.c:279
7349 ++msgid " Error reading from pipe: "
7350 ++msgstr " Lỗi đọc từ đường ống (pipe): "
7351 ++
7352 ++#: edit/edit.c:288
7353 ++msgid " Cannot open pipe for reading: "
7354 ++msgstr " Không thể mở đường ống để đọc: "
7355 ++
7356 ++#: edit/edit.c:351
7357 ++msgid " Cannot get size/permissions info for file: "
7358 ++msgstr " Không lấy được thông tin kích thước/quyền hạn của tập tin: "
7359 ++
7360 ++#: edit/edit.c:360
7361 ++msgid " Not an ordinary file: "
7362 ++msgstr " Tập tin không thông thường: "
7363 ++
7364 ++#: edit/edit.c:376
7365 ++msgid " File is too large: "
7366 ++msgstr " Tập tin quá lớn: "
7367 ++
7368 ++#: edit/edit.c:2665
7369 ++msgid "Macro recursion is too deep"
7370 ++msgstr "Đệ qui của macro quá sâu"
7371 ++
7372 ++#: edit/edit.h:262
7373 ++msgid "&Dismiss"
7374 ++msgstr "Đó&ng"
7375 ++
7376 ++#: edit/edit.h:264 edit/editcmd.c:382 edit/editcmd.c:1228 edit/editcmd.c:1310
7377 ++#: edit/editcmd.c:2569 edit/editmenu.c:37 edit/editoptions.c:71
7378 ++#: src/boxes.c:139 src/boxes.c:276 src/boxes.c:372 src/boxes.c:464
7379 ++#: src/boxes.c:590 src/boxes.c:713 src/boxes.c:835 src/boxes.c:945
7380 ++#: src/boxes.c:1013 src/filegui.c:763 src/find.c:184 src/layout.c:348
7381 ++#: src/option.c:113 src/subshell.c:323 src/view.c:2107 src/wtools.c:441
7382 ++msgid "&OK"
7383 ++msgstr "Đồng ý &="
7384 ++
7385 ++#: edit/editcmd.c:45 edit/editcmd.c:46
7386 ++msgid " Enter file name: "
7387 ++msgstr " Hãy nhập tên tập tin: "
7388 ++
7389 ++#: edit/editcmd.c:283
7390 ++msgid " Error writing to pipe: "
7391 ++msgstr " Lỗi ghi vào đường ống: "
7392 ++
7393 ++#: edit/editcmd.c:293
7394 ++msgid " Cannot open pipe for writing: "
7395 ++msgstr " Không thể mở đường ống để ghi: "
7396 ++
7397 ++#: edit/editcmd.c:375
7398 ++msgid "Quick save "
7399 ++msgstr "&Lưu nhanh"
7400 ++
7401 ++#: edit/editcmd.c:376
7402 ++msgid "Safe save "
7403 ++msgstr "Lưu &an toàn"
7404 ++
7405 ++#: edit/editcmd.c:377
7406 ++msgid "Do backups -->"
7407 ++msgstr "&Sao lưu -->"
7408 ++
7409 ++#: edit/editcmd.c:380 edit/editcmd.c:1169 edit/editcmd.c:1226
7410 ++#: edit/editcmd.c:1308 edit/editcmd.c:2567 edit/editoptions.c:68
7411 ++#: src/achown.c:68 src/boxes.c:140 src/boxes.c:277 src/boxes.c:370
7412 ++#: src/boxes.c:462 src/boxes.c:588 src/boxes.c:711 src/boxes.c:833
7413 ++#: src/boxes.c:1013 src/chmod.c:96 src/chown.c:72 src/cmd.c:856
7414 ++#: src/filegui.c:745 src/find.c:184 src/hotlist.c:121 src/hotlist.c:523
7415 ++#: src/hotlist.c:830 src/hotlist.c:926 src/layout.c:349 src/learn.c:58
7416 ++#: src/option.c:114 src/panelize.c:66 src/view.c:441 src/view.c:2104
7417 ++#: src/wtools.c:46 src/wtools.c:439
7418 ++msgid "&Cancel"
7419 ++msgstr "Đóng hộp thoại &-"
7420 ++
7421 ++#: edit/editcmd.c:386
7422 ++msgid "Extension:"
7423 ++msgstr "&Mở rộng:"
7424 ++
7425 ++#: edit/editcmd.c:392
7426 ++msgid " Edit Save Mode "
7427 ++msgstr " Chế độ ghi nhớ "
7428 ++
7429 ++#: edit/editcmd.c:465 edit/editcmd.c:524
7430 ++msgid " Save As "
7431 ++msgstr " Ghi như "
7432 ++
7433 ++#: edit/editcmd.c:482 edit/editcmd.c:804 edit/editcmd.c:841
7434 ++#: edit/editcmd.c:1000 edit/editcmd.c:1113 src/file.c:599 src/help.c:318
7435 ++#: src/main.c:424 src/screen.c:1415 src/selcodepage.c:105 src/subshell.c:319
7436 ++#: src/subshell.c:653 src/utilunix.c:401 src/utilunix.c:405 src/utilunix.c:427
7437 ++#: vfs/mcfs.c:138
7438 ++msgid "Warning"
7439 ++msgstr "Cảnh báo"
7440 ++
7441 ++#: edit/editcmd.c:483
7442 ++msgid " A file already exists with this name. "
7443 ++msgstr " Tập tin có tên như vậy đã tồn tại. "
7444 ++
7445 ++#: edit/editcmd.c:484
7446 ++msgid "Overwrite"
7447 ++msgstr "Ghi chèn"
7448 ++
7449 ++#: edit/editcmd.c:484 edit/editcmd.c:569 edit/editcmd.c:768 edit/editcmd.c:804
7450 ++#: edit/editcmd.c:844 edit/editcmd.c:1003 edit/editcmd.c:1116
7451 ++msgid "Cancel"
7452 ++msgstr "Hủy bỏ"
7453 ++
7454 ++#: edit/editcmd.c:526 edit/editcmd.c:2293 src/view.c:440
7455 ++msgid " Cannot save file. "
7456 ++msgstr " Không thể ghi nhớ tập tin. "
7457 ++
7458 ++#: edit/editcmd.c:626 edit/editcmd.c:634 edit/editcmd.c:659 edit/editcmd.c:706
7459 ++msgid " Delete macro "
7460 ++msgstr " Xóa macro "
7461 ++
7462 ++#: edit/editcmd.c:628
7463 ++msgid " Cannot open temp file "
7464 ++msgstr " Không thể mở tập tin tạm thời "
7465 ++
7466 ++#: edit/editcmd.c:636 edit/editcmd.c:697 edit/editcmd.c:754
7467 ++msgid " Cannot open macro file "
7468 ++msgstr " Không thể mở tập tin chứa các macro "
7469 ++
7470 ++#: edit/editcmd.c:660
7471 ++msgid " Cannot overwrite macro file "
7472 ++msgstr " Không thể ghi chèn lên tập tin chứa các macro "
7473 ++
7474 ++#: edit/editcmd.c:676 edit/editcmd.c:697
7475 ++msgid " Save macro "
7476 ++msgstr " Ghi nhớ macro "
7477 ++
7478 ++#: edit/editcmd.c:678
7479 ++msgid " Press the macro's new hotkey: "
7480 ++msgstr " Hãy nhấn phím tắt mới của macro: "
7481 ++
7482 ++#: edit/editcmd.c:707 edit/editkeys.c:195 edit/editkeys.c:225
7483 ++msgid " Press macro hotkey: "
7484 ++msgstr " Hãy nhấn phím tắt của macro: "
7485 ++
7486 ++#: edit/editcmd.c:753
7487 ++msgid " Load macro "
7488 ++msgstr " Nạp macro "
7489 ++
7490 ++#: edit/editcmd.c:766
7491 ++msgid " Confirm save file? : "
7492 ++msgstr " Phê chuẩn việc ghi nhớ tập tin?: "
7493 ++
7494 ++#: edit/editcmd.c:768 src/view.c:439
7495 ++msgid " Save file "
7496 ++msgstr " Ghi nhớ tập tin "
7497 ++
7498 ++#: edit/editcmd.c:768 edit/editwidget.c:288 src/view.c:2220
7499 ++msgid "Save"
7500 ++msgstr "Ghinhớ"
7501 ++
7502 ++#: edit/editcmd.c:804 edit/editcmd.c:842
7503 ++msgid ""
7504 ++" Current text was modified without a file save. \n"
7505 ++" Continue discards these changes. "
7506 ++msgstr ""
7507 ++" Văn bản hiện thời đã thay đổi và chưa được ghi nhớ. \n"
7508 ++" Tiếp tục thao tác sẽ làm mất những thay đổi này. "
7509 ++
7510 ++#: edit/editcmd.c:804 edit/editcmd.c:843 edit/editcmd.c:1003
7511 ++#: edit/editcmd.c:1116
7512 ++msgid "Continue"
7513 ++msgstr "Tiếp tục"
7514 ++
7515 ++#: edit/editcmd.c:850
7516 ++msgid " Load "
7517 ++msgstr " Nạp "
7518 ++
7519 ++#: edit/editcmd.c:1002 edit/editcmd.c:1115
7520 ++msgid " Block is large, you may not be able to undo this action. "
7521 ++msgstr " Khối quá lớn, có thể bạn sẽ không hủy bỏ được bước này. "
7522 ++
7523 ++#: edit/editcmd.c:1171
7524 ++msgid "O&ne"
7525 ++msgstr "&Một"
7526 ++
7527 ++#: edit/editcmd.c:1173 src/file.c:2210 src/filegui.c:521
7528 ++msgid "A&ll"
7529 ++msgstr "&Tất cả"
7530 ++
7531 ++#: edit/editcmd.c:1175 src/file.c:2147 src/filegui.c:210
7532 ++msgid "&Skip"
7533 ++msgstr "&Bỏ qua"
7534 ++
7535 ++#: edit/editcmd.c:1177
7536 ++msgid "&Replace"
7537 ++msgstr "&Thay thế"
7538 ++
7539 ++#: edit/editcmd.c:1184 edit/editcmd.c:1191
7540 ++msgid " Replace with: "
7541 ++msgstr " Thay thế bằng: "
7542 ++
7543 ++#: edit/editcmd.c:1196
7544 ++msgid " Confirm replace "
7545 ++msgstr " Phê chuẩn thay thế "
7546 ++
7547 ++#: edit/editcmd.c:1230 edit/editcmd.c:1312
7548 ++msgid "scanf &Expression"
7549 ++msgstr "biểu thức &Scanf"
7550 ++
7551 ++#: edit/editcmd.c:1232
7552 ++msgid "replace &All"
7553 ++msgstr "&Thay thế tất cả"
7554 ++
7555 ++#: edit/editcmd.c:1234
7556 ++msgid "pr&Ompt on replace"
7557 ++msgstr "&Hỏi trước khi thay"
7558 ++
7559 ++#: edit/editcmd.c:1236 edit/editcmd.c:1314 src/view.c:2110
7560 ++msgid "&Backwards"
7561 ++msgstr "&Tìm ngược lại"
7562 ++
7563 ++#: edit/editcmd.c:1238 edit/editcmd.c:1316
7564 ++msgid "&Regular expression"
7565 ++msgstr "&Biểu thức chính quy"
7566 ++
7567 ++#: edit/editcmd.c:1240 edit/editcmd.c:1318
7568 ++msgid "&Whole words only"
7569 ++msgstr "&Chỉ những từ đầy đủ"
7570 ++
7571 ++#: edit/editcmd.c:1242 edit/editcmd.c:1320 src/find.c:176
7572 ++msgid "case &Sensitive"
7573 ++msgstr "có tính &Kiểu chữ"
7574 ++
7575 ++#: edit/editcmd.c:1246
7576 ++msgid " Enter replacement argument order eg. 3,2,1,4 "
7577 ++msgstr " Hãy nhập thứ tự của tham số thay thế, ví dụ 3,2,1,4 "
7578 ++
7579 ++#: edit/editcmd.c:1250
7580 ++msgid " Enter replacement string:"
7581 ++msgstr " Nhập chuỗi thay thế:"
7582 ++
7583 ++#: edit/editcmd.c:1254 edit/editcmd.c:1324 src/view.c:2115
7584 ++msgid " Enter search string:"
7585 ++msgstr " Nhập chuỗi tìm kiếm:"
7586 ++
7587 ++#: edit/editcmd.c:1273 edit/editcmd.c:1925 edit/editcmd.c:1949
7588 ++msgid " Replace "
7589 ++msgstr " Thay thế "
7590 ++
7591 ++#: edit/editcmd.c:1338 edit/editcmd.c:2036 edit/editcmd.c:2038
7592 ++#: edit/editcmd.c:2066 edit/editwidget.c:293 src/view.c:1594 src/view.c:1673
7593 ++#: src/view.c:1826 src/view.c:1838 src/view.c:2060 src/view.c:2113
7594 ++#: src/view.c:2120 src/view.c:2236
7595 ++msgid "Search"
7596 ++msgstr "Tìm"
7597 ++
7598 ++#: edit/editcmd.c:1719
7599 ++msgid " Invalid regular expression, or scanf expression with to many conversions "
7600 ++msgstr " Biểu thức chính quy không đúng, hoặc biểu thức scanf có quá nhiều biến đổi "
7601 ++
7602 ++#: edit/editcmd.c:1927
7603 ++msgid " Error in replacement format string. "
7604 ++msgstr " Lỗi trong định dạng chuỗi thay thế. "
7605 ++
7606 ++#: edit/editcmd.c:1957
7607 ++#, c-format
7608 ++msgid " %ld replacements made. "
7609 ++msgstr " %ld thay thế được thực hiện. "
7610 ++
7611 ++#: edit/editcmd.c:1960 edit/editcmd.c:2038 edit/editcmd.c:2066 src/view.c:1673
7612 ++#: src/view.c:1838
7613 ++msgid " Search string not found "
7614 ++msgstr " Không tìm thấy chuỗi tìm kiếm "
7615 ++
7616 ++#: edit/editcmd.c:2036
7617 ++#, c-format
7618 ++msgid " %d finds made, %d bookmarks added "
7619 ++msgstr " tìm thấy %d , thêm %d thẻ đánh dấu (bookmark) "
7620 ++
7621 ++#: edit/editcmd.c:2088 edit/editwidget.c:296 src/help.c:826 src/main.c:1208
7622 ++#: src/view.c:456 src/view.c:2215 src/view.c:2246
7623 ++msgid "Quit"
7624 ++msgstr "Thoát"
7625 ++
7626 ++#: edit/editcmd.c:2088 src/view.c:457
7627 ++msgid " File was modified, Save with exit? "
7628 ++msgstr "Tập tin đã thay đổi, ghi nhớ khi thoát? "
7629 ++
7630 ++#: edit/editcmd.c:2089 src/view.c:458
7631 ++msgid "Cancel quit"
7632 ++msgstr "Không thoát"
7633 ++
7634 ++#: edit/editcmd.c:2089 src/cmd.c:195 src/file.c:1837 src/file.c:2209
7635 ++#: src/filegui.c:526 src/hotlist.c:1049 src/main.c:471 src/screen.c:1952
7636 ++#: src/subshell.c:654 src/tree.c:708 src/view.c:458 vfs/mcfs.c:143
7637 ++msgid "&Yes"
7638 ++msgstr "&Có"
7639 ++
7640 ++#: edit/editcmd.c:2089 src/cmd.c:195 src/file.c:1837 src/file.c:2209
7641 ++#: src/filegui.c:525 src/hotlist.c:1049 src/main.c:471 src/screen.c:1953
7642 ++#: src/subshell.c:654 src/tree.c:708 src/view.c:458 vfs/mcfs.c:143
7643 ++msgid "&No"
7644 ++msgstr "&Không"
7645 ++
7646 ++#: edit/editcmd.c:2202
7647 ++msgid " Copy to clipboard "
7648 ++msgstr "Sao chép vào bộ đệm "
7649 ++
7650 ++#: edit/editcmd.c:2202 edit/editcmd.c:2215
7651 ++msgid " Unable to save to file. "
7652 ++msgstr "Không ghi nhớ được tập tin. "
7653 ++
7654 ++#: edit/editcmd.c:2215
7655 ++msgid " Cut to clipboard "
7656 ++msgstr "Cắt vào bộ đệm "
7657 ++
7658 ++#: edit/editcmd.c:2243 src/view.c:2005
7659 ++msgid " Goto line "
7660 ++msgstr "Chuyển tới dòng "
7661 ++
7662 ++#: edit/editcmd.c:2243
7663 ++msgid " Enter line: "
7664 ++msgstr "Hãy nhập số thứ tự dòng: "
7665 ++
7666 ++#: edit/editcmd.c:2278 edit/editcmd.c:2291
7667 ++msgid " Save Block "
7668 ++msgstr "Ghi nhớ khối "
7669 ++
7670 ++#: edit/editcmd.c:2307 edit/editcmd.c:2320
7671 ++msgid " Insert File "
7672 ++msgstr "Chèn tập tin "
7673 ++
7674 ++#: edit/editcmd.c:2322
7675 ++msgid " Cannot insert file. "
7676 ++msgstr "Không chèn được tập tin. "
7677 ++
7678 ++#: edit/editcmd.c:2339
7679 ++msgid " Sort block "
7680 ++msgstr "Sắp xếp khối "
7681 ++
7682 ++#: edit/editcmd.c:2339 edit/editcmd.c:2465
7683 ++msgid " You must first highlight a block of text. "
7684 ++msgstr "Đầu tiên bạn phải chọn một khối văn bản. "
7685 ++
7686 ++#: edit/editcmd.c:2346
7687 ++msgid " Run Sort "
7688 ++msgstr "Thực hiện sắp xếp "
7689 ++
7690 ++#: edit/editcmd.c:2347
7691 ++msgid " Enter sort options (see manpage) separated by whitespace: "
7692 ++msgstr "Nhập tùy chọn sắp xếp (xem trang man), phân cách nhau bởi khoảng trắng: "
7693 ++
7694 ++#: edit/editcmd.c:2358 edit/editcmd.c:2363
7695 ++msgid " Sort "
7696 ++msgstr "Sắp xếp "
7697 ++
7698 ++#: edit/editcmd.c:2359
7699 ++msgid " Cannot execute sort command "
7700 ++msgstr "Không thể thực hiện câu lệnh sort "
7701 ++
7702 ++#: edit/editcmd.c:2364
7703 ++msgid " Sort returned non-zero: "
7704 ++msgstr "Sắp xếp trả lại giá trị khác không: "
7705 ++
7706 ++#: edit/editcmd.c:2388
7707 ++msgid "Paste output of external command"
7708 ++msgstr "Dán kết quả của lệnh ngoại trú"
7709 ++
7710 ++#: edit/editcmd.c:2389
7711 ++msgid "Enter shell command(s):"
7712 ++msgstr "Nhập (các) câu lệnh shell:"
7713 ++
7714 ++#: edit/editcmd.c:2398
7715 ++msgid "External command"
7716 ++msgstr "Lệnh ngoại trú"
7717 ++
7718 ++#: edit/editcmd.c:2399
7719 ++msgid "Cannot execute command"
7720 ++msgstr "Không thực hiện được câu lệnh"
7721 ++
7722 ++#: edit/editcmd.c:2433
7723 ++msgid "Error creating script:"
7724 ++msgstr "Lỗi tạo script:"
7725 ++
7726 ++#: edit/editcmd.c:2441
7727 ++msgid "Error reading script:"
7728 ++msgstr "Lỗi đọc script:"
7729 ++
7730 ++#: edit/editcmd.c:2450
7731 ++msgid "Error closing script:"
7732 ++msgstr "Lỗi đóng script:"
7733 ++
7734 ++#: edit/editcmd.c:2456
7735 ++msgid "Script created:"
7736 ++msgstr "Đã tạo script:"
7737 ++
7738 ++#: edit/editcmd.c:2463
7739 ++msgid "Process block"
7740 ++msgstr "Xử lý khối"
7741 ++
7742 ++#: edit/editcmd.c:2562
7743 ++msgid " Mail "
7744 ++msgstr " Thư "
7745 ++
7746 ++#: edit/editcmd.c:2573
7747 ++msgid " Copies to"
7748 ++msgstr " Sao chép tới"
7749 ++
7750 ++#: edit/editcmd.c:2577
7751 ++msgid " Subject"
7752 ++msgstr " Tên thư"
7753 ++
7754 ++#: edit/editcmd.c:2581
7755 ++msgid " To"
7756 ++msgstr " Người nhận"
7757 ++
7758 ++#: edit/editcmd.c:2583
7759 ++msgid " mail -s <subject> -c <cc> <to>"
7760 ++msgstr " mail -s <Tên thư> -c <cc> <Người nhận>"
7761 ++
7762 ++#: edit/editkeys.c:180
7763 ++msgid " Emacs key: "
7764 ++msgstr "Phím Emacs: "
7765 ++
7766 ++#: edit/editkeys.c:194 edit/editkeys.c:225
7767 ++msgid " Execute Macro "
7768 ++msgstr "Thực hiện Macro "
7769 ++
7770 ++#: edit/editkeys.c:217
7771 ++msgid " Insert Literal "
7772 ++msgstr " Chèn văn bản thuần túy "
7773 ++
7774 ++#: edit/editkeys.c:218
7775 ++msgid " Press any key: "
7776 ++msgstr " Nhấn phím bất kỳ: "
7777 ++
7778 ++#: edit/editlock.c:148
7779 ++#, c-format
7780 ++msgid ""
7781 ++"File \"%s\" is already being edited\n"
7782 ++"User: %s\n"
7783 ++"Process ID: %d"
7784 ++msgstr ""
7785 ++"Tập tin \"%s\" đang được soạn thảo\n"
7786 ++"Ngưòi dùng: %s\n"
7787 ++"ID tiến trình: %d"
7788 ++
7789 ++#: edit/editlock.c:153
7790 ++msgid "File locked"
7791 ++msgstr "Tập tin bị khóa"
7792 ++
7793 ++#: edit/editlock.c:153
7794 ++msgid "&Grab lock"
7795 ++msgstr "&Chiếm đoạt khóa"
7796 ++
7797 ++#: edit/editlock.c:154
7798 ++msgid "&Ignore lock"
7799 ++msgstr "&Lời đi khóa"
7800 ++
7801 ++#: edit/editmenu.c:55
7802 ++msgid " About "
7803 ++msgstr " Về chương trình "
7804 ++
7805 ++#: edit/editmenu.c:56
7806 ++msgid ""
7807 ++"\n"
7808 ++" Cooledit v3.11.5\n"
7809 ++"\n"
7810 ++" Copyright (C) 1996 the Free Software Foundation\n"
7811 ++"\n"
7812 ++" A user friendly text editor written\n"
7813 ++" for the Midnight Commander.\n"
7814 ++msgstr ""
7815 ++"\n"
7816 ++" Cooledit v3.11.5\n"
7817 ++"\n"
7818 ++" Copyright (C) 1996 the Free Software Foundation\n"
7819 ++"\n"
7820 ++" Trình soạn thảo với giao diện người dùng thân thiện.\n"
7821 ++" Được viết cho Midnight Commander.\n"
7822 ++
7823 ++#: edit/editmenu.c:283 edit/editmenu.c:301
7824 ++msgid "&Open file..."
7825 ++msgstr "&Mở tập tin..."
7826 ++
7827 ++#: edit/editmenu.c:284
7828 ++msgid "&New C-n"
7829 ++msgstr "&Tập tin mới C-n"
7830 ++
7831 ++#: edit/editmenu.c:286 edit/editmenu.c:304
7832 ++msgid "&Save F2"
7833 ++msgstr "&Ghi nhớ F2"
7834 ++
7835 ++#: edit/editmenu.c:287 edit/editmenu.c:305
7836 ++msgid "Save &as... F12"
7837 ++msgstr "Ghi &như... F12"
7838 ++
7839 ++#: edit/editmenu.c:289 edit/editmenu.c:307
7840 ++msgid "&Insert file... F15"
7841 ++msgstr "&Chèn tập tin... F15"
7842 ++
7843 ++#: edit/editmenu.c:290
7844 ++msgid "Copy to &file... C-f"
7845 ++msgstr "Ché&p vào tập tin... C-f"
7846 ++
7847 ++#: edit/editmenu.c:292 edit/editmenu.c:310
7848 ++msgid "&User menu... F11"
7849 ++msgstr "Trình đơn người &dùng... F11"
7850 ++
7851 ++#: edit/editmenu.c:294 edit/editmenu.c:312
7852 ++msgid "A&bout... "
7853 ++msgstr "&Về chương trình... "
7854 ++
7855 ++#: edit/editmenu.c:296 edit/editmenu.c:314
7856 ++msgid "&Quit F10"
7857 ++msgstr "T&hoát F10"
7858 ++
7859 ++#: edit/editmenu.c:302
7860 ++msgid "&New C-x k"
7861 ++msgstr "&Tập tin mới C-x k"
7862 ++
7863 ++#: edit/editmenu.c:308
7864 ++msgid "Copy to &file... "
7865 ++msgstr "S&ao chép vào tập tin... "
7866 ++
7867 ++#: edit/editmenu.c:319
7868 ++msgid "&Toggle Mark F3"
7869 ++msgstr "&Bật/tắt bôi đen F3"
7870 ++
7871 ++#: edit/editmenu.c:320
7872 ++msgid "&Mark Columns S-F3"
7873 ++msgstr "Bôi đen &cột S-F3"
7874 ++
7875 ++#: edit/editmenu.c:322
7876 ++msgid "Toggle &ins/overw Ins"
7877 ++msgstr "Chế độ chèn/&thay thế Ins"
7878 ++
7879 ++#: edit/editmenu.c:324
7880 ++msgid "&Copy F5"
7881 ++msgstr "&Sao chép F5"
7882 ++
7883 ++#: edit/editmenu.c:325
7884 ++msgid "&Move F6"
7885 ++msgstr "&Di chuyển F6"
7886 ++
7887 ++#: edit/editmenu.c:326
7888 ++msgid "&Delete F8"
7889 ++msgstr "&Xóa F8"
7890 ++
7891 ++#: edit/editmenu.c:328
7892 ++msgid "&Undo C-u"
7893 ++msgstr "&Hủy bước C-u"
7894 ++
7895 ++#: edit/editmenu.c:330
7896 ++msgid "&Beginning C-PgUp"
7897 ++msgstr "Đầ&u tập tin C-PgUp"
7898 ++
7899 ++#: edit/editmenu.c:331
7900 ++msgid "&End C-PgDn"
7901 ++msgstr "Cuố&i tập tin C-PgDn"
7902 ++
7903 ++#: edit/editmenu.c:338
7904 ++msgid "&Search... F7"
7905 ++msgstr "Tìm &kiếm... F7"
7906 ++
7907 ++#: edit/editmenu.c:339
7908 ++msgid "Search &again F17"
7909 ++msgstr "&Tìm kiếm lại lần nữa F17"
7910 ++
7911 ++#: edit/editmenu.c:340
7912 ++msgid "&Replace... F4"
7913 ++msgstr "Th&ay thế... F4"
7914 ++
7915 ++#: edit/editmenu.c:347 edit/editmenu.c:371
7916 ++msgid "&Go to line... M-l"
7917 ++msgstr "&Chuyển tới dòng... M-l"
7918 ++
7919 ++#: edit/editmenu.c:348 edit/editmenu.c:372
7920 ++msgid "Go to matching &bracket M-b"
7921 ++msgstr "Chuyển &tới dấu ngoặc tạo cặp M-b"
7922 ++
7923 ++#: edit/editmenu.c:350 edit/editmenu.c:374
7924 ++msgid "Insert &literal... C-q"
7925 ++msgstr "Chèn &văn bản thuần túy... C-q"
7926 ++
7927 ++#: edit/editmenu.c:352 edit/editmenu.c:376
7928 ++msgid "&Refresh screen C-l"
7929 ++msgstr "&Làm mới màn hình C-l"
7930 ++
7931 ++#: edit/editmenu.c:354 edit/editmenu.c:378
7932 ++msgid "&Start record macro C-r"
7933 ++msgstr "&Bắt đầu ghi macro C-r"
7934 ++
7935 ++#: edit/editmenu.c:355 edit/editmenu.c:379
7936 ++msgid "&Finish record macro... C-r"
7937 ++msgstr "&Kết thúc ghi macro... C-r"
7938 ++
7939 ++#: edit/editmenu.c:356
7940 ++msgid "&Execute macro... C-a, KEY"
7941 ++msgstr "Chạy &macro... C-a, KEY"
7942 ++
7943 ++#: edit/editmenu.c:357 edit/editmenu.c:381
7944 ++msgid "Delete macr&o... "
7945 ++msgstr "&Xóa macro... "
7946 ++
7947 ++#: edit/editmenu.c:359 edit/editmenu.c:383
7948 ++msgid "Insert &date/time "
7949 ++msgstr "Chèn &ngày/giờ "
7950 ++
7951 ++#: edit/editmenu.c:361 edit/editmenu.c:385
7952 ++msgid "Format p&aragraph M-p"
7953 ++msgstr "Định &dạng đoạn văn M-p"
7954 ++
7955 ++#: edit/editmenu.c:362
7956 ++msgid "'ispell' s&pell check C-p"
7957 ++msgstr "Kiểm tra chính tả '&ispell' C-p"
7958 ++
7959 ++#: edit/editmenu.c:363 edit/editmenu.c:387
7960 ++msgid "Sor&t... M-t"
7961 ++msgstr "&Sắp xếp... M-t"
7962 ++
7963 ++#: edit/editmenu.c:364 edit/editmenu.c:388
7964 ++msgid "Paste o&utput of... M-u"
7965 ++msgstr "Dán &kết quả của lệnh... M-u"
7966 ++
7967 ++#: edit/editmenu.c:365 edit/editmenu.c:389
7968 ++msgid "E&xternal Formatter F19"
7969 ++msgstr "T&rình định dạng ngoài F19"
7970 ++
7971 ++#: edit/editmenu.c:366 edit/editmenu.c:390
7972 ++msgid "&Mail... "
7973 ++msgstr "T&hư điện tử... "
7974 ++
7975 ++#: edit/editmenu.c:380
7976 ++msgid "&Execute macro... C-x e, KEY"
7977 ++msgstr "Thực hiện &macro... C-x e, KEY"
7978 ++
7979 ++#: edit/editmenu.c:386
7980 ++msgid "'ispell' s&pell check M-$"
7981 ++msgstr "Kiểm tra chính tả '&ispell' M-$"
7982 ++
7983 ++#: edit/editmenu.c:395
7984 ++msgid "&General... "
7985 ++msgstr "Ch&ung... "
7986 ++
7987 ++#: edit/editmenu.c:396
7988 ++msgid "&Save mode..."
7989 ++msgstr "&Chế độ ghi nhớ..."
7990 ++
7991 ++#: edit/editmenu.c:397 src/main.c:909
7992 ++msgid "learn &Keys..."
7993 ++msgstr "&Tạo phím tắt... "
7994 ++
7995 ++#: edit/editmenu.c:408 edit/editmenu.c:422 src/chmod.c:146 src/chown.c:119
7996 ++msgid " File "
7997 ++msgstr " Tập tin "
7998 ++
7999 ++#: edit/editmenu.c:410 edit/editmenu.c:424
8000 ++msgid " Edit "
8001 ++msgstr " Soạn thảo "
8002 ++
8003 ++#: edit/editmenu.c:412 edit/editmenu.c:426
8004 ++msgid " Sear/Repl "
8005 ++msgstr " Tìm kiếm/Thay thế "
8006 ++
8007 ++#: edit/editmenu.c:414 edit/editmenu.c:428
8008 ++msgid " Command "
8009 ++msgstr " Câu lệnh "
8010 ++
8011 ++#: edit/editmenu.c:416 edit/editmenu.c:430
8012 ++msgid " Options "
8013 ++msgstr " Tùy chọn "
8014 ++
8015 ++#: edit/editoptions.c:36
8016 ++msgid "Intuitive"
8017 ++msgstr "T&rực giác"
8018 ++
8019 ++#: edit/editoptions.c:36
8020 ++msgid "Emacs"
8021 ++msgstr "&Emacs"
8022 ++
8023 ++#: edit/editoptions.c:39
8024 ++msgid "None"
8025 ++msgstr "&Không"
8026 ++
8027 ++#: edit/editoptions.c:39
8028 ++msgid "Dynamic paragraphing"
8029 ++msgstr "Định &dạng đoạn văn động"
8030 ++
8031 ++#: edit/editoptions.c:39
8032 ++msgid "Type writer wrap"
8033 ++msgstr "Tự độ&ng chuyển dòng"
8034 ++
8035 ++#: edit/editoptions.c:75
8036 ++msgid "Word wrap line length: "
8037 ++msgstr "Vị trí chuyển dòng: "
8038 ++
8039 ++#: edit/editoptions.c:81
8040 ++msgid "Tab spacing: "
8041 ++msgstr "Độ rộng tab: "
8042 ++
8043 ++#: edit/editoptions.c:88
8044 ++msgid "Synta&x highlighting"
8045 ++msgstr "&Chiếu sáng cú pháp"
8046 ++
8047 ++#: edit/editoptions.c:91
8048 ++msgid "Save file &position"
8049 ++msgstr "&Ghi nhớ vị trí trong tập tin"
8050 ++
8051 ++#: edit/editoptions.c:94
8052 ++msgid "Confir&m before saving"
8053 ++msgstr "&Hỏi lại trước khi ghi nhớ"
8054 ++
8055 ++#: edit/editoptions.c:97
8056 ++msgid "Fill tabs with &spaces"
8057 ++msgstr "&Làm đầy tab bằng khoảng trắng"
8058 ++
8059 ++#: edit/editoptions.c:100
8060 ++msgid "&Return does autoindent"
8061 ++msgstr "&Enter tự động thụt dòng"
8062 ++
8063 ++#: edit/editoptions.c:103
8064 ++msgid "&Backspace through tabs"
8065 ++msgstr "&Backpace xóa hết tab"
8066 ++
8067 ++#: edit/editoptions.c:106
8068 ++msgid "&Fake half tabs"
8069 ++msgstr "&Tạo một nửa tab"
8070 ++
8071 ++#: edit/editoptions.c:112
8072 ++msgid "Wrap mode"
8073 ++msgstr "Chế độ chuyển dòng"
8074 ++
8075 ++#: edit/editoptions.c:119
8076 ++msgid "Key emulation"
8077 ++msgstr "Giả tạo phím"
8078 ++
8079 ++#: edit/editoptions.c:124
8080 ++msgid " Editor options "
8081 ++msgstr " Cấu hình trình soạn thảo "
8082 ++
8083 ++#: edit/editwidget.c:287 src/help.c:793 src/help.c:814 src/main.c:1205
8084 ++#: src/screen.c:2184 src/tree.c:970 src/view.c:2213
8085 ++msgid "Help"
8086 ++msgstr "Giúpđỡ"
8087 ++
8088 ++#: edit/editwidget.c:289
8089 ++msgid "Mark"
8090 ++msgstr "Bôiđen"
8091 ++
8092 ++#: edit/editwidget.c:290
8093 ++msgid "Replac"
8094 ++msgstr "Thayth"
8095 ++
8096 ++#: edit/editwidget.c:291 src/file.c:803 src/screen.c:2188 src/tree.c:975
8097 ++msgid "Copy"
8098 ++msgstr "Cópi "
8099 ++
8100 ++#: edit/editwidget.c:292
8101 ++msgid "Move"
8102 ++msgstr "Chuyển"
8103 ++
8104 ++#: edit/editwidget.c:294 src/screen.c:2191
8105 ++msgid "Delete"
8106 ++msgstr "Xóa "
8107 ++
8108 ++#: edit/editwidget.c:295 src/main.c:1207
8109 ++msgid "PullDn"
8110 ++msgstr "GọiTĐ "
8111 ++
8112 ++#: edit/syntax.c:1100 edit/syntax.c:1107
8113 ++msgid " Load syntax file "
8114 ++msgstr " Nạp tập tin cú pháp "
8115 ++
8116 ++#: edit/syntax.c:1101 src/help.c:764 src/user.c:711
8117 ++#, c-format
8118 ++msgid ""
8119 ++" Cannot open file %s \n"
8120 ++" %s "
8121 ++msgstr ""
8122 ++" Không mở được tập tin %s \n"
8123 ++" %s "
8124 ++
8125 ++#: edit/syntax.c:1108
8126 ++#, c-format
8127 ++msgid " Error in file %s on line %d "
8128 ++msgstr " Lỗi trong tập tin %s trên dòng %d "
8129 ++
8130 ++#: src/achown.c:69 src/chmod.c:97 src/chown.c:73
8131 ++msgid "&Set"
8132 ++msgstr "Đồ&ng ý"
8133 ++
8134 ++#: src/achown.c:70
8135 ++msgid "S&kip"
8136 ++msgstr "&Bỏ qua"
8137 ++
8138 ++#: src/achown.c:71 src/chmod.c:101 src/chown.c:76
8139 ++msgid "Set &all"
8140 ++msgstr "Đặt &tất cả"
8141 ++
8142 ++#: src/achown.c:250 src/achown.c:338 src/achown.c:345
8143 ++msgid "owner"
8144 ++msgstr "sở hữu"
8145 ++
8146 ++#: src/achown.c:250 src/achown.c:340 src/achown.c:347
8147 ++msgid "group"
8148 ++msgstr "nhóm"
8149 ++
8150 ++#: src/achown.c:342
8151 ++msgid "other"
8152 ++msgstr "khác"
8153 ++
8154 ++#: src/achown.c:350
8155 ++msgid "On"
8156 ++msgstr "Trên"
8157 ++
8158 ++#: src/achown.c:352
8159 ++msgid "Flag"
8160 ++msgstr "Cờ"
8161 ++
8162 ++#: src/achown.c:354
8163 ++msgid "Mode"
8164 ++msgstr "Chếđộ"
8165 ++
8166 ++#: src/achown.c:358
8167 ++#, c-format
8168 ++msgid "%6d of %d"
8169 ++msgstr "%6d của %d"
8170 ++
8171 ++#: src/achown.c:549
8172 ++msgid " Chown advanced command "
8173 ++msgstr " Câu lệnh chown mở rộng"
8174 ++
8175 ++#: src/achown.c:607 src/achown.c:623 src/achown.c:669 src/chmod.c:241
8176 ++#: src/chmod.c:311
8177 ++#, c-format
8178 ++msgid ""
8179 ++" Cannot chmod \"%s\" \n"
8180 ++" %s "
8181 ++msgstr ""
8182 ++" Không chmod được \"%s\" \n"
8183 ++" %s "
8184 ++
8185 ++#: src/achown.c:612 src/achown.c:627 src/achown.c:673 src/chown.c:214
8186 ++#: src/chown.c:322
8187 ++#, c-format
8188 ++msgid ""
8189 ++" Cannot chown \"%s\" \n"
8190 ++" %s "
8191 ++msgstr ""
8192 ++" Không thay thế được chủ sở hữu \"%s\" \n"
8193 ++" %s "
8194 ++
8195 ++#: src/background.c:205 src/file.c:2145
8196 ++msgid " Background process error "
8197 ++msgstr " Lỗi của tiến trình nền sau "
8198 ++
8199 ++#: src/background.c:211
8200 ++msgid " Unknown error in child "
8201 ++msgstr " Lỗi không rõ trong tiến trình con "
8202 ++
8203 ++#: src/background.c:219
8204 ++msgid " Child died unexpectedly "
8205 ++msgstr " Tiến trình con bất đắc kỳ tử "
8206 ++
8207 ++#: src/background.c:226
8208 ++msgid " Background protocol error "
8209 ++msgstr " Lỗi giao thức nền sau "
8210 ++
8211 ++#: src/background.c:227
8212 ++msgid ""
8213 ++" Background process sent us a request for more arguments \n"
8214 ++" than we can handle. \n"
8215 ++msgstr ""
8216 ++" Tiến trình nền sau yêu cầu nhiều tham số hơn, \n"
8217 ++" số chúng ta có thể điều khiển. \n"
8218 ++
8219 ++#: src/boxes.c:75
8220 ++msgid "&Full file list"
8221 ++msgstr "&Danh sách đầy đủ"
8222 ++
8223 ++#: src/boxes.c:76
8224 ++msgid "&Brief file list"
8225 ++msgstr "&Thu gọn"
8226 ++
8227 ++#: src/boxes.c:77
8228 ++msgid "&Long file list"
8229 ++msgstr "&Mở rộng"
8230 ++
8231 ++#: src/boxes.c:78
8232 ++msgid "&User defined:"
8233 ++msgstr "&Người dùng tự xác định:"
8234 ++
8235 ++#: src/boxes.c:136
8236 ++msgid "Listing mode"
8237 ++msgstr "Dạng danh sách"
8238 ++
8239 ++#: src/boxes.c:138
8240 ++msgid "user &Mini status"
8241 ++msgstr "t&Rạng thái mini"
8242 ++
8243 ++#: src/boxes.c:278
8244 ++msgid "&Reverse"
8245 ++msgstr "&Ngược lại"
8246 ++
8247 ++#: src/boxes.c:279
8248 ++msgid "case sensi&tive"
8249 ++msgstr "tính đến kiể&U chữ"
8250 ++
8251 ++#: src/boxes.c:280
8252 ++msgid "Sort order"
8253 ++msgstr "Thứ tự sắp xếp"
8254 ++
8255 ++#: src/boxes.c:375
8256 ++msgid " confirm &Exit "
8257 ++msgstr " trước khi th&Oát "
8258 ++
8259 ++#: src/boxes.c:377
8260 ++msgid " confirm e&Xecute "
8261 ++msgstr " trước &Khi thực hiện "
8262 ++
8263 ++#: src/boxes.c:379
8264 ++msgid " confirm o&Verwrite "
8265 ++msgstr " &Trước khi ghi chèn "
8266 ++
8267 ++#: src/boxes.c:381
8268 ++msgid " confirm &Delete "
8269 ++msgstr " hỏi lại trước khi &Xóa "
8270 ++
8271 ++#: src/boxes.c:387 src/cmd.c:194
8272 ++msgid " Confirmation "
8273 ++msgstr " Hỏi xác nhận "
8274 ++
8275 ++#: src/boxes.c:459
8276 ++msgid "Full 8 bits output"
8277 ++msgstr "Đầu ra 8 bit đầy đủ"
8278 ++
8279 ++#: src/boxes.c:459
8280 ++msgid "ISO 8859-1"
8281 ++msgstr "ISO.8859-1"
8282 ++
8283 ++#: src/boxes.c:459
8284 ++msgid "7 bits"
8285 ++msgstr "7 bit"
8286 ++
8287 ++#: src/boxes.c:466 src/boxes.c:594
8288 ++msgid "F&ull 8 bits input"
8289 ++msgstr "Đầ&u vào 8 bit đầy đủ"
8290 ++
8291 ++#: src/boxes.c:474 src/boxes.c:575
8292 ++msgid " Display bits "
8293 ++msgstr " Ký tự hiển thị "
8294 ++
8295 ++#: src/boxes.c:556 src/boxes.c:581 src/selcodepage.c:70
8296 ++msgid "Other 8 bit"
8297 ++msgstr "8 bit khác"
8298 ++
8299 ++#: src/boxes.c:578
8300 ++msgid "Input / display codepage:"
8301 ++msgstr "Bảng mã đầu vào / hiển thị:"
8302 ++
8303 ++#: src/boxes.c:597
8304 ++msgid "&Select"
8305 ++msgstr "&Lựa chọn"
8306 ++
8307 ++#: src/boxes.c:716
8308 ++msgid "Use &passive mode"
8309 ++msgstr "Sử &dụng chế độ thụ động"
8310 ++
8311 ++#: src/boxes.c:718
8312 ++msgid "&Use ~/.netrc"
8313 ++msgstr "&Sử dụng ~/.netrc"
8314 ++
8315 ++#: src/boxes.c:722
8316 ++msgid "&Always use ftp proxy"
8317 ++msgstr "&Luôn luôn sử dụng ftp proxy"
8318 ++
8319 ++#: src/boxes.c:724
8320 ++msgid "sec"
8321 ++msgstr "giây"
8322 ++
8323 ++#: src/boxes.c:728
8324 ++msgid "ftpfs directory cache timeout:"
8325 ++msgstr "Thời gian chờ của cache thư mục ftp:"
8326 ++
8327 ++#: src/boxes.c:732
8328 ++msgid "ftp anonymous password:"
8329 ++msgstr "Mật khẩu ftp nặc danh:"
8330 ++
8331 ++#: src/boxes.c:739
8332 ++msgid "Timeout for freeing VFSs:"
8333 ++msgstr "Thời gian chờ giải phóng VFS:"
8334 ++
8335 ++#: src/boxes.c:745
8336 ++msgid " Virtual File System Setting "
8337 ++msgstr " Thiết lập hệ thống tập tin ảo "
8338 ++
8339 ++#: src/boxes.c:799
8340 ++msgid "Quick cd"
8341 ++msgstr "cd nhanh"
8342 ++
8343 ++#: src/boxes.c:802
8344 ++msgid "cd"
8345 ++msgstr "cd"
8346 ++
8347 ++#: src/boxes.c:837
8348 ++msgid "Symbolic link filename:"
8349 ++msgstr "Tên của liên kết mềm:"
8350 ++
8351 ++#: src/boxes.c:841
8352 ++msgid "Existing filename (filename symlink will point to):"
8353 ++msgstr "Tên tập tin đã có (liên kết mềm sẽ chỉ đến):"
8354 ++
8355 ++#: src/boxes.c:848
8356 ++msgid "Symbolic link"
8357 ++msgstr "Liên kết mềm"
8358 ++
8359 ++#: src/boxes.c:881
8360 ++msgid "Running "
8361 ++msgstr "Đang chạy "
8362 ++
8363 ++#: src/boxes.c:882 src/find.c:721
8364 ++msgid "Stopped"
8365 ++msgstr "Đã dừng"
8366 ++
8367 ++#: src/boxes.c:942
8368 ++msgid "&Stop"
8369 ++msgstr "&Dừng"
8370 ++
8371 ++#: src/boxes.c:943
8372 ++msgid "&Resume"
8373 ++msgstr "&Phục hồi"
8374 ++
8375 ++#: src/boxes.c:944
8376 ++msgid "&Kill"
8377 ++msgstr "&Diệt"
8378 ++
8379 ++#: src/boxes.c:981
8380 ++msgid "Background Jobs"
8381 ++msgstr " Công việc nền sau"
8382 ++
8383 ++#: src/boxes.c:1012
8384 ++msgid "Domain:"
8385 ++msgstr "Miền (domain):"
8386 ++
8387 ++#: src/boxes.c:1012
8388 ++msgid "Username:"
8389 ++msgstr "Tên người dùng:"
8390 ++
8391 ++#: src/boxes.c:1012
8392 ++msgid "Password:"
8393 ++msgstr "Mật khẩu:"
8394 ++
8395 ++#: src/boxes.c:1063
8396 ++#, c-format
8397 ++msgid "Password for \\\\%s\\%s"
8398 ++msgstr "Mật khẩu cho \\\\%s\\%s"
8399 ++
8400 ++#: src/charsets.c:51 vfs/extfs.c:1260 vfs/sfs.c:318
8401 ++#, c-format
8402 ++msgid "Warning: file %s not found\n"
8403 ++msgstr "Cảnh báo: không tìm thấy tập tin %s\n"
8404 ++
8405 ++#: src/charsets.c:198 src/charsets.c:212
8406 ++#, c-format
8407 ++msgid "Cannot translate from %s to %s"
8408 ++msgstr "Không chuyển được bảng mã từ %s thành %s"
8409 ++
8410 ++#: src/chmod.c:77
8411 ++msgid "execute/search by others"
8412 ++msgstr "người khác có quyền chạy/tìm"
8413 ++
8414 ++#: src/chmod.c:78
8415 ++msgid "write by others"
8416 ++msgstr "người khác có quyền ghi nhớ"
8417 ++
8418 ++#: src/chmod.c:79
8419 ++msgid "read by others"
8420 ++msgstr "người khác có quyền đọc"
8421 ++
8422 ++#: src/chmod.c:80
8423 ++msgid "execute/search by group"
8424 ++msgstr "nhóm có quyền chạy/tìm kiếm"
8425 ++
8426 ++#: src/chmod.c:81
8427 ++msgid "write by group"
8428 ++msgstr "nhóm có quyền ghi nhớ"
8429 ++
8430 ++#: src/chmod.c:82
8431 ++msgid "read by group"
8432 ++msgstr "nhóm có quyền đọc"
8433 ++
8434 ++#: src/chmod.c:83
8435 ++msgid "execute/search by owner"
8436 ++msgstr "chủ sở hữu có quyền chạy/tìm"
8437 ++
8438 ++#: src/chmod.c:84
8439 ++msgid "write by owner"
8440 ++msgstr "chủ sở hữu có quyền ghi nhớ"
8441 ++
8442 ++#: src/chmod.c:85
8443 ++msgid "read by owner"
8444 ++msgstr "chủ sở hữu có quyền đọc"
8445 ++
8446 ++#: src/chmod.c:86
8447 ++msgid "sticky bit"
8448 ++msgstr "bit dính (sticky)"
8449 ++
8450 ++#: src/chmod.c:87
8451 ++msgid "set group ID on execution"
8452 ++msgstr "đặt ID nhóm khi chạy"
8453 ++
8454 ++#: src/chmod.c:88
8455 ++msgid "set user ID on execution"
8456 ++msgstr "đặt ID người dùng khi chạy"
8457 ++
8458 ++#: src/chmod.c:98
8459 ++msgid "C&lear marked"
8460 ++msgstr "&Xóa đánh dấu"
8461 ++
8462 ++#: src/chmod.c:99
8463 ++msgid "S&et marked"
8464 ++msgstr "Đá&nh dấu"
8465 ++
8466 ++#: src/chmod.c:100
8467 ++msgid "&Marked all"
8468 ++msgstr "Đánh &dấu tất cả"
8469 ++
8470 ++#: src/chmod.c:124 src/screen.c:405
8471 ++msgid "Name"
8472 ++msgstr "Tên"
8473 ++
8474 ++#: src/chmod.c:126
8475 ++msgid "Permissions (Octal)"
8476 ++msgstr "Quyền hạn (Hệ tám)"
8477 ++
8478 ++#: src/chmod.c:128
8479 ++msgid "Owner name"
8480 ++msgstr "Tên chủ sở hữu"
8481 ++
8482 ++#: src/chmod.c:130
8483 ++msgid "Group name"
8484 ++msgstr "Tên nhóm"
8485 ++
8486 ++#: src/chmod.c:133
8487 ++msgid "Use SPACE to change"
8488 ++msgstr "Dùng PHÍM TRẮNG để thay đổi"
8489 ++
8490 ++#: src/chmod.c:135
8491 ++msgid "an option, ARROW KEYS"
8492 ++msgstr "tùy chọn, PHÍM MŨI TÊN"
8493 ++
8494 ++#: src/chmod.c:137
8495 ++msgid "to move between options"
8496 ++msgstr "để di chuyển giữa các tùy chọn"
8497 ++
8498 ++#: src/chmod.c:139
8499 ++msgid "and T or INS to mark"
8500 ++msgstr "và T hoặc INS để đánh dấu"
8501 ++
8502 ++#: src/chmod.c:144 src/chown.c:111
8503 ++msgid " Permission "
8504 ++msgstr " Quyền truy cập "
8505 ++
8506 ++#: src/chmod.c:196
8507 ++msgid "Chmod command"
8508 ++msgstr " Câu lệnh chmod "
8509 ++
8510 ++#: src/chown.c:74
8511 ++msgid "Set &users"
8512 ++msgstr "Đặt &người dùng"
8513 ++
8514 ++#: src/chown.c:75
8515 ++msgid "Set &groups"
8516 ++msgstr "Đặt &nhóm"
8517 ++
8518 ++#: src/chown.c:103
8519 ++msgid " Name "
8520 ++msgstr " Tên "
8521 ++
8522 ++#: src/chown.c:105
8523 ++msgid " Owner name "
8524 ++msgstr " Tên chủ sở hữu "
8525 ++
8526 ++#: src/chown.c:107 src/chown.c:117
8527 ++msgid " Group name "
8528 ++msgstr " Tên nhóm "
8529 ++
8530 ++#: src/chown.c:109
8531 ++msgid " Size "
8532 ++msgstr " Kích thước "
8533 ++
8534 ++#: src/chown.c:115
8535 ++msgid " User name "
8536 ++msgstr " Tên người dùng "
8537 ++
8538 ++#: src/chown.c:158
8539 ++msgid " Chown command "
8540 ++msgstr " Câu lệnh chown "
8541 ++
8542 ++#: src/chown.c:178
8543 ++msgid "<Unknown user>"
8544 ++msgstr "<không rõ người dùng>"
8545 ++
8546 ++#: src/chown.c:179
8547 ++msgid "<Unknown group>"
8548 ++msgstr "<không rõ nhóm>"
8549 ++
8550 ++#: src/cmd.c:194
8551 ++msgid "Files tagged, want to cd?"
8552 ++msgstr "Đã đánh dấu các tập tin, chuyển thư mục?"
8553 ++
8554 ++#: src/cmd.c:200 src/cmd.c:670 src/cmd.c:727 src/main.c:681 src/screen.c:1933
8555 ++msgid "Cannot change directory"
8556 ++msgstr "Không thay đổi được thư mục"
8557 ++
8558 ++#: src/cmd.c:233
8559 ++msgid " View file "
8560 ++msgstr " Xem tập tin "
8561 ++
8562 ++#: src/cmd.c:233
8563 ++msgid " Filename:"
8564 ++msgstr " Tên tập tin:"
8565 ++
8566 ++#: src/cmd.c:255
8567 ++msgid " Filtered view "
8568 ++msgstr " Lọc rồi xem "
8569 ++
8570 ++#: src/cmd.c:256
8571 ++msgid " Filter command and arguments:"
8572 ++msgstr " Lệnh lọc và tham số:"
8573 ++
8574 ++#: src/cmd.c:355
8575 ++msgid "Create a new Directory"
8576 ++msgstr "Tạo thư mục mới"
8577 ++
8578 ++#: src/cmd.c:356
8579 ++msgid " Enter directory name:"
8580 ++msgstr " Hãy nhập tên thư mục:"
8581 ++
8582 ++#: src/cmd.c:428
8583 ++msgid " Filter "
8584 ++msgstr " Đầu lọc "
8585 ++
8586 ++#: src/cmd.c:429
8587 ++msgid " Set expression for filtering filenames"
8588 ++msgstr " Đặt biểu thức để lọc tên tập tin (nhấn F1 để xem trợ giúp)"
8589 ++
8590 ++#: src/cmd.c:482
8591 ++msgid " Select "
8592 ++msgstr " Chọn "
8593 ++
8594 ++#: src/cmd.c:510 src/cmd.c:555 src/find.c:147
8595 ++msgid " Malformed regular expression "
8596 ++msgstr " Biểu thức chính quy không đúng "
8597 ++
8598 ++#: src/cmd.c:528
8599 ++msgid " Unselect "
8600 ++msgstr " Bỏ chọn "
8601 ++
8602 ++#: src/cmd.c:596
8603 ++msgid "Extension file edit"
8604 ++msgstr "Soạn thảo phần mở rộng tập tin"
8605 ++
8606 ++#: src/cmd.c:597
8607 ++msgid " Which extension file you want to edit? "
8608 ++msgstr " Soạn thảo phần mở rộng tập tin nào? "
8609 ++
8610 ++#: src/cmd.c:598 src/cmd.c:701
8611 ++msgid "&User"
8612 ++msgstr "&Người dùng"
8613 ++
8614 ++#: src/cmd.c:598 src/cmd.c:627 src/cmd.c:701
8615 ++msgid "&System Wide"
8616 ++msgstr "&Hệ thống"
8617 ++
8618 ++#: src/cmd.c:624
8619 ++msgid " Menu edit "
8620 ++msgstr " Soạn thảo tập tin trình đơn "
8621 ++
8622 ++#: src/cmd.c:625
8623 ++msgid " Which menu file do you want to edit? "
8624 ++msgstr " Soạn thảo tập tin trình đơn nào? "
8625 ++
8626 ++#: src/cmd.c:627
8627 ++msgid "&Local"
8628 ++msgstr "&Nội bộ máy"
8629 ++
8630 ++#: src/cmd.c:627
8631 ++msgid "&Home"
8632 ++msgstr "&Cá nhân"
8633 ++
8634 ++#: src/cmd.c:699
8635 ++msgid "Syntax file edit"
8636 ++msgstr "Soạn thảo tập tin cú pháp"
8637 ++
8638 ++#: src/cmd.c:700
8639 ++msgid " Which syntax file you want to edit? "
8640 ++msgstr " Soạn thảo tập tin cú pháp nào? "
8641 ++
8642 ++#: src/cmd.c:854
8643 ++msgid " Compare directories "
8644 ++msgstr " So sánh thư mục "
8645 ++
8646 ++#: src/cmd.c:855
8647 ++msgid " Select compare method: "
8648 ++msgstr " Chọn phương pháp so sánh: "
8649 ++
8650 ++#: src/cmd.c:855
8651 ++msgid "&Quick"
8652 ++msgstr "&Nhanh"
8653 ++
8654 ++#: src/cmd.c:856
8655 ++msgid "&Size only"
8656 ++msgstr "&Chỉ theo kích thước"
8657 ++
8658 ++#: src/cmd.c:856
8659 ++msgid "&Thorough"
8660 ++msgstr "&Theo từng byte"
8661 ++
8662 ++#: src/cmd.c:869
8663 ++msgid " Both panels should be in the listing mode to use this command "
8664 ++msgstr "Để thực hiện câu lệnh này cả hai bảng phải ở trong chế độ danh sách "
8665 ++
8666 ++#: src/cmd.c:885
8667 ++msgid " The command history is empty "
8668 ++msgstr " Lịch sử dòng lệnh rỗng "
8669 ++
8670 ++#: src/cmd.c:889
8671 ++msgid " Command history "
8672 ++msgstr " Lịch sử dòng lệnh "
8673 ++
8674 ++#: src/cmd.c:925
8675 ++msgid ""
8676 ++" Not an xterm or Linux console; \n"
8677 ++" the panels cannot be toggled. "
8678 ++msgstr ""
8679 ++" Đây không phải là xterm hay kênh giao tác Linux; \n"
8680 ++" bảng sẽ không thể bị tắt. "
8681 ++
8682 ++#: src/cmd.c:939
8683 ++#, c-format
8684 ++msgid "Link %s to:"
8685 ++msgstr "Tạo liên kết tới %s:"
8686 ++
8687 ++#: src/cmd.c:940
8688 ++msgid " Link "
8689 ++msgstr " Liên kết "
8690 ++
8691 ++#: src/cmd.c:950
8692 ++#, c-format
8693 ++msgid " link: %s "
8694 ++msgstr " liên kết: %s "
8695 ++
8696 ++#: src/cmd.c:978
8697 ++#, c-format
8698 ++msgid " symlink: %s "
8699 ++msgstr " liên kết mềm: %s "
8700 ++
8701 ++#: src/cmd.c:1012
8702 ++#, c-format
8703 ++msgid " Symlink `%s' points to: "
8704 ++msgstr " Liên kết mềm %s chỉ tới: "
8705 ++
8706 ++#: src/cmd.c:1017
8707 ++msgid " Edit symlink "
8708 ++msgstr " Sửa liên kết mềm "
8709 ++
8710 ++#: src/cmd.c:1022
8711 ++#, c-format
8712 ++msgid " edit symlink, unable to remove %s: %s "
8713 ++msgstr " sửa liên kết mềm, không thể xóa %s: %s "
8714 ++
8715 ++#: src/cmd.c:1026
8716 ++#, c-format
8717 ++msgid " edit symlink: %s "
8718 ++msgstr " sửa liên kết mềm: %s "
8719 ++
8720 ++#: src/cmd.c:1037
8721 ++#, c-format
8722 ++msgid "`%s' is not a symbolic link"
8723 ++msgstr "`%s' không phải là một liên kết mềm"
8724 ++
8725 ++#: src/cmd.c:1155
8726 ++#, c-format
8727 ++msgid " Cannot chdir to %s "
8728 ++msgstr " Không thể chdir vào %s "
8729 ++
8730 ++#: src/cmd.c:1164
8731 ++msgid " Enter machine name (F1 for details): "
8732 ++msgstr " Hãy nhập tên máy (nhấn F1 để biết chi tiết): "
8733 ++
8734 ++#: src/cmd.c:1169 src/widget.c:1051
8735 ++msgid " Link to a remote machine "
8736 ++msgstr " Kiết nối tới máy ở xa "
8737 ++
8738 ++#: src/cmd.c:1176 src/widget.c:1052
8739 ++msgid " FTP to machine "
8740 ++msgstr " FTP tới máy ở xa "
8741 ++
8742 ++#: src/cmd.c:1182
8743 ++msgid " Shell link to machine "
8744 ++msgstr " Kết nối shell tới máy ở xa"
8745 ++
8746 ++#: src/cmd.c:1189 src/widget.c:1053
8747 ++msgid " SMB link to machine "
8748 ++msgstr " Kết nối SMB tới máy ở xa"
8749 ++
8750 ++#: src/cmd.c:1198
8751 ++msgid " Undelete files on an ext2 file system "
8752 ++msgstr " Phục hồi tập tin trên hệ thống tập tin ext2 sau khi xóa "
8753 ++
8754 ++#: src/cmd.c:1199
8755 ++msgid ""
8756 ++" Enter device (without /dev/) to undelete\n"
8757 ++" files on: (F1 for details)"
8758 ++msgstr ""
8759 ++" Nhập tên thiết bị (không có /dev/), để\n"
8760 ++" phục hồi tập tin của nó: (nhấn F1 để biết chi tiết)"
8761 ++
8762 ++#: src/cmd.c:1249
8763 ++msgid " Setup saved to ~/"
8764 ++msgstr " Tham số ghi nhớ trong ~/"
8765 ++
8766 ++#: src/cmd.c:1251
8767 ++msgid " Setup "
8768 ++msgstr " Cấu hình "
8769 ++
8770 ++#: src/command.c:177 src/screen.c:2174 src/tree.c:823
8771 ++#, c-format
8772 ++msgid ""
8773 ++" Cannot chdir to \"%s\" \n"
8774 ++" %s "
8775 ++msgstr ""
8776 ++" Không chdir được tới \"%s\" \n"
8777 ++" %s "
8778 ++
8779 ++#: src/command.c:210 src/user.c:694
8780 ++msgid " Cannot execute commands on non-local filesystems"
8781 ++msgstr " Chỉ có thể thực hiện câu lệnh trên hệ thống tập tin nội bộ"
8782 ++
8783 ++#: src/command.c:219 src/execute.c:183
8784 ++msgid " The shell is already running a command "
8785 ++msgstr " shell đang chạy một câu lệnh"
8786 ++
8787 ++#: src/dir.c:49
8788 ++msgid "&Unsorted"
8789 ++msgstr "không &Sắp xếp"
8790 ++
8791 ++#: src/dir.c:50
8792 ++msgid "&Name"
8793 ++msgstr "th&Eo tên"
8794 ++
8795 ++#: src/dir.c:51
8796 ++msgid "&Extension"
8797 ++msgstr "&Phần mở rộng"
8798 ++
8799 ++#: src/dir.c:52
8800 ++msgid "&Modify time"
8801 ++msgstr "&Thời gian sửa đổi"
8802 ++
8803 ++#: src/dir.c:53
8804 ++msgid "&Access time"
8805 ++msgstr "thời &Gian truy cập"
8806 ++
8807 ++#: src/dir.c:54
8808 ++msgid "&Change time"
8809 ++msgstr "thời gi&An thay đổi"
8810 ++
8811 ++#: src/dir.c:55
8812 ++msgid "&Size"
8813 ++msgstr "&Kích thước"
8814 ++
8815 ++#: src/dir.c:56
8816 ++msgid "&Inode"
8817 ++msgstr "&Chỉ mục inode"
8818 ++
8819 ++#: src/dir.c:59
8820 ++msgid "&Type"
8821 ++msgstr "&Loại"
8822 ++
8823 ++#: src/dir.c:60
8824 ++msgid "&Links"
8825 ++msgstr "&Liên kết"
8826 ++
8827 ++#: src/dir.c:61
8828 ++msgid "N&GID"
8829 ++msgstr "N&GID"
8830 ++
8831 ++#: src/dir.c:62
8832 ++msgid "N&UID"
8833 ++msgstr "N&UID"
8834 ++
8835 ++#: src/dir.c:63
8836 ++msgid "&Owner"
8837 ++msgstr "&Chủ sở hữu"
8838 ++
8839 ++#: src/dir.c:64
8840 ++msgid "&Group"
8841 ++msgstr "&Nhóm"
8842 ++
8843 ++#: src/dir.c:475 src/dir.c:577
8844 ++msgid "Cannot read directory contents"
8845 ++msgstr "Không đọc được nội dung thư mục"
8846 ++
8847 ++#: src/execute.c:133 src/utilunix.c:380
8848 ++msgid "Press any key to continue..."
8849 ++msgstr "Để tiếp tục nhấn phím bất kỳ..."
8850 ++
8851 ++#: src/execute.c:235
8852 ++msgid "Type `exit' to return to the Midnight Commander"
8853 ++msgstr "Hãy gõ \"exit\" để quay trở lại Midnight Commander"
8854 ++
8855 ++#: src/execute.c:343
8856 ++#, c-format
8857 ++msgid " Cannot fetch a local copy of %s "
8858 ++msgstr " Không thể lấy được bản sao nội bộ của %s "
8859 ++
8860 ++#: src/ext.c:106 src/user.c:566
8861 ++#, c-format
8862 ++msgid ""
8863 ++" Cannot create temporary command file \n"
8864 ++" %s "
8865 ++msgstr ""
8866 ++" Không tạo được tập tin câu lệnh tạm thời\n"
8867 ++" %s "
8868 ++
8869 ++#: src/ext.c:119 src/user.c:589
8870 ++msgid " Parameter "
8871 ++msgstr " Tham số "
8872 ++
8873 ++#: src/ext.c:462 src/ext.c:481
8874 ++msgid " file error "
8875 ++msgstr " lỗi tập tin "
8876 ++
8877 ++#: src/ext.c:464 src/ext.c:483
8878 ++msgid "Format of the "
8879 ++msgstr "Định dạng của "
8880 ++
8881 ++#: src/ext.c:465
8882 ++msgid ""
8883 ++"mc.ext file has changed\n"
8884 ++"with version 3.0. It seems that installation\n"
8885 ++"failed. Please fetch a fresh new copy from the\n"
8886 ++"Midnight Commander package."
8887 ++msgstr ""
8888 ++"Tập tin mc.ext đã thay đổi\n"
8889 ++"từ phiên bản 3.0. Rất có thể có sự cố khi cài đặt.\n"
8890 ++"Xin hãy lấy bản sao mới nhất từ gói \n"
8891 ++"Midnight Commander."
8892 ++
8893 ++#: src/ext.c:484
8894 ++msgid ""
8895 ++" file has changed\n"
8896 ++"with version 3.0. You may want either to\n"
8897 ++"copy it from "
8898 ++msgstr ""
8899 ++" tập tin đã thay đổi\n"
8900 ++"trong phiên bản 3.0. Có thể nên sao\n"
8901 ++"chép nó từ "
8902 ++
8903 ++#: src/ext.c:487
8904 ++msgid ""
8905 ++"mc.ext or use that\n"
8906 ++"file as an example of how to write it.\n"
8907 ++msgstr ""
8908 ++"mc.ext, hoặc sử dụng tập tin này làm\n"
8909 ++"ví dụ để biết cách viết.\n"
8910 ++
8911 ++#: src/ext.c:490
8912 ++msgid "mc.ext will be used for this moment."
8913 ++msgstr "mc.ext sẽ được sử dụng trong thời điểm này."
8914 ++
8915 ++#: src/file.c:122 src/tree.c:593
8916 ++msgid " Copy "
8917 ++msgstr " Sao chép "
8918 ++
8919 ++#: src/file.c:123 src/tree.c:634
8920 ++msgid " Move "
8921 ++msgstr " Di chuyển "
8922 ++
8923 ++#: src/file.c:124 src/tree.c:708
8924 ++msgid " Delete "
8925 ++msgstr " Xóa "
8926 ++
8927 ++#: src/file.c:217
8928 ++msgid " Invalid target mask "
8929 ++msgstr " Dấu hiệu đích đến không đúng "
8930 ++
8931 ++#: src/file.c:316
8932 ++msgid " Cannot make the hardlink "
8933 ++msgstr " Không thể tạo liên kết cứng "
8934 ++
8935 ++#: src/file.c:359
8936 ++#, c-format
8937 ++msgid ""
8938 ++" Cannot read source link \"%s\" \n"
8939 ++" %s "
8940 ++msgstr ""
8941 ++" Không thể đọc liên kết nguồn \"%s\" \n"
8942 ++" %s "
8943 ++
8944 ++#: src/file.c:370
8945 ++msgid ""
8946 ++" Cannot make stable symlinks across non-local filesystems: \n"
8947 ++"\n"
8948 ++" Option Stable Symlinks will be disabled "
8949 ++msgstr ""
8950 ++" Không tạo được liên kết mềm bền vững giữa các hệ thống tập tin không phải nội bộ:\n"
8951 ++"\n"
8952 ++" Tùy chọn \"Liên kết mềm Bền vững\" sẽ bị tắt "
8953 ++
8954 ++#: src/file.c:419
8955 ++#, c-format
8956 ++msgid ""
8957 ++" Cannot create target symlink \"%s\" \n"
8958 ++" %s "
8959 ++msgstr ""
8960 ++" Khônt tạo được liên kết mềm đích \"%s\" \n"
8961 ++" %s "
8962 ++
8963 ++#: src/file.c:493
8964 ++#, c-format
8965 ++msgid ""
8966 ++" Cannot overwrite directory \"%s\" \n"
8967 ++" %s "
8968 ++msgstr ""
8969 ++" Không thể ghi chèn lên thư mục \"%s\" \n"
8970 ++" %s "
8971 ++
8972 ++#: src/file.c:504
8973 ++#, c-format
8974 ++msgid ""
8975 ++" Cannot stat source file \"%s\" \n"
8976 ++" %s "
8977 ++msgstr ""
8978 ++" Không lấy được tính chất (stat) của tập tin nguồn \"%s\" \n"
8979 ++" %s "
8980 ++
8981 ++#: src/file.c:514 src/file.c:1115
8982 ++#, c-format
8983 ++msgid " `%s' and `%s' are the same file "
8984 ++msgstr " `%s' và `%s' là một tập tin "
8985 ++
8986 ++#: src/file.c:552
8987 ++#, c-format
8988 ++msgid ""
8989 ++" Cannot create special file \"%s\" \n"
8990 ++" %s "
8991 ++msgstr ""
8992 ++" Không tạo được tập tin đặc biệt \"%s\" \n"
8993 ++" %s "
8994 ++
8995 ++#: src/file.c:564 src/file.c:813
8996 ++#, c-format
8997 ++msgid ""
8998 ++" Cannot chown target file \"%s\" \n"
8999 ++" %s "
9000 ++msgstr ""
9001 ++" Không thay đổi được chủ sở hữu của tập tin đích đến \"%s\" \n"
9002 ++" %s "
9003 ++
9004 ++#: src/file.c:575 src/file.c:830
9005 ++#, c-format
9006 ++msgid ""
9007 ++" Cannot chmod target file \"%s\" \n"
9008 ++" %s "
9009 ++msgstr ""
9010 ++" Không thay đổi được quyền hạn (chmod) của tập tin đích đến \"%s\" \n"
9011 ++" %s "
9012 ++
9013 ++#: src/file.c:589
9014 ++#, c-format
9015 ++msgid ""
9016 ++" Cannot open source file \"%s\" \n"
9017 ++" %s "
9018 ++msgstr ""
9019 ++" Không mở được tập tin nguồn \"%s\" \n"
9020 ++" %s "
9021 ++
9022 ++#: src/file.c:600
9023 ++msgid " Reget failed, about to overwrite file "
9024 ++msgstr " Lấy phần còn lại của tập tin không thành công, tập tin sẽ bị ghi đè "
9025 ++
9026 ++#: src/file.c:607
9027 ++#, c-format
9028 ++msgid ""
9029 ++" Cannot fstat source file \"%s\" \n"
9030 ++" %s "
9031 ++msgstr ""
9032 ++" Không lấy được tính chất (fstat) tập tin nguồn \"%s\" \n"
9033 ++" %s "
9034 ++
9035 ++#: src/file.c:631
9036 ++#, c-format
9037 ++msgid ""
9038 ++" Cannot create target file \"%s\" \n"
9039 ++" %s "
9040 ++msgstr ""
9041 ++" Không tạo được tập tin đích \"%s\" \n"
9042 ++" %s "
9043 ++
9044 ++#: src/file.c:646
9045 ++#, c-format
9046 ++msgid ""
9047 ++" Cannot fstat target file \"%s\" \n"
9048 ++" %s "
9049 ++msgstr ""
9050 ++" Không lấy được tính chất (fstat) tập tin đích \"%s\" \n"
9051 ++" %s "
9052 ++
9053 ++#: src/file.c:680
9054 ++#, c-format
9055 ++msgid ""
9056 ++" Cannot read source file \"%s\" \n"
9057 ++" %s "
9058 ++msgstr ""
9059 ++" Không đọc được tập tin nguồn \"%s\" \n"
9060 ++" %s "
9061 ++
9062 ++#: src/file.c:715
9063 ++#, c-format
9064 ++msgid ""
9065 ++" Cannot write target file \"%s\" \n"
9066 ++" %s "
9067 ++msgstr ""
9068 ++" Không ghi nhớ được tập tin nguồn \"%s\" \n"
9069 ++" %s "
9070 ++
9071 ++#: src/file.c:733
9072 ++msgid "(stalled)"
9073 ++msgstr "(bị nhốt)"
9074 ++
9075 ++#: src/file.c:780
9076 ++#, c-format
9077 ++msgid ""
9078 ++" Cannot close source file \"%s\" \n"
9079 ++" %s "
9080 ++msgstr ""
9081 ++" Không đóng được tập tin nguồn \"%s\" \n"
9082 ++" %s "
9083 ++
9084 ++#: src/file.c:791
9085 ++#, c-format
9086 ++msgid ""
9087 ++" Cannot close target file \"%s\" \n"
9088 ++" %s "
9089 ++msgstr ""
9090 ++" Không đóng được tập tin đính \"%s\" \n"
9091 ++" %s "
9092 ++
9093 ++#: src/file.c:804
9094 ++msgid "Incomplete file was retrieved. Keep it?"
9095 ++msgstr "Nhận được tập tin không đầy đủ. Giữ tập tin?"
9096 ++
9097 ++#: src/file.c:805
9098 ++msgid "&Delete"
9099 ++msgstr "&Xóa"
9100 ++
9101 ++#: src/file.c:805
9102 ++msgid "&Keep"
9103 ++msgstr "&Giữ"
9104 ++
9105 ++#: src/file.c:873
9106 ++#, c-format
9107 ++msgid ""
9108 ++" Cannot stat source directory \"%s\" \n"
9109 ++" %s "
9110 ++msgstr ""
9111 ++" Không lấy được thông tin (stat) thư mục nguồn \"%s\" \n"
9112 ++" %s "
9113 ++
9114 ++#: src/file.c:900
9115 ++#, c-format
9116 ++msgid ""
9117 ++" Source directory \"%s\" is not a directory \n"
9118 ++" %s "
9119 ++msgstr ""
9120 ++" Thư mục nguồn \"%s\" không phải là một thư mục \n"
9121 ++" %s "
9122 ++
9123 ++#: src/file.c:910
9124 ++#, c-format
9125 ++msgid ""
9126 ++" Cannot copy cyclic symbolic link \n"
9127 ++" `%s' "
9128 ++msgstr ""
9129 ++" Không sao chép được liên kết mềm vòng lặp \n"
9130 ++" `%s' "
9131 ++
9132 ++#: src/file.c:945 src/file.c:1985 src/tree.c:648
9133 ++#, c-format
9134 ++msgid ""
9135 ++" Destination \"%s\" must be a directory \n"
9136 ++" %s "
9137 ++msgstr ""
9138 ++" Nơi đến \"%s\" phải là một thư mục \n"
9139 ++" %s "
9140 ++
9141 ++#: src/file.c:975
9142 ++#, c-format
9143 ++msgid ""
9144 ++" Cannot create target directory \"%s\" \n"
9145 ++" %s "
9146 ++msgstr ""
9147 ++" Không tạo được thư mục đích đến \"%s\" \n"
9148 ++" %s "
9149 ++
9150 ++#: src/file.c:994
9151 ++#, c-format
9152 ++msgid ""
9153 ++" Cannot chown target directory \"%s\" \n"
9154 ++" %s "
9155 ++msgstr ""
9156 ++" Không thay đổi được chủ sở hữu (chown) của thư mục đích đến \"%s\" \n"
9157 ++" %s "
9158 ++
9159 ++#: src/file.c:1096
9160 ++#, c-format
9161 ++msgid ""
9162 ++" Cannot stat file \"%s\" \n"
9163 ++" %s "
9164 ++msgstr ""
9165 ++" Không nhận được tính chất (stat) của tập tin \"%s\" \n"
9166 ++" %s "
9167 ++
9168 ++#: src/file.c:1122
9169 ++#, c-format
9170 ++msgid " Cannot overwrite directory `%s' "
9171 ++msgstr " Không thể ghi đè lên thư mục `%s' "
9172 ++
9173 ++#: src/file.c:1157
9174 ++#, c-format
9175 ++msgid ""
9176 ++" Cannot move file \"%s\" to \"%s\" \n"
9177 ++" %s "
9178 ++msgstr ""
9179 ++" Không thể di chuyển tập tin \"%s\" vào \"%s\" \n"
9180 ++" %s "
9181 ++
9182 ++#: src/file.c:1181
9183 ++#, c-format
9184 ++msgid ""
9185 ++" Cannot remove file \"%s\" \n"
9186 ++" %s "
9187 ++msgstr ""
9188 ++" Không thể xóa tập tin \"%s\" \n"
9189 ++" %s "
9190 ++
9191 ++#: src/file.c:1233
9192 ++#, c-format
9193 ++msgid " `%s' and `%s' are the same directory "
9194 ++msgstr " %s và %s - là một thư mục "
9195 ++
9196 ++#: src/file.c:1252
9197 ++#, c-format
9198 ++msgid " Cannot overwrite directory \"%s\" %s "
9199 ++msgstr " Không thể ghi đè lên thư mục \"%s\" %s "
9200 ++
9201 ++#: src/file.c:1256
9202 ++#, c-format
9203 ++msgid " Cannot overwrite file \"%s\" %s "
9204 ++msgstr " Không thể ghi đè tập tin \"%s\" %s "
9205 ++
9206 ++#: src/file.c:1282
9207 ++#, c-format
9208 ++msgid ""
9209 ++" Cannot move directory \"%s\" to \"%s\" \n"
9210 ++" %s "
9211 ++msgstr ""
9212 ++" Không thể di chuyển thư mục \"%s\" vào \"%s\" \n"
9213 ++" %s "
9214 ++
9215 ++#: src/file.c:1352
9216 ++#, c-format
9217 ++msgid ""
9218 ++" Cannot delete file \"%s\" \n"
9219 ++" %s "
9220 ++msgstr ""
9221 ++" Không thể xóa tập tin \"%s\" \n"
9222 ++" %s "
9223 ++
9224 ++#: src/file.c:1412 src/file.c:1481 src/file.c:1509
9225 ++#, c-format
9226 ++msgid ""
9227 ++" Cannot remove directory \"%s\" \n"
9228 ++" %s "
9229 ++msgstr ""
9230 ++" Không thể xóa thư mục \"%s\" \n"
9231 ++" %s "
9232 ++
9233 ++#: src/file.c:1657
9234 ++msgid "1Copy"
9235 ++msgstr "1Sao chép"
9236 ++
9237 ++#: src/file.c:1657
9238 ++msgid "1Move"
9239 ++msgstr "1Di chuyển"
9240 ++
9241 ++#: src/file.c:1657
9242 ++msgid "1Delete"
9243 ++msgstr "1Xóa"
9244 ++
9245 ++#: src/file.c:1672
9246 ++#, no-c-format
9247 ++msgid "%o %f \"%s\"%m"
9248 ++msgstr "%o %f \"%s\"%m"
9249 ++
9250 ++# msgfmt warnings/errors must be ignored. mc parse this pattern itself.
9251 ++#: src/file.c:1674
9252 ++#, no-c-format
9253 ++msgid "%o %d %f%m"
9254 ++msgstr "%o (%d cái) %f%m"
9255 ++
9256 ++#: src/file.c:1676 vfs/fish.c:561
9257 ++msgid "file"
9258 ++msgstr "tập tin"
9259 ++
9260 ++#: src/file.c:1676
9261 ++msgid "files"
9262 ++msgstr "các tập tin"
9263 ++
9264 ++#: src/file.c:1676
9265 ++msgid "directory"
9266 ++msgstr "thư mục"
9267 ++
9268 ++#: src/file.c:1676
9269 ++msgid "directories"
9270 ++msgstr "Các thư mục"
9271 ++
9272 ++#: src/file.c:1677
9273 ++msgid "files/directories"
9274 ++msgstr "tập tin/thư mục"
9275 ++
9276 ++#: src/file.c:1677
9277 ++msgid " with source mask:"
9278 ++msgstr " với nhãn ban đầu:"
9279 ++
9280 ++#: src/file.c:1677
9281 ++msgid " to:"
9282 ++msgstr " vào:"
9283 ++
9284 ++#: src/file.c:1821
9285 ++msgid " Cannot operate on \"..\"! "
9286 ++msgstr " Không thể thao tác trên \"..\"! "
9287 ++
9288 ++#: src/file.c:1877
9289 ++msgid " Sorry, I could not put the job in background "
9290 ++msgstr " Xin lỗi, không thể đặt công việc nào vào chế độ nền sau "
9291 ++
9292 ++#: src/file.c:2147 src/view.c:441
9293 ++msgid "&Retry"
9294 ++msgstr "&Thử lại"
9295 ++
9296 ++#: src/file.c:2148 src/file.c:2211 src/filegui.c:207 src/filegui.c:517
9297 ++msgid "&Abort"
9298 ++msgstr "&Dừng"
9299 ++
9300 ++#: src/file.c:2200
9301 ++msgid ""
9302 ++"\n"
9303 ++" Directory not empty. \n"
9304 ++" Delete it recursively? "
9305 ++msgstr ""
9306 ++"\n"
9307 ++" Thư mục không rỗng. \n"
9308 ++" Xóa toàn bộ (đệ quy)? "
9309 ++
9310 ++#: src/file.c:2202
9311 ++msgid ""
9312 ++"\n"
9313 ++" Background process: Directory not empty \n"
9314 ++" Delete it recursively? "
9315 ++msgstr ""
9316 ++"\n"
9317 ++" Tiến trình nền sau: Thư mục không rỗng \n"
9318 ++" Xóa toàn bộ (đệ quy)? "
9319 ++
9320 ++#: src/file.c:2204
9321 ++msgid " Delete: "
9322 ++msgstr " Xóa: "
9323 ++
9324 ++#: src/file.c:2210 src/filegui.c:519
9325 ++msgid "Non&e"
9326 ++msgstr "&Không"
9327 ++
9328 ++#: src/filegui.c:324
9329 ++#, c-format
9330 ++msgid "ETA %d:%02d.%02d"
9331 ++msgstr "Còn lại %d:%02d.%02d"
9332 ++
9333 ++#: src/filegui.c:347
9334 ++#, c-format
9335 ++msgid "%.2f MB/s"
9336 ++msgstr "%.2f МB/giây"
9337 ++
9338 ++#: src/filegui.c:350
9339 ++#, c-format
9340 ++msgid "%.2f KB/s"
9341 ++msgstr "%.2f KB/giây"
9342 ++
9343 ++#: src/filegui.c:353
9344 ++#, c-format
9345 ++msgid "%ld B/s"
9346 ++msgstr "%ld B/giây"
9347 ++
9348 ++#: src/filegui.c:376
9349 ++msgid "File"
9350 ++msgstr "Tập tin"
9351 ++
9352 ++#: src/filegui.c:399
9353 ++msgid "Count"
9354 ++msgstr "Đếm"
9355 ++
9356 ++#: src/filegui.c:420
9357 ++msgid "Bytes"
9358 ++msgstr "Byte"
9359 ++
9360 ++#: src/filegui.c:453
9361 ++msgid "Source"
9362 ++msgstr "Nguồn"
9363 ++
9364 ++#: src/filegui.c:476
9365 ++msgid "Target"
9366 ++msgstr "Đích"
9367 ++
9368 ++#: src/filegui.c:498
9369 ++msgid "Deleting"
9370 ++msgstr "Đang xóa"
9371 ++
9372 ++#: src/filegui.c:516
9373 ++#, c-format
9374 ++msgid "Target file \"%s\" already exists!"
9375 ++msgstr "Tập tin đích \"%s\" đã tồn tại!"
9376 ++
9377 ++#: src/filegui.c:518
9378 ++msgid "If &size differs"
9379 ++msgstr "&Nếu kích thước khác nhau"
9380 ++
9381 ++#: src/filegui.c:520
9382 ++msgid "&Update"
9383 ++msgstr "&Cập nhật"
9384 ++
9385 ++#: src/filegui.c:522
9386 ++msgid "Overwrite all targets?"
9387 ++msgstr "Khi đè lên mọi tập tin đích?"
9388 ++
9389 ++#: src/filegui.c:523
9390 ++msgid "&Reget"
9391 ++msgstr "&Lấy lại"
9392 ++
9393 ++#: src/filegui.c:524
9394 ++msgid "A&ppend"
9395 ++msgstr "&Thêm vào cuối"
9396 ++
9397 ++#: src/filegui.c:527
9398 ++msgid "Overwrite this target?"
9399 ++msgstr "Khi đè lên tập tin này?"
9400 ++
9401 ++#: src/filegui.c:528
9402 ++#, c-format
9403 ++msgid "Target date: %s, size %d"
9404 ++msgstr "Thời gian sửa đổi của tập tin đích: %s, kích thước %d"
9405 ++
9406 ++#: src/filegui.c:529
9407 ++#, c-format
9408 ++msgid "Source date: %s, size %d"
9409 ++msgstr "Thời gian sửa đổi của tập tin nguồn: %s, kích thước %d"
9410 ++
9411 ++#: src/filegui.c:604
9412 ++msgid " File exists "
9413 ++msgstr " Tập tin tồn tại "
9414 ++
9415 ++#: src/filegui.c:606
9416 ++msgid " Background process: File exists "
9417 ++msgstr " Tiến trình nền sau: tập tin tồn tại "
9418 ++
9419 ++#: src/filegui.c:728
9420 ++msgid "preserve &Attributes"
9421 ++msgstr "&Ghi nhớ thuộc tính"
9422 ++
9423 ++#: src/filegui.c:730
9424 ++msgid "follow &Links"
9425 ++msgstr "đi theo &Liên kết"
9426 ++
9427 ++#: src/filegui.c:732
9428 ++msgid "to:"
9429 ++msgstr "vào:"
9430 ++
9431 ++#: src/filegui.c:733
9432 ++msgid "&Using shell patterns"
9433 ++msgstr "&Sử dụng mẫu (pattern) của shell"
9434 ++
9435 ++#: src/filegui.c:754
9436 ++msgid "&Background"
9437 ++msgstr "&Trong nền sau"
9438 ++
9439 ++#: src/filegui.c:764
9440 ++msgid "&Stable Symlinks"
9441 ++msgstr "liên kết &Bền vững"
9442 ++
9443 ++#: src/filegui.c:766
9444 ++msgid "&Dive into subdir if exists"
9445 ++msgstr "&Vào thư mục con, nếu có"
9446 ++
9447 ++#: src/filegui.c:938
9448 ++#, c-format
9449 ++msgid ""
9450 ++"Invalid source pattern `%s' \n"
9451 ++" %s "
9452 ++msgstr ""
9453 ++"Mẫu không đúng `%s' \n"
9454 ++" %s "
9455 ++
9456 ++#: src/find.c:99
9457 ++msgid "&Suspend"
9458 ++msgstr "&Hoãn"
9459 ++
9460 ++#: src/find.c:100
9461 ++msgid "Con&tinue"
9462 ++msgstr "&Tiếp tục"
9463 ++
9464 ++#: src/find.c:101
9465 ++msgid "&Chdir"
9466 ++msgstr "&Chuyển thư mục"
9467 ++
9468 ++#: src/find.c:102
9469 ++msgid "&Again"
9470 ++msgstr "&Lặp lại"
9471 ++
9472 ++#: src/find.c:103 src/subshell.c:323
9473 ++msgid "&Quit"
9474 ++msgstr "&Thoát"
9475 ++
9476 ++#: src/find.c:104 src/panelize.c:69
9477 ++msgid "Pane&lize"
9478 ++msgstr "&Bảng"
9479 ++
9480 ++#: src/find.c:105
9481 ++msgid "&View - F3"
9482 ++msgstr "X&em - F3"
9483 ++
9484 ++#: src/find.c:106
9485 ++msgid "&Edit - F4"
9486 ++msgstr "&Soạn thảo - F4"
9487 ++
9488 ++#: src/find.c:183
9489 ++msgid "Start at:"
9490 ++msgstr "Bắt đầu từ:"
9491 ++
9492 ++#: src/find.c:183
9493 ++msgid "Filename:"
9494 ++msgstr "Tên tập tin:"
9495 ++
9496 ++#: src/find.c:183
9497 ++msgid "Content: "
9498 ++msgstr "Nội dung: "
9499 ++
9500 ++#: src/find.c:184 src/main.c:795 src/main.c:819
9501 ++msgid "&Tree"
9502 ++msgstr "&Cây thư mục"
9503 ++
9504 ++#: src/find.c:232 src/find.c:792
9505 ++msgid "Find File"
9506 ++msgstr "Tìm tập tin"
9507 ++
9508 ++#: src/find.c:464
9509 ++#, c-format
9510 ++msgid "Grepping in %s"
9511 ++msgstr "Tìm trong %s"
9512 ++
9513 ++#: src/find.c:538
9514 ++msgid "Finished"
9515 ++msgstr "Kết thúc"
9516 ++
9517 ++#: src/find.c:565 src/view.c:1594
9518 ++#, c-format
9519 ++msgid "Searching %s"
9520 ++msgstr "Tìm %s"
9521 ++
9522 ++#: src/find.c:721 src/find.c:818
9523 ++msgid "Searching"
9524 ++msgstr "Tìm"
9525 ++
9526 ++#: src/help.c:279
9527 ++msgid " Help file format error\n"
9528 ++msgstr " Lỗi định dạng tập tin trợ giúp\n"
9529 ++
9530 ++#: src/help.c:318
9531 ++msgid " Internal bug: Double start of link area "
9532 ++msgstr " Lỗi (bug) nội bộ: vùng liên kết có hai đầu "
9533 ++
9534 ++#: src/help.c:554 src/help.c:778
9535 ++#, c-format
9536 ++msgid " Cannot find node %s in help file "
9537 ++msgstr " Không tìm thấy nút %s trong tập tin trợ giúp "
9538 ++
9539 ++#: src/help.c:816
9540 ++msgid "Index"
9541 ++msgstr "Chỉ mục"
9542 ++
9543 ++#: src/help.c:818
9544 ++msgid "Prev"
9545 ++msgstr "Quay lại"
9546 ++
9547 ++#: src/hotlist.c:115
9548 ++msgid "&Move"
9549 ++msgstr "&Di chuyển"
9550 ++
9551 ++#: src/hotlist.c:116 src/panelize.c:68
9552 ++msgid "&Remove"
9553 ++msgstr "&Xóa"
9554 ++
9555 ++#: src/hotlist.c:117 src/hotlist.c:834 src/hotlist.c:930
9556 ++msgid "&Append"
9557 ++msgstr "&Thêm vào"
9558 ++
9559 ++#: src/hotlist.c:118 src/hotlist.c:832 src/hotlist.c:928
9560 ++msgid "&Insert"
9561 ++msgstr "c&Hèn"
9562 ++
9563 ++#: src/hotlist.c:119
9564 ++msgid "New &Entry"
9565 ++msgstr "tạo &Mục mới"
9566 ++
9567 ++#: src/hotlist.c:120
9568 ++msgid "New &Group"
9569 ++msgstr "&Nhóm mới"
9570 ++
9571 ++#: src/hotlist.c:122
9572 ++msgid "&Up"
9573 ++msgstr "&Lên"
9574 ++
9575 ++#: src/hotlist.c:123
9576 ++msgid "&Add current"
9577 ++msgstr "&Thêm hiện thời"
9578 ++
9579 ++#: src/hotlist.c:125
9580 ++msgid "&Refresh"
9581 ++msgstr "&Làm mới"
9582 ++
9583 ++#: src/hotlist.c:126
9584 ++msgid "Fr&ee VFSs now"
9585 ++msgstr "&Giải phóng"
9586 ++
9587 ++#: src/hotlist.c:128
9588 ++msgid "Change &To"
9589 ++msgstr "&Chuyển tới"
9590 ++
9591 ++#: src/hotlist.c:177
9592 ++msgid "Subgroup - press ENTER to see list"
9593 ++msgstr "Nhóm con - nhấn ENTER để xem danh sách"
9594 ++
9595 ++#: src/hotlist.c:609
9596 ++msgid "Active VFS directories"
9597 ++msgstr "Thư mục VFS hoạt động"
9598 ++
9599 ++#: src/hotlist.c:612
9600 ++msgid "Directory hotlist"
9601 ++msgstr "Danh sách thư mục thường dùng"
9602 ++
9603 ++#: src/hotlist.c:640
9604 ++msgid " Directory path "
9605 ++msgstr " Đường dẫn tới thư mục "
9606 ++
9607 ++#: src/hotlist.c:643 src/hotlist.c:692
9608 ++msgid " Directory label "
9609 ++msgstr " Nhãn thư mục"
9610 ++
9611 ++#: src/hotlist.c:668
9612 ++#, c-format
9613 ++msgid "Moving %s"
9614 ++msgstr "Di chuyển %s"
9615 ++
9616 ++#: src/hotlist.c:907
9617 ++msgid "New hotlist entry"
9618 ++msgstr " Thêm bản ghi vào tra cứu"
9619 ++
9620 ++#: src/hotlist.c:907
9621 ++msgid "Directory label"
9622 ++msgstr " Tên nhãn thư mục"
9623 ++
9624 ++#: src/hotlist.c:907
9625 ++msgid "Directory path"
9626 ++msgstr " Đường dẫn tới thư mục"
9627 ++
9628 ++#: src/hotlist.c:987
9629 ++msgid " New hotlist group "
9630 ++msgstr " Thêm nhóm vào tra cứu "
9631 ++
9632 ++#: src/hotlist.c:987
9633 ++msgid "Name of new group"
9634 ++msgstr " Tên nhóm mới"
9635 ++
9636 ++#: src/hotlist.c:1002
9637 ++#, c-format
9638 ++msgid "Label for \"%s\":"
9639 ++msgstr " Tên nhãn cho \"%s\":"
9640 ++
9641 ++#: src/hotlist.c:1006
9642 ++msgid " Add to hotlist "
9643 ++msgstr " Thêm vào tra cứu "
9644 ++
9645 ++#: src/hotlist.c:1043
9646 ++msgid " Remove: "
9647 ++msgstr " Xóa: "
9648 ++
9649 ++#: src/hotlist.c:1047
9650 ++msgid ""
9651 ++"\n"
9652 ++" Group not empty.\n"
9653 ++" Remove it?"
9654 ++msgstr ""
9655 ++"\n"
9656 ++" Nhóm không rỗng.\n"
9657 ++" Xóa nó?"
9658 ++
9659 ++#: src/hotlist.c:1391
9660 ++msgid " Top level group "
9661 ++msgstr "Nhóm cấp độ cao nhất "
9662 ++
9663 ++#: src/hotlist.c:1414
9664 ++msgid "MC was unable to write ~/"
9665 ++msgstr "MC không thể ghi nhớ ~/"
9666 ++
9667 ++#: src/hotlist.c:1415
9668 ++msgid " file, your old hotlist entries were not deleted"
9669 ++msgstr " tập tin, tra cứu thư mục cũ chưa bị xóa"
9670 ++
9671 ++#: src/hotlist.c:1417
9672 ++msgid " Hotlist Load "
9673 ++msgstr " Nạp tra cứu "
9674 ++
9675 ++#: src/info.c:74
9676 ++#, c-format
9677 ++msgid "Midnight Commander %s"
9678 ++msgstr "Midnight Commander %s"
9679 ++
9680 ++#: src/info.c:91
9681 ++#, c-format
9682 ++msgid "File: %s"
9683 ++msgstr "Tập tin: %s"
9684 ++
9685 ++#: src/info.c:103
9686 ++#, c-format
9687 ++msgid "Free nodes: %d (%d%%) of %d"
9688 ++msgstr "Nút tự do: %d (%d%%) trong tổng số %d"
9689 ++
9690 ++#: src/info.c:109
9691 ++msgid "No node information"
9692 ++msgstr "Không có thông tin về nút (node)"
9693 ++
9694 ++#: src/info.c:117
9695 ++#, c-format
9696 ++msgid "Free space: %s (%d%%) of %s"
9697 ++msgstr "Chỗ trống: %s (%d%%) của %s"
9698 ++
9699 ++#: src/info.c:121
9700 ++msgid "No space information"
9701 ++msgstr "Không có thông tin về khoảng trống"
9702 ++
9703 ++#: src/info.c:125
9704 ++#, c-format
9705 ++msgid "Type: %s "
9706 ++msgstr "Loại: %s "
9707 ++
9708 ++#: src/info.c:125
9709 ++msgid "non-local vfs"
9710 ++msgstr "không phải vfs cục bộ"
9711 ++
9712 ++#: src/info.c:131
9713 ++#, c-format
9714 ++msgid "Device: %s"
9715 ++msgstr "Thiết bị: %s"
9716 ++
9717 ++#: src/info.c:135
9718 ++#, c-format
9719 ++msgid "Filesystem: %s"
9720 ++msgstr "Hệ thống tập tin: %s"
9721 ++
9722 ++#: src/info.c:140
9723 ++#, c-format
9724 ++msgid "Accessed: %s"
9725 ++msgstr "Truy cập: %s"
9726 ++
9727 ++#: src/info.c:144
9728 ++#, c-format
9729 ++msgid "Modified: %s"
9730 ++msgstr "Sửa đổi: %s"
9731 ++
9732 ++#: src/info.c:148
9733 ++#, c-format
9734 ++msgid "Created: %s"
9735 ++msgstr "Tạo ra: %s"
9736 ++
9737 ++#: src/info.c:163
9738 ++#, c-format
9739 ++msgid "Size: %s"
9740 ++msgstr "Kích thước: %s"
9741 ++
9742 ++#: src/info.c:166
9743 ++#, c-format
9744 ++msgid " (%d block)"
9745 ++msgstr " (%d khối)"
9746 ++
9747 ++#: src/info.c:166
9748 ++#, c-format
9749 ++msgid " (%d blocks)"
9750 ++msgstr " (%d khối)"
9751 ++
9752 ++#: src/info.c:172
9753 ++#, c-format
9754 ++msgid "Owner: %s/%s"
9755 ++msgstr "Chủ sở hữu: %s/%s"
9756 ++
9757 ++#: src/info.c:177
9758 ++#, c-format
9759 ++msgid "Links: %d"
9760 ++msgstr "Liên kết: %d"
9761 ++
9762 ++#: src/info.c:181
9763 ++#, c-format
9764 ++msgid "Mode: %s (%04o)"
9765 ++msgstr "Quyền hạn: %s (%04o)"
9766 ++
9767 ++#: src/info.c:186
9768 ++#, c-format
9769 ++msgid "Location: %Xh:%Xh"
9770 ++msgstr "Vị trí: %Xh:%Xh"
9771 ++
9772 ++#: src/info.c:196
9773 ++msgid "File: None"
9774 ++msgstr "Tập tin: Không có"
9775 ++
9776 ++#: src/layout.c:151
9777 ++msgid "&Vertical"
9778 ++msgstr "&Thẳng đứng"
9779 ++
9780 ++#: src/layout.c:152
9781 ++msgid "&Horizontal"
9782 ++msgstr "&Nằm ngang"
9783 ++
9784 ++#: src/layout.c:162
9785 ++msgid "&Xterm window title"
9786 ++msgstr "tiê&U đề cửa sổ xterm"
9787 ++
9788 ++#: src/layout.c:163
9789 ++msgid "h&Intbar visible"
9790 ++msgstr "dòng &Gợi ý"
9791 ++
9792 ++#: src/layout.c:164
9793 ++msgid "&Keybar visible"
9794 ++msgstr "&Hiển thị thanh phím tắt"
9795 ++
9796 ++#: src/layout.c:165
9797 ++msgid "command &Prompt"
9798 ++msgstr "&Dòng lệnh"
9799 ++
9800 ++#: src/layout.c:166
9801 ++msgid "show &Mini status"
9802 ++msgstr "hiện trạng thái m&Ini"
9803 ++
9804 ++#: src/layout.c:167
9805 ++msgid "menu&Bar visible"
9806 ++msgstr "thAnh trình đơn"
9807 ++
9808 ++#: src/layout.c:168
9809 ++msgid "&Equal split"
9810 ++msgstr "&Kích thước bằng nhau"
9811 ++
9812 ++#: src/layout.c:169
9813 ++msgid "pe&Rmissions"
9814 ++msgstr "&Quyền truy cập"
9815 ++
9816 ++#: src/layout.c:170
9817 ++msgid "&File types"
9818 ++msgstr "&Loại tập tin"
9819 ++
9820 ++#: src/layout.c:350 src/learn.c:59 src/learn.c:174 src/option.c:115
9821 ++msgid "&Save"
9822 ++msgstr "Ghi nhớ &+"
9823 ++
9824 ++#: src/layout.c:358
9825 ++msgid " Panel split "
9826 ++msgstr " Chia bảng "
9827 ++
9828 ++#: src/layout.c:359
9829 ++msgid " Highlight... "
9830 ++msgstr " Chiếu sáng... "
9831 ++
9832 ++#: src/layout.c:360 src/option.c:125
9833 ++msgid " Other options "
9834 ++msgstr " Cấu hình khác "
9835 ++
9836 ++#: src/layout.c:361
9837 ++msgid "output lines"
9838 ++msgstr "dòng kết quả"
9839 ++
9840 ++#: src/layout.c:423
9841 ++msgid "Layout"
9842 ++msgstr "Vẻ ngoài"
9843 ++
9844 ++#: src/learn.c:73
9845 ++msgid "Learn keys"
9846 ++msgstr "Tạo phím tắt"
9847 ++
9848 ++#: src/learn.c:79
9849 ++msgid " Teach me a key "
9850 ++msgstr " Dạy tôi một phím "
9851 ++
9852 ++#: src/learn.c:80
9853 ++#, c-format
9854 ++msgid ""
9855 ++"Please press the %s\n"
9856 ++"and then wait until this message disappears.\n"
9857 ++"\n"
9858 ++"Then, press it again to see if OK appears\n"
9859 ++"next to its button.\n"
9860 ++"\n"
9861 ++"If you want to escape, press a single Escape key\n"
9862 ++"and wait as well."
9863 ++msgstr ""
9864 ++"Xin hãy nhấn lên %s\n"
9865 ++"và đợi cho thông báo này biến mất.\n"
9866 ++"\n"
9867 ++"Sau đó hãy nhấn một lần nữa để chắc chắn là ở bên phải\n"
9868 ++"của tên xuất hiện \"OK\".\n"
9869 ++"\n"
9870 ++"Nếu bạn muốn dừng việc dạy phím, thì hãy nhấn\n"
9871 ++"phím Esc và cũng cần đợi một chút."
9872 ++
9873 ++#: src/learn.c:114
9874 ++msgid " Cannot accept this key "
9875 ++msgstr " Không thể chấp nhận phím này "
9876 ++
9877 ++#: src/learn.c:115
9878 ++#, c-format
9879 ++msgid " You have entered \"%s\""
9880 ++msgstr " Đã nhập vào \"%s\""
9881 ++
9882 ++#. TRANSLATORS: This label appears near learned keys. Keep it short.
9883 ++#: src/learn.c:164
9884 ++msgid "OK"
9885 ++msgstr "OK"
9886 ++
9887 ++#: src/learn.c:172
9888 ++msgid ""
9889 ++"It seems that all your keys already\n"
9890 ++"work fine. That's great."
9891 ++msgstr ""
9892 ++"Có vẻ như tất cả các phím của bạn\n"
9893 ++"làm việc tốt. Thật là tuyệt."
9894 ++
9895 ++#: src/learn.c:174
9896 ++msgid "&Discard"
9897 ++msgstr "&Vứt bỏ"
9898 ++
9899 ++#: src/learn.c:179
9900 ++msgid ""
9901 ++"Great! You have a complete terminal database!\n"
9902 ++"All your keys work well."
9903 ++msgstr ""
9904 ++"Tuyệt! Chúng ta có một cơ sở dữ liệu mô tả terminal đầy đủ!\n"
9905 ++"Tất cả các phím đều làm việc tốt."
9906 ++
9907 ++#: src/learn.c:287
9908 ++msgid "Press all the keys mentioned here. After you have done it, check"
9909 ++msgstr "Hãy nhấn tất cả những phím liệt kê ở trên. Sau khi nhấn xong, hãy kiểm tra"
9910 ++
9911 ++#: src/learn.c:291
9912 ++msgid "which keys are not marked with OK. Press space on the missing"
9913 ++msgstr "xem những phím nào không có dấu hiệu \"OK\". Nhấn phím space trên những"
9914 ++
9915 ++#: src/learn.c:295
9916 ++msgid "key, or click with the mouse to define it. Move around with Tab."
9917 ++msgstr "phím bị thiếu, hoặc nhấn chuột để xác định. Di chuyển bằng Tab."
9918 ++
9919 ++#: src/main.c:425
9920 ++msgid ""
9921 ++" The Commander can't change to the directory that \n"
9922 ++" the subshell claims you are in. Perhaps you have \n"
9923 ++" deleted your working directory, or given yourself \n"
9924 ++" extra access permissions with the \"su\" command? "
9925 ++msgstr ""
9926 ++" MC không thể chuyển vào thư mục, mà tiến trình shell \n"
9927 ++" con thông báo. Rất có thể, bạn đã xóa thư mục làm việc \n"
9928 ++" hoặc thêm cho mình quyền truy cập mở rộng bằng câu \n"
9929 ++" lệnh \"su\"? "
9930 ++
9931 ++#: src/main.c:469 src/screen.c:1951
9932 ++msgid " The Midnight Commander "
9933 ++msgstr " Midnight Commander "
9934 ++
9935 ++#: src/main.c:470
9936 ++msgid " Do you really want to quit the Midnight Commander? "
9937 ++msgstr " Thực sự muốn thoát Midnight Commander? "
9938 ++
9939 ++#: src/main.c:792 src/main.c:816
9940 ++msgid "&Listing mode..."
9941 ++msgstr "&Dạng danh sách..."
9942 ++
9943 ++#: src/main.c:793 src/main.c:817
9944 ++msgid "&Quick view C-x q"
9945 ++msgstr "&Xem nhanh C-x q"
9946 ++
9947 ++#: src/main.c:794 src/main.c:818
9948 ++msgid "&Info C-x i"
9949 ++msgstr "&Thông tin C-x i"
9950 ++
9951 ++#: src/main.c:797 src/main.c:821
9952 ++msgid "&Sort order..."
9953 ++msgstr "t&Hứ tự sắp xếp..."
9954 ++
9955 ++#: src/main.c:799 src/main.c:823
9956 ++msgid "&Filter..."
9957 ++msgstr "&Lọc tập tin..."
9958 ++
9959 ++#: src/main.c:803 src/main.c:827
9960 ++msgid "&Network link..."
9961 ++msgstr "&Kết nối mạng..."
9962 ++
9963 ++#: src/main.c:805 src/main.c:829
9964 ++msgid "FT&P link..."
9965 ++msgstr "kết nối &FTP..."
9966 ++
9967 ++#: src/main.c:806 src/main.c:830
9968 ++msgid "S&hell link..."
9969 ++msgstr "kết nối &Shell..."
9970 ++
9971 ++#: src/main.c:808 src/main.c:832
9972 ++msgid "SM&B link..."
9973 ++msgstr "kết nối SM&B..."
9974 ++
9975 ++#: src/main.c:812 src/main.c:836
9976 ++msgid "&Rescan C-r"
9977 ++msgstr "&Quét lại C-r"
9978 ++
9979 ++#: src/main.c:840
9980 ++msgid "&User menu F2"
9981 ++msgstr "&Trình đơn người dùng F2"
9982 ++
9983 ++#: src/main.c:841
9984 ++msgid "&View F3"
9985 ++msgstr "&Xem F3"
9986 ++
9987 ++#: src/main.c:842
9988 ++msgid "Vie&w file... "
9989 ++msgstr "x&Em tập tin... "
9990 ++
9991 ++#: src/main.c:843
9992 ++msgid "&Filtered view M-!"
9993 ++msgstr "xe&M đã lọc M-!"
9994 ++
9995 ++#: src/main.c:844
9996 ++msgid "&Edit F4"
9997 ++msgstr "&Soạn thảo F4"
9998 ++
9999 ++#: src/main.c:845
10000 ++msgid "&Copy F5"
10001 ++msgstr "sao &Chép F5"
10002 ++
10003 ++#: src/main.c:846
10004 ++msgid "c&Hmod C-x c"
10005 ++msgstr "c&Hmod C-x c"
10006 ++
10007 ++#: src/main.c:847
10008 ++msgid "&Link C-x l"
10009 ++msgstr "&Liên kết cứng C-x l"
10010 ++
10011 ++#: src/main.c:848
10012 ++msgid "&SymLink C-x s"
10013 ++msgstr "liên &Kết mềm C-x s"
10014 ++
10015 ++#: src/main.c:849
10016 ++msgid "edit s&Ymlink C-x C-s"
10017 ++msgstr "sử&A liên kết mềm C-x C-s"
10018 ++
10019 ++#: src/main.c:850
10020 ++msgid "ch&Own C-x o"
10021 ++msgstr "cho&Wn C-x o"
10022 ++
10023 ++#: src/main.c:851
10024 ++msgid "&Advanced chown "
10025 ++msgstr "chown &Nâng cao "
10026 ++
10027 ++#: src/main.c:852
10028 ++msgid "&Rename/Move F6"
10029 ++msgstr "Đổi tên/&Di chuyển F6"
10030 ++
10031 ++#: src/main.c:853
10032 ++msgid "&Mkdir F7"
10033 ++msgstr "mkdi&R F7"
10034 ++
10035 ++#: src/main.c:854
10036 ++msgid "&Delete F8"
10037 ++msgstr "xó&A F8"
10038 ++
10039 ++#: src/main.c:855
10040 ++msgid "&Quick cd M-c"
10041 ++msgstr "cd nhanh &> M-c"
10042 ++
10043 ++#: src/main.c:857
10044 ++msgid "select &Group M-+"
10045 ++msgstr "Chọn Nhóm &+ M-+"
10046 ++
10047 ++#: src/main.c:858
10048 ++msgid "u&Nselect group M-\\"
10049 ++msgstr "&Bỏ chọn nhóm M-\\"
10050 ++
10051 ++#: src/main.c:859
10052 ++msgid "reverse selec&Tion M-*"
10053 ++msgstr "Chọn ngược lạ&I M-*"
10054 ++
10055 ++#: src/main.c:861
10056 ++msgid "e&Xit F10"
10057 ++msgstr "Th&Oát F10"
10058 ++
10059 ++#: src/main.c:869
10060 ++msgid "&Directory tree"
10061 ++msgstr "cây thư &Mục"
10062 ++
10063 ++#: src/main.c:870
10064 ++msgid "&Find file M-?"
10065 ++msgstr "&Tìm tập tin M-?"
10066 ++
10067 ++#: src/main.c:871
10068 ++msgid "s&Wap panels C-u"
10069 ++msgstr "đổi chỗ h&Ai bảng C-u"
10070 ++
10071 ++#: src/main.c:872
10072 ++msgid "switch &Panels on/off C-o"
10073 ++msgstr "&Bật/tắt bảng C-o"
10074 ++
10075 ++#: src/main.c:873
10076 ++msgid "&Compare directories C-x d"
10077 ++msgstr "&So sánh thư mục C-x d"
10078 ++
10079 ++#: src/main.c:874
10080 ++msgid "e&Xternal panelize C-x !"
10081 ++msgstr "bản&G ngoài C-x !"
10082 ++
10083 ++#: src/main.c:875
10084 ++msgid "show directory s&Izes"
10085 ++msgstr "&Hiển thị kích thước thư mục"
10086 ++
10087 ++#: src/main.c:877
10088 ++msgid "command &History"
10089 ++msgstr "&Lịch sử câu lệnh"
10090 ++
10091 ++#: src/main.c:878
10092 ++msgid "di&Rectory hotlist C-\\"
10093 ++msgstr "Thư mục thường dùng &* C-\\"
10094 ++
10095 ++#: src/main.c:880
10096 ++msgid "&Active VFS list C-x a"
10097 ++msgstr "&Danh sách VFS hoạt động C-x a"
10098 ++
10099 ++#: src/main.c:883
10100 ++msgid "&Background jobs C-x j"
10101 ++msgstr "&Công việc nền sau C-x j"
10102 ++
10103 ++#: src/main.c:887
10104 ++msgid "&Undelete files (ext2fs only)"
10105 ++msgstr "&Phục hồi tập tin đã xóa (chỉ ext2fs)"
10106 ++
10107 ++#: src/main.c:890
10108 ++msgid "&Listing format edit"
10109 ++msgstr "&Soạn thảo định dạng danh sách"
10110 ++
10111 ++#: src/main.c:895
10112 ++msgid "Edit &extension file"
10113 ++msgstr "soạn thảo tập tin phần mở &Rộng"
10114 ++
10115 ++#: src/main.c:896
10116 ++msgid "Edit &menu file"
10117 ++msgstr "soạ&N thảo tập tin trình đơn"
10118 ++
10119 ++#: src/main.c:898
10120 ++msgid "Edit edi&tor menu file"
10121 ++msgstr "sửa trình đơn của trình s&Oạn thảo"
10122 ++
10123 ++#: src/main.c:899
10124 ++msgid "Edit &syntax file"
10125 ++msgstr "sửa tập tin cú &Pháp"
10126 ++
10127 ++#: src/main.c:905
10128 ++msgid "&Configuration..."
10129 ++msgstr "&Cấu hình..."
10130 ++
10131 ++#: src/main.c:906
10132 ++msgid "&Layout..."
10133 ++msgstr "&Vẻ ngoài..."
10134 ++
10135 ++#: src/main.c:907
10136 ++msgid "c&Onfirmation..."
10137 ++msgstr "&Xác nhận..."
10138 ++
10139 ++#: src/main.c:908
10140 ++msgid "&Display bits..."
10141 ++msgstr "bit &Hiển thị..."
10142 ++
10143 ++#: src/main.c:911
10144 ++msgid "&Virtual FS..."
10145 ++msgstr "&FS ảo..."
10146 ++
10147 ++#: src/main.c:914
10148 ++msgid "&Save setup"
10149 ++msgstr "&Ghi nhớ cấu hình"
10150 ++
10151 ++#: src/main.c:925
10152 ++msgid " &Above "
10153 ++msgstr " Ở &trên "
10154 ++
10155 ++#: src/main.c:925
10156 ++msgid " &Left "
10157 ++msgstr " &Bảng trái "
10158 ++
10159 ++#: src/main.c:929
10160 ++msgid " &File "
10161 ++msgstr " &Tập tin "
10162 ++
10163 ++#: src/main.c:932
10164 ++msgid " &Command "
10165 ++msgstr " &Câu lệnh "
10166 ++
10167 ++#: src/main.c:935
10168 ++msgid " &Options "
10169 ++msgstr " &Cấu hình "
10170 ++
10171 ++#: src/main.c:938
10172 ++msgid " &Below "
10173 ++msgstr " Ở &dưới "
10174 ++
10175 ++#: src/main.c:938
10176 ++msgid " &Right "
10177 ++msgstr " Bảng &phải "
10178 ++
10179 ++#: src/main.c:981
10180 ++msgid " Information "
10181 ++msgstr " Thông tin "
10182 ++
10183 ++#: src/main.c:983
10184 ++msgid ""
10185 ++" Using the fast reload option may not reflect the exact \n"
10186 ++" directory contents. In this case you'll need to do a \n"
10187 ++" manual reload of the directory. See the man page for \n"
10188 ++" the details. "
10189 ++msgstr ""
10190 ++" Sử dụng tùy chọn nạp lại nhanh có thể không phản ánh \n"
10191 ++" đúng nội dung hiện thời của thư mục. Trong trường hợp \n"
10192 ++" này cần nạp lại thư mục một cách thủ công. Hãy xem \n"
10193 ++" trang hướng dẫn sử dụng man để biết them chi tiết. "
10194 ++
10195 ++#: src/main.c:1206 src/screen.c:2185
10196 ++msgid "Menu"
10197 ++msgstr "Trđơn "
10198 ++
10199 ++#: src/main.c:1340
10200 ++msgid "The TERM environment variable is unset!\n"
10201 ++msgstr "Biến môi trườn TERM chưa được xác định!\n"
10202 ++
10203 ++#: src/main.c:1642 src/textconf.c:116
10204 ++#, c-format
10205 ++msgid "GNU Midnight Commander %s\n"
10206 ++msgstr "GNU Midnight Commander %s\n"
10207 ++
10208 ++#: src/main.c:1848
10209 ++msgid "[flags] [this_dir] [other_panel_dir]\n"
10210 ++msgstr "[cờ] [thư_mục_này] [thư_mục_bảng_còn_lại]\n"
10211 ++
10212 ++#: src/main.c:1852
10213 ++msgid "+number"
10214 ++msgstr "+số"
10215 ++
10216 ++#: src/main.c:1853
10217 ++msgid "Set initial line number for the internal editor"
10218 ++msgstr "Đặt số dòng ban đầu cho trình soạn thảo nội bộ"
10219 ++
10220 ++#: src/main.c:1855
10221 ++msgid ""
10222 ++"\n"
10223 ++"Please send any bug reports (including the output of `mc -V')\n"
10224 ++"to mc-devel@gnome.org\n"
10225 ++msgstr ""
10226 ++"\n"
10227 ++"Xin hãy gửi bất kỳ báo cáo lỗi (bug) nào (gồm cả kết quả của lệnh `mc -V')\n"
10228 ++"tới mc-devel@gnome.org\n"
10229 ++
10230 ++#: src/main.c:1870
10231 ++msgid ""
10232 ++"--colors KEYWORD={FORE},{BACK}\n"
10233 ++"\n"
10234 ++"{FORE} and {BACK} can be omitted, and the default will be used\n"
10235 ++"\n"
10236 ++"Keywords:\n"
10237 ++" Global: errors, reverse, gauge, input\n"
10238 ++" File display: normal, selected, marked, markselect\n"
10239 ++" Dialog boxes: dnormal, dfocus, dhotnormal, dhotfocus\n"
10240 ++" Menus: menu, menuhot, menusel, menuhotsel\n"
10241 ++" Help: helpnormal, helpitalic, helplink, helpslink\n"
10242 ++" File types: directory, executable, link, stalelink, device, special, "
10243 ++"core\n"
10244 ++"\n"
10245 ++"Colors:\n"
10246 ++" black, gray, red, brightred, green, brightgreen, brown,\n"
10247 ++" yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
10248 ++" brightcyan, lightgray and white\n"
10249 ++"\n"
10250 ++msgstr ""
10251 ++"--colors TỪ_KHÓA={VĂN BẢN},{NỀN}\n"
10252 ++"\n"
10253 ++"có thể bỏ qua {VĂN BẢN} và {NỀN}, và sử dụng giá trị theo mặc định\n"
10254 ++"\n"
10255 ++"Từ khóa:\n"
10256 ++" Toàn cầu: errors, reverse, gauge, input\n"
10257 ++" Hiển thị tập tin: normal, selected, marked, markselect\n"
10258 ++" Hộp thoại: dnormal, dfocus, dhotnormal, dhotfocus\n"
10259 ++" Trình đơn: menu, menuhot, menusel, menuhotsel\n"
10260 ++" Trợ giúp: helpnormal, helpitalic, helplink, helpslink\n"
10261 ++" Dạng tập tin: directory, executable, link, stalelink, device, special, core\n"
10262 ++"\n"
10263 ++"Màu sắc:\n"
10264 ++" black, gray, red, brightred, green, brightgreen, brown,\n"
10265 ++" yellow, blue, brightblue, magenta, brightmagenta, cyan,\n"
10266 ++" brightcyan, lightgray, white\n"
10267 ++"\n"
10268 ++
10269 ++#: src/main.c:1945
10270 ++msgid "Displays this help message"
10271 ++msgstr "Hiển thị thông báo trợ giúp này"
10272 ++
10273 ++#: src/main.c:1947
10274 ++msgid "Displays the current version"
10275 ++msgstr "Hiển thị số phiên bản hiện thời"
10276 ++
10277 ++#: src/main.c:1951
10278 ++msgid "Forces xterm features"
10279 ++msgstr "Bắt buộc dùng tính năng của xterm"
10280 ++
10281 ++#: src/main.c:1953
10282 ++msgid "Disable mouse support in text version"
10283 ++msgstr "Bỏ hỗ trợ chuột trong phiên bản văn bản (text)"
10284 ++
10285 ++#: src/main.c:1956
10286 ++msgid "Tries to use termcap instead of terminfo"
10287 ++msgstr "Thử sử dụng termcap thay cho terminfo"
10288 ++
10289 ++#: src/main.c:1959
10290 ++msgid "Resets soft keys on HP terminals"
10291 ++msgstr "Đặt lại phím phần mềm trên các terminal HP"
10292 ++
10293 ++#: src/main.c:1961
10294 ++msgid "To run on slow terminals"
10295 ++msgstr "Để chạy trên các terminal chậm"
10296 ++
10297 ++#: src/main.c:1963
10298 ++msgid "Use stickchars to draw"
10299 ++msgstr "Sử dụng ký tự thẳng đứng để vẽ"
10300 ++
10301 ++#: src/main.c:1967
10302 ++msgid "Requests to run in black and white"
10303 ++msgstr "Yêu cầu chạy trong chế độ đen trắng"
10304 ++
10305 ++#: src/main.c:1969
10306 ++msgid "Request to run in color mode"
10307 ++msgstr "Yêu cầu chạy trong chế độ màu"
10308 ++
10309 ++#: src/main.c:1971
10310 ++msgid "Specifies a color configuration"
10311 ++msgstr "Xác định cấu hình màu sắc"
10312 ++
10313 ++#: src/main.c:1973
10314 ++msgid "Displays a help screen on how to change the color scheme"
10315 ++msgstr "Hiển thị cửa sổ trợ giúp cách thay đổi bộ phối hợp màu"
10316 ++
10317 ++#: src/main.c:1978
10318 ++msgid "Log ftp dialog to specified file"
10319 ++msgstr "Ghi hội thoại FTP vào một tập tin"
10320 ++
10321 ++#: src/main.c:1981
10322 ++msgid "Set debug level"
10323 ++msgstr "Đặt mức độ tìm sửa lỗi (debug)"
10324 ++
10325 ++#: src/main.c:1987
10326 ++msgid "Print data directory"
10327 ++msgstr "In ra tên thư mục dữ liệu"
10328 ++
10329 ++#: src/main.c:1989
10330 ++msgid "Print last working directory to specified file"
10331 ++msgstr "Ghi thư mục làm việc cuối cùng vào tập tin chỉ ra"
10332 ++
10333 ++#: src/main.c:1994
10334 ++msgid "Enables subshell support (default)"
10335 ++msgstr "Bật hỗ trợ shell con (mặc định)"
10336 ++
10337 ++#: src/main.c:1996
10338 ++msgid "Disables subshell support"
10339 ++msgstr "Tắt hỗ trợ shell con"
10340 ++
10341 ++#: src/main.c:2001
10342 ++msgid "Launches the file viewer on a file"
10343 ++msgstr "Xem tập tin"
10344 ++
10345 ++#: src/main.c:2004
10346 ++msgid "Edits one file"
10347 ++msgstr "Soạn thảo tập tin"
10348 ++
10349 ++#: src/main.c:2218
10350 ++msgid " Notice "
10351 ++msgstr " Cảnh báo "
10352 ++
10353 ++#: src/main.c:2219
10354 ++msgid ""
10355 ++" The Midnight Commander configuration files \n"
10356 ++" are now stored in the ~/.mc directory, the \n"
10357 ++" files have been moved now\n"
10358 ++msgstr ""
10359 ++" Các tập tin cấu hình Midnight Commander \n"
10360 ++" bây giờ đặt trong thư mục ~/.mc, các \n"
10361 ++" tập tin cũ bây giờ được chuyển tới đó\n"
10362 ++
10363 ++#: src/option.c:56
10364 ++msgid "safe de&Lete"
10365 ++msgstr "Xóa một cách &An toàn"
10366 ++
10367 ++#: src/option.c:57
10368 ++msgid "cd follows lin&Ks"
10369 ++msgstr "cd th&Eo liên kết"
10370 ++
10371 ++#: src/option.c:58
10372 ++msgid "L&ynx-like motion"
10373 ++msgstr "di chuyển giống trong l&Ynx"
10374 ++
10375 ++#: src/option.c:59
10376 ++msgid "rotatin&G dash"
10377 ++msgstr "cái chỉ &Quay"
10378 ++
10379 ++#: src/option.c:60
10380 ++msgid "co&Mplete: show all"
10381 ++msgstr "tự động hoàn thành: hiện tất cả"
10382 ++
10383 ++#: src/option.c:61
10384 ++msgid "&Use internal view"
10385 ++msgstr "trình xem nội &Bộ"
10386 ++
10387 ++#: src/option.c:62
10388 ++msgid "use internal ed&It"
10389 ++msgstr "sử dụng s&Oạn thảo nội bộ"
10390 ++
10391 ++#: src/option.c:63
10392 ++msgid "auto m&Enus"
10393 ++msgstr "t&Rình đơn tự động"
10394 ++
10395 ++#: src/option.c:64
10396 ++msgid "&Auto save setup"
10397 ++msgstr "tự động gh&I nhớ cấu hình"
10398 ++
10399 ++#: src/option.c:65
10400 ++msgid "shell &Patterns"
10401 ++msgstr "&Mẫu dạng shell"
10402 ++
10403 ++#: src/option.c:66
10404 ++msgid "Compute &Totals"
10405 ++msgstr "tính tổn&G kích thước"
10406 ++
10407 ++#: src/option.c:67
10408 ++msgid "&Verbose operation"
10409 ++msgstr "thao tác với thông báo &Dài dòng"
10410 ++
10411 ++#: src/option.c:69
10412 ++msgid "&Fast dir reload"
10413 ++msgstr "nạ&P nhanh thư mục"
10414 ++
10415 ++#: src/option.c:70
10416 ++msgid "mi&X all files"
10417 ++msgstr "trộn lẫn tất &Cả tập tin"
10418 ++
10419 ++#: src/option.c:71
10420 ++msgid "&Drop down menus"
10421 ++msgstr "đẩy &Xuống trình đơn"
10422 ++
10423 ++#: src/option.c:72
10424 ++msgid "ma&Rk moves down"
10425 ++msgstr "&Nhãn di chuyển xuống"
10426 ++
10427 ++#: src/option.c:73
10428 ++msgid "show &Hidden files"
10429 ++msgstr "&Hiển thị tập tin ẩn"
10430 ++
10431 ++#: src/option.c:74
10432 ++msgid "show &Backup files"
10433 ++msgstr "hiển thị tập tin sao &Lưu"
10434 ++
10435 ++#: src/option.c:85
10436 ++msgid "&Never"
10437 ++msgstr "&Không bao giờ"
10438 ++
10439 ++#: src/option.c:86
10440 ++msgid "on dumb &Terminals"
10441 ++msgstr "&Trên terminal ngu"
10442 ++
10443 ++#: src/option.c:87
10444 ++msgid "Alwa&ys"
10445 ++msgstr "&Luôn luôn"
10446 ++
10447 ++#: src/option.c:123
10448 ++msgid " Panel options "
10449 ++msgstr " Cấu hình bảng "
10450 ++
10451 ++#: src/option.c:124
10452 ++msgid " Pause after run... "
10453 ++msgstr " Tạm ngừng sau khi chạy... "
10454 ++
10455 ++#: src/option.c:170
10456 ++msgid "Configure options"
10457 ++msgstr "Tùy chọn cấu hình"
10458 ++
10459 ++#: src/panelize.c:67
10460 ++msgid "&Add new"
10461 ++msgstr "&Thêm mới"
10462 ++
10463 ++#: src/panelize.c:154 src/panelize.c:420
10464 ++msgid "External panelize"
10465 ++msgstr "Bảng ngoài"
10466 ++
10467 ++#: src/panelize.c:169
10468 ++msgid "Command"
10469 ++msgstr "Câu lệnh"
10470 ++
10471 ++#: src/panelize.c:185 src/panelize.c:242 src/panelize.c:313 src/panelize.c:334
10472 ++msgid "Other command"
10473 ++msgstr "Lệnh khác"
10474 ++
10475 ++#: src/panelize.c:226
10476 ++msgid " Add to external panelize "
10477 ++msgstr " Thêm vào bảng ngoài "
10478 ++
10479 ++#: src/panelize.c:227
10480 ++msgid " Enter command label: "
10481 ++msgstr " Nhập tên câu lệnh: "
10482 ++
10483 ++#: src/panelize.c:267
10484 ++msgid " Cannot run external panelize in a non-local directory "
10485 ++msgstr " Không thể chạy câu lệnh này trên một thư mục không phải nội bộ "
10486 ++
10487 ++#: src/panelize.c:316
10488 ++msgid "Find rejects after patching"
10489 ++msgstr "Tìm những loại bỏ sau khi vá lỗi (patch)"
10490 ++
10491 ++#: src/panelize.c:317
10492 ++msgid "Find *.orig after patching"
10493 ++msgstr "Tìm *.orig) sau khi vá lỗi (patch)"
10494 ++
10495 ++#: src/panelize.c:318
10496 ++msgid "Find SUID and SGID programs"
10497 ++msgstr "Tìm chương trình có các bit SUID/SGID"
10498 ++
10499 ++#: src/panelize.c:369
10500 ++msgid "Cannot invoke command."
10501 ++msgstr "Không thực hiện được câu lệnh."
10502 ++
10503 ++#: src/panelize.c:420
10504 ++msgid "Pipe close failed"
10505 ++msgstr "Đóng đường ống không thành công"
10506 ++
10507 ++#: src/popt.c:547
10508 ++msgid "missing argument"
10509 ++msgstr "thiếu tham số"
10510 ++
10511 ++#: src/popt.c:549
10512 ++msgid "unknown option"
10513 ++msgstr "tùy chọn không rõ"
10514 ++
10515 ++#: src/popt.c:555
10516 ++msgid "invalid numeric value"
10517 ++msgstr "giá trị số không thích hợp"
10518 ++
10519 ++#: src/popthelp.c:31
10520 ++msgid "Show this help message"
10521 ++msgstr "Hiển thị thông báo trợ giúp này"
10522 ++
10523 ++#: src/popthelp.c:32
10524 ++msgid "Display brief usage message"
10525 ++msgstr "Hiển thị chỉ dẫn ngắn gọn"
10526 ++
10527 ++#: src/popthelp.c:60
10528 ++msgid "ARG"
10529 ++msgstr "ARG"
10530 ++
10531 ++#: src/popthelp.c:179
10532 ++msgid "Usage:"
10533 ++msgstr "Sử dụng:"
10534 ++
10535 ++#: src/screen.c:201
10536 ++msgid "UP--DIR"
10537 ++msgstr "LÊNTRÊN"
10538 ++
10539 ++#: src/screen.c:222
10540 ++msgid "SYMLINK"
10541 ++msgstr "LIÊNKẾTMỀM"
10542 ++
10543 ++#: src/screen.c:226
10544 ++msgid "SUB-DIR"
10545 ++msgstr "THƯMỤCCON"
10546 ++
10547 ++#: src/screen.c:406 src/screen.c:407
10548 ++msgid "Size"
10549 ++msgstr "Kích cỡ"
10550 ++
10551 ++#: src/screen.c:409
10552 ++msgid "MTime"
10553 ++msgstr "Thời gian sửa"
10554 ++
10555 ++#: src/screen.c:410
10556 ++msgid "ATime"
10557 ++msgstr "Truy cập cuối cùng"
10558 ++
10559 ++#: src/screen.c:411
10560 ++msgid "CTime"
10561 ++msgstr "Thời gian thay đổi"
10562 ++
10563 ++#: src/screen.c:412
10564 ++msgid "Permission"
10565 ++msgstr "Quyền hạn"
10566 ++
10567 ++#: src/screen.c:413
10568 ++msgid "Perm"
10569 ++msgstr "Quyền"
10570 ++
10571 ++#: src/screen.c:414
10572 ++msgid "Nl"
10573 ++msgstr "Nl"
10574 ++
10575 ++#: src/screen.c:415
10576 ++msgid "Inode"
10577 ++msgstr "Nút"
10578 ++
10579 ++#: src/screen.c:416
10580 ++msgid "UID"
10581 ++msgstr "UID"
10582 ++
10583 ++#: src/screen.c:417
10584 ++msgid "GID"
10585 ++msgstr "GID"
10586 ++
10587 ++#: src/screen.c:418
10588 ++msgid "Owner"
10589 ++msgstr "Chủ sở hữu"
10590 ++
10591 ++#: src/screen.c:419
10592 ++msgid "Group"
10593 ++msgstr "Nhóm"
10594 ++
10595 ++#: src/screen.c:655
10596 ++#, c-format
10597 ++msgid "%s bytes in %d file"
10598 ++msgstr "%s byte trong %d tập tin"
10599 ++
10600 ++#: src/screen.c:655
10601 ++#, c-format
10602 ++msgid "%s bytes in %d files"
10603 ++msgstr "%s byte trong %d tập tin"
10604 ++
10605 ++#: src/screen.c:681
10606 ++msgid "<readlink failed>"
10607 ++msgstr "<đọc liên kết không thành công>"
10608 ++
10609 ++#: src/screen.c:1289
10610 ++msgid "Unknown tag on display format: "
10611 ++msgstr "Thẻ ghi không rõ trong định dạng hiển thị: "
10612 ++
10613 ++#: src/screen.c:1415
10614 ++msgid "User supplied format looks invalid, reverting to default."
10615 ++msgstr "Định dạng người dùng đưa ra có vẻ không thích hợp, chuyển lại thành mặc định."
10616 ++
10617 ++#: src/screen.c:1952
10618 ++msgid " Do you really want to execute? "
10619 ++msgstr " Thực sự muốn thực hiện? "
10620 ++
10621 ++#: src/screen.c:2186
10622 ++msgid "View"
10623 ++msgstr "Xem "
10624 ++
10625 ++#: src/screen.c:2187 src/view.c:2231
10626 ++msgid "Edit"
10627 ++msgstr "Soạn "
10628 ++
10629 ++#: src/screen.c:2189 src/tree.c:977
10630 ++msgid "RenMov"
10631 ++msgstr "Chuyển"
10632 ++
10633 ++#: src/screen.c:2190 src/tree.c:981
10634 ++msgid "Mkdir"
10635 ++msgstr "Tạotm "
10636 ++
10637 ++#: src/selcodepage.c:54
10638 ++msgid " Choose input codepage "
10639 ++msgstr " Chọn bảng mã dữ liệu vào "
10640 ++
10641 ++#: src/selcodepage.c:58
10642 ++msgid "- < No translation >"
10643 ++msgstr "- < Không có dịch >"
10644 ++
10645 ++#: src/selcodepage.c:106
10646 ++msgid ""
10647 ++"To use this feature select your codepage in\n"
10648 ++"Setup / Display Bits dialog!\n"
10649 ++"Do not forget to save options."
10650 ++msgstr ""
10651 ++"Để sử dụng tính năng này, hãy chọn bảng mã trong\n"
10652 ++"trình đơn Cấu hình / hộp thoại Bit hiển thị!\n"
10653 ++"Đừng quên ghi nhớ lại cấu hình."
10654 ++
10655 ++#: src/slint.c:188
10656 ++#, c-format
10657 ++msgid ""
10658 ++"Screen size %dx%d is not supported.\n"
10659 ++"Check the TERM environment variable.\n"
10660 ++msgstr ""
10661 ++"Kích thước màn hình %dx%d không được hỗ trợ.\n"
10662 ++"Hãy kiểm tra biến môi trường TERM.\n"
10663 ++
10664 ++#: src/subshell.c:320
10665 ++msgid ""
10666 ++"GNU Midnight Commander is already\n"
10667 ++"running on this terminal.\n"
10668 ++"Subshell support will be disabled."
10669 ++msgstr ""
10670 ++"Một GNU Midnight Commander đã làm việc\n"
10671 ++"trên terminal này. Sẽ không có hỗ trợ\n"
10672 ++"shell con."
10673 ++
10674 ++#: src/subshell.c:425
10675 ++#, c-format
10676 ++msgid "Cannot open named pipe %s\n"
10677 ++msgstr "Không mở được đường ống tên (named pipe) %s\n"
10678 ++
10679 ++#: src/subshell.c:653
10680 ++msgid " The shell is still active. Quit anyway? "
10681 ++msgstr " Shell vẫn còn hoạt động. Vẫn thoát? "
10682 ++
10683 ++#: src/subshell.c:790
10684 ++#, c-format
10685 ++msgid "Warning: Cannot change to %s.\n"
10686 ++msgstr "Cảnh báo: Không chuyển được vào %s.\n"
10687 ++
10688 ++#: src/textconf.c:50
10689 ++msgid "With builtin Editor\n"
10690 ++msgstr "Với Trình soạn thảo nội trú\n"
10691 ++
10692 ++#: src/textconf.c:56
10693 ++msgid "Using system-installed S-Lang library"
10694 ++msgstr "Sử dụng thư việc của S-Lang hệ thống"
10695 ++
10696 ++#: src/textconf.c:58
10697 ++msgid "Using included S-Lang library"
10698 ++msgstr "Sử dụng thư việc S-Lang bao gồm"
10699 ++
10700 ++#: src/textconf.c:64
10701 ++msgid "with termcap database"
10702 ++msgstr "với cơ sở dữ liệu termcap"
10703 ++
10704 ++#: src/textconf.c:66
10705 ++msgid "with terminfo database"
10706 ++msgstr "với cơ sở dữ liệu terminfo"
10707 ++
10708 ++#: src/textconf.c:70
10709 ++msgid "Using the ncurses library"
10710 ++msgstr "Dùng thư viện ncurses"
10711 ++
10712 ++#: src/textconf.c:79
10713 ++msgid "With optional subshell support"
10714 ++msgstr "Với hỗ trợ shell con không bắt buộc"
10715 ++
10716 ++#: src/textconf.c:81
10717 ++msgid "With subshell support as default"
10718 ++msgstr "Với hỗ trợ shell con mặc định"
10719 ++
10720 ++#: src/textconf.c:87
10721 ++msgid "With support for background operations\n"
10722 ++msgstr "Với hỗ trợ thao tác nền sau\n"
10723 ++
10724 ++#: src/textconf.c:91
10725 ++msgid "With mouse support on xterm and Linux console\n"
10726 ++msgstr "Với hỗ trợ chuột trong xterm và kênh giao tác Linux\n"
10727 ++
10728 ++#: src/textconf.c:93
10729 ++msgid "With mouse support on xterm\n"
10730 ++msgstr "Với hỗ trợ chuột trong xterm\n"
10731 ++
10732 ++#: src/textconf.c:97
10733 ++msgid "With support for X11 events\n"
10734 ++msgstr "Với hỗ trợ sự kiện X11\n"
10735 ++
10736 ++#: src/textconf.c:101
10737 ++msgid "With internationalization support\n"
10738 ++msgstr "Với hỗ trợ các ngôn ngữ khác\n"
10739 ++
10740 ++#: src/textconf.c:105
10741 ++msgid "With multiple codepages support\n"
10742 ++msgstr "Với hỗ trợ nhiều bảng mã\n"
10743 ++
10744 ++#: src/textconf.c:121
10745 ++msgid "Virtual File System:"
10746 ++msgstr "Hệ thống tập tin ảo:"
10747 ++
10748 ++#: src/tree.c:147
10749 ++#, c-format
10750 ++msgid ""
10751 ++"Cannot open the %s file for writing:\n"
10752 ++"%s\n"
10753 ++msgstr ""
10754 ++"Không mở được tập tin %s để ghi nhớ:\n"
10755 ++"%s\n"
10756 ++
10757 ++#: src/tree.c:591
10758 ++#, c-format
10759 ++msgid "Copy \"%s\" directory to:"
10760 ++msgstr " Sao chép thư mục \"%s\" vào:"
10761 ++
10762 ++#: src/tree.c:632
10763 ++#, c-format
10764 ++msgid "Move \"%s\" directory to:"
10765 ++msgstr " Di chuyển thư mục \"%s\" vào:"
10766 ++
10767 ++#: src/tree.c:642
10768 ++#, c-format
10769 ++msgid ""
10770 ++" Cannot stat the destination \n"
10771 ++" %s "
10772 ++msgstr ""
10773 ++" Không lấy (stat) được thuộc tính của đích đến \n"
10774 ++" %s "
10775 ++
10776 ++#: src/tree.c:705
10777 ++#, c-format
10778 ++msgid " Delete %s? "
10779 ++msgstr " Xóa %s? "
10780 ++
10781 ++#: src/tree.c:735
10782 ++msgid "Static"
10783 ++msgstr "Tĩnh"
10784 ++
10785 ++#: src/tree.c:735
10786 ++msgid "Dynamc"
10787 ++msgstr "Động"
10788 ++
10789 ++#: src/tree.c:971
10790 ++msgid "Rescan"
10791 ++msgstr "Quét lại"
10792 ++
10793 ++#: src/tree.c:973
10794 ++msgid "Forget"
10795 ++msgstr "Quên"
10796 ++
10797 ++#: src/tree.c:986
10798 ++msgid "Rmdir"
10799 ++msgstr "Xóa thư mục"
10800 ++
10801 ++#: src/treestore.c:343
10802 ++#, c-format
10803 ++msgid ""
10804 ++"Cannot write to the %s file:\n"
10805 ++"%s\n"
10806 ++msgstr ""
10807 ++"Không ghi nhớ được vào tập tin %s:\n"
10808 ++"%s\n"
10809 ++
10810 ++#: src/user.c:133
10811 ++msgid " Format error on file Extensions File "
10812 ++msgstr " Lỗi định dạng tập tin \"Phần mở rộng của tập tin\" "
10813 ++
10814 ++#: src/user.c:134
10815 ++#, c-format
10816 ++msgid " The %%var macro has no default "
10817 ++msgstr " Macro %%var không có giá trị mặc định "
10818 ++
10819 ++#: src/user.c:135
10820 ++#, c-format
10821 ++msgid " The %%var macro has no variable "
10822 ++msgstr " Macro %%var không có giá trị biến "
10823 ++
10824 ++#: src/user.c:447
10825 ++msgid " Debug "
10826 ++msgstr " Sửa lỗi "
10827 ++
10828 ++#: src/user.c:456
10829 ++msgid " ERROR: "
10830 ++msgstr " LỖI: "
10831 ++
10832 ++#: src/user.c:460
10833 ++msgid " True: "
10834 ++msgstr " Đúng: "
10835 ++
10836 ++#: src/user.c:462
10837 ++msgid " False: "
10838 ++msgstr " Sai: "
10839 ++
10840 ++#: src/user.c:669
10841 ++msgid " Warning -- ignoring file "
10842 ++msgstr " Cảnh báo - tập tin bị lờ đi "
10843 ++
10844 ++#: src/user.c:670
10845 ++#, c-format
10846 ++msgid ""
10847 ++"File %s is not owned by root or you or is world writable.\n"
10848 ++"Using it may compromise your security"
10849 ++msgstr ""
10850 ++"Tập tin %s không thuộc quyền sở hữu của root, hay của bạn,\n"
10851 ++"hoặc ai cũng có thể ghi. Sử dụng tập tin này có thể không an toàn"
10852 ++
10853 ++#: src/user.c:792
10854 ++#, c-format
10855 ++msgid " No suitable entries found in %s "
10856 ++msgstr " Không tìm thấy mục thích hợp trong %s"
10857 ++
10858 ++#: src/user.c:798
10859 ++msgid " User menu "
10860 ++msgstr " Trình đơn người dùng "
10861 ++
10862 ++#: src/util.c:671 src/util.c:697
10863 ++msgid "%b %e %H:%M"
10864 ++msgstr "%b %e %H:%M"
10865 ++
10866 ++#: src/util.c:672 src/util.c:695
10867 ++msgid "%b %e %Y"
10868 ++msgstr "%b %e %Y"
10869 ++
10870 ++#: src/utilunix.c:333
10871 ++#, c-format
10872 ++msgid "%s is not a directory\n"
10873 ++msgstr "%s không phải là một thư mục\n"
10874 ++
10875 ++#: src/utilunix.c:335
10876 ++#, c-format
10877 ++msgid "Directory %s is not owned by you\n"
10878 ++msgstr "Bạn không sở hữu thư mục %s\n"
10879 ++
10880 ++#: src/utilunix.c:338
10881 ++#, c-format
10882 ++msgid "Cannot set correct permissions for directory %s\n"
10883 ++msgstr "Không đặt được quyền hạn đúng cho thư mục %s\n"
10884 ++
10885 ++#: src/utilunix.c:343
10886 ++#, c-format
10887 ++msgid "Cannot create temporary directory %s: %s\n"
10888 ++msgstr "Không tạo được thư mục tạm thời %s: %s\n"
10889 ++
10890 ++#: src/utilunix.c:373
10891 ++#, c-format
10892 ++msgid "Temporary files will be created in %s\n"
10893 ++msgstr "Tập tin tạm thời sẽ được tạo trong thư mục %s\n"
10894 ++
10895 ++#: src/utilunix.c:376
10896 ++msgid "Temporary files will not be created\n"
10897 ++msgstr "Tập tin tạm thời sẽ không được tạo ra\n"
10898 ++
10899 ++#: src/utilunix.c:401
10900 ++msgid " Pipe failed "
10901 ++msgstr " Lỗi đường ống "
10902 ++
10903 ++#: src/utilunix.c:405
10904 ++msgid " Dup failed "
10905 ++msgstr " Lỗi lặp lại "
10906 ++
10907 ++#: src/view.c:502
10908 ++msgid " Cannot spawn child program "
10909 ++msgstr " Không sinh ra được tiến trình con "
10910 ++
10911 ++#: src/view.c:513
10912 ++msgid "Empty output from child filter"
10913 ++msgstr "Bộ lọc con trả lại kết quả rỗng"
10914 ++
10915 ++#: src/view.c:519
10916 ++msgid " Cannot open file "
10917 ++msgstr " Không mở được tập tin "
10918 ++
10919 ++#: src/view.c:618
10920 ++#, c-format
10921 ++msgid ""
10922 ++" Cannot open \"%s\"\n"
10923 ++" %s "
10924 ++msgstr ""
10925 ++" Không mở được \"%s\"\n"
10926 ++" %s "
10927 ++
10928 ++#: src/view.c:627
10929 ++#, c-format
10930 ++msgid ""
10931 ++" Cannot stat \"%s\"\n"
10932 ++" %s "
10933 ++msgstr ""
10934 ++" Không lấy (stat) được thuộc tính \"%s\"\n"
10935 ++" %s "
10936 ++
10937 ++#: src/view.c:636
10938 ++msgid " Cannot view: not a regular file "
10939 ++msgstr " Không xem được vì lý do: không\n"
10940 ++" phải tập tin thông thường "
10941 ++
10942 ++#: src/view.c:775
10943 ++#, c-format
10944 ++msgid "File: %s"
10945 ++msgstr "Tập tin: %s"
10946 ++
10947 ++#: src/view.c:790
10948 ++#, c-format
10949 ++msgid "Offset 0x%08lx"
10950 ++msgstr "Bộ offset 0x%08lx"
10951 ++
10952 ++#: src/view.c:792
10953 ++#, c-format
10954 ++msgid "Col %d"
10955 ++msgstr "Cột %d"
10956 ++
10957 ++#: src/view.c:796
10958 ++#, c-format
10959 ++msgid "%s bytes"
10960 ++msgstr "%s byte"
10961 ++
10962 ++#: src/view.c:801
10963 ++msgid " [grow]"
10964 ++msgstr " [lớn lên]"
10965 ++
10966 ++#: src/view.c:1826
10967 ++msgid "Invalid hex search expression"
10968 ++msgstr "Biểu thức tìm kiếm hex không đúng"
10969 ++
10970 ++#: src/view.c:1880
10971 ++msgid " Invalid regular expression "
10972 ++msgstr " Biểu thức chính quy không đúng"
10973 ++
10974 ++#: src/view.c:2003
10975 ++#, c-format
10976 ++msgid ""
10977 ++" The current line number is %d.\n"
10978 ++" Enter the new line number:"
10979 ++msgstr ""
10980 ++" Số thứ tự dòng hiện thời %d.\n"
10981 ++" Hãy nhập số thứ tự dòng muốn chuyển đến:"
10982 ++
10983 ++#: src/view.c:2026
10984 ++#, c-format
10985 ++msgid ""
10986 ++" The current address is 0x%lx.\n"
10987 ++" Enter the new address:"
10988 ++msgstr ""
10989 ++" Địa chỉ hiện thời - 0x%lx.\n"
10990 ++" Hãy nhập địa chỉ mới:"
10991 ++
10992 ++#: src/view.c:2028
10993 ++msgid " Goto Address "
10994 ++msgstr " Đi tới địa chỉ "
10995 ++
10996 ++#: src/view.c:2060
10997 ++msgid " Enter regexp:"
10998 ++msgstr " Nhập biểu thức chính quy:"
10999 ++
11000 ++#: src/view.c:2216
11001 ++msgid "Ascii"
11002 ++msgstr "Ascii"
11003 ++
11004 ++#: src/view.c:2216
11005 ++msgid "Hex"
11006 ++msgstr "Hex"
11007 ++
11008 ++#: src/view.c:2218
11009 ++msgid "Goto"
11010 ++msgstr "ĐiTới"
11011 ++
11012 ++#: src/view.c:2218
11013 ++msgid "Line"
11014 ++msgstr "Dòng"
11015 ++
11016 ++#: src/view.c:2220
11017 ++msgid "RxSrch"
11018 ++msgstr "TìmRx"
11019 ++
11020 ++#: src/view.c:2225
11021 ++msgid "EdHex"
11022 ++msgstr "SoạnHex"
11023 ++
11024 ++#: src/view.c:2225
11025 ++msgid "EdText"
11026 ++msgstr "SoạnVb"
11027 ++
11028 ++#: src/view.c:2233
11029 ++msgid "UnWrap"
11030 ++msgstr "BỏWrap"
11031 ++
11032 ++#: src/view.c:2233
11033 ++msgid "Wrap"
11034 ++msgstr "CóWrap"
11035 ++
11036 ++#: src/view.c:2236
11037 ++msgid "HxSrch"
11038 ++msgstr "TìmHx"
11039 ++
11040 ++#: src/view.c:2239
11041 ++msgid "Raw"
11042 ++msgstr "Thô"
11043 ++
11044 ++#: src/view.c:2239
11045 ++msgid "Parse"
11046 ++msgstr "Phtích"
11047 ++
11048 ++#: src/view.c:2244
11049 ++msgid "Unform"
11050 ++msgstr "K0dạng"
11051 ++
11052 ++#: src/view.c:2244
11053 ++msgid "Format"
11054 ++msgstr "CóDạng"
11055 ++
11056 ++#: src/widget.c:911
11057 ++msgid " History "
11058 ++msgstr " Lịch sử"
11059 ++
11060 ++#: src/win.c:159
11061 ++msgid "Function key 1"
11062 ++msgstr "Phím chức năng 1"
11063 ++
11064 ++#: src/win.c:160
11065 ++msgid "Function key 2"
11066 ++msgstr "Phím chức năng 2"
11067 ++
11068 ++#: src/win.c:161
11069 ++msgid "Function key 3"
11070 ++msgstr "Phím chức năng 3"
11071 ++
11072 ++#: src/win.c:162
11073 ++msgid "Function key 4"
11074 ++msgstr "Phím chức năng 4"
11075 ++
11076 ++#: src/win.c:163
11077 ++msgid "Function key 5"
11078 ++msgstr "Phím chức năng 5"
11079 ++
11080 ++#: src/win.c:164
11081 ++msgid "Function key 6"
11082 ++msgstr "Phím chức năng 6"
11083 ++
11084 ++#: src/win.c:165
11085 ++msgid "Function key 7"
11086 ++msgstr "Phím chức năng 7"
11087 ++
11088 ++#: src/win.c:166
11089 ++msgid "Function key 8"
11090 ++msgstr "Phím chức năng 8"
11091 ++
11092 ++#: src/win.c:167
11093 ++msgid "Function key 9"
11094 ++msgstr "Phím chức năng 9"
11095 ++
11096 ++#: src/win.c:168
11097 ++msgid "Function key 10"
11098 ++msgstr "Phím chức năng 10"
11099 ++
11100 ++#: src/win.c:169
11101 ++msgid "Function key 11"
11102 ++msgstr "Phím chức năng 11"
11103 ++
11104 ++#: src/win.c:170
11105 ++msgid "Function key 12"
11106 ++msgstr "Phím chức năng 12"
11107 ++
11108 ++#: src/win.c:171
11109 ++msgid "Function key 13"
11110 ++msgstr "Phím chức năng 13"
11111 ++
11112 ++#: src/win.c:172
11113 ++msgid "Function key 14"
11114 ++msgstr "Phím chức năng 14"
11115 ++
11116 ++#: src/win.c:173
11117 ++msgid "Function key 15"
11118 ++msgstr "Phím chức năng 15"
11119 ++
11120 ++#: src/win.c:174
11121 ++msgid "Function key 16"
11122 ++msgstr "Phím chức năng 16"
11123 ++
11124 ++#: src/win.c:175
11125 ++msgid "Function key 17"
11126 ++msgstr "Phím chức năng 17"
11127 ++
11128 ++#: src/win.c:176
11129 ++msgid "Function key 18"
11130 ++msgstr "Phím chức năng 18"
11131 ++
11132 ++#: src/win.c:177
11133 ++msgid "Function key 19"
11134 ++msgstr "Phím chức năng 19"
11135 ++
11136 ++#: src/win.c:178
11137 ++msgid "Function key 20"
11138 ++msgstr "Phím chức năng 20"
11139 ++
11140 ++#: src/win.c:179
11141 ++msgid "Backspace key"
11142 ++msgstr "Phím Backspace"
11143 ++
11144 ++#: src/win.c:180
11145 ++msgid "End key"
11146 ++msgstr "Phím End"
11147 ++
11148 ++#: src/win.c:181
11149 ++msgid "Up arrow key"
11150 ++msgstr "Phím mũi tên lên"
11151 ++
11152 ++#: src/win.c:182
11153 ++msgid "Down arrow key"
11154 ++msgstr "Phím mũi tên xuống"
11155 ++
11156 ++#: src/win.c:183
11157 ++msgid "Left arrow key"
11158 ++msgstr "Phím mũi tên sang trái"
11159 ++
11160 ++#: src/win.c:184
11161 ++msgid "Right arrow key"
11162 ++msgstr "Phím mũi tên sang phải"
11163 ++
11164 ++#: src/win.c:185
11165 ++msgid "Home key"
11166 ++msgstr "Phím Home"
11167 ++
11168 ++#: src/win.c:186
11169 ++msgid "Page Down key"
11170 ++msgstr "Phím Page Down"
11171 ++
11172 ++#: src/win.c:187
11173 ++msgid "Page Up key"
11174 ++msgstr "Phím Page Up"
11175 ++
11176 ++#: src/win.c:188
11177 ++msgid "Insert key"
11178 ++msgstr "Phím Insert"
11179 ++
11180 ++#: src/win.c:189
11181 ++msgid "Delete key"
11182 ++msgstr "Phím Delete"
11183 ++
11184 ++#: src/win.c:190
11185 ++msgid "Completion/M-tab"
11186 ++msgstr "Hoàn thành/M-Tab"
11187 ++
11188 ++#: src/win.c:191
11189 ++msgid "+ on keypad"
11190 ++msgstr "+ trên phần keypad"
11191 ++
11192 ++#: src/win.c:192
11193 ++msgid "- on keypad"
11194 ++msgstr "- trên phần keypad"
11195 ++
11196 ++#: src/win.c:193
11197 ++msgid "* on keypad"
11198 ++msgstr "* trên phần keypad"
11199 ++
11200 ++#: src/win.c:195
11201 ++msgid "Left arrow keypad"
11202 ++msgstr "Mũi tên sang trái trên phần keypad"
11203 ++
11204 ++#: src/win.c:196
11205 ++msgid "Right arrow keypad"
11206 ++msgstr "Mũi tên sang phải trên phần keypad"
11207 ++
11208 ++#: src/win.c:197
11209 ++msgid "Up arrow keypad"
11210 ++msgstr "Mũi tên lên trên của phần keypad"
11211 ++
11212 ++#: src/win.c:198
11213 ++msgid "Down arrow keypad"
11214 ++msgstr "Mũi tên xuống dưới của phần keypad"
11215 ++
11216 ++#: src/win.c:199
11217 ++msgid "Home on keypad"
11218 ++msgstr "Home trên keypad"
11219 ++
11220 ++#: src/win.c:200
11221 ++msgid "End on keypad"
11222 ++msgstr "End trên keypad"
11223 ++
11224 ++#: src/win.c:201
11225 ++msgid "Page Down keypad"
11226 ++msgstr "Page Down trên keypad"
11227 ++
11228 ++#: src/win.c:202
11229 ++msgid "Page Up keypad"
11230 ++msgstr "Page Up trên keypad"
11231 ++
11232 ++#: src/win.c:203
11233 ++msgid "Insert on keypad"
11234 ++msgstr "Insert trên keypad"
11235 ++
11236 ++#: src/win.c:204
11237 ++msgid "Delete on keypad"
11238 ++msgstr "Delete trên keypad"
11239 ++
11240 ++#: src/win.c:205
11241 ++msgid "Enter on keypad"
11242 ++msgstr "Enter trên keypad"
11243 ++
11244 ++#: src/win.c:206
11245 ++msgid "Slash on keypad"
11246 ++msgstr "Slash trên keypad"
11247 ++
11248 ++#: src/win.c:207
11249 ++msgid "NumLock on keypad"
11250 ++msgstr "NumLock trên keypad"
11251 ++
11252 ++#: src/wtools.c:256
11253 ++msgid "Background process:"
11254 ++msgstr "Tiến trình nền sau:"
11255 ++
11256 ++#: vfs/cpio.c:142 vfs/cpio.c:158
11257 ++#, c-format
11258 ++msgid ""
11259 ++"Cannot open cpio archive\n"
11260 ++"%s"
11261 ++msgstr ""
11262 ++"Không mở được tập tin nén cpio\n"
11263 ++"%s"
11264 ++
11265 ++#: vfs/cpio.c:223
11266 ++#, c-format
11267 ++msgid ""
11268 ++"Premature end of cpio archive\n"
11269 ++"%s"
11270 ++msgstr ""
11271 ++"Phần cuối của tập tin nén cpio bị hỏng\n"
11272 ++"%s"
11273 ++
11274 ++#: vfs/cpio.c:309 vfs/cpio.c:359
11275 ++#, c-format
11276 ++msgid ""
11277 ++"Corrupted cpio header encountered in\n"
11278 ++"%s"
11279 ++msgstr ""
11280 ++"Lỗi phần đầu cpio phát hiện trong\n"
11281 ++"%s"
11282 ++
11283 ++#: vfs/cpio.c:432
11284 ++#, c-format
11285 ++msgid ""
11286 ++"Inconsistent hardlinks of\n"
11287 ++"%s\n"
11288 ++"in cpio archive\n"
11289 ++"%s"
11290 ++msgstr ""
11291 ++"Liên kết cứng không thích hợp \n"
11292 ++"%s\n"
11293 ++"trong tập tin nén cpio\n"
11294 ++"%s"
11295 ++
11296 ++#: vfs/cpio.c:457
11297 ++#, c-format
11298 ++msgid "%s contains duplicate entries! Skipping!"
11299 ++msgstr "%s chứa mục lặp lại! Nhảy qua!"
11300 ++
11301 ++#: vfs/cpio.c:526
11302 ++#, c-format
11303 ++msgid ""
11304 ++"Unexpected end of file\n"
11305 ++"%s"
11306 ++msgstr ""
11307 ++"Kết thúc tập tin không mong đợi\n"
11308 ++"%s"
11309 ++
11310 ++#: vfs/direntry.c:326
11311 ++#, c-format
11312 ++msgid "Directory cache expired for %s"
11313 ++msgstr "Cache thư mục hết hạn cho %s"
11314 ++
11315 ++#: vfs/direntry.c:749
11316 ++msgid "Starting linear transfer..."
11317 ++msgstr "Chạy truyền tải theo đường thẳng..."
11318 ++
11319 ++#: vfs/direntry.c:886
11320 ++#, c-format
11321 ++msgid "%s: %s: %s %3d%% (%lu bytes transferred)"
11322 ++msgstr "%s: %s: %s %3d%% (đã truyền tải %lu byte)"
11323 ++
11324 ++#: vfs/direntry.c:887
11325 ++#, c-format
11326 ++msgid "%s: %s: %s %lu bytes transferred"
11327 ++msgstr "%s: %s: %s đã truyền tải %lu byte"
11328 ++
11329 ++#: vfs/direntry.c:933
11330 ++msgid "Getting file"
11331 ++msgstr "Nhận tập tin"
11332 ++
11333 ++#: vfs/extfs.c:303
11334 ++#, c-format
11335 ++msgid ""
11336 ++"Cannot open %s archive\n"
11337 ++"%s"
11338 ++msgstr ""
11339 ++"Không mở được tập tin nén %s\n"
11340 ++"%s"
11341 ++
11342 ++#: vfs/extfs.c:343 vfs/extfs.c:365 vfs/extfs.c:415
11343 ++msgid "Inconsistent extfs archive"
11344 ++msgstr "Tập tin nén extfs không thích hợp"
11345 ++
11346 ++#: vfs/fish.c:157
11347 ++#, c-format
11348 ++msgid "fish: Disconnecting from %s"
11349 ++msgstr "fish: Ngừng kết nối từ %s"
11350 ++
11351 ++#: vfs/fish.c:232
11352 ++msgid "fish: Waiting for initial line..."
11353 ++msgstr "fish: Đang chời dòng đầu tiên..."
11354 ++
11355 ++#: vfs/fish.c:244
11356 ++msgid "Sorry, we cannot do password authenticated connections for now."
11357 ++msgstr "Xin lỗi, bây giờ không thể tạo kết nối xác thực theo mật khẩu."
11358 ++
11359 ++#: vfs/fish.c:249
11360 ++msgid " fish: Password required for "
11361 ++msgstr "fish: yêu cầu mật khẩu cho "
11362 ++
11363 ++#: vfs/fish.c:258
11364 ++msgid "fish: Sending password..."
11365 ++msgstr "fish: Đang gửi mật khẩu..."
11366 ++
11367 ++#: vfs/fish.c:264
11368 ++msgid "fish: Sending initial line..."
11369 ++msgstr "fish: Đang gửi dòng đầu tiên..."
11370 ++
11371 ++#: vfs/fish.c:275
11372 ++msgid "fish: Handshaking version..."
11373 ++msgstr "fish: Đang xác nhận phiên bản..."
11374 ++
11375 ++#: vfs/fish.c:289
11376 ++msgid "fish: Setting up current directory..."
11377 ++msgstr "fish: Đang đặt thư mục hiện thời..."
11378 ++
11379 ++#: vfs/fish.c:291
11380 ++#, c-format
11381 ++msgid "fish: Connected, home %s."
11382 ++msgstr "fish: Kết nối thành công, thư mục cá nhân %s."
11383 ++
11384 ++#: vfs/fish.c:375
11385 ++#, c-format
11386 ++msgid "fish: Reading directory %s..."
11387 ++msgstr "fish: Đọc thư mục %s..."
11388 ++
11389 ++#: vfs/fish.c:477 vfs/ftpfs.c:1277 vfs/undelfs.c:343
11390 ++#, c-format
11391 ++msgid "%s: done."
11392 ++msgstr "%s: xong."
11393 ++
11394 ++#: vfs/fish.c:482 vfs/ftpfs.c:1247 vfs/undelfs.c:346
11395 ++#, c-format
11396 ++msgid "%s: failure"
11397 ++msgstr "%s: lỗi"
11398 ++
11399 ++#: vfs/fish.c:507
11400 ++#, c-format
11401 ++msgid "fish: store %s: sending command..."
11402 ++msgstr "fish: bản ghi %s: đang gửi câu lệnh..."
11403 ++
11404 ++#: vfs/fish.c:548
11405 ++msgid "fish: Local read failed, sending zeros"
11406 ++msgstr "fish: Lỗi đọc nội bộ, đang gửi các số không"
11407 ++
11408 ++#: vfs/fish.c:560
11409 ++#, c-format
11410 ++msgid "fish: storing %s %d (%lu)"
11411 ++msgstr "fish: ghi %s %d (%lu)"
11412 ++
11413 ++#: vfs/fish.c:561
11414 ++msgid "zeros"
11415 ++msgstr "các số không"
11416 ++
11417 ++#: vfs/fish.c:613
11418 ++msgid "Aborting transfer..."
11419 ++msgstr "Dừng truyền tải..."
11420 ++
11421 ++#: vfs/fish.c:622
11422 ++msgid "Error reported after abort."
11423 ++msgstr "Có lỗi báo cáo sau khi dừng."
11424 ++
11425 ++#: vfs/fish.c:624
11426 ++msgid "Aborted transfer would be successful."
11427 ++msgstr "Dừng truyền tải thành công."
11428 ++
11429 ++#: vfs/ftpfs.c:378
11430 ++#, c-format
11431 ++msgid "ftpfs: Disconnecting from %s"
11432 ++msgstr "ftpfs: Ngắt kết nối từ %s"
11433 ++
11434 ++#: vfs/ftpfs.c:433
11435 ++msgid " FTP: Password required for "
11436 ++msgstr " FTP: Cần mật khẩu cho "
11437 ++
11438 ++#: vfs/ftpfs.c:469
11439 ++msgid "ftpfs: sending login name"
11440 ++msgstr "ftpfs: đang gửi tên đăng nhập"
11441 ++
11442 ++#: vfs/ftpfs.c:473
11443 ++msgid "ftpfs: sending user password"
11444 ++msgstr "ftpfs: đang gửi mật khẩu người dùng"
11445 ++
11446 ++#: vfs/ftpfs.c:479
11447 ++#, c-format
11448 ++msgid "FTP: Account required for user %s"
11449 ++msgstr "FTP: Yêu cầu tài khoản cho người dùng %s"
11450 ++
11451 ++#: vfs/ftpfs.c:481
11452 ++msgid "Account:"
11453 ++msgstr "Tài khoản:"
11454 ++
11455 ++#: vfs/ftpfs.c:485
11456 ++msgid "ftpfs: sending user account"
11457 ++msgstr "ftpfs: đang gửi tài khoản người dùng"
11458 ++
11459 ++#: vfs/ftpfs.c:495
11460 ++msgid "ftpfs: logged in"
11461 ++msgstr "ftpfs: đã đăng nhập"
11462 ++
11463 ++#: vfs/ftpfs.c:509
11464 ++#, c-format
11465 ++msgid "ftpfs: Login incorrect for user %s "
11466 ++msgstr "ftpfs: lỗi đăng nhập cho người dùng %s "
11467 ++
11468 ++#: vfs/ftpfs.c:633
11469 ++msgid "ftpfs: Invalid host name."
11470 ++msgstr "ftpfs: Tên máy không đúng."
11471 ++
11472 ++#: vfs/ftpfs.c:651
11473 ++msgid "ftpfs: Invalid host address."
11474 ++msgstr "ftpfs: Địa chỉ không đúng."
11475 ++
11476 ++#: vfs/ftpfs.c:673
11477 ++#, c-format
11478 ++msgid "ftpfs: making connection to %s"
11479 ++msgstr "ftpfs: Thực hiện kết nối với %s"
11480 ++
11481 ++#: vfs/ftpfs.c:683
11482 ++msgid "ftpfs: connection interrupted by user"
11483 ++msgstr "ftpfs: người dùng dừng kết nối giữa chừng"
11484 ++
11485 ++#: vfs/ftpfs.c:685
11486 ++#, c-format
11487 ++msgid "ftpfs: connection to server failed: %s"
11488 ++msgstr "ftpfs: kết nối tới máy chủ không thành công: %s"
11489 ++
11490 ++#: vfs/ftpfs.c:726
11491 ++#, c-format
11492 ++msgid "Waiting to retry... %d (Control-C to cancel)"
11493 ++msgstr "Chờ thử lại... %d (Control-C để hủy bỏ)"
11494 ++
11495 ++#: vfs/ftpfs.c:906
11496 ++msgid "ftpfs: could not setup passive mode"
11497 ++msgstr "ftpfs: không đặt được chế độ bị động (passive)"
11498 ++
11499 ++#: vfs/ftpfs.c:985
11500 ++msgid "ftpfs: aborting transfer."
11501 ++msgstr "ftpfs: dừng truyền tải."
11502 ++
11503 ++#: vfs/ftpfs.c:987
11504 ++#, c-format
11505 ++msgid "ftpfs: abort error: %s"
11506 ++msgstr "ftpfs: lỗi thoát: %s"
11507 ++
11508 ++#: vfs/ftpfs.c:995
11509 ++msgid "ftpfs: abort failed"
11510 ++msgstr "ftpfs: sự cố thoát"
11511 ++
11512 ++#: vfs/ftpfs.c:1099 vfs/ftpfs.c:1203
11513 ++msgid "ftpfs: CWD failed."
11514 ++msgstr "ftpfs: CWD (thay đổi thư mục) không thành công."
11515 ++
11516 ++#: vfs/ftpfs.c:1109 vfs/ftpfs.c:1116
11517 ++msgid "ftpfs: couldn't resolve symlink"
11518 ++msgstr "ftpfs: không tìm được liên kết mềm"
11519 ++
11520 ++#: vfs/ftpfs.c:1167
11521 ++msgid "Resolving symlink..."
11522 ++msgstr "Đang tìm liên kết mềm..."
11523 ++
11524 ++#: vfs/ftpfs.c:1189
11525 ++#, c-format
11526 ++msgid "ftpfs: Reading FTP directory %s... %s%s"
11527 ++msgstr "ftpfs: Đọc thư mục FTP %s... %s%s"
11528 ++
11529 ++#: vfs/ftpfs.c:1192
11530 ++msgid "(strict rfc959)"
11531 ++msgstr "(hạn chế rfc959)"
11532 ++
11533 ++#: vfs/ftpfs.c:1193
11534 ++msgid "(chdir first)"
11535 ++msgstr "(đầu tiên chdir)"
11536 ++
11537 ++#: vfs/ftpfs.c:1290
11538 ++msgid "ftpfs: failed; nowhere to fallback to"
11539 ++msgstr "ftpfs: lỗi; không có nơi nào để quay lại về"
11540 ++
11541 ++#: vfs/ftpfs.c:1355
11542 ++#, c-format
11543 ++msgid "ftpfs: storing file %lu (%lu)"
11544 ++msgstr "ftpfs: ghi tập tin %lu (%lu)"
11545 ++
11546 ++#: vfs/ftpfs.c:1740
11547 ++msgid ""
11548 ++"~/.netrc file has incorrect mode.\n"
11549 ++"Remove password or correct mode."
11550 ++msgstr ""
11551 ++"Tập tin ~/.netrc có chế độ truy cập/sở hữu không đúng.\n"
11552 ++"Hãy xóa mật khẩu hoặc sửa lại chế độ cho đúng."
11553 ++
11554 ++#: vfs/mcfs.c:122 vfs/mcfs.c:167
11555 ++msgid " MCFS "
11556 ++msgstr " MCFS "
11557 ++
11558 ++#: vfs/mcfs.c:123
11559 ++msgid " The server does not support this version "
11560 ++msgstr " Máy chủ không hỗ trợ phiên bản này "
11561 ++
11562 ++#: vfs/mcfs.c:140
11563 ++msgid ""
11564 ++" The remote server is not running on a system port \n"
11565 ++" you need a password to log in, but the information may \n"
11566 ++" not be safe on the remote side. Continue? \n"
11567 ++msgstr ""
11568 ++" Máy chủ ở xa không chạy trên một cổng hệ thống. Cần \n"
11569 ++" mật khẩu để đăng nhập vào, nhưng điều này có thể \n"
11570 ++" không an toàn cho thông tin phía ở xa. Tiếp tục?\n"
11571 ++
11572 ++#: vfs/mcfs.c:153
11573 ++msgid " MCFS Password required "
11574 ++msgstr " Yêu cầu mật khẩu MCFS "
11575 ++
11576 ++#: vfs/mcfs.c:167
11577 ++msgid " Invalid password "
11578 ++msgstr " Mật khẩu không đúng "
11579 ++
11580 ++#: vfs/mcfs.c:227
11581 ++#, c-format
11582 ++msgid " Cannot locate hostname: %s "
11583 ++msgstr " Không xác định được tên máy ở xa: %s"
11584 ++
11585 ++#: vfs/mcfs.c:246
11586 ++#, c-format
11587 ++msgid " Cannot create socket: %s "
11588 ++msgstr " Không tạo được socket: %s "
11589 ++
11590 ++#: vfs/mcfs.c:252
11591 ++#, c-format
11592 ++msgid " Cannot connect to server: %s "
11593 ++msgstr " Không kết nối được tới máy chủ: %s "
11594 ++
11595 ++#: vfs/mcfs.c:322
11596 ++msgid " Too many open connections "
11597 ++msgstr " Quá nhiều kết nối mở "
11598 ++
11599 ++#: vfs/sfs.c:346
11600 ++#, c-format
11601 ++msgid ""
11602 ++"Warning: Invalid line in %s:\n"
11603 ++"%s\n"
11604 ++msgstr ""
11605 ++"Cảnh báo: dòng không đúng trong %s:\n"
11606 ++"%s\n"
11607 ++
11608 ++#: vfs/sfs.c:358
11609 ++#, c-format
11610 ++msgid ""
11611 ++"Warning: Invalid flag %c in %s:\n"
11612 ++"%s\n"
11613 ++msgstr ""
11614 ++"Cảnh báo: Cờ không đúng %c trong %s:\n"
11615 ++"%s\n"
11616 ++
11617 ++#: vfs/smbfs.c:576
11618 ++#, c-format
11619 ++msgid ""
11620 ++" smbfs_reconnect to %s failed\n"
11621 ++" "
11622 ++msgstr ""
11623 ++" smbfs_reconnect (kết nối lại) tới %s không thành công\n"
11624 ++" "
11625 ++
11626 ++#: vfs/smbfs.c:1120
11627 ++msgid " Authentication failed "
11628 ++msgstr " Xác thực không thành công "
11629 ++
11630 ++#: vfs/smbfs.c:1632
11631 ++#, c-format
11632 ++msgid " Error %s creating directory %s "
11633 ++msgstr " Lỗi %s khi tạo thư mục %s "
11634 ++
11635 ++#: vfs/smbfs.c:1655
11636 ++#, c-format
11637 ++msgid " Error %s removing directory %s "
11638 ++msgstr " Lỗi %s khi xóa thư mục %s "
11639 ++
11640 ++#: vfs/smbfs.c:1744
11641 ++#, c-format
11642 ++msgid " %s opening remote file %s "
11643 ++msgstr " %s khi mở tập tin ở xa %s "
11644 ++
11645 ++#: vfs/smbfs.c:1817
11646 ++#, c-format
11647 ++msgid " %s removing remote file %s "
11648 ++msgstr " %s khi xoá tập tin ở xa %s "
11649 ++
11650 ++#: vfs/smbfs.c:1855
11651 ++#, c-format
11652 ++msgid " %s renaming files\n"
11653 ++msgstr " %s khi đổi tên các tập tin\n"
11654 ++
11655 ++#: vfs/tar.c:212 vfs/tar.c:229
11656 ++#, c-format
11657 ++msgid ""
11658 ++"Cannot open tar archive\n"
11659 ++"%s"
11660 ++msgstr ""
11661 ++"Không mở được tập tin nén tar\n"
11662 ++"%s"
11663 ++
11664 ++#: vfs/tar.c:424
11665 ++msgid "Unexpected EOF on archive file"
11666 ++msgstr "Kết thúc tập tin EOF nén không mong đợi"
11667 ++
11668 ++#: vfs/tar.c:476 vfs/tar.c:483
11669 ++msgid "Inconsistent tar archive"
11670 ++msgstr "Tập tin tar không thích hợp"
11671 ++
11672 ++#: vfs/tar.c:561
11673 ++#, c-format
11674 ++msgid ""
11675 ++"Hmm,...\n"
11676 ++"%s\n"
11677 ++"doesn't look like a tar archive."
11678 ++msgstr ""
11679 ++"Hừm,...\n"
11680 ++"%s\n"
11681 ++"không giống tập tin tar."
11682 ++
11683 ++#: vfs/undelfs.c:82
11684 ++msgid " undelfs: error "
11685 ++msgstr " undelfs: lỗi "
11686 ++
11687 ++#: vfs/undelfs.c:189
11688 ++msgid " not enough memory "
11689 ++msgstr " không đủ bộ nhớ "
11690 ++
11691 ++#: vfs/undelfs.c:194
11692 ++msgid " while allocating block buffer "
11693 ++msgstr " khi phân phối bộ đệm khối "
11694 ++
11695 ++#: vfs/undelfs.c:198
11696 ++#, c-format
11697 ++msgid " open_inode_scan: %d "
11698 ++msgstr " open_inode_scan: %d "
11699 ++
11700 ++#: vfs/undelfs.c:202
11701 ++#, c-format
11702 ++msgid " while starting inode scan %d "
11703 ++msgstr " khi bắt đầu quét chỉ mục nút inode %d "
11704 ++
11705 ++#: vfs/undelfs.c:211
11706 ++#, c-format
11707 ++msgid "undelfs: loading deleted files information %d inodes"
11708 ++msgstr "undelfs: nạp thông tin về những tập tin bị xóa %d inode"
11709 ++
11710 ++#: vfs/undelfs.c:229
11711 ++#, c-format
11712 ++msgid " while calling ext2_block_iterate %d "
11713 ++msgstr " khi gọi ext2_block_iterate %d "
11714 ++
11715 ++#: vfs/undelfs.c:241
11716 ++msgid " no more memory while reallocating array "
11717 ++msgstr " không đủ bộ nhớ khi phân phối lại chuỗi "
11718 ++
11719 ++#: vfs/undelfs.c:262
11720 ++#, c-format
11721 ++msgid " while doing inode scan %d "
11722 ++msgstr " khi quét chỉ mục nút inode %d "
11723 ++
11724 ++#: vfs/undelfs.c:297
11725 ++msgid " Ext2lib error "
11726 ++msgstr " Lỗi Ext2lib "
11727 ++
11728 ++#: vfs/undelfs.c:325 vfs/undelfs.c:644
11729 ++#, c-format
11730 ++msgid " Cannot open file %s "
11731 ++msgstr " Không mở được tập tin %s "
11732 ++
11733 ++#: vfs/undelfs.c:328
11734 ++msgid "undelfs: reading inode bitmap..."
11735 ++msgstr "undelfs: đọc sơ đồ bit của nút inode..."
11736 ++
11737 ++#: vfs/undelfs.c:331
11738 ++#, c-format
11739 ++msgid ""
11740 ++" Cannot load inode bitmap from: \n"
11741 ++" %s \n"
11742 ++msgstr ""
11743 ++" Không nạp được sơ đồ bit của nút inode từ:\n"
11744 ++" %s \n"
11745 ++
11746 ++#: vfs/undelfs.c:334
11747 ++msgid "undelfs: reading block bitmap..."
11748 ++msgstr "undelfs: đọc sơ đồ bit của khối..."
11749 ++
11750 ++#: vfs/undelfs.c:337
11751 ++#, c-format
11752 ++msgid ""
11753 ++" Cannot load block bitmap from: \n"
11754 ++" %s \n"
11755 ++msgstr ""
11756 ++" Không nạp được sơ đồ bit của khối từ:\n"
11757 ++" %s \n"
11758 ++
11759 ++#: vfs/undelfs.c:360
11760 ++msgid " vfs_info is not fs! "
11761 ++msgstr " vfs_info không phải là hệ thống tập tin! "
11762 ++
11763 ++#: vfs/undelfs.c:416 vfs/undelfs.c:600
11764 ++msgid " You have to chdir to extract files first "
11765 ++msgstr " Đầu tiên bạn phải chdir để chuyển tới thư mục chứa tập tin cần giản nén "
11766 ++
11767 ++#: vfs/undelfs.c:539
11768 ++msgid " while iterating over blocks "
11769 ++msgstr " khi lặp lại khối "
11770 ++
11771 ++#: vfs/vfs.c:880
11772 ++msgid "Changes to file lost"
11773 ++msgstr "Thay đổi tới tập tin bị mất"
11774 ++
11775 --- mc-4.6.1.orig/debian/patches/22_main.c.patch
11776 +++ mc-4.6.1/debian/patches/22_main.c.patch
11777 @@ -0,0 +1,51 @@
11778 +--- src/main.c Fri Nov 14 21:43:12 2003
11779 ++++ src/main.c Fri Mar 18 15:36:41 2005
11780 +@@ -1597,21 +1597,45 @@
11781 +
11782 + #define xtoolkit_panel_setup()
11783 +
11784 +-/* Show current directory in the xterm title */
11785 ++/* Show hostname and current directory in the xterm title */
11786 + void
11787 + update_xterm_title_path (void)
11788 + {
11789 + unsigned char *p, *s;
11790 ++ char *pvp;
11791 ++ size_t pvlen;
11792 ++ int pvresult;
11793 +
11794 + if (xterm_flag && xterm_title) {
11795 ++ // currrent path
11796 + p = s = g_strdup (strip_home_and_password (current_panel->cwd));
11797 ++ // hostname
11798 ++ pvlen = strlen(p);
11799 ++ pvp = g_malloc (pvlen + 64); //approach - max hostname length
11800 ++ pvresult = gethostname(pvp, 63);
11801 ++ if (pvresult) { // print just current path
11802 ++ g_free (pvp);
11803 ++ pvp = p;
11804 ++ } else {
11805 ++ s = pvp;
11806 ++ do { // merge hostname with path
11807 ++ if (!is_printable (*s))
11808 ++ *s = '?';
11809 ++ } while (*++s!=0x00);
11810 ++ *s++=':';
11811 ++ strcpy (s, p);
11812 ++ g_free (p);
11813 ++ }
11814 ++
11815 + do {
11816 + if (!is_printable (*s))
11817 + *s = '?';
11818 + } while (*++s);
11819 +- fprintf (stdout, "\33]0;mc - %s\7", p);
11820 ++// fprintf (stdout, "\33]0;mc - %s\7", p);
11821 ++ fprintf (stdout, "\33]0;mc - %s\7", pvp);
11822 + fflush (stdout);
11823 +- g_free (p);
11824 ++// g_free (p);
11825 ++ g_free (pvp);
11826 + }
11827 + }
11828 +
11829 --- mc-4.6.1.orig/debian/patches/05_symcrash.patch
11830 +++ mc-4.6.1/debian/patches/05_symcrash.patch
11831 @@ -0,0 +1,45 @@
11832 +--- mc-4.6.1/src/util.c.symcrash 2005-09-13 12:32:54.000000000 +0200
11833 ++++ mc-4.6.1/src/util.c 2005-09-13 12:39:09.000000000 +0200
11834 +@@ -1406,21 +1406,23 @@
11835 + * as needed up in first and then goes down using second */
11836 + char *diff_two_paths (const char *first, const char *second)
11837 + {
11838 +- char *p, *q, *r, *s, *buf = 0;
11839 ++ char *p, *q, *r, *s, *buf = NULL;
11840 + int i, j, prevlen = -1, currlen;
11841 + char *my_first = NULL, *my_second = NULL;
11842 +
11843 + my_first = resolve_symlinks (first);
11844 + if (my_first == NULL)
11845 + return NULL;
11846 ++ my_second= resolve_symlinks (second);
11847 ++ if (my_second == NULL) {
11848 ++ g_free (my_first);
11849 ++ return NULL;
11850 ++ }
11851 + for (j = 0; j < 2; j++) {
11852 + p = my_first;
11853 + if (j) {
11854 +- my_second = resolve_symlinks (second);
11855 +- if (my_second == NULL) {
11856 +- g_free (my_first);
11857 ++ if (my_second == NULL)
11858 + return buf;
11859 +- }
11860 + }
11861 + q = my_second;
11862 + for (;;) {
11863 +--- mc-4.6.1/src/file.c.symcrash 2005-09-13 12:32:54.000000000 +0200
11864 ++++ mc-4.6.1/src/file.c 2005-09-13 12:29:16.000000000 +0200
11865 +@@ -387,9 +387,9 @@
11866 + char *p, *q, *s;
11867 +
11868 + const char *r = strrchr (src_path, PATH_SEP);
11869 +-
11870 ++
11871 + if (r) {
11872 +- p = g_strndup (src_path, r - src_path);
11873 ++ p = g_strndup (src_path, r - src_path + 1);
11874 + if (*dst_path == PATH_SEP)
11875 + q = g_strdup (dst_path);
11876 + else
11877 --- mc-4.6.1.orig/debian/patches/36_developer_mode.patch
11878 +++ mc-4.6.1/debian/patches/36_developer_mode.patch
11879 @@ -0,0 +1,42 @@
11880 +--- configure.ac 2005-04-19 23:12:27.000000000 +0200
11881 ++++ configure.ac 2005-04-19 23:14:32.000000000 +0200
11882 +@@ -556,15 +556,7 @@
11883 + AC_DEFINE(USE_INCLUDED_SLANG, 1, [Use the S-Lang included here])
11884 + fi
11885 +
11886 +-if test x"$USE_MAINTAINER_MODE" = x"yes"; then
11887 +- if test x"${enable_gcc_warnings+set}" != x"set"; then
11888 +- if test x"${GCC}" = x"yes"; then
11889 +- CFLAGS="-Wall $CFLAGS"
11890 +- fi
11891 +- fi
11892 +-fi
11893 +-
11894 +-ri_GCC_WARNINGS
11895 ++MC_ARG_ENABLE_DEVELOPER_MODE()
11896 +
11897 + AC_SUBST(CFLAGS)
11898 + AC_SUBST(CPPFLAGS)
11899 +--- acinclude.m4 2005-01-11 10:15:33.000000000 +0100
11900 ++++ acinclude.m4 2005-04-19 23:12:27.000000000 +0200
11901 +@@ -898,3 +898,20 @@
11902 + [Define if functions cannot be renamed by asm labels])
11903 + fi
11904 + ])
11905 ++
11906 ++AC_DEFUN([MC_ARG_ENABLE_DEVELOPER_MODE],
11907 ++[AC_ARG_ENABLE([developer-mode],
11908 ++ AS_HELP_STRING([--enable-developer-mode], [Enable debugging help]))
11909 ++AM_CONDITIONAL([DEVELOPER], [test x"$enable_developer_mode" = x"yes"])
11910 ++if test x"$enable_developer_mode" = x"yes"; then
11911 ++ AC_DEFINE([MC_ENABLE_DEBUGGING_CODE], [1], [Enable debugging code])
11912 ++ if test x"$GCC" = x"yes"; then
11913 ++dnl Developers get some useful warnings and debugging support.
11914 ++dnl This will make the backtrace output more readable.
11915 ++ CFLAGS="-W -Wall -ggdb ${CFLAGS}"
11916 ++ fi
11917 ++elif test x"$GCC" = x"yes"; then
11918 ++dnl Some warnings cannot hurt at all
11919 ++ CFLAGS="-Wall"
11920 ++fi
11921 ++])
11922 --- mc-4.6.1.orig/debian/patches/10_it.po.patch
11923 +++ mc-4.6.1/debian/patches/10_it.po.patch
11924 @@ -0,0 +1,11 @@
11925 +--- mc-4.6.0-4.6.1-pre4.orig/po/it.po
11926 ++++ mc-4.6.0-4.6.1-pre4/po/it.po
11927 +@@ -2097,7 +2097,7 @@
11928 +
11929 + #: src/filegui.c:524
11930 + msgid "A&ppend"
11931 +-msgstr "Atta&cca"
11932 ++msgstr "atta&Cca"
11933 +
11934 + #: src/filegui.c:527
11935 + msgid "Overwrite this target?"
11936 --- mc-4.6.1.orig/debian/patches/09_de.po.patch
11937 +++ mc-4.6.1/debian/patches/09_de.po.patch
11938 @@ -0,0 +1,56 @@
11939 +--- po/de.po.orig 2005-06-11 16:42:51.000000000 +0200
11940 ++++ po/de.po 2005-06-14 18:55:30.000000000 +0200
11941 +@@ -1411,7 +1411,7 @@
11942 + #: src/cmd.c:988
11943 + #, c-format
11944 + msgid " edit symlink: %s "
11945 +-msgstr " symbolschen Link barbeiten: %s"
11946 ++msgstr " symbolschen Link bearbeiten: %s"
11947 +
11948 + #: src/cmd.c:999
11949 + #, c-format
11950 +@@ -1561,7 +1561,7 @@
11951 + " Cannot create temporary command file \n"
11952 + " %s "
11953 + msgstr ""
11954 +-" Kann temporäre Befehlsdaei nicht anlegen \n"
11955 ++" Kann temporäre Befehlsdatei nicht anlegen \n"
11956 + " %s "
11957 +
11958 + #: src/ext.c:117 src/user.c:585
11959 +@@ -1669,7 +1669,7 @@
11960 + " Cannot stat source file \"%s\" \n"
11961 + " %s "
11962 + msgstr ""
11963 +-" Kann Quelldaei \"%s\" nicht untersuchen \n"
11964 ++" Kann Quelldatei \"%s\" nicht untersuchen \n"
11965 + " %s "
11966 +
11967 + #: src/file.c:517 src/file.c:1058
11968 +@@ -2575,7 +2575,7 @@
11969 + #: src/learn.c:115
11970 + #, c-format
11971 + msgid " You have entered \"%s\""
11972 +-msgstr " Sie haben \"%s\" einggeben"
11973 ++msgstr " Sie haben \"%s\" eingegeben"
11974 +
11975 + #. TRANSLATORS: This label appears near learned keys. Keep it short.
11976 + #: src/learn.c:164
11977 +@@ -2667,7 +2667,7 @@
11978 +
11979 + #: src/main.c:811 src/main.c:835
11980 + msgid "S&hell link..."
11981 +-msgstr "Shell-Verbindung..."
11982 ++msgstr "S&hell-Verbindung..."
11983 +
11984 + #: src/main.c:813 src/main.c:837
11985 + msgid "SM&B link..."
11986 +@@ -4199,7 +4199,7 @@
11987 + #: vfs/ftpfs.c:684
11988 + #, c-format
11989 + msgid "ftpfs: connection to server failed: %s"
11990 +-msgstr "ftpfs: Verbindung zum Server fehlgeschlgen: %s"
11991 ++msgstr "ftpfs: Verbindung zum Server fehlgeschlagen: %s"
11992 +
11993 + #: vfs/ftpfs.c:725
11994 + #, c-format
11995 --- mc-4.6.1.orig/debian/patches/60_recode.patch
11996 +++ mc-4.6.1/debian/patches/60_recode.patch
11997 @@ -0,0 +1,1550 @@
11998 +diff -urN mc-4.6.1-orig/edit/editkeys.c mc-4.6.1/edit/editkeys.c
11999 +--- mc-4.6.1-orig/edit/editkeys.c 2005-05-27 21:19:18.000000000 +0700
12000 ++++ mc-4.6.1/edit/editkeys.c 2005-07-30 23:13:14.000000000 +0700
12001 +@@ -205,7 +205,7 @@
12002 +
12003 + #ifdef HAVE_CHARSET
12004 + if (x_key == XCTRL ('t')) {
12005 +- do_select_codepage ();
12006 ++ do_select_codepage (_(" Choose codepage "));
12007 +
12008 + edit->force = REDRAW_COMPLETELY;
12009 + command = CK_Refresh;
12010 +ä×ÏÉÞÎÙÅ ÆÁÊÌÙ mc-4.6.1-orig/po/ru.gmo É mc-4.6.1/po/ru.gmo ÒÁÚÌÉÞÁÀÔÓÑ
12011 +diff -urN mc-4.6.1-orig/po/ru.po mc-4.6.1/po/ru.po
12012 +--- mc-4.6.1-orig/po/ru.po 2005-07-23 23:53:30.000000000 +0700
12013 ++++ mc-4.6.1/po/ru.po 2005-07-30 23:17:02.000000000 +0700
12014 +@@ -4503,3 +4503,32 @@
12015 + #: vfs/vfs.c:894
12016 + msgid "Changes to file lost"
12017 + msgstr "éÚÍÅÎÅÎÉÑ ÄÌÑ ÆÁÊÌÁ ÐÏÔÅÒÑÎÙ"
12018 ++
12019 ++#: messages for recode patch
12020 ++msgid "Panel &codepage"
12021 ++msgstr "ëÏÄÉÒÏ×ËÁ ÐÁÎÅÌÉ"
12022 ++
12023 ++msgid " Choose codepage "
12024 ++msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ"
12025 ++
12026 ++msgid " Choose panel codepage "
12027 ++msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ ÐÁÎÅÌÉ "
12028 ++
12029 ++msgid " Choose default FTP codepage "
12030 ++msgstr " ÷ÙÂÅÒÉÔÅ ËÏÄÉÒÏ×ËÕ FTP ÐÏ ÕÍÏÌÞÁÎÉÀ "
12031 ++
12032 ++msgid "FTP default codepage:"
12033 ++msgstr "ëÏÄÉÒÏ×ËÁ FTP ÐÏ ÕÍÏÌÞÁÎÉÀ:"
12034 ++
12035 ++msgid "Recode file names:"
12036 ++msgstr "ðÅÒÅËÏÄÉÒÏ×ÁÔØ ÉÍÅÎÁ:"
12037 ++
12038 ++msgid "Recoding works only with COPY/MOVE operation"
12039 ++msgstr "ðÅÒÅËÏÄÉÒÏ×ËÁ ÒÁÂÏÔÁÅÔ ÔÏÌØËÏ ÄÌÑ ÏÐÅÒÁÃÉÊ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ"
12040 ++
12041 ++msgid " Choose \"FROM\" codepage for COPY/MOVE operaion "
12042 ++msgstr" ÷ÙÂÅÒÉÔÅ ÎÁÞÁÌØÎÕÀ ËÏÄÉÒÏ×ËÕ ÄÌÑ ÏÐÅÒÁÃÉÉ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ "
12043 ++
12044 ++msgid " Choose \"TO\" codepage for COPY/MOVE operaion "
12045 ++msgstr" ÷ÙÂÅÒÉÔÅ ËÏÎÅÞÎÕÀ ËÏÄÉÒÏ×ËÕ ÄÌÑ ÏÐÅÒÁÃÉÉ ËÏÐÉÒÏ×ÁÎÉÑ/ÐÅÒÅÍÅÝÅÎÉÑ "
12046 ++
12047 +diff -urN mc-4.6.1-orig/src/boxes.c mc-4.6.1/src/boxes.c
12048 +--- mc-4.6.1-orig/src/boxes.c 2005-05-27 21:19:18.000000000 +0700
12049 ++++ mc-4.6.1/src/boxes.c 2005-07-31 01:20:52.000000000 +0700
12050 +@@ -49,6 +49,7 @@
12051 + #ifdef HAVE_CHARSET
12052 + #include "charsets.h"
12053 + #include "selcodepage.h"
12054 ++#include "recode.h"
12055 + #endif
12056 +
12057 + #ifdef USE_NETCODE
12058 +@@ -446,8 +447,8 @@
12059 + }
12060 + }
12061 +
12062 +-#define DISPY 11
12063 +-#define DISPX 46
12064 ++#define DISPY 13
12065 ++#define DISPX 35
12066 +
12067 +
12068 + #ifndef HAVE_CHARSET
12069 +@@ -543,26 +544,61 @@
12070 +
12071 +
12072 + static int new_display_codepage;
12073 ++static int new_ftp_codepage;
12074 +
12075 +-static WLabel *cplabel;
12076 + static WCheck *inpcheck;
12077 +
12078 ++static WButton *cpbutton;
12079 ++static WButton *cpbutton_ftp;
12080 ++
12081 + static int
12082 + sel_charset_button (int action)
12083 + {
12084 + const char *cpname;
12085 + char buf[64];
12086 +- new_display_codepage = select_charset (new_display_codepage, 1);
12087 ++ new_display_codepage = select_charset (new_display_codepage, 1, _(" Choose input codepage "));
12088 + cpname = (new_display_codepage < 0)
12089 + ? _("Other 8 bit")
12090 + : codepages[new_display_codepage].name;
12091 +
12092 + /* avoid strange bug with label repainting */
12093 +- g_snprintf (buf, sizeof (buf), "%-27s", cpname);
12094 +- label_set_text (cplabel, buf);
12095 ++ sprintf( buf, "%s", cpname );
12096 ++ button_set_text (cpbutton, buf);
12097 ++
12098 ++ if(new_display_codepage<0) new_ftp_codepage=-1;
12099 ++ cpname = (new_ftp_codepage < 0)
12100 ++ ? _("Other 8 bit")
12101 ++ : codepages[ new_ftp_codepage ].name;
12102 ++ sprintf( buf, "%s", cpname );
12103 ++ button_set_text (cpbutton_ftp, buf);
12104 ++
12105 + return 0;
12106 + }
12107 +
12108 ++static int sel_charset_button_ftp(int action) {
12109 ++ char *cpname, buf[64];
12110 ++ if(new_display_codepage>0) {
12111 ++ new_ftp_codepage = select_charset(new_ftp_codepage, 0, _(" Choose default FTP codepage "));
12112 ++ cpname = (new_display_codepage < 0)
12113 ++ ? _("Other 8 bit")
12114 ++ : codepages[ new_display_codepage ].name;
12115 ++ sprintf( buf, "%s", cpname );
12116 ++ button_set_text( cpbutton, buf );
12117 ++ cpname = (new_ftp_codepage < 0)
12118 ++ ? _("Other 8 bit")
12119 ++ : codepages[ new_ftp_codepage ].name;
12120 ++ sprintf( buf, "%s", cpname );
12121 ++ button_set_text( cpbutton_ftp, buf );
12122 ++ }
12123 ++ else {
12124 ++ message( 1, _(" Warning "),
12125 ++ _("To use this feature select your codepage in\n"
12126 ++ "Setup / Display Bits dialog!\n"
12127 ++ "Do not forget to save options." ));
12128 ++ }
12129 ++ return 0;
12130 ++}
12131 ++
12132 + static Dlg_head *
12133 + init_disp_bits_box (void)
12134 + {
12135 +@@ -581,9 +617,6 @@
12136 + cpname = (new_display_codepage < 0)
12137 + ? _("Other 8 bit")
12138 + : codepages[new_display_codepage].name;
12139 +- cplabel = label_new (4, 4, cpname);
12140 +- add_widget (dbits_dlg, cplabel);
12141 +-
12142 + add_widget (dbits_dlg,
12143 + button_new (DISPY - 3, DISPX / 2 + 3, B_CANCEL,
12144 + NORMAL_BUTTON, _("&Cancel"), 0));
12145 +@@ -592,13 +625,30 @@
12146 + 0));
12147 +
12148 + inpcheck =
12149 +- check_new (6, 4, !use_8th_bit_as_meta, _("F&ull 8 bits input"));
12150 ++ check_new (8, 4, !use_8th_bit_as_meta, _("F&ull 8 bits input"));
12151 + add_widget (dbits_dlg, inpcheck);
12152 +
12153 +- cpname = _("&Select");
12154 +- add_widget (dbits_dlg,
12155 +- button_new (4, DISPX - 8 - mbstrlen (cpname), B_USER,
12156 +- NORMAL_BUTTON, cpname, sel_charset_button));
12157 ++
12158 ++ add_widget( dbits_dlg, label_new( 5, 4, _("FTP default codepage:")));
12159 ++ if(n_codepages>0) {
12160 ++ cpname = (new_display_codepage < 0)
12161 ++ ? _("Other 8 bit")
12162 ++ : codepages[ new_display_codepage ].name;
12163 ++ }
12164 ++ else cpname= _("Other 8 bit");
12165 ++ cpbutton=button_new(4, 5, B_USER,
12166 ++ NORMAL_BUTTON, cpname, sel_charset_button);
12167 ++
12168 ++ if(n_codepages>0) {
12169 ++ cpname = (new_ftp_codepage < 0)
12170 ++ ? _("Other 8 bit")
12171 ++ : codepages[ new_ftp_codepage ].name;
12172 ++ }
12173 ++ else cpname= _("Other 8 bit");
12174 ++ cpbutton_ftp=button_new(6, 5, B_USER,
12175 ++ NORMAL_BUTTON, cpname, sel_charset_button_ftp);
12176 ++ add_widget( dbits_dlg, cpbutton_ftp);
12177 ++ add_widget (dbits_dlg, cpbutton);
12178 +
12179 + return dbits_dlg;
12180 + }
12181 +@@ -608,6 +658,7 @@
12182 + {
12183 + Dlg_head *dbits_dlg;
12184 + new_display_codepage = display_codepage;
12185 ++ new_ftp_codepage = ftp_codepage;
12186 +
12187 + application_keypad_mode ();
12188 + dbits_dlg = init_disp_bits_box ();
12189 +@@ -628,6 +679,17 @@
12190 + && display_codepage != 1) ? 128 : 160;
12191 + #endif
12192 + use_8th_bit_as_meta = !(inpcheck->state & C_BOOL);
12193 ++
12194 ++ ftp_codepage=new_ftp_codepage;
12195 ++ if(display_codepage<=0) {
12196 ++ panel_reset_codepage(left_panel);
12197 ++ paint_dir(left_panel);
12198 ++ display_mini_info(left_panel);
12199 ++ panel_reset_codepage(right_panel);
12200 ++ paint_dir(right_panel);
12201 ++ display_mini_info(right_panel);
12202 ++ }
12203 ++
12204 + }
12205 + destroy_dlg (dbits_dlg);
12206 + repaint_screen ();
12207 +diff -urN mc-4.6.1-orig/src/charsets.c mc-4.6.1/src/charsets.c
12208 +--- mc-4.6.1-orig/src/charsets.c 2005-07-23 23:52:02.000000000 +0700
12209 ++++ mc-4.6.1/src/charsets.c 2005-07-30 23:31:28.000000000 +0700
12210 +@@ -119,8 +119,6 @@
12211 + }
12212 + }
12213 +
12214 +-#define OTHER_8BIT "Other_8_bit"
12215 +-
12216 + const char *
12217 + get_codepage_id (int n)
12218 + {
12219 +@@ -139,7 +137,7 @@
12220 + return -1;
12221 + }
12222 +
12223 +-static char
12224 ++char
12225 + translate_character (iconv_t cd, char c)
12226 + {
12227 + char outbuf[4], *obuf;
12228 +diff -urN mc-4.6.1-orig/src/charsets.h mc-4.6.1/src/charsets.h
12229 +--- mc-4.6.1-orig/src/charsets.h 2004-08-30 17:38:00.000000000 +0700
12230 ++++ mc-4.6.1/src/charsets.h 2005-07-30 23:32:37.000000000 +0700
12231 +@@ -6,6 +6,7 @@
12232 + #define UNKNCHAR '\001'
12233 +
12234 + #define CHARSETS_INDEX "mc.charsets"
12235 ++#define OTHER_8BIT "Other_8_bit"
12236 +
12237 + extern int n_codepages;
12238 +
12239 +@@ -19,6 +20,10 @@
12240 +
12241 + extern struct codepage_desc *codepages;
12242 +
12243 ++#include <iconv.h>
12244 ++extern char translate_character(iconv_t cd, char c);
12245 ++extern char errbuf[255];
12246 ++
12247 + const char *get_codepage_id (int n);
12248 + int get_codepage_index (const char *id);
12249 + int load_codepages_list (void);
12250 +diff -urN mc-4.6.1-orig/src/cmd.c mc-4.6.1/src/cmd.c
12251 +--- mc-4.6.1-orig/src/cmd.c 2005-05-27 21:19:18.000000000 +0700
12252 ++++ mc-4.6.1/src/cmd.c 2005-07-30 23:41:23.000000000 +0700
12253 +@@ -74,6 +74,10 @@
12254 + # include "../edit/edit.h"
12255 + #endif
12256 +
12257 ++#ifdef HAVE_CHARSET
12258 ++#include "recode.h"
12259 ++#endif
12260 ++
12261 + /* If set and you don't have subshell support,then C-o will give you a shell */
12262 + int output_starts_shell = 0;
12263 +
12264 +@@ -350,6 +354,9 @@
12265 + {
12266 + char *tempdir;
12267 + char *dir;
12268 ++#ifdef HAVE_CHARSET
12269 ++ char *recoded_dir;
12270 ++#endif
12271 +
12272 + dir =
12273 + input_expand_dialog (_("Create a new Directory"),
12274 +@@ -360,8 +367,17 @@
12275 +
12276 + if (dir[0] == '/' || dir[0] == '~')
12277 + tempdir = g_strdup (dir);
12278 +- else
12279 +- tempdir = concat_dir_and_file (current_panel->cwd, dir);
12280 ++ else {
12281 ++#ifdef HAVE_CHARSET
12282 ++ recoded_dir=g_strdup(dir);
12283 ++ my_translate_string(dir,strlen(dir), recoded_dir,current_panel->tr_table_input);
12284 ++ tempdir = concat_dir_and_file (current_panel->cwd, recoded_dir);
12285 ++ g_free(recoded_dir);
12286 ++#else
12287 ++ tempdir = concat_dir_and_file (current_panel->cwd, dir);
12288 ++#endif
12289 ++ }
12290 ++
12291 + g_free (dir);
12292 +
12293 + save_cwds_stat ();
12294 +diff -urN mc-4.6.1-orig/src/file.c mc-4.6.1/src/file.c
12295 +--- mc-4.6.1-orig/src/file.c 2005-05-27 21:19:18.000000000 +0700
12296 ++++ mc-4.6.1/src/file.c 2005-07-30 23:55:00.000000000 +0700
12297 +@@ -77,6 +77,9 @@
12298 + #include "../vfs/vfs-impl.h"
12299 +
12300 + /* }}} */
12301 ++#ifdef HAVE_CHARSET
12302 ++#include "recode.h"
12303 ++#endif
12304 +
12305 + int verbose = 1;
12306 +
12307 +@@ -914,7 +917,11 @@
12308 + }
12309 + /* Dive into subdir if exists */
12310 + if (toplevel && ctx->dive_into_subdirs) {
12311 +- dest_dir = concat_dir_and_file (d, x_basename (s));
12312 ++#ifdef HAVE_CHARSET
12313 ++ dest_dir = concat_dir_and_recoded_fname(d, x_basename (s), ctx);
12314 ++#else
12315 ++ dest_dir = concat_dir_and_file (d, x_basename (s));
12316 ++#endif
12317 + } else {
12318 + dest_dir = g_strdup (d);
12319 + goto dont_mkdir;
12320 +@@ -964,7 +971,11 @@
12321 +
12322 + (*ctx->stat_func) (path, &buf);
12323 + if (S_ISDIR (buf.st_mode)) {
12324 +- mdpath = concat_dir_and_file (dest_dir, next->d_name);
12325 ++#ifdef HAVE_CHARSET
12326 ++ mdpath = concat_dir_and_recoded_fname(dest_dir, next->d_name, ctx);
12327 ++#else
12328 ++ mdpath = concat_dir_and_file (dest_dir, next->d_name);
12329 ++#endif
12330 + /*
12331 + * From here, we just intend to recursively copy subdirs, not
12332 + * the double functionality of copying different when the target
12333 +@@ -975,7 +986,11 @@
12334 + parent_dirs, progress_count, progress_bytes);
12335 + g_free (mdpath);
12336 + } else {
12337 +- dest_file = concat_dir_and_file (dest_dir, x_basename (path));
12338 ++#ifdef HAVE_CHARSET
12339 ++ dest_file=concat_dir_and_recoded_fname(dest_dir, x_basename(path),ctx);
12340 ++#else
12341 ++ dest_file = concat_dir_and_file (dest_dir, x_basename (path));
12342 ++#endif
12343 + return_status = copy_file_file (ctx, path, dest_file, 1,
12344 + progress_count, progress_bytes, 0);
12345 + g_free (dest_file);
12346 +@@ -1159,7 +1174,12 @@
12347 + destdir = g_strdup (d);
12348 + move_over = 1;
12349 + } else
12350 +- destdir = concat_dir_and_file (d, x_basename (s));
12351 ++#ifdef HAVE_CHARSET
12352 ++ destdir = concat_dir_and_recoded_fname(d, x_basename (s), ctx);
12353 ++#else
12354 ++ destdir = concat_dir_and_file (d, x_basename (s));
12355 ++#endif
12356 ++
12357 +
12358 + if (sbuf.st_dev == dbuf.st_dev && sbuf.st_ino == dbuf.st_ino) {
12359 + int msize = COLS - 36;
12360 +@@ -1875,7 +1895,12 @@
12361 + if (temp == NULL) {
12362 + value = transform_error;
12363 + } else {
12364 +- char *temp2 = concat_dir_and_file (dest, temp);
12365 ++#ifdef HAVE_CHARSET
12366 ++ char *temp2 = concat_dir_and_recoded_fname (dest, temp, ctx);
12367 ++#else
12368 ++ char *temp2 = concat_dir_and_file (dest, temp);
12369 ++#endif
12370 ++
12371 + g_free (dest);
12372 + dest = temp2;
12373 + temp = NULL;
12374 +@@ -1969,7 +1994,12 @@
12375 + if (temp == NULL)
12376 + value = transform_error;
12377 + else {
12378 +- char *temp2 = concat_dir_and_file (dest, temp);
12379 ++#ifdef HAVE_CHARSET
12380 ++ char *temp2 = concat_dir_and_recoded_fname(dest, temp, ctx);
12381 ++#else
12382 ++ char *temp2 = concat_dir_and_file (dest, temp);
12383 ++#endif
12384 ++
12385 +
12386 + switch (operation) {
12387 + case OP_COPY:
12388 +diff -urN mc-4.6.1-orig/src/filegui.c mc-4.6.1/src/filegui.c
12389 +--- mc-4.6.1-orig/src/filegui.c 2006-06-13 00:53:19.000000000 +0700
12390 ++++ mc-4.6.1/src/filegui.c 2006-06-13 01:18:24.000000000 +0700
12391 +@@ -71,6 +71,10 @@
12392 + #include "util.h" /* strip_password() */
12393 + #include "tty.h"
12394 +
12395 ++#ifdef HAVE_CHARSET
12396 ++#include "recode.h"
12397 ++#endif
12398 ++
12399 + /* }}} */
12400 +
12401 + /* This structure describes the UI and internal data required by a file
12402 +@@ -722,57 +726,79 @@
12403 + }
12404 + }
12405 +
12406 ++#ifdef HAVE_CHARSET
12407 ++#define FMDY 15
12408 ++#else
12409 + #define FMDY 13
12410 ++#endif
12411 ++
12412 + #define FMD_XLEN 64
12413 + extern int fmd_xlen;
12414 + static QuickWidget fmd_widgets[] = {
12415 +
12416 +-#define FMCB0 FMDC
12417 +-#define FMCB12 0
12418 +-#define FMCB11 1
12419 +- /* follow symlinks and preserve Attributes must be the first */
12420 +- {quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"), 9, 0,
12421 +- 0 /* &op_preserve */ , 0, "preserve"},
12422 +- {quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"), 7, 0,
12423 +- 0 /* &file_mask_op_follow_links */ , 0, "follow"},
12424 +- {quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, "to"},
12425 +- {quick_checkbox, 37, 64, 4, FMDY, N_("&Using shell patterns"), 0, 0,
12426 +- 0 /* &source_easy_patterns */ , 0, "using-shell"},
12427 +- {quick_input, 3, 64, 3, FMDY, "", 58,
12428 +- 0, 0, 0, "input-def"},
12429 +-#define FMDI1 4
12430 +-#define FMDI2 5
12431 +-#define FMDC 3
12432 +- {quick_input, 3, 64, 6, FMDY, "", 58, 0,
12433 +- 0, 0, "input2"},
12434 +-#define FMDI0 6
12435 +- {quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, "ql"},
12436 +-#define FMBRGT 7
12437 +- {quick_button, 42, 64, 9, FMDY, N_("&Cancel"), 0, B_CANCEL, 0, 0,
12438 +- "cancel"},
12439 +-#undef SKIP
12440 ++#ifdef HAVE_CHARSET
12441 ++ #define Y_OK 12
12442 ++#else
12443 ++ #define Y_OK 9
12444 ++#endif
12445 ++
12446 + #ifdef WITH_BACKGROUND
12447 +-# define SKIP 5
12448 +-# define FMCB21 11
12449 +-# define FMCB22 10
12450 +-# define FMBLFT 9
12451 +-# define FMBMID 8
12452 +- {quick_button, 25, 64, 9, FMDY, N_("&Background"), 0, B_USER, 0, 0,
12453 +- "back"},
12454 +-#else /* WITH_BACKGROUND */
12455 +-# define SKIP 4
12456 +-# define FMCB21 10
12457 +-# define FMCB22 9
12458 +-# define FMBLFT 8
12459 +-# undef FMBMID
12460 +-#endif
12461 +- {quick_button, 14, 64, 9, FMDY, N_("&OK"), 0, B_ENTER, 0, 0, "ok"},
12462 +- {quick_checkbox, 42, 64, 8, FMDY, N_("&Stable Symlinks"), 0, 0,
12463 +- 0 /* &file_mask_stable_symlinks */ , 0, "stab-sym"},
12464 +- {quick_checkbox, 31, 64, 7, FMDY, N_("&Dive into subdir if exists"), 0,
12465 +- 0,
12466 +- 0 /* &dive_into_subdirs */ , 0, "dive"},
12467 +- NULL_QuickWidget
12468 ++ #define ADD 0
12469 ++#else
12470 ++ #define ADD -1
12471 ++#endif
12472 ++
12473 ++ #define FM_STAB_SYM 0
12474 ++ #define FM_DIVE_INTO_SUBDIR 1
12475 ++ #define FM_PRES_ATTR 2
12476 ++ #define FM_FOLLOW_LINKS 3
12477 ++ #define FM_DST_INPUT 4
12478 ++ #define FM_DST_TITLE 5
12479 ++ #define FM_USING_SHELL_PATT 6
12480 ++ #define FM_SRC_INPUT 7
12481 ++ #define FM_SRC_TITLE 8
12482 ++ #define FM_CANCEL 9
12483 ++#ifdef WITH_BACKGROUND
12484 ++ #define FM_BKGND 10
12485 ++#endif
12486 ++ #define FM_OK 11+ADD
12487 ++#ifdef HAVE_CHARSET
12488 ++ #define FM_TO_CODEPAGE 12+ADD
12489 ++ #define FM_FROM_CODEPAGE 13+ADD
12490 ++ #define FM_RECODE_TITLE 14+ADD
12491 ++ #define FM_RECODE_ARROW 15+ADD
12492 ++#endif // HAVE_CHARSET
12493 ++
12494 ++
12495 ++#ifdef HAVE_CHARSET
12496 ++ #define SKIP 10
12497 ++ #define B_FROM B_USER+1
12498 ++ #define B_TO B_USER+2
12499 ++#else
12500 ++ #define SKIP 10
12501 ++#endif
12502 ++
12503 ++ {quick_checkbox, 42,64, 8, FMDY, N_("&Stable Symlinks"),0,0,0,0,"stab-sym"},
12504 ++ {quick_checkbox, 31,64, 7, FMDY, N_("&Dive into subdir if exists"),0,0,0,0,"dive"},
12505 ++ {quick_checkbox, 3, 64, 8, FMDY, N_("preserve &Attributes"),9,0,0,0,"preserve"},
12506 ++ {quick_checkbox, 3, 64, 7, FMDY, N_("follow &Links"),7,0,0,0,"follow"},
12507 ++ {quick_input, 3, 64, 6, FMDY, "", 58, 0, 0, 0, "input2"},
12508 ++ {quick_label, 3, 64, 5, FMDY, N_("to:"), 0, 0, 0, 0, "to"},
12509 ++ {quick_checkbox, 37,64, 4, FMDY, N_("&Using shell patterns"),0,0, 0,0,"us-sh"},
12510 ++ {quick_input, 3, 64, 3, FMDY, "", 58, 0, 0, 0, "input-def"},
12511 ++ {quick_label, 3, 64, 2, FMDY, "", 0, 0, 0, 0, "ql"},
12512 ++ {quick_button, 42,64, Y_OK, FMDY, N_("&Cancel"), 0, B_CANCEL, 0,0, "cancel"},
12513 ++#ifdef WITH_BACKGROUND
12514 ++ {quick_button, 25,64, Y_OK, FMDY, N_("&Background"), 0, B_USER, 0,0, "back"},
12515 ++#endif
12516 ++ {quick_button, 14,64, Y_OK, FMDY, N_("&OK"), 0, B_ENTER, 0, 0, "ok"},
12517 ++#ifdef HAVE_CHARSET
12518 ++ {quick_button, 46,64, 10, FMDY,"to codepage", 0, B_TO, 0, 0, "ql"},
12519 ++ {quick_button, 25,64, 10, FMDY, "from codepage", 0, B_FROM, 0, 0, "ql"},
12520 ++ {quick_label, 3, 64, 10, FMDY, N_("Recode file names:"), 0, 0, 0, 0, "ql"},
12521 ++ {quick_label, 42,64, 10, FMDY, "->", 0, 0, 0, 0, "ql"},
12522 ++#endif
12523 ++ {0}
12524 + };
12525 +
12526 + static int
12527 +@@ -806,48 +832,48 @@
12528 + if (fmd_widgets[i].text[0] != '\0')
12529 + fmd_widgets[i].text = _(fmd_widgets[i].text);
12530 +
12531 +- len = mbstrlen (fmd_widgets[FMCB11].text)
12532 +- + mbstrlen (fmd_widgets[FMCB21].text) + 15;
12533 ++ len = mbstrlen (fmd_widgets[FM_FOLLOW_LINKS].text)
12534 ++ + mbstrlen (fmd_widgets[FM_DIVE_INTO_SUBDIR].text) + 15;
12535 + fmd_xlen = max (fmd_xlen, len);
12536 +
12537 +- len = mbstrlen (fmd_widgets[FMCB12].text)
12538 +- + mbstrlen (fmd_widgets[FMCB22].text) + 15;
12539 ++ len = mbstrlen (fmd_widgets[FM_PRES_ATTR].text)
12540 ++ + mbstrlen (fmd_widgets[FM_STAB_SYM].text) + 15;
12541 + fmd_xlen = max (fmd_xlen, len);
12542 +
12543 +- len = mbstrlen (fmd_widgets[FMBRGT].text)
12544 +- + mbstrlen (fmd_widgets[FMBLFT].text) + 11;
12545 ++ len = mbstrlen (fmd_widgets[FM_CANCEL].text)
12546 ++ + mbstrlen (fmd_widgets[FM_OK].text) + 11;
12547 +
12548 +-#ifdef FMBMID
12549 +- len += mbstrlen (fmd_widgets[FMBMID].text) + 6;
12550 ++#ifdef FM_BKGND
12551 ++ len += mbstrlen (fmd_widgets[FM_BKGND].text) + 6;
12552 + #endif
12553 +
12554 + fmd_xlen = max (fmd_xlen, len + 4);
12555 +
12556 + len = (fmd_xlen - (len + 6)) / 2;
12557 +- i = fmd_widgets[FMBLFT].relative_x = len + 3;
12558 +- i += mbstrlen (fmd_widgets[FMBLFT].text) + 8;
12559 ++ i = fmd_widgets[FM_OK].relative_x = len + 3;
12560 ++ i += mbstrlen (fmd_widgets[FM_OK].text) + 8;
12561 +
12562 +-#ifdef FMBMID
12563 +- fmd_widgets[FMBMID].relative_x = i;
12564 +- i += mbstrlen (fmd_widgets[FMBMID].text) + 6;
12565 ++#ifdef FM_BKGND
12566 ++ fmd_widgets[FM_BKGND].relative_x = i;
12567 ++ i += mbstrlen (fmd_widgets[FM_BKGND].text) + 6;
12568 + #endif
12569 +
12570 +- fmd_widgets[FMBRGT].relative_x = i;
12571 ++ fmd_widgets[FM_CANCEL].relative_x = i;
12572 +
12573 + #define chkbox_xpos(i) \
12574 + fmd_widgets [i].relative_x = fmd_xlen - mbstrlen (fmd_widgets [i].text) - 6
12575 +
12576 +- chkbox_xpos (FMCB0);
12577 +- chkbox_xpos (FMCB21);
12578 +- chkbox_xpos (FMCB22);
12579 ++ chkbox_xpos (FM_USING_SHELL_PATT);
12580 ++ chkbox_xpos (FM_DIVE_INTO_SUBDIR);
12581 ++ chkbox_xpos (FM_STAB_SYM);
12582 +
12583 + if (fmd_xlen != FMD_XLEN) {
12584 + i = sizeof (fmd_widgets) / sizeof (fmd_widgets[0]) - 1;
12585 + while (i--)
12586 + fmd_widgets[i].x_divisions = fmd_xlen;
12587 +
12588 +- fmd_widgets[FMDI1].hotkey_pos =
12589 +- fmd_widgets[FMDI2].hotkey_pos = fmd_xlen - 6;
12590 ++ fmd_widgets[FM_SRC_INPUT].hotkey_pos =
12591 ++ fmd_widgets[FM_DST_INPUT].hotkey_pos = fmd_xlen - 6;
12592 + }
12593 + #undef chkbox_xpos
12594 +
12595 +@@ -867,6 +893,9 @@
12596 + int val;
12597 + QuickDialog Quick_input;
12598 + char *def_text;
12599 ++#ifdef HAVE_CHARSET
12600 ++ char *errmsg;
12601 ++#endif
12602 + g_return_val_if_fail (ctx != NULL, NULL);
12603 +
12604 + def_text = g_strdup(def_text_orig);
12605 +@@ -884,10 +913,11 @@
12606 +
12607 + /* Set up the result pointers */
12608 +
12609 +- fmd_widgets[FMCB12].result = &ctx->op_preserve;
12610 +- fmd_widgets[FMCB11].result = &ctx->follow_links;
12611 +- fmd_widgets[FMCB22].result = &ctx->stable_symlinks;
12612 +- fmd_widgets[FMCB21].result = &ctx->dive_into_subdirs;
12613 ++ fmd_widgets[FM_PRES_ATTR].result = &ctx->op_preserve;
12614 ++ fmd_widgets[FM_FOLLOW_LINKS].result = &ctx->follow_links;
12615 ++ fmd_widgets[FM_STAB_SYM].result = &ctx->stable_symlinks;
12616 ++ fmd_widgets[FM_DIVE_INTO_SUBDIR].result = &ctx->dive_into_subdirs;
12617 ++
12618 +
12619 + /* filter out a possible password from def_text */
12620 + def_text_secure = strip_password (g_strdup (def_text), 1);
12621 +@@ -895,8 +925,9 @@
12622 + /* Create the dialog */
12623 +
12624 + ctx->stable_symlinks = 0;
12625 +- fmd_widgets[FMDC].result = &source_easy_patterns;
12626 +- fmd_widgets[FMDI1].text = easy_patterns ? "*" : "^\\(.*\\)$";
12627 ++ fmd_widgets[FM_USING_SHELL_PATT].result = &source_easy_patterns;
12628 ++ fmd_widgets[FM_SRC_INPUT].text = easy_patterns ? "*" : "^\\(.*\\)$";
12629 ++
12630 + Quick_input.xlen = fmd_xlen;
12631 + Quick_input.xpos = -1;
12632 + Quick_input.title = op_names[operation];
12633 +@@ -904,19 +935,37 @@
12634 + Quick_input.ylen = FMDY;
12635 + Quick_input.i18n = 1;
12636 + Quick_input.widgets = fmd_widgets;
12637 +- fmd_widgets[FMDI0].text = text;
12638 +- fmd_widgets[FMDI2].text = def_text_secure;
12639 +- fmd_widgets[FMDI2].str_result = &dest_dir;
12640 +- fmd_widgets[FMDI1].str_result = &source_mask;
12641 ++ fmd_widgets[FM_SRC_TITLE].text = text;
12642 ++ fmd_widgets[FM_DST_INPUT].text = def_text_secure;
12643 ++ fmd_widgets[FM_DST_INPUT].str_result = &dest_dir;
12644 ++ fmd_widgets[FM_SRC_INPUT].str_result = &source_mask;
12645 +
12646 + *do_background = 0;
12647 ++
12648 ++#ifdef HAVE_CHARSET
12649 ++ ctx->from_codepage=current_panel->src_codepage;
12650 ++ ctx->to_codepage=left_panel->src_codepage;
12651 ++ if (left_panel) {
12652 ++ ctx->to_codepage=left_panel->src_codepage;
12653 ++ if( (current_panel==left_panel) && right_panel ) ctx->to_codepage=right_panel->src_codepage;
12654 ++ }
12655 ++#endif
12656 ++
12657 + ask_file_mask:
12658 +
12659 ++#ifdef HAVE_CHARSET
12660 ++ if(operation!=OP_COPY && operation!=OP_MOVE) {
12661 ++ ctx->from_codepage=-1;
12662 ++ ctx->to_codepage=-1;
12663 ++ }
12664 ++ fmd_widgets[FM_FROM_CODEPAGE].text=get_codepage_id(ctx->from_codepage);
12665 ++ fmd_widgets[FM_TO_CODEPAGE].text=get_codepage_id(ctx->to_codepage);
12666 ++#endif
12667 ++
12668 + if ((val = quick_dialog_skip (&Quick_input, SKIP)) == B_CANCEL) {
12669 + g_free (def_text_secure);
12670 + return 0;
12671 + }
12672 +- g_free (def_text_secure);
12673 +
12674 + if (ctx->follow_links)
12675 + ctx->stat_func = (mc_stat_fn) mc_stat;
12676 +@@ -938,6 +984,7 @@
12677 + orig_mask = source_mask;
12678 + if (!dest_dir || !*dest_dir) {
12679 + g_free (source_mask);
12680 ++ g_free (def_text_secure);
12681 + g_free(def_text);
12682 + return dest_dir;
12683 + }
12684 +@@ -992,6 +1039,48 @@
12685 + }
12686 + if (val == B_USER)
12687 + *do_background = 1;
12688 ++#ifdef HAVE_CHARSET
12689 ++ if(val == B_FROM) {
12690 ++ if(operation==OP_COPY || operation==OP_MOVE) {
12691 ++ if(display_codepage<=0) {
12692 ++ message( 1, _(" Warning "),
12693 ++ _("To use this feature select your codepage in\n"
12694 ++ "Setup / Display Bits dialog!\n"
12695 ++ "Do not forget to save options." ));
12696 ++ goto ask_file_mask;
12697 ++ }
12698 ++ ctx->from_codepage=select_charset(ctx->from_codepage,0,
12699 ++ _(" Choose \"FROM\" codepage for COPY/MOVE operaion "));
12700 ++ }
12701 ++ else
12702 ++ message(1,"Warning",_("Recoding works only with COPY or MOVE operation"));
12703 ++ goto ask_file_mask;
12704 ++ }
12705 ++ if(val == B_TO) {
12706 ++ if(operation==OP_COPY || operation==OP_MOVE) {
12707 ++ if(display_codepage<=0) {
12708 ++ message( 1, _(" Warning "),
12709 ++ _("To use this feature select your codepage in\n"
12710 ++ "Setup / Display Bits dialog!\n"
12711 ++ "Do not forget to save options." ));
12712 ++ goto ask_file_mask;
12713 ++ }
12714 ++ ctx->to_codepage=select_charset(ctx->to_codepage,0,
12715 ++ _(" Choose \"TO\" codepage for COPY/MOVE operaion "));
12716 ++ }
12717 ++ else
12718 ++ message(1,"Warning",_("Recoding works only with COPY or MOVE operation"));
12719 ++ goto ask_file_mask;
12720 ++ }
12721 ++
12722 ++ errmsg=my_init_tt(ctx->to_codepage,ctx->from_codepage,ctx->tr_table);
12723 ++ if(errmsg) {
12724 ++ my_reset_tt(ctx->tr_table,256);
12725 ++ message( 1, MSG_ERROR, "%s", errmsg);
12726 ++ }
12727 ++#endif
12728 ++
12729 ++ g_free(def_text_secure);
12730 + g_free(def_text);
12731 + return dest_dir;
12732 + }
12733 +diff -urN mc-4.6.1-orig/src/fileopctx.c mc-4.6.1/src/fileopctx.c
12734 +--- mc-4.6.1-orig/src/fileopctx.c 2005-05-27 21:19:18.000000000 +0700
12735 ++++ mc-4.6.1/src/fileopctx.c 2005-07-31 00:01:14.000000000 +0700
12736 +@@ -24,8 +24,12 @@
12737 + #include <unistd.h>
12738 +
12739 + #include "global.h"
12740 +-#include "fileopctx.h"
12741 +
12742 ++#ifdef HAVE_CHARSET
12743 ++#include "recode.h"
12744 ++#endif
12745 ++
12746 ++#include "fileopctx.h"
12747 +
12748 + /**
12749 + * file_op_context_new:
12750 +@@ -52,6 +56,12 @@
12751 + ctx->umask_kill = 0777777;
12752 + ctx->erase_at_end = TRUE;
12753 +
12754 ++#ifdef HAVE_CHARSET
12755 ++ ctx->from_codepage=-1;
12756 ++ ctx->to_codepage=-1;
12757 ++ my_reset_tt(ctx->tr_table,256);
12758 ++#endif
12759 ++
12760 + return ctx;
12761 + }
12762 +
12763 +diff -urN mc-4.6.1-orig/src/fileopctx.h mc-4.6.1/src/fileopctx.h
12764 +--- mc-4.6.1-orig/src/fileopctx.h 2004-10-07 01:06:26.000000000 +0700
12765 ++++ mc-4.6.1/src/fileopctx.h 2005-07-31 00:03:00.000000000 +0700
12766 +@@ -108,6 +108,14 @@
12767 + /* User interface data goes here */
12768 +
12769 + void *ui;
12770 ++
12771 ++#ifdef HAVE_CHARSET
12772 ++ /* Recode data */
12773 ++ int from_codepage, to_codepage;
12774 ++ unsigned char tr_table[256];
12775 ++ unsigned char recode_buf[MC_MAXPATHLEN];
12776 ++#endif
12777 ++
12778 + } FileOpContext;
12779 +
12780 +
12781 +diff -urN mc-4.6.1-orig/src/main.c mc-4.6.1/src/main.c
12782 +--- mc-4.6.1-orig/src/main.c 2005-07-23 23:52:02.000000000 +0700
12783 ++++ mc-4.6.1/src/main.c 2005-07-31 00:08:01.000000000 +0700
12784 +@@ -86,6 +86,7 @@
12785 +
12786 + #ifdef HAVE_CHARSET
12787 + #include "charsets.h"
12788 ++#include "recode.h"
12789 + #endif /* HAVE_CHARSET */
12790 +
12791 + #ifdef USE_VFS
12792 +@@ -102,6 +103,7 @@
12793 + /* The structures for the panels */
12794 + WPanel *left_panel = NULL;
12795 + WPanel *right_panel = NULL;
12796 ++WPanel* ret_panel=NULL;
12797 +
12798 + /* The pointer to the tree */
12799 + WTree *the_tree = NULL;
12800 +@@ -585,6 +587,7 @@
12801 + }
12802 + directory = *new_dir ? new_dir : home_dir;
12803 +
12804 ++ ret_panel=panel;
12805 + if (mc_chdir (directory) == -1) {
12806 + strcpy (panel->cwd, olddir);
12807 + g_free (olddir);
12808 +@@ -798,6 +801,10 @@
12809 + {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
12810 + {' ', N_("&Info C-x i"), 'I', info_cmd},
12811 + {' ', N_("&Tree"), 'T', tree_cmd},
12812 ++#ifdef HAVE_CHARSET
12813 ++ {' ', "", ' ', 0},
12814 ++ {' ', N_("Panel &codepage"), 'C', fnc_l_cmd},
12815 ++#endif
12816 + {' ', "", ' ', 0},
12817 + {' ', N_("&Sort order..."), 'S', sort_cmd},
12818 + {' ', "", ' ', 0},
12819 +@@ -822,6 +829,10 @@
12820 + {' ', N_("&Quick view C-x q"), 'Q', quick_view_cmd},
12821 + {' ', N_("&Info C-x i"), 'I', info_cmd},
12822 + {' ', N_("&Tree"), 'T', tree_cmd},
12823 ++#ifdef HAVE_CHARSET
12824 ++ {' ', "", ' ', 0},
12825 ++ {' ', N_("Panel &codepage"), 'C', fnc_r_cmd},
12826 ++#endif
12827 + {' ', "", ' ', 0},
12828 + {' ', N_("&Sort order..."), 'S', sort_cmd},
12829 + {' ', "", ' ', 0},
12830 +diff -urN mc-4.6.1-orig/src/Makefile.am mc-4.6.1/src/Makefile.am
12831 +--- mc-4.6.1-orig/src/Makefile.am 2005-06-08 19:27:19.000000000 +0700
12832 ++++ mc-4.6.1/src/Makefile.am 2005-07-31 01:30:09.000000000 +0700
12833 +@@ -40,7 +40,8 @@
12834 + mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
12835 + $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV)
12836 +
12837 +-CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
12838 ++CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \
12839 ++ recode.c recode.h
12840 +
12841 + SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \
12842 + chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \
12843 +@@ -55,8 +56,8 @@
12844 + menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
12845 + option.c option.h panel.h panelize.c panelize.h poptalloca.h \
12846 + popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c \
12847 +- profile.c profile.h regex.c rxvt.c screen.c setup.c setup.h \
12848 +- slint.c subshell.c subshell.h textconf.c textconf.h \
12849 ++ profile.c profile.h regex.c rxvt.c screen.c screen.h setup.c \
12850 ++ setup.h slint.c subshell.c subshell.h textconf.c textconf.h \
12851 + tree.c tree.h treestore.c treestore.h tty.h user.c user.h \
12852 + util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
12853 + widget.h win.c win.h wtools.c wtools.h \
12854 +diff -urN mc-4.6.1-orig/src/Makefile.in mc-4.6.1/src/Makefile.in
12855 +--- mc-4.6.1-orig/src/Makefile.in 2005-07-23 23:53:15.000000000 +0700
12856 ++++ mc-4.6.1/src/Makefile.in 2005-07-31 01:47:59.000000000 +0700
12857 +@@ -84,12 +84,12 @@
12858 + mouse.c mouse.h myslang.h option.c option.h panel.h panelize.c \
12859 + panelize.h poptalloca.h popt.c poptconfig.c popt.h popthelp.c \
12860 + poptint.h poptparse.c profile.c profile.h regex.c rxvt.c \
12861 +- screen.c setup.c setup.h slint.c subshell.c subshell.h \
12862 ++ screen.c screen.h setup.c setup.h slint.c subshell.c subshell.h \
12863 + textconf.c textconf.h tree.c tree.h treestore.c treestore.h \
12864 + tty.h user.c user.h util.c util.h utilunix.c view.c view.h \
12865 + vfsdummy.h widget.c widget.h win.c win.h wtools.c wtools.h \
12866 + x11conn.h x11conn.c charsets.c charsets.h selcodepage.c \
12867 +- selcodepage.h
12868 ++ selcodepage.h recode.c recode.h
12869 + am__objects_1 = achown.$(OBJEXT) background.$(OBJEXT) boxes.$(OBJEXT) \
12870 + chmod.$(OBJEXT) chown.$(OBJEXT) cmd.$(OBJEXT) color.$(OBJEXT) \
12871 + command.$(OBJEXT) complete.$(OBJEXT) cons.handler.$(OBJEXT) \
12872 +@@ -109,7 +109,8 @@
12873 + util.$(OBJEXT) utilunix.$(OBJEXT) view.$(OBJEXT) \
12874 + widget.$(OBJEXT) win.$(OBJEXT) wtools.$(OBJEXT) \
12875 + x11conn.$(OBJEXT)
12876 +-am__objects_2 = charsets.$(OBJEXT) selcodepage.$(OBJEXT)
12877 ++am__objects_2 = charsets.$(OBJEXT) selcodepage.$(OBJEXT) recode.$(OBJEXT)
12878 ++
12879 + @CHARSET_FALSE@am_mc_OBJECTS = $(am__objects_1)
12880 + @CHARSET_TRUE@am_mc_OBJECTS = $(am__objects_1) $(am__objects_2)
12881 + mc_OBJECTS = $(am_mc_OBJECTS)
12882 +@@ -342,7 +343,8 @@
12883 + mc_LDADD = $(EDITLIB) $(SLANGLIB) $(VFSLIB) \
12884 + $(INTLLIBS) $(GLIB_LIBS) $(MCLIBS) $(LIBICONV)
12885 +
12886 +-CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h
12887 ++CHARSET_SRC = charsets.c charsets.h selcodepage.c selcodepage.h \
12888 ++ recode.c recode.h
12889 + SRCS = achown.c achown.h background.c background.h boxes.c boxes.h \
12890 + chmod.c chmod.h chown.c chown.h cmd.c cmd.h color.c color.h \
12891 + command.c command.h complete.c complete.h cons.handler.c \
12892 +@@ -356,8 +358,8 @@
12893 + menu.c menu.h mountlist.c mountlist.h mouse.c mouse.h myslang.h \
12894 + option.c option.h panel.h panelize.c panelize.h poptalloca.h \
12895 + popt.c poptconfig.c popt.h popthelp.c poptint.h poptparse.c \
12896 +- profile.c profile.h regex.c rxvt.c screen.c setup.c setup.h \
12897 +- slint.c subshell.c subshell.h textconf.c textconf.h \
12898 ++ profile.c profile.h regex.c rxvt.c screen.c screen.h setup.c \
12899 ++ setup.h slint.c subshell.c subshell.h textconf.c textconf.h \
12900 + tree.c tree.h treestore.c treestore.h tty.h user.c user.h \
12901 + util.c util.h utilunix.c view.c view.h vfsdummy.h widget.c \
12902 + widget.h win.c win.h wtools.c wtools.h \
12903 +diff -urN mc-4.6.1-orig/src/panel.h mc-4.6.1/src/panel.h
12904 +--- mc-4.6.1-orig/src/panel.h 2004-08-29 23:55:51.000000000 +0700
12905 ++++ mc-4.6.1/src/panel.h 2005-07-31 00:12:04.000000000 +0700
12906 +@@ -71,6 +71,19 @@
12907 +
12908 + int searching;
12909 + char search_buffer [256];
12910 ++
12911 ++#ifdef HAVE_CHARSET
12912 ++ int src_codepage;
12913 ++ unsigned char tr_table[256], tr_table_input[256];
12914 ++#endif
12915 ++
12916 ++#ifdef USE_VFS
12917 ++ #ifdef HAVE_CHARSET
12918 ++ int ret_codepage;
12919 ++ #endif
12920 ++ int is_return;
12921 ++ char retdir[MC_MAXPATHLEN];
12922 ++#endif
12923 + } WPanel;
12924 +
12925 + WPanel *panel_new (const char *panel_name);
12926 +@@ -96,6 +109,7 @@
12927 + extern WPanel *left_panel;
12928 + extern WPanel *right_panel;
12929 + extern WPanel *current_panel;
12930 ++extern WPanel* ret_panel;
12931 +
12932 + void try_to_select (WPanel *panel, const char *name);
12933 +
12934 +diff -urN mc-4.6.1-orig/src/recode.c mc-4.6.1/src/recode.c
12935 +--- mc-4.6.1-orig/src/recode.c 1970-01-01 07:00:00.000000000 +0700
12936 ++++ mc-4.6.1/src/recode.c 2005-07-31 02:39:42.000000000 +0700
12937 +@@ -0,0 +1,153 @@
12938 ++#include "recode.h"
12939 ++#ifdef HAVE_CHARSET
12940 ++
12941 ++char *lang;
12942 ++char lang_codepage_name[256];
12943 ++int lang_codepage;
12944 ++
12945 ++int ftp_codepage=-1;
12946 ++
12947 ++// recode buffer for displaying file names
12948 ++unsigned char recode_buf[MC_MAXPATHLEN];
12949 ++
12950 ++WPanel* recode_panel;
12951 ++
12952 ++//--- get codepage from $LANG
12953 ++void get_locale_codepage() {
12954 ++ char* a;
12955 ++ char* b;
12956 ++ int len;
12957 ++
12958 ++ lang=getenv("LANG");
12959 ++ if(!lang) {
12960 ++ strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
12961 ++ lang_codepage=-1;
12962 ++ return;
12963 ++ }
12964 ++
12965 ++ a=strchr(lang,'.');
12966 ++ if(!a) {
12967 ++ strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
12968 ++ lang_codepage=-1;
12969 ++ return;
12970 ++ }
12971 ++ ++a;
12972 ++
12973 ++ b=strchr(lang,'@');
12974 ++ if(!b) b=lang+strlen(lang);
12975 ++
12976 ++ len=b-a;
12977 ++ if(len>=sizeof(lang_codepage_name)) len=sizeof(lang_codepage_name)-1;
12978 ++
12979 ++ memcpy(lang_codepage_name,a, len);
12980 ++ lang_codepage_name[len]='\0';
12981 ++ lang_codepage=get_codepage_index(lang_codepage_name);
12982 ++ if(lang_codepage<0) strncpy(lang_codepage_name,OTHER_8BIT, sizeof(OTHER_8BIT));
12983 ++}
12984 ++
12985 ++//--- reset translation table
12986 ++void my_reset_tt(unsigned char *table,int n) {
12987 ++ int i;
12988 ++ for(i=0;i<n;i++) table[i]=i;
12989 ++}
12990 ++
12991 ++//--- reset panel codepage
12992 ++void panel_reset_codepage(WPanel *p) {
12993 ++ p->src_codepage=-1;
12994 ++ my_reset_tt(p->tr_table,256);
12995 ++ my_reset_tt(p->tr_table_input,256);
12996 ++}
12997 ++
12998 ++//--- Initialize translation table
12999 ++// i need this function because init_translation_table from
13000 ++// charsets.c fills only fixed translation tables conv_displ and conv_input
13001 ++//---
13002 ++char* my_init_tt( int from, int to, unsigned char *table) {
13003 ++ int i;
13004 ++ iconv_t cd;
13005 ++ char *cpfrom, *cpto;
13006 ++
13007 ++ if(from < 0 || to < 0 || from == to) {
13008 ++ my_reset_tt(table,256);
13009 ++ return NULL;
13010 ++ }
13011 ++ my_reset_tt(table,128);
13012 ++ cpfrom=codepages[from ].id;
13013 ++ cpto=codepages[to].id;
13014 ++ cd=iconv_open(cpfrom, cpto);
13015 ++ if(cd==(iconv_t)-1) {
13016 ++ snprintf(errbuf, 255, _("Cannot translate from %s to %s"), cpfrom, cpto);
13017 ++ return errbuf;
13018 ++ }
13019 ++ for(i=128; i<=255; ++i) table[i] = translate_character(cd, i);
13020 ++ iconv_close(cd);
13021 ++ return NULL;
13022 ++}
13023 ++
13024 ++//--- Translate string from one codepage to another
13025 ++void my_translate_string(unsigned char *s1,int l1, unsigned char *s2, unsigned char *table) {
13026 ++ int i=0;
13027 ++ if(!s1) return;
13028 ++ while(i<l1) {
13029 ++ s2[i]=table[s1[i]];
13030 ++ i++;
13031 ++ }
13032 ++ s2[i]=0;
13033 ++}
13034 ++
13035 ++//--- Recode filename and concat in to dir
13036 ++char* concat_dir_and_recoded_fname(const char *dir, const char *fname, FileOpContext *ctx) {
13037 ++ int i = strlen (dir);
13038 ++
13039 ++ my_translate_string((unsigned char*)fname,strlen(fname),ctx->recode_buf,ctx->tr_table);
13040 ++ if (dir [i-1] == PATH_SEP)
13041 ++ return g_strconcat (dir, ctx->recode_buf, NULL);
13042 ++ else
13043 ++ return g_strconcat (dir, PATH_SEP_STR, ctx->recode_buf, NULL);
13044 ++ return 0;
13045 ++}
13046 ++
13047 ++
13048 ++//--- Internal handler for "Panel codepage"
13049 ++static void fnc_cmd(WPanel *p) {
13050 ++ char *errmsg;
13051 ++ if(display_codepage > 0) {
13052 ++ p->src_codepage=select_charset(p->src_codepage, 0, _(" Choose panel codepage "));
13053 ++ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
13054 ++ if(errmsg) {
13055 ++ panel_reset_codepage(p);
13056 ++ message( 1, MSG_ERROR, "%s", errmsg);
13057 ++ }
13058 ++ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
13059 ++ if (errmsg) {
13060 ++ panel_reset_codepage(p);
13061 ++ message( 1, MSG_ERROR, "%s", errmsg );
13062 ++ }
13063 ++ paint_dir(p);
13064 ++ show_dir(p);
13065 ++ display_mini_info(p);
13066 ++ }
13067 ++ else {
13068 ++ message( 1, _(" Warning "),
13069 ++ _("To use this feature select your codepage in\n"
13070 ++ "Setup / Display Bits dialog!\n"
13071 ++ "Do not forget to save options." ));
13072 ++ }
13073 ++}
13074 ++
13075 ++//--- Menu handlers for "Panel codepage" for left and right panel menu
13076 ++
13077 ++void fnc_l_cmd() {
13078 ++ fnc_cmd(left_panel);
13079 ++}
13080 ++
13081 ++void fnc_r_cmd() {
13082 ++ fnc_cmd(right_panel);
13083 ++}
13084 ++
13085 ++//--- screen handler for "Panel codepage"
13086 ++void fnc_c_cmd(WPanel *panel) {
13087 ++ fnc_cmd(current_panel);
13088 ++}
13089 ++
13090 ++#endif //HAVE_CHARSET
13091 +diff -urN mc-4.6.1-orig/src/recode.h mc-4.6.1/src/recode.h
13092 +--- mc-4.6.1-orig/src/recode.h 1970-01-01 07:00:00.000000000 +0700
13093 ++++ mc-4.6.1/src/recode.h 2005-07-31 02:39:13.000000000 +0700
13094 +@@ -0,0 +1,48 @@
13095 ++#ifndef __RECODE_H__
13096 ++#define __RECODE_H__
13097 ++#include <config.h>
13098 ++#ifdef HAVE_CHARSET
13099 ++
13100 ++#include <stdio.h>
13101 ++#include <locale.h>
13102 ++#include <iconv.h>
13103 ++
13104 ++#include "global.h"
13105 ++#include "wtools.h"
13106 ++#include "panel.h"
13107 ++#include "charsets.h"
13108 ++#include "selcodepage.h"
13109 ++#include "screen.h"
13110 ++#include "main.h"
13111 ++#include "fileopctx.h"
13112 ++
13113 ++extern char *lang;
13114 ++extern char lang_codepage_name[256];
13115 ++extern int lang_codepage;
13116 ++
13117 ++extern int ftp_codepage;
13118 ++
13119 ++// recode buffer for displaying file names
13120 ++extern unsigned char recode_buf[MC_MAXPATHLEN];
13121 ++extern WPanel* recode_panel;
13122 ++
13123 ++//--- get codepage from $LANG
13124 ++extern void get_locale_codepage();
13125 ++
13126 ++//--- reset translation table
13127 ++extern void my_reset_tt(unsigned char *table,int n);
13128 ++//--- reset panel codepage
13129 ++extern void panel_reset_codepage(WPanel *p);
13130 ++//--- Initialize translation table
13131 ++extern char* my_init_tt( int from, int to, unsigned char *table);
13132 ++//--- Translate string from one codepage to another
13133 ++extern void my_translate_string(unsigned char *s1,int l1, unsigned char *s2, unsigned char *table);
13134 ++//--- Recode filename and concat in to dir
13135 ++extern char* concat_dir_and_recoded_fname(const char *dir, const char *fname, FileOpContext *ctx);
13136 ++//--- handlers for "Panel codepage"
13137 ++extern void fnc_l_cmd();
13138 ++extern void fnc_r_cmd();
13139 ++extern void fnc_c_cmd(WPanel *panel);
13140 ++
13141 ++#endif // HAVE_CHARSET
13142 ++#endif //__RECODE_H__
13143 +diff -urN mc-4.6.1-orig/src/screen.c mc-4.6.1/src/screen.c
13144 +--- mc-4.6.1-orig/src/screen.c 2006-06-13 00:21:48.000000000 +0700
13145 ++++ mc-4.6.1/src/screen.c 2006-06-13 00:42:17.000000000 +0700
13146 +@@ -48,6 +48,10 @@
13147 + #define WANT_WIDGETS
13148 + #include "main.h" /* the_menubar */
13149 +
13150 ++#ifdef HAVE_CHARSET
13151 ++#include "recode.h"
13152 ++#endif
13153 ++
13154 + #define ELEMENTS(arr) ( sizeof(arr) / sizeof((arr)[0]) )
13155 +
13156 + #define J_LEFT 1
13157 +@@ -170,6 +174,7 @@
13158 + string_file_name (file_entry *fe, int len)
13159 + {
13160 + size_t i;
13161 ++ char* filename;
13162 + #ifdef UTF8
13163 + static char buffer [BUF_SMALL * 4];
13164 + mbstate_t s;
13165 +@@ -181,6 +186,13 @@
13166 + static char buffer [BUF_SMALL];
13167 + #endif
13168 +
13169 ++#ifdef HAVE_CHARSET
13170 ++ my_translate_string(fe->fname,fe->fnamelen, recode_buf, recode_panel->tr_table);
13171 ++ filename= recode_buf;
13172 ++#else
13173 ++ filename=fe->fname;
13174 ++#endif
13175 ++
13176 + #ifdef UTF8
13177 + if (SLsmg_Is_Unicode)
13178 + for (i = 0; i < sizeof (buffer) - 1; i++) {
13179 +@@ -212,7 +224,7 @@
13180 + for (i = 0; i < sizeof(buffer) - 1; i++) {
13181 + char c;
13182 +
13183 +- c = fe->fname[i];
13184 ++ c= filename[i];
13185 +
13186 + if (!c)
13187 + break;
13188 +@@ -698,6 +710,10 @@
13189 + int second_column = 0;
13190 + int width, offset;
13191 +
13192 ++#ifdef HAVE_CHARSET
13193 ++ recode_panel=panel;
13194 ++#endif
13195 ++
13196 + offset = 0;
13197 + if (!isstatus && panel->split){
13198 +
13199 +@@ -737,7 +753,7 @@
13200 + }
13201 + }
13202 +
13203 +-static void
13204 ++void
13205 + display_mini_info (WPanel *panel)
13206 + {
13207 + if (!show_mini_info)
13208 +@@ -798,7 +814,7 @@
13209 + return;
13210 + }
13211 +
13212 +-static void
13213 ++void
13214 + paint_dir (WPanel *panel)
13215 + {
13216 + int i;
13217 +@@ -836,7 +852,7 @@
13218 + #endif /* !HAVE_SLANG */
13219 + }
13220 +
13221 +-static void
13222 ++void
13223 + show_dir (WPanel *panel)
13224 + {
13225 + char *tmp;
13226 +@@ -864,8 +880,15 @@
13227 + tmp = g_malloc (panel->widget.cols + 1);
13228 + tmp[panel->widget.cols] = '\0';
13229 +
13230 ++#ifdef HAVE_CHARSET
13231 ++ my_translate_string(panel->cwd,strlen(panel->cwd),recode_buf, panel->tr_table);
13232 ++ trim (strip_home_and_password (recode_buf), tmp,
13233 ++ min (max (panel->widget.cols - 7, 0), panel->widget.cols) );
13234 ++#else
13235 + trim (strip_home_and_password (panel->cwd), tmp,
13236 + min (max (panel->widget.cols - 7, 0), panel->widget.cols) );
13237 ++#endif
13238 ++
13239 + addstr (tmp);
13240 + g_free (tmp);
13241 + widget_move (&panel->widget, 0, 1);
13242 +@@ -1077,6 +1100,17 @@
13243 + mc_get_current_wd (panel->cwd, sizeof (panel->cwd) - 2);
13244 + strcpy (panel->lwd, ".");
13245 +
13246 ++#ifdef HAVE_CHARSET
13247 ++ panel_reset_codepage(panel);
13248 ++#endif
13249 ++
13250 ++#ifdef USE_VFS
13251 ++ panel->is_return=0;
13252 ++ #ifdef HAVE_CHARSET
13253 ++ panel->ret_codepage=-1;
13254 ++ #endif
13255 ++#endif
13256 ++
13257 + panel->hist_name = g_strconcat ("Dir Hist ", panel_name, (char *) NULL);
13258 + panel->dir_history = history_get (panel->hist_name);
13259 + directory_history_add (panel, panel->cwd);
13260 +@@ -2234,7 +2268,12 @@
13261 + { XCTRL('n'), move_down }, /* C-n like emacs */
13262 + { XCTRL('s'), start_search }, /* C-s like emacs */
13263 + { ALT('s'), start_search }, /* M-s not like emacs */
13264 ++#ifndef HAVE_CHARSET
13265 + { XCTRL('t'), mark_file },
13266 ++#endif
13267 ++#ifdef HAVE_CHARSET
13268 ++ { XCTRL('t'), mark_file }, /* was 'fnc_c_cmd' */
13269 ++#endif
13270 + { ALT('o'), chdir_other_panel },
13271 + { ALT('l'), chdir_to_readlink },
13272 + { ALT('H'), directory_history_list },
13273 +diff -urN mc-4.6.1-orig/src/screen.h mc-4.6.1/src/screen.h
13274 +--- mc-4.6.1-orig/src/screen.h 1970-01-01 07:00:00.000000000 +0700
13275 ++++ mc-4.6.1/src/screen.h 2005-07-31 00:26:59.000000000 +0700
13276 +@@ -0,0 +1,11 @@
13277 ++#ifndef __SCREEN_H__
13278 ++#define __SCREEN_H__
13279 ++#include <config.h>
13280 ++
13281 ++#include "global.h"
13282 ++
13283 ++extern void paint_dir (WPanel *panel);
13284 ++extern void display_mini_info (WPanel *panel);
13285 ++extern void show_dir(WPanel *panel);
13286 ++#endif //__SCREEN_H__
13287 ++
13288 +diff -urN mc-4.6.1-orig/src/selcodepage.c mc-4.6.1/src/selcodepage.c
13289 +--- mc-4.6.1-orig/src/selcodepage.c 2005-05-27 21:19:18.000000000 +0700
13290 ++++ mc-4.6.1/src/selcodepage.c 2005-07-31 00:31:43.000000000 +0700
13291 +@@ -44,14 +44,16 @@
13292 + }
13293 +
13294 + int
13295 +-select_charset (int current_charset, int seldisplay)
13296 ++select_charset (int current_charset, int seldisplay, const char *title)
13297 + {
13298 ++ int new_charset;
13299 ++
13300 + int i, menu_lines = n_codepages + 1;
13301 + char buffer[255];
13302 +
13303 + /* Create listbox */
13304 + Listbox *listbox = create_listbox_window (ENTRY_LEN + 2, menu_lines,
13305 +- _(" Choose input codepage "),
13306 ++ title,
13307 + "[Codepages Translation]");
13308 +
13309 + if (!seldisplay)
13310 +@@ -81,20 +83,26 @@
13311 +
13312 + i = run_listbox (listbox);
13313 +
13314 +- return (seldisplay) ? ((i >= n_codepages) ? -1 : i)
13315 +- : (i - 1);
13316 ++ if(i==-1)
13317 ++ i = (seldisplay)
13318 ++ ? ((current_charset < 0) ? n_codepages : current_charset)
13319 ++ : (current_charset + 1);
13320 ++
13321 ++ new_charset =(seldisplay) ? ( (i >= n_codepages) ? -1 : i ) : ( i-1 );
13322 ++ new_charset = (new_charset==-2) ? current_charset:new_charset;
13323 ++ return new_charset;
13324 + }
13325 +
13326 + /* Helper functions for codepages support */
13327 +
13328 +
13329 + int
13330 +-do_select_codepage (void)
13331 ++do_select_codepage (const char *title)
13332 + {
13333 + const char *errmsg;
13334 +
13335 + if (display_codepage > 0) {
13336 +- source_codepage = select_charset (source_codepage, 0);
13337 ++ source_codepage = select_charset (source_codepage, 0, title);
13338 + errmsg =
13339 + init_translation_table (source_codepage, display_codepage);
13340 + if (errmsg) {
13341 +diff -urN mc-4.6.1-orig/src/selcodepage.h mc-4.6.1/src/selcodepage.h
13342 +--- mc-4.6.1-orig/src/selcodepage.h 2002-10-31 05:16:16.000000000 +0600
13343 ++++ mc-4.6.1/src/selcodepage.h 2005-07-31 00:31:33.000000000 +0700
13344 +@@ -2,8 +2,8 @@
13345 + #ifndef __SELCODEPAGE_H__
13346 + #define __SELCODEPAGE_H__
13347 +
13348 +-int select_charset (int current_charset, int seldisplay);
13349 +-int do_select_codepage (void);
13350 ++int select_charset (int current_charset, int seldisplay, const char *title);
13351 ++int do_select_codepage (const char *title);
13352 +
13353 + #endif /* __SELCODEPAGE_H__ */
13354 + #endif /* HAVE_CHARSET */
13355 +diff -urN mc-4.6.1-orig/src/setup.c mc-4.6.1/src/setup.c
13356 +--- mc-4.6.1-orig/src/setup.c 2005-05-27 21:19:18.000000000 +0700
13357 ++++ mc-4.6.1/src/setup.c 2005-07-31 00:36:33.000000000 +0700
13358 +@@ -47,6 +47,8 @@
13359 +
13360 + #ifdef HAVE_CHARSET
13361 + #include "charsets.h"
13362 ++#include"recode.h"
13363 ++#include "wtools.h"
13364 + #endif
13365 +
13366 + #ifdef USE_NETCODE
13367 +@@ -255,6 +257,11 @@
13368 + g_snprintf (buffer, sizeof (buffer), "%d", panel->user_mini_status);
13369 + save_string (section, "user_mini_status", buffer,
13370 + profile_name);
13371 ++
13372 ++#ifdef HAVE_CHARSET
13373 ++ // save panel codepage
13374 ++ save_string(section, "panel_display_codepage", get_codepage_id(panel->src_codepage), profile_name);
13375 ++#endif
13376 + }
13377 +
13378 + void
13379 +@@ -352,6 +359,7 @@
13380 + #ifdef HAVE_CHARSET
13381 + save_string( "Misc", "display_codepage",
13382 + get_codepage_id( display_codepage ), profile_name );
13383 ++ save_string( "Misc", "ftp_codepage", get_codepage_id(ftp_codepage), profile_name);
13384 + #endif /* HAVE_CHARSET */
13385 +
13386 + g_free (profile);
13387 +@@ -401,6 +409,31 @@
13388 + panel->user_mini_status =
13389 + load_int (section, "user_mini_status", 0);
13390 +
13391 ++#ifdef HAVE_CHARSET
13392 ++//--- Loading panel codepage
13393 ++ panel_reset_codepage(panel);
13394 ++ if(load_codepages_list()>0) {
13395 ++ char cpname[128];
13396 ++ char *errmsg;
13397 ++
13398 ++
13399 ++ if(display_codepage>=0) {
13400 ++ load_string(section, "panel_display_codepage", "", cpname, sizeof(cpname));
13401 ++ if(cpname[0]!='\0') panel->src_codepage = get_codepage_index(cpname);
13402 ++ }
13403 ++
13404 ++ errmsg=my_init_tt(display_codepage,panel->src_codepage,panel->tr_table);
13405 ++ if(errmsg) {
13406 ++ panel_reset_codepage(panel);
13407 ++ message( 1, MSG_ERROR, "%s", errmsg );
13408 ++ }
13409 ++ errmsg=my_init_tt(panel->src_codepage,display_codepage,panel->tr_table_input);
13410 ++ if(errmsg) {
13411 ++ panel_reset_codepage(panel);
13412 ++ message( 1, MSG_ERROR, "%s", errmsg );
13413 ++ }
13414 ++ }
13415 ++#endif
13416 + }
13417 +
13418 + static void
13419 +@@ -543,12 +576,18 @@
13420 + #endif /* USE_VFS && USE_NETCODE */
13421 +
13422 + #ifdef HAVE_CHARSET
13423 +- if ( load_codepages_list() > 0 ) {
13424 +- char cpname[128];
13425 +- load_string( "Misc", "display_codepage", "",
13426 +- cpname, sizeof(cpname) );
13427 +- if ( cpname[0] != '\0' )
13428 +- display_codepage = get_codepage_index( cpname );
13429 ++ if(load_codepages_list() > 0) {
13430 ++ char cpname[128];
13431 ++ get_locale_codepage();
13432 ++ load_string("Misc", "display_codepage", "", cpname, sizeof(cpname));
13433 ++ if(cpname[0] != '\0') display_codepage=get_codepage_index(cpname);
13434 ++ else display_codepage=lang_codepage;
13435 ++
13436 ++ ftp_codepage=-1;
13437 ++ if(display_codepage >= 0) {
13438 ++ load_string( "Misc", "ftp_codepage", "", cpname, sizeof(cpname));
13439 ++ if(cpname[0] != '\0') ftp_codepage=get_codepage_index(cpname);
13440 ++ }
13441 + }
13442 +
13443 + init_translation_table( source_codepage, display_codepage );
13444 +diff -urN mc-4.6.1-orig/src/view.c mc-4.6.1/src/view.c
13445 +--- mc-4.6.1-orig/src/view.c 2005-05-27 21:19:18.000000000 +0700
13446 ++++ mc-4.6.1/src/view.c 2005-07-31 00:37:29.000000000 +0700
13447 +@@ -2534,7 +2534,7 @@
13448 +
13449 + #ifdef HAVE_CHARSET
13450 + case XCTRL ('t'):
13451 +- do_select_codepage ();
13452 ++ do_select_codepage (_(" Choose codepage "));
13453 + view->dirty++;
13454 + view_update (view, TRUE);
13455 + return MSG_HANDLED;
13456 +diff -urN mc-4.6.1-orig/vfs/vfs.c mc-4.6.1/vfs/vfs.c
13457 +--- mc-4.6.1-orig/vfs/vfs.c 2005-05-27 21:19:19.000000000 +0700
13458 ++++ mc-4.6.1/vfs/vfs.c 2005-07-31 00:42:45.000000000 +0700
13459 +@@ -49,6 +49,11 @@
13460 + #include "smbfs.h"
13461 + #include "local.h"
13462 +
13463 ++#include "../src/panel.h"
13464 ++#ifdef HAVE_CHARSET
13465 ++#include "../src/recode.h"
13466 ++#endif
13467 ++
13468 + /* They keep track of the current directory */
13469 + static struct vfs_class *current_vfs;
13470 + static char *current_dir;
13471 +@@ -681,8 +686,66 @@
13472 + vfsid old_vfsid;
13473 + int result;
13474 +
13475 ++#ifdef HAVE_CHARSET
13476 ++ char* errmsg;
13477 ++#endif
13478 ++ WPanel* p=ret_panel;
13479 ++
13480 + new_dir = vfs_canon (path);
13481 + new_vfs = vfs_get_class (new_dir);
13482 ++ old_vfsid = vfs_getid (current_vfs, current_dir);
13483 ++ old_vfs = current_vfs;
13484 ++
13485 ++ if(p) {
13486 ++
13487 ++ // Change from localfs to ftpfs
13488 ++ ret_panel=NULL;
13489 ++ if( (strcmp(old_vfs->name,"localfs")==0) &&
13490 ++ (strcmp(new_vfs->name,"ftpfs")==0)){
13491 ++ p->is_return=1;
13492 ++ strncpy(p->retdir,current_dir, MC_MAXPATHLEN);
13493 ++#ifdef HAVE_CHARSET
13494 ++ p->ret_codepage=p->src_codepage;
13495 ++ p->src_codepage=ftp_codepage;
13496 ++ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
13497 ++ if(errmsg) {
13498 ++ panel_reset_codepage(p);
13499 ++ message( 1, MSG_ERROR, "%s", errmsg );
13500 ++ }
13501 ++ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
13502 ++ if(errmsg) {
13503 ++ panel_reset_codepage(p);
13504 ++ message( 1, MSG_ERROR, "%s", errmsg );
13505 ++ }
13506 ++#endif
13507 ++ }
13508 ++
13509 ++ // Change from ftpfs to localfs
13510 ++ if( (strcmp(old_vfs->name,"ftpfs")==0) &&
13511 ++ (strcmp(new_vfs->name,"localfs")==0) &&
13512 ++ p->is_return){
13513 ++ p->is_return=0;
13514 ++ g_free(new_dir);
13515 ++ new_dir = vfs_canon (p->retdir);
13516 ++ new_vfs = vfs_get_class (new_dir);
13517 ++#ifdef HAVE_CHARSET
13518 ++ p->src_codepage=p->ret_codepage;
13519 ++ errmsg=my_init_tt(display_codepage,p->src_codepage,p->tr_table);
13520 ++ if(errmsg) {
13521 ++ panel_reset_codepage(p);
13522 ++ message( 1, MSG_ERROR, "%s", errmsg );
13523 ++ }
13524 ++ errmsg=my_init_tt(p->src_codepage,display_codepage,p->tr_table_input);
13525 ++ if(errmsg) {
13526 ++ panel_reset_codepage(p);
13527 ++ message( 1, MSG_ERROR, "%s", errmsg );
13528 ++ }
13529 ++#endif
13530 ++ }
13531 ++ }
13532 ++
13533 ++
13534 ++
13535 + if (!new_vfs->chdir) {
13536 + g_free (new_dir);
13537 + return -1;
13538 +@@ -696,9 +759,6 @@
13539 + return -1;
13540 + }
13541 +
13542 +- old_vfsid = vfs_getid (current_vfs, current_dir);
13543 +- old_vfs = current_vfs;
13544 +-
13545 + /* Actually change directory */
13546 + g_free (current_dir);
13547 + current_dir = new_dir;
13548 --- mc-4.6.1.orig/debian/patches/02_debian_syntax.patch
13549 +++ mc-4.6.1/debian/patches/02_debian_syntax.patch
13550 @@ -0,0 +1,118 @@
13551 +diff -urN mc-4.6.0-pre2.orig/syntax/debian-changelog.syntax mc-4.6.0-pre2/syntax/debian-changelog.syntax
13552 +--- mc-4.6.0-pre2.orig/syntax/debian-changelog.syntax 1970-01-01 01:00:00.000000000 +0100
13553 ++++ mc-4.6.0-pre2/syntax/debian-changelog.syntax 2002-12-29 18:11:08.000000000 +0100
13554 +@@ -0,0 +1,20 @@
13555 ++context default
13556 ++
13557 ++ keyword linestart \s\s\* brightcyan/17
13558 ++ keyword linestart \s-- brightred/19
13559 ++ keyword linestart \s\s\s\s\+ cyan/17
13560 ++
13561 ++ keyword <*@*> brightred/19
13562 ++ keyword whole experimental; brightmagenta/magenta
13563 ++ keyword whole unstable; brightmagenta/magenta
13564 ++ keyword whole stable; brightmagenta/magenta
13565 ++ keyword whole urgency=low yellow/24
13566 ++ keyword whole urgency=medium brightgreen/6
13567 ++ keyword whole urgency=high white/25
13568 ++ keyword whole urgency=LOW yellow/24
13569 ++ keyword whole urgency=MEDIUM brightgreen/6
13570 ++ keyword whole urgency=HIGH white/25
13571 ++
13572 ++ keyword whole bug white/25
13573 ++ keyword whole Bug white/25
13574 ++ keyword whole BUG white/25
13575 +diff -urN mc-4.6.0-pre2.orig/syntax/debian-control.syntax mc-4.6.0-pre2/syntax/debian-control.syntax
13576 +--- mc-4.6.0-pre2.orig/syntax/debian-control.syntax 1970-01-01 01:00:00.000000000 +0100
13577 ++++ mc-4.6.0-pre2/syntax/debian-control.syntax 2002-12-29 18:11:13.000000000 +0100
13578 +@@ -0,0 +1,23 @@
13579 ++context default
13580 ++ keyword linestart Source brightmagenta/20
13581 ++ keyword linestart Section brightmagenta/20
13582 ++ keyword linestart Priority brightmagenta/20
13583 ++ keyword linestart Maintainer brightmagenta/20
13584 ++ keyword linestart Standards-Version brightmagenta/20
13585 ++ keyword linestart Package green/6
13586 ++ keyword linestart Architecture green/6
13587 ++ keyword linestart Depends green/6
13588 ++ keyword linestart Recommends green/6
13589 ++ keyword linestart Suggests green/6
13590 ++ keyword linestart Conflicts green/6
13591 ++ keyword linestart Replaces green/6
13592 ++ keyword linestart Provides green/6
13593 ++ keyword linestart Pre-Depends green/6
13594 ++ keyword linestart Build-Depends green/6
13595 ++ keyword linestart Build-Depends-Indep green/6
13596 ++ keyword linestart Build-Conflicts green/6
13597 ++ keyword linestart Build-Conflicts-Indep green/6
13598 ++ keyword linestart Description green/6
13599 ++ keyword <*@*> brightred/19
13600 ++
13601 ++context linestart \s \n brown/22
13602 +diff -urN mc-4.6.0-pre2.orig/syntax/debian-sources-list.syntax mc-4.6.0-pre2/syntax/debian-sources-list.syntax
13603 +--- mc-4.6.0-pre2.orig/syntax/debian-sources-list.syntax 1970-01-01 01:00:00.000000000 +0100
13604 ++++ mc-4.6.0-pre2/syntax/debian-sources-list.syntax 2002-12-29 18:11:16.000000000 +0100
13605 +@@ -0,0 +1,12 @@
13606 ++context default
13607 ++ keyword linestart deb-src brightmagenta/20
13608 ++ keyword linestart deb brightmagenta/20
13609 ++ keyword \$\(ARCH\) brightred/18
13610 ++
13611 ++context # \n brown/22
13612 ++context ftp\:\/\/ \s green/6
13613 ++context http\:\/\/ \s green/6
13614 ++context cdrom\:\/ \s yellow/24
13615 ++context file\:\/ \s brightcyan/14
13616 ++
13617 ++###############################################################################
13618 +diff -urN mc-4.6.0-pre2.orig/syntax/Makefile.am mc-4.6.0-pre2/syntax/Makefile.am
13619 +--- mc-4.6.0-pre2.orig/syntax/Makefile.am 2002-09-22 02:06:27.000000000 +0200
13620 ++++ mc-4.6.0-pre2/syntax/Makefile.am 2002-12-29 18:01:24.000000000 +0100
13621 +@@ -5,6 +5,9 @@
13622 + ada95.syntax \
13623 + c.syntax \
13624 + changelog.syntax \
13625 ++ debian-changelog.syntax \
13626 ++ debian-control.syntax \
13627 ++ debian-sources-list.syntax \
13628 + diff.syntax \
13629 + dos.syntax \
13630 + fortran.syntax \
13631 +diff -urN mc-4.6.0-pre2.orig/syntax/Makefile.in mc-4.6.0-pre2/syntax/Makefile.in
13632 +--- mc-4.6.0-pre2.orig/syntax/Makefile.in 2002-12-26 22:38:19.000000000 +0100
13633 ++++ mc-4.6.0-pre2/syntax/Makefile.in 2002-12-29 18:01:45.000000000 +0100
13634 +@@ -190,6 +190,9 @@
13635 + ada95.syntax \
13636 + c.syntax \
13637 + changelog.syntax \
13638 ++ debian-changelog.syntax \
13639 ++ debian-control.syntax \
13640 ++ debian-sources-list.syntax \
13641 + diff.syntax \
13642 + dos.syntax \
13643 + fortran.syntax \
13644 +diff -urN mc-4.6.0-pre2.orig/syntax/Syntax mc-4.6.0-pre2/syntax/Syntax
13645 +--- mc-4.6.0-pre2.orig/syntax/Syntax 2003-01-14 22:26:40.000000000 +0100
13646 ++++ mc-4.6.0-pre2/syntax/Syntax 2002-12-13 09:12:52.000000000 +0100
13647 +@@ -116,6 +116,21 @@
13648 + file [Ss]yntax$ Syntax\sHighlighting\sdefinitions ^#\ssyntax\srules\sversion\s
13649 + include syntax.syntax
13650 +
13651 ++file sources.list$ sources\slist
13652 ++include debian-sources-list.syntax
13653 ++
13654 ++file control$ Debian\scontrol\sfile
13655 ++include debian-control.syntax
13656 ++
13657 ++file (rules|rocks)$ Debian\srules
13658 ++include makefile.syntax
13659 ++
13660 ++file .\*changelog$ Debian\schangelog\sfile
13661 ++include debian-changelog.syntax
13662 ++
13663 ++file changelog.Debian$ Debian\schangelog\sfile
13664 ++include debian-changelog.syntax
13665 ++
13666 + file .\* unknown
13667 + include unknown.syntax
13668 +
13669 --- mc-4.6.1.orig/debian/patches/28_mc-ctype.patch
13670 +++ mc-4.6.1/debian/patches/28_mc-ctype.patch
13671 @@ -0,0 +1,10 @@
13672 +--- edit/editcmd.c 2005-03-17 22:18:23.000000000 +0100
13673 ++++ edit/editcmd.c 2005-03-30 10:05:48.983156480 +0200
13674 +@@ -24,7 +24,6 @@
13675 + /* #define PIPE_BLOCKS_SO_READ_BYTE_BY_BYTE */
13676 +
13677 + #include <config.h>
13678 +-#include <ctype.h>
13679 +
13680 + #include <stdio.h>
13681 + #include <stdarg.h>
13682 --- mc-4.6.1.orig/debian/patches/06_smbconf_path.patch
13683 +++ mc-4.6.1/debian/patches/06_smbconf_path.patch
13684 @@ -0,0 +1,11 @@
13685 +--- vfs/smbfs.c.orig 2002-12-13 15:57:39.000000000 +0100
13686 ++++ vfs/smbfs.c 2002-12-13 15:57:46.000000000 +0100
13687 +@@ -259,7 +259,7 @@
13688 + static int
13689 + smbfs_init (struct vfs_class * me)
13690 + {
13691 +- const char *servicesf = CONFIGDIR PATH_SEP_STR "smb.conf";
13692 ++ const char *servicesf = CONFIGDIR PATH_SEP_STR "samba/smb.conf";
13693 +
13694 + /* DEBUGLEVEL = 4; */
13695 +
13696 --- mc-4.6.1.orig/debian/patches/08_awk.patch
13697 +++ mc-4.6.1/debian/patches/08_awk.patch
13698 @@ -0,0 +1,12 @@
13699 +diff -urN mc-4.6.0.orig/configure mc-4.6.0/configure
13700 +--- mc-4.6.0.orig/configure 2003-02-05 19:09:04.000000000 +0100
13701 ++++ mc-4.6.0/configure 2003-03-03 21:23:03.000000000 +0100
13702 +@@ -1489,7 +1489,7 @@
13703 + echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
13704 + fi
13705 +
13706 +-for ac_prog in gawk mawk nawk awk
13707 ++for ac_prog in awk gawk mawk nawk
13708 + do
13709 + # Extract the first word of "$ac_prog", so it can be a program name with args.
13710 + set dummy $ac_prog; ac_word=$2
13711 --- mc-4.6.1.orig/debian/patches/11_extfs_missing.patch
13712 +++ mc-4.6.1/debian/patches/11_extfs_missing.patch
13713 @@ -0,0 +1,127 @@
13714 +diff -pruN vfs/extfs/uzip.in vfs/extfs/uzip.in
13715 +--- vfs/extfs/uzip.in 2004-09-03 14:40:11.000000000 +0200
13716 ++++ vfs/extfs/uzip.in 2005-02-06 13:02:49.000000000 +0100
13717 +@@ -34,6 +34,14 @@ my $cmd_delete = "$app_zip -d";
13718 + # Command used to extract a file to standard out
13719 + my $cmd_extract = "$app_unzip -p";
13720 +
13721 ++# -rw-r--r-- 2.2 unx 2891 tx 1435 defN 20000330.211927 ./edit.html
13722 ++# (perm) (?) (?) (size) (?) (zippedsize) (method) (yyyy)(mm)(dd)(HH)(MM) (fname)
13723 ++my $regex_zipinfo_line = qr"^(\S{7,10})\s+(\d+\.\d+)\s+(\S+)\s+(\d+)\s+(\S\S)\s+(\d+)\s+(\S{4})\s+(\d{4})(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d)\s(.*)$";
13724 ++
13725 ++# 2891 Defl:N 1435 50% 03-30-00 21:19 50cbaaf8 ./edit.html
13726 ++# (size) (method) (zippedsize) (zipratio) (mm)(dd)(yy)(HH)(MM) (cksum) (fname)
13727 ++my $regex_nonzipinfo_line = qr"^\s*(\d+)\s+(\S+)\s+(\d+)\s+(-?\d+\%)\s+(\d?\d)-(\d?\d)-(\d\d)\s+(\d?\d):(\d\d)\s+([0-9a-f]+)\s\s(.*)$";
13728 ++
13729 + #
13730 + # Main code
13731 + #
13732 +@@ -50,6 +58,50 @@ my $aarchive = absolutize($archive, $old
13733 + my $cmd_list = ($op_has_zipinfo ? $cmd_list_zi : $cmd_list_nzi);
13734 + my ($qarchive, $aqarchive) = map (quotemeta, $archive, $aarchive);
13735 +
13736 ++# Strip all "." and ".." path components from a pathname.
13737 ++sub zipfs_canonicalize_pathname($) {
13738 ++ my ($fname) = @_;
13739 ++ $fname =~ s,/+,/,g;
13740 ++ $fname =~ s,(^|/)(?:\.?\./)+,$1,;
13741 ++ return $fname;
13742 ++}
13743 ++
13744 ++# The Midnight Commander never calls this script with archive pathnames
13745 ++# starting with either "./" or "../". Some ZIP files contain such names,
13746 ++# so we need to build a translation table for them.
13747 ++my $zipfs_realpathname_table = undef;
13748 ++sub zipfs_realpathname($) {
13749 ++ my ($fname) = @_;
13750 ++
13751 ++ if (!defined($zipfs_realpathname_table)) {
13752 ++ $zipfs_realpathname_table = {};
13753 ++ if (!open(ZIP, "$cmd_list $qarchive |")) {
13754 ++ return $fname;
13755 ++ }
13756 ++ foreach my $line (<ZIP>) {
13757 ++ $line =~ s/\r*\n*$//;
13758 ++ if ($op_has_zipinfo) {
13759 ++ if ($line =~ $regex_zipinfo_line) {
13760 ++ my ($fname) = ($14);
13761 ++ $zipfs_realpathname_table->{zipfs_canonicalize_pathname($fname)} = $fname;
13762 ++ }
13763 ++ } else {
13764 ++ if ($line =~ $regex_nonzipinfo_line) {
13765 ++ my ($fname) = ($11);
13766 ++ $zipfs_realpathname_table->{zipfs_canonicalize_pathname($fname)} = $fname;
13767 ++ }
13768 ++ }
13769 ++ }
13770 ++ if (!close(ZIP)) {
13771 ++ return $fname;
13772 ++ }
13773 ++ }
13774 ++ if (exists($zipfs_realpathname_table->{$fname})) {
13775 ++ return $zipfs_realpathname_table->{$fname};
13776 ++ }
13777 ++ return $fname;
13778 ++}
13779 ++
13780 + if ($cmd eq 'list') { &mczipfs_list(@ARGV); }
13781 + if ($cmd eq 'rm') { &mczipfs_rm(@ARGV); }
13782 + if ($cmd eq 'rmdir') { &mczipfs_rmdir(@ARGV); }
13783 +@@ -63,7 +115,12 @@ exit 1;
13784 +
13785 + # Remove a file from the archive.
13786 + sub mczipfs_rm {
13787 +- my ($qfile) = map { &zipquotemeta($_) } @_;
13788 ++ my ($qfile) = map { &zipquotemeta(zipfs_realpathname($_)) } @_;
13789 ++
13790 ++ # "./" at the beginning of pathnames is stripped by Info-ZIP,
13791 ++ # so convert it to "[.]/" to prevent stripping.
13792 ++ $qfile =~ s/^\\\./[.]/;
13793 ++
13794 + &checkargs(1, 'archive file', @_);
13795 + &safesystem("$cmd_delete $qarchive $qfile >/dev/null");
13796 + exit;
13797 +@@ -74,7 +131,7 @@ sub mczipfs_rm {
13798 + # additional slash to the directory name to remove. I am not
13799 + # sure this is absolutely necessary, but it doesn't hurt.
13800 + sub mczipfs_rmdir {
13801 +- my ($qfile) = map { &zipquotemeta($_) } @_;
13802 ++ my ($qfile) = map { &zipquotemeta(zipfs_realpathname($_)) } @_;
13803 + &checkargs(1, 'archive directory', @_);
13804 + &safesystem("$cmd_delete $qarchive $qfile/ >/dev/null", 12);
13805 + exit;
13806 +@@ -84,7 +141,7 @@ sub mczipfs_rmdir {
13807 + # Note that we don't need to check if the file is a link,
13808 + # because mc apparently doesn't call copyout for symbolic links.
13809 + sub mczipfs_copyout {
13810 +- my ($qafile, $qfsfile) = map { &zipquotemeta($_) } @_;
13811 ++ my ($qafile, $qfsfile) = map { &zipquotemeta(zipfs_realpathname($_)) } @_;
13812 + &checkargs(1, 'archive file', @_);
13813 + &checkargs(2, 'local file', @_);
13814 + &safesystem("$cmd_extract $qarchive $qafile > $qfsfile", 11);
13815 +@@ -195,14 +252,14 @@ sub mczipfs_list {
13816 + next if /^Archive:/;
13817 + next if /^\d+ file/;
13818 + next if /^Empty zipfile\.$/;
13819 +- my @match = /^(.{10}) +([\d.]+) +([a-z\d]+) +(\d+) +([^ ]{2}) +(\d+) +([^ ]{4}) +(\d{4})(\d\d)(\d\d)\.(\d\d)(\d\d)(\d\d) +(.*)$/;
13820 ++ my @match = /$regex_zipinfo_line/;
13821 + next if ($#match != 13);
13822 + &checked_print_file(@match);
13823 + }
13824 + } else {
13825 + while (<PIPE>) {
13826 + chomp;
13827 +- my @match = /^ *(\d+) +([^ ]+) +(\d+) +(-?\d+\%) +(\d?\d)-(\d?\d)-(\d\d) (\d?\d):(\d\d) +([0-9a-f]+) +(.*)$/;
13828 ++ my @match = /$regex_nonzipinfo_line/;
13829 + next if ($#match != 10);
13830 + my @rmatch = ('', '', 'unknown', $match[0], '', $match[2], $match[1],
13831 + $match[6] + ($match[6] < 70 ? 2000 : 1900), $match[4], $match[5],
13832 +@@ -230,7 +287,7 @@ sub mczipfs_list {
13833 + sub mczipfs_run {
13834 + my ($afile) = @_;
13835 + &checkargs(1, 'archive file', @_);
13836 +- my $qafile = &zipquotemeta($afile);
13837 ++ my $qafile = &zipquotemeta(zipfs_realpathname($afile));
13838 + my $tmpdir = &mktmpdir();
13839 + my $tmpfile = File::Basename::basename($afile);
13840 +
13841 --- mc-4.6.1.orig/debian/patches/04_off64t.patch
13842 +++ mc-4.6.1/debian/patches/04_off64t.patch
13843 @@ -0,0 +1,189 @@
13844 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/cpio.c mc-4.6.1-pre4/vfs/cpio.c
13845 +--- mc-4.6.1-pre4.debian/vfs/cpio.c 2005-05-27 16:19:19.000000000 +0200
13846 ++++ mc-4.6.1-pre4/vfs/cpio.c 2005-08-23 21:32:39.306219927 +0200
13847 +@@ -83,7 +83,7 @@
13848 + struct vfs_s_inode *inode;
13849 + };
13850 +
13851 +-static int cpio_position;
13852 ++static off_t cpio_position;
13853 +
13854 + static int cpio_find_head(struct vfs_class *me, struct vfs_s_super *super);
13855 + static int cpio_read_bin_head(struct vfs_class *me, struct vfs_s_super *super);
13856 +@@ -107,7 +107,7 @@
13857 + return l;
13858 + }
13859 +
13860 +-static int cpio_skip_padding(struct vfs_s_super *super)
13861 ++static off_t cpio_skip_padding(struct vfs_s_super *super)
13862 + {
13863 + switch(super->u.arch.type) {
13864 + case CPIO_BIN:
13865 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/direntry.c mc-4.6.1-pre4/vfs/direntry.c
13866 +--- mc-4.6.1-pre4.debian/vfs/direntry.c 2004-11-29 19:44:49.000000000 +0100
13867 ++++ mc-4.6.1-pre4/vfs/direntry.c 2005-08-23 21:32:39.307219773 +0200
13868 +@@ -836,13 +836,13 @@
13869 + return 0;
13870 + }
13871 +
13872 +-static int
13873 ++static off_t
13874 + vfs_s_lseek (void *fh, off_t offset, int whence)
13875 + {
13876 + off_t size = FH->ino->st.st_size;
13877 +
13878 + if (FH->handle != -1){ /* If we have local file opened, we want to work with it */
13879 +- int retval = lseek (FH->handle, offset, whence);
13880 ++ off_t retval = lseek (FH->handle, offset, whence);
13881 + if (retval == -1)
13882 + FH->ino->super->me->verrno = errno;
13883 + return retval;
13884 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/extfs.c mc-4.6.1-pre4/vfs/extfs.c
13885 +--- mc-4.6.1-pre4.debian/vfs/extfs.c 2005-05-27 16:19:19.000000000 +0200
13886 ++++ mc-4.6.1-pre4/vfs/extfs.c 2005-08-23 21:32:39.309219464 +0200
13887 +@@ -1125,7 +1125,7 @@
13888 + return 0;
13889 + }
13890 +
13891 +-static int extfs_lseek (void *data, off_t offset, int whence)
13892 ++static off_t extfs_lseek (void *data, off_t offset, int whence)
13893 + {
13894 + struct pseudofile *file = (struct pseudofile *) data;
13895 +
13896 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/local.c mc-4.6.1-pre4/vfs/local.c
13897 +--- mc-4.6.1-pre4.debian/vfs/local.c 2004-09-25 01:00:18.000000000 +0200
13898 ++++ mc-4.6.1-pre4/vfs/local.c 2005-08-23 21:32:39.310219310 +0200
13899 +@@ -197,7 +197,7 @@
13900 + return chdir (path);
13901 + }
13902 +
13903 +-int
13904 ++off_t
13905 + local_lseek (void *data, off_t offset, int whence)
13906 + {
13907 + int fd = * (int *) data;
13908 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/local.h mc-4.6.1-pre4/vfs/local.h
13909 +--- mc-4.6.1-pre4.debian/vfs/local.h 2004-08-17 11:17:43.000000000 +0200
13910 ++++ mc-4.6.1-pre4/vfs/local.h 2005-08-23 21:32:39.318218076 +0200
13911 +@@ -11,7 +11,7 @@
13912 + extern int local_read (void *data, char *buffer, int count);
13913 + extern int local_fstat (void *data, struct stat *buf);
13914 + extern int local_errno (struct vfs_class *me);
13915 +-extern int local_lseek (void *data, off_t offset, int whence);
13916 ++extern off_t local_lseek (void *data, off_t offset, int whence);
13917 + #ifdef HAVE_MMAP
13918 + extern caddr_t local_mmap (struct vfs_class *me, caddr_t addr, size_t len,
13919 + int prot, int flags, void *data, off_t offset);
13920 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/mcfs.c mc-4.6.1-pre4/vfs/mcfs.c
13921 +--- mc-4.6.1-pre4.debian/vfs/mcfs.c 2005-05-27 16:19:19.000000000 +0200
13922 ++++ mc-4.6.1-pre4/vfs/mcfs.c 2005-08-23 21:32:39.315218539 +0200
13923 +@@ -1037,7 +1037,7 @@
13924 + return 0;
13925 + }
13926 +
13927 +-static int
13928 ++static off_t
13929 + mcfs_lseek (void *data, off_t offset, int whence)
13930 + {
13931 + mcfs_handle *info = (mcfs_handle *) data;
13932 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/smbfs.c mc-4.6.1-pre4/vfs/smbfs.c
13933 +--- mc-4.6.1-pre4.debian/vfs/smbfs.c 2005-05-27 16:19:19.000000000 +0200
13934 ++++ mc-4.6.1-pre4/vfs/smbfs.c 2005-08-23 21:32:39.317218231 +0200
13935 +@@ -1585,7 +1585,7 @@
13936 +
13937 + #define smbfs_lstat smbfs_stat /* no symlinks on smb filesystem? */
13938 +
13939 +-static int
13940 ++static off_t
13941 + smbfs_lseek (void *data, off_t offset, int whence)
13942 + {
13943 + smbfs_handle *info = (smbfs_handle *) data;
13944 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/tar.c mc-4.6.1-pre4/vfs/tar.c
13945 +--- mc-4.6.1-pre4.debian/vfs/tar.c 2005-05-27 16:19:19.000000000 +0200
13946 ++++ mc-4.6.1-pre4/vfs/tar.c 2005-08-23 21:32:39.311219156 +0200
13947 +@@ -194,7 +194,7 @@
13948 + }
13949 +
13950 + /* As we open one archive at a time, it is safe to have this static */
13951 +-static int current_tar_position = 0;
13952 ++static off_t current_tar_position = 0;
13953 +
13954 + /* Returns fd of the open tar file */
13955 + static int
13956 +@@ -457,7 +457,7 @@
13957 + struct stat st;
13958 + struct vfs_s_entry *entry;
13959 + struct vfs_s_inode *inode, *parent;
13960 +- long data_position;
13961 ++ off_t data_position;
13962 + char *q;
13963 + int len;
13964 + char *current_file_name, *current_link_name;
13965 +@@ -642,8 +642,9 @@
13966 + int fd = FH_SUPER->u.arch.fd;
13967 + struct vfs_class *me = FH_SUPER->me;
13968 +
13969 +- if (mc_lseek (fd, begin + FH->pos, SEEK_SET) !=
13970 +- begin + FH->pos) ERRNOR (EIO, -1);
13971 ++
13972 ++ off_t o = mc_lseek(fd, begin + FH->pos, SEEK_SET);
13973 ++ if ( o != begin + FH->pos) ERRNOR (EIO, -1);
13974 +
13975 + count = MIN(count, FH->ino->st.st_size - FH->pos);
13976 +
13977 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/undelfs.c mc-4.6.1-pre4/vfs/undelfs.c
13978 +--- mc-4.6.1-pre4.debian/vfs/undelfs.c 2005-05-27 16:19:19.000000000 +0200
13979 ++++ mc-4.6.1-pre4/vfs/undelfs.c 2005-08-23 21:32:39.313218847 +0200
13980 +@@ -645,7 +645,7 @@
13981 + }
13982 +
13983 + /* this has to stay here for now: vfs layer does not know how to emulate it */
13984 +-static int
13985 ++static off_t
13986 + undelfs_lseek(void *vfs_info, off_t offset, int whence)
13987 + {
13988 + return -1;
13989 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/vfs-impl.h mc-4.6.1-pre4/vfs/vfs-impl.h
13990 +--- mc-4.6.1-pre4.debian/vfs/vfs-impl.h 2004-09-02 15:57:59.000000000 +0200
13991 ++++ mc-4.6.1-pre4/vfs/vfs-impl.h 2005-08-23 21:32:39.318218076 +0200
13992 +@@ -53,7 +53,7 @@
13993 + int (*rename) (struct vfs_class *me, const char *p1, const char *p2);
13994 + int (*chdir) (struct vfs_class *me, const char *path);
13995 + int (*ferrno) (struct vfs_class *me);
13996 +- int (*lseek) (void *vfs_info, off_t offset, int whence);
13997 ++ off_t (*lseek) (void *vfs_info, off_t offset, int whence);
13998 + int (*mknod) (struct vfs_class *me, const char *path, int mode, int dev);
13999 +
14000 + vfsid (*getid) (struct vfs_class *me, const char *path);
14001 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/vfs.c mc-4.6.1-pre4/vfs/vfs.c
14002 +--- mc-4.6.1-pre4.debian/vfs/vfs.c 2005-05-27 16:19:19.000000000 +0200
14003 ++++ mc-4.6.1-pre4/vfs/vfs.c 2005-08-23 21:32:39.312219002 +0200
14004 +@@ -623,14 +623,14 @@
14005 + off_t mc_lseek (int fd, off_t offset, int whence)
14006 + {
14007 + struct vfs_class *vfs;
14008 +- int result;
14009 ++ off_t result;
14010 +
14011 + if (fd == -1)
14012 + return -1;
14013 +
14014 + vfs = vfs_op (fd);
14015 + result = vfs->lseek ? (*vfs->lseek)(vfs_info (fd), offset, whence) : -1;
14016 +- if (result == -1)
14017 ++ if (result == (off_t)-1)
14018 + errno = vfs->lseek ? ferrno (vfs) : E_NOTSUPP;
14019 + return result;
14020 + }
14021 +diff -N -r -u -x config.log mc-4.6.1-pre4.debian/vfs/xdirentry.h mc-4.6.1-pre4/vfs/xdirentry.h
14022 +--- mc-4.6.1-pre4.debian/vfs/xdirentry.h 2004-10-06 20:04:15.000000000 +0200
14023 ++++ mc-4.6.1-pre4/vfs/xdirentry.h 2005-08-23 21:32:39.326216843 +0200
14024 +@@ -90,7 +90,7 @@
14025 + char *linkname; /* Symlink's contents */
14026 + char *localname; /* Filename of local file, if we have one */
14027 + struct timeval timestamp; /* Subclass specific */
14028 +- long data_offset; /* Subclass specific */
14029 ++ off_t data_offset; /* Subclass specific */
14030 + };
14031 +
14032 + /* Data associated with an open file */
14033 --- mc-4.6.1.orig/debian/patches/40_view.c.patch
14034 +++ mc-4.6.1/debian/patches/40_view.c.patch
14035 @@ -0,0 +1,16 @@
14036 +--- src/view.c 2005-04-27 23:34:30.000000000 +0200
14037 ++++ src/view.c 2005-04-27 23:36:20.000000000 +0200
14038 +@@ -1239,7 +1239,12 @@
14039 + if (lines != -1 && line >= lines)
14040 + return p;
14041 +
14042 +- c = get_byte (view, p);
14043 ++ if ((c = get_byte (view, p)) == -1) {
14044 ++ if (upto)
14045 ++ return line;
14046 ++ else
14047 ++ return p;
14048 ++ }
14049 +
14050 + if (view->wrap_mode) {
14051 + if (c == '\r')
14052 --- mc-4.6.1.orig/debian/patches/47_mc.menu.patch
14053 +++ mc-4.6.1/debian/patches/47_mc.menu.patch
14054 @@ -0,0 +1,30 @@
14055 +--- lib/mc.menu 2005-05-02 18:08:11.000000000 +0200
14056 ++++ lib/mc.menu 2005-05-02 18:08:37.000000000 +0200
14057 +@@ -15,7 +15,7 @@ shell_patterns=0
14058 +
14059 + 0 Edit a bug report and send it to root
14060 + I=`mktemp ${MC_TMPDIR:-/tmp}/mail.XXXXXX` || exit 1
14061 +- ${EDITOR-vi} $I
14062 ++ ${EDITOR-editor} $I
14063 + test -r $I && mail root < $I
14064 + rm -f $I
14065 +
14066 +@@ -330,3 +330,7 @@
14067 + o Open next a free console
14068 + open -s -- sh
14069 +
14070 ++=+ f \.dsc$ & t r
14071 ++x Extract the contents of a Debian source package
14072 ++ dpkg-source -x %f
14073 ++
14074 +--- src/util.h 2006-06-13 04:39:20.000000000 +0300
14075 ++++ src/util.h 2006-06-13 04:39:53.000000000 +0300
14076 +@@ -217,7 +217,7 @@ void save_file_position (const char *fil
14077 + #define PATH_ENV_SEP ':'
14078 + #define TMPDIR_DEFAULT "/tmp"
14079 + #define SCRIPT_SUFFIX ""
14080 +-#define get_default_editor() "vi"
14081 ++#define get_default_editor() "editor"
14082 + #define OS_SORT_CASE_SENSITIVE_DEFAULT 1
14083 + #define STRCOMP strcmp
14084 + #define STRNCOMP strncmp
14085 --- mc-4.6.1.orig/debian/patches/18_sh_syntax.patch
14086 +++ mc-4.6.1/debian/patches/18_sh_syntax.patch
14087 @@ -0,0 +1,468 @@
14088 +/* Creator: Michelle Konzack */
14089 +/* E-Mail: <linux4michelle@freenet.de> */
14090 +/* */
14091 +/* Creation-Date: Sat, 12 Mar 2005 16:59:01 +0100 */
14092 +
14093 +
14094 +--- syntax/sh.syntax Sat Mar 12 16:54:56 2005
14095 ++++ syntax/sh.syntax Sat Mar 12 16:57:47 2005
14096 +@@ -41,7 +41,9 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14097 + keyword whole bg yellow
14098 + keyword whole break yellow
14099 + keyword whole case yellow
14100 ++ keyword whole clear yellow
14101 + keyword whole continue yellow
14102 ++ keyword whole declare yellow
14103 + keyword whole done yellow
14104 + keyword whole do yellow
14105 + keyword whole elif yellow
14106 +@@ -56,11 +58,13 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14107 + keyword whole for yellow
14108 + keyword whole if yellow
14109 + keyword whole in yellow
14110 ++ keyword whole let yellow
14111 + keyword whole read yellow
14112 + keyword whole return yellow
14113 + keyword whole select yellow
14114 + keyword whole set yellow
14115 + keyword whole shift yellow
14116 ++ keyword whole source yellow
14117 + keyword whole then yellow
14118 + keyword whole trap yellow
14119 + keyword whole umask yellow
14120 +@@ -69,6 +73,8 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14121 + keyword whole wait yellow
14122 + keyword whole while yellow
14123 +
14124 ++ keyword whole apt-get cyan
14125 ++ keyword whole ar cyan
14126 + keyword whole arch cyan
14127 + keyword whole ash cyan
14128 + keyword whole awk cyan
14129 +@@ -77,90 +83,204 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14130 + keyword whole bg_backup cyan
14131 + keyword whole bg_restore cyan
14132 + keyword whole bsh cyan
14133 ++ keyword whole bzip cyan
14134 ++ keyword whole bzip2 cyan
14135 ++ keyword whole cam cyan
14136 + keyword whole cat cyan
14137 + keyword whole cd cyan
14138 ++ keyword whole cdda2wav cyan
14139 + keyword whole chgrp cyan
14140 + keyword whole chmod cyan
14141 + keyword whole chown cyan
14142 ++ keyword whole cmp cyan
14143 ++ keyword whole col cyan
14144 ++ keyword whole compress cyan
14145 + keyword whole cp cyan
14146 + keyword whole cpio cyan
14147 ++ keyword whole cpp cyan
14148 + keyword whole csh cyan
14149 ++ keyword whole curl cyan
14150 ++ keyword whole cut cyan
14151 + keyword whole date cyan
14152 + keyword whole dd cyan
14153 + keyword whole df cyan
14154 ++ keyword whole dialog cyan
14155 ++ keyword whole diff cyan
14156 ++ keyword whole dirname cyan
14157 + keyword whole dmesg cyan
14158 + keyword whole dnsdomainname cyan
14159 + keyword whole doexec cyan
14160 + keyword whole domainname cyan
14161 ++ keyword whole dpkg cyan
14162 ++ keyword whole dpkg-buildpackage cyan
14163 ++ keyword whole dpkg-scanpackages cyan
14164 ++ keyword whole dpkg-scansources cyan
14165 + keyword whole echo cyan
14166 + keyword whole ed cyan
14167 ++ keyword whole editor cyan
14168 + keyword whole egrep cyan
14169 + keyword whole ex cyan
14170 ++ keyword whole fakeroot cyan
14171 + keyword whole false cyan
14172 ++ keyword whole fdformat cyan
14173 ++ keyword whole fetchmail cyan
14174 + keyword whole fgrep cyan
14175 + keyword whole find cyan
14176 ++ keyword whole formail cyan
14177 ++ keyword whole free cyan
14178 ++ keyword whole freeze cyan
14179 + keyword whole fsconf cyan
14180 + keyword whole gawk cyan
14181 ++ keyword whole gdb cyan
14182 ++ keyword whole gcc cyan
14183 + keyword whole grep cyan
14184 + keyword whole gunzip cyan
14185 + keyword whole gzip cyan
14186 ++ keyword whole ha cyan
14187 + keyword whole hostname cyan
14188 + keyword whole igawk cyan
14189 ++ keyword whole insmod cyan
14190 + keyword whole ipcalc cyan
14191 ++ keyword whole iptables cyan
14192 + keyword whole kill cyan
14193 + keyword whole ksh cyan
14194 ++ keyword whole lame cyan
14195 ++ keyword whole less cyan
14196 ++ keyword whole lharc cyan
14197 ++ keyword whole lilo cyan
14198 ++ keyword whole linux_logo cyan
14199 + keyword whole linuxconf cyan
14200 + keyword whole ln cyan
14201 ++ keyword whole locale cyan
14202 ++ keyword whole logger cyan
14203 + keyword whole login cyan
14204 + keyword whole lpdconf cyan
14205 + keyword whole ls cyan
14206 ++ keyword whole lynx cyan
14207 + keyword whole mail cyan
14208 ++ keyword whole man cyan
14209 ++ keyword whole mc cyan
14210 ++ keyword whole mcedit cyan
14211 ++ keyword whole mcview cyan
14212 ++ keyword whole mimedecode cyan
14213 + keyword whole mkdir cyan
14214 ++ keyword whole mkdirhier cyan
14215 ++ keyword whole mkfs.ext2 cyan
14216 ++ keyword whole mkfs.ext3 cyan
14217 ++ keyword whole mkfs.minix cyan
14218 ++ keyword whole mkfs.msdos cyan
14219 ++ keyword whole mke2fs cyan
14220 ++ keyword whole mkdosfs cyan
14221 ++ keyword whole mkinitrd cyan
14222 + keyword whole mknod cyan
14223 + keyword whole mktemp cyan
14224 ++ keyword whole modprobe cyan
14225 + keyword whole more cyan
14226 + keyword whole mount cyan
14227 ++ keyword whole mozilla cyan
14228 ++ keyword whole mp3info cyan
14229 ++ keyword whole munpack cyan
14230 ++ keyword whole msgfmt cyan
14231 + keyword whole mt cyan
14232 ++ keyword whole mutt cyan
14233 + keyword whole mv cyan
14234 + keyword whole netconf cyan
14235 + keyword whole netstat cyan
14236 + keyword whole nice cyan
14237 + keyword whole nisdomainname cyan
14238 ++ keyword whole nm cyan
14239 ++ keyword whole patch cyan
14240 ++ keyword whole pinfo cyan
14241 + keyword whole ping cyan
14242 ++ keyword whole procmail cyan
14243 + keyword whole ps cyan
14244 + keyword whole pwd cyan
14245 ++ keyword whole rar cyan
14246 + keyword whole red cyan
14247 + keyword whole remadmin cyan
14248 ++ keyword whole rename cyan
14249 + keyword whole rm cyan
14250 + keyword whole rmdir cyan
14251 ++ keyword whole rmmod cyan
14252 ++ keyword whole rplay cyan
14253 + keyword whole rpm cyan
14254 ++ keyword whole rpm2cpio cyan
14255 + keyword whole sed cyan
14256 + keyword whole set cyan
14257 + keyword whole setserial cyan
14258 + keyword whole sh cyan
14259 + keyword whole sleep cyan
14260 + keyword whole sort cyan
14261 ++ keyword whole sa-learn cyan
14262 ++ keyword whole spamassassin cyan
14263 ++ keyword whole spamc cyan
14264 ++ keyword whole spamd cyan
14265 ++ keyword whole ssmtp cyan
14266 ++ keyword whole strace cyan
14267 + keyword whole stty cyan
14268 + keyword whole su cyan
14269 + keyword whole sync cyan
14270 + keyword whole taper cyan
14271 + keyword whole tar cyan
14272 ++ keyword whole tcpdump cyan
14273 + keyword whole tcsh cyan
14274 + keyword whole test cyan
14275 ++ keyword whole tempfile cyan
14276 + keyword whole time cyan
14277 ++ keyword whole tnef cyan
14278 + keyword whole touch cyan
14279 ++ keyword whole tr cyan
14280 + keyword whole true cyan
14281 ++ keyword whole tune2fs cyan
14282 + keyword whole umount cyan
14283 + keyword whole uname cyan
14284 ++ keyword whole unarj cyan
14285 ++ keyword whole uniq cyan
14286 ++ keyword whole unzip cyan
14287 ++ keyword whole uptime cyan
14288 + keyword whole userconf cyan
14289 + keyword whole usleep cyan
14290 + keyword whole vi cyan
14291 + keyword whole view cyan
14292 + keyword whole vim cyan
14293 ++ keyword whole wc cyan
14294 ++ keyword whole wget cyan
14295 ++ keyword whole whiptail cyan
14296 ++ keyword whole wvWare cyan
14297 + keyword whole xconf cyan
14298 ++ keyword whole xgettext cyan
14299 ++ keyword whole xmessage cyan
14300 ++ keyword whole xmodmap cyan
14301 ++ keyword whole xterm cyan
14302 + keyword whole ypdomainname cyan
14303 + keyword whole zcat cyan
14304 ++ keyword whole zgv cyan
14305 ++ keyword whole zip cyan
14306 ++ keyword whole zoo cyan
14307 + keyword whole zsh cyan
14308 ++ keyword whole Xdialog cyan
14309 ++
14310 ++ keyword whole gpg red
14311 ++ keyword whole md5sum red
14312 ++ keyword whole openssl red
14313 ++ keyword whole ssh red
14314 ++
14315 ++ keyword whole TEXTDOMAINDIR magenta
14316 ++ keyword whole TEXTDOMAIN magenta
14317 ++ keyword whole VERSION magenta
14318 ++
14319 ++ keyword whole jpegtopnm cyan
14320 ++ keyword whole pnmscale cyan
14321 ++ keyword whole ppmtoxpm cyan
14322 ++
14323 ++ keyword whole /dev/audio brightblue
14324 ++ keyword whole /dev/dsp brightblue
14325 ++ keyword whole /dev/null brightblue
14326 ++ keyword whole /dev/mixed brightblue
14327 ++ keyword whole /dev/stdin brightblue
14328 ++ keyword whole /dev/stdout brightblue
14329 ++ keyword whole /dev/stderr brightblue
14330 ++ keyword whole /dev/zero brightblue
14331 +
14332 + wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_
14333 +
14334 +@@ -224,7 +344,9 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14335 +
14336 + keyword whole break yellow
14337 + keyword whole case yellow
14338 ++ keyword whole clear yellow
14339 + keyword whole continue yellow
14340 ++ keyword whole declare yellow
14341 + keyword whole done yellow
14342 + keyword whole do yellow
14343 + keyword whole elif yellow
14344 +@@ -238,11 +360,15 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14345 + keyword whole return yellow
14346 + keyword whole select yellow
14347 + keyword whole shift yellow
14348 ++ keyword whole source yellow
14349 + keyword whole then yellow
14350 + keyword whole trap yellow
14351 + keyword whole until yellow
14352 ++ keyword whole wait yellow
14353 + keyword whole while yellow
14354 +
14355 ++ keyword whole apt-get cyan
14356 ++ keyword whole ar cyan
14357 + keyword whole arch cyan
14358 + keyword whole ash cyan
14359 + keyword whole awk cyan
14360 +@@ -251,89 +377,194 @@ wholechars abcdefghijklmnopqrstuvwxyzABC
14361 + keyword whole bg_backup cyan
14362 + keyword whole bg_restore cyan
14363 + keyword whole bsh cyan
14364 ++ keyword whole bzip cyan
14365 ++ keyword whole bzip2 cyan
14366 ++ keyword whole cam cyan
14367 + keyword whole cat cyan
14368 + keyword whole cd cyan
14369 ++ keyword whole cdda2wav cyan
14370 + keyword whole chgrp cyan
14371 + keyword whole chmod cyan
14372 + keyword whole chown cyan
14373 ++ keyword whole cmp cyan
14374 ++ keyword whole col cyan
14375 ++ keyword whole compress cyan
14376 + keyword whole cp cyan
14377 + keyword whole cpio cyan
14378 ++ keyword whole cpp cyan
14379 + keyword whole csh cyan
14380 ++ keyword whole curl cyan
14381 ++ keyword whole cut cyan
14382 + keyword whole date cyan
14383 + keyword whole dd cyan
14384 + keyword whole df cyan
14385 ++ keyword whole dialog cyan
14386 ++ keyword whole diff cyan
14387 ++ keyword whole dirname cyan
14388 + keyword whole dmesg cyan
14389 + keyword whole dnsdomainname cyan
14390 + keyword whole doexec cyan
14391 + keyword whole domainname cyan
14392 ++ keyword whole dpkg cyan
14393 ++ keyword whole dpkg-buildpackage cyan
14394 ++ keyword whole dpkg-scanpackages cyan
14395 ++ keyword whole dpkg-scansources cyan
14396 + keyword whole echo cyan
14397 + keyword whole ed cyan
14398 ++ keyword whole editor cyan
14399 + keyword whole egrep cyan
14400 + keyword whole ex cyan
14401 ++ keyword whole fakeroot cyan
14402 + keyword whole false cyan
14403 ++ keyword whole fdformat cyan
14404 ++ keyword whole fetchmail cyan
14405 + keyword whole fgrep cyan
14406 + keyword whole find cyan
14407 ++ keyword whole free cyan
14408 ++ keyword whole freeze cyan
14409 + keyword whole fsconf cyan
14410 + keyword whole gawk cyan
14411 ++ keyword whole gdb cyan
14412 ++ keyword whole gcc cyan
14413 + keyword whole grep cyan
14414 + keyword whole gunzip cyan
14415 + keyword whole gzip cyan
14416 ++ keyword whole ha cyan
14417 + keyword whole hostname cyan
14418 + keyword whole igawk cyan
14419 ++ keyword whole insmod cyan
14420 ++ keyword whole iptables cyan
14421 + keyword whole ipcalc cyan
14422 + keyword whole kill cyan
14423 + keyword whole ksh cyan
14424 ++ keyword whole lame cyan
14425 ++ keyword whole less cyan
14426 ++ keyword whole lharc cyan
14427 ++ keyword whole lilo cyan
14428 ++ keyword whole linux_logo cyan
14429 + keyword whole linuxconf cyan
14430 + keyword whole ln cyan
14431 ++ keyword whole locale cyan
14432 ++ keyword whole logger cyan
14433 + keyword whole login cyan
14434 + keyword whole lpdconf cyan
14435 + keyword whole ls cyan
14436 ++ keyword whole lynx cyan
14437 + keyword whole mail cyan
14438 ++ keyword whole man cyan
14439 ++ keyword whole mc cyan
14440 ++ keyword whole mcedit cyan
14441 ++ keyword whole mcview cyan
14442 ++ keyword whole mimedecode cyan
14443 + keyword whole mkdir cyan
14444 ++ keyword whole mkdirhier cyan
14445 ++ keyword whole mkfs.ext2 cyan
14446 ++ keyword whole mkfs.ext3 cyan
14447 ++ keyword whole mkfs.minix cyan
14448 ++ keyword whole mkfs.msdos cyan
14449 ++ keyword whole mke2fs cyan
14450 ++ keyword whole mkdosfs cyan
14451 ++ keyword whole mkinitrd cyan
14452 + keyword whole mknod cyan
14453 + keyword whole mktemp cyan
14454 ++ keyword whole modprobe cyan
14455 + keyword whole more cyan
14456 + keyword whole mount cyan
14457 ++ keyword whole mozilla cyan
14458 ++ keyword whole mp3info cyan
14459 ++ keyword whole msgfmt cyan
14460 + keyword whole mt cyan
14461 ++ keyword whole mutt cyan
14462 + keyword whole mv cyan
14463 + keyword whole netconf cyan
14464 + keyword whole netstat cyan
14465 + keyword whole nice cyan
14466 + keyword whole nisdomainname cyan
14467 ++ keyword whole nm cyan
14468 ++ keyword whole patch cyan
14469 ++ keyword whole pinfo cyan
14470 + keyword whole ping cyan
14471 + keyword whole ps cyan
14472 + keyword whole pwd cyan
14473 ++ keyword whole rar cyan
14474 + keyword whole red cyan
14475 + keyword whole remadmin cyan
14476 ++ keyword whole rename cyan
14477 + keyword whole rm cyan
14478 + keyword whole rmdir cyan
14479 ++ keyword whole rmmod cyan
14480 ++ keyword whole rplay cyan
14481 + keyword whole rpm cyan
14482 ++ keyword whole rpm2cpio cyan
14483 + keyword whole sed cyan
14484 + keyword whole set cyan
14485 + keyword whole setserial cyan
14486 + keyword whole sh cyan
14487 + keyword whole sleep cyan
14488 + keyword whole sort cyan
14489 ++ keyword whole sa-learn cyan
14490 ++ keyword whole spamassassin cyan
14491 ++ keyword whole spamc cyan
14492 ++ keyword whole spamd cyan
14493 ++ keyword whole ssmtp cyan
14494 ++ keyword whole strace cyan
14495 + keyword whole stty cyan
14496 + keyword whole su cyan
14497 + keyword whole sync cyan
14498 + keyword whole taper cyan
14499 + keyword whole tar cyan
14500 ++ keyword whole tcpdump cyan
14501 + keyword whole tcsh cyan
14502 ++ keyword whole tempfile cyan
14503 + keyword whole test cyan
14504 + keyword whole time cyan
14505 ++ keyword whole tnef cyan
14506 + keyword whole touch cyan
14507 ++ keyword whole tr cyan
14508 + keyword whole true cyan
14509 ++ keyword whole tune2fs cyan
14510 + keyword whole umount cyan
14511 + keyword whole uname cyan
14512 ++ keyword whole unarj cyan
14513 ++ keyword whole uniq cyan
14514 ++ keyword whole unzip cyan
14515 ++ keyword whole uptime cyan
14516 + keyword whole userconf cyan
14517 + keyword whole usleep cyan
14518 + keyword whole vi cyan
14519 + keyword whole view cyan
14520 + keyword whole vim cyan
14521 ++ keyword whole wc cyan
14522 ++ keyword whole wget cyan
14523 ++ keyword whole whiptail cyan
14524 ++ keyword whole wvWare cyan
14525 + keyword whole xconf cyan
14526 ++ keyword whole xgettext cyan
14527 ++ keyword whole xmessage cyan
14528 ++ keyword whole xmodmap cyan
14529 ++ keyword whole xterm cyan
14530 + keyword whole ypdomainname cyan
14531 + keyword whole zcat cyan
14532 ++ keyword whole zgv cyan
14533 ++ keyword whole zoo cyan
14534 ++ keyword whole zip cyan
14535 + keyword whole zsh cyan
14536 ++ keyword whole Xdialog cyan
14537 +
14538 +-
14539 ++ keyword whole gpg red
14540 ++ keyword whole md5sum red
14541 ++ keyword whole openssl red
14542 ++ keyword whole ssh red
14543 ++
14544 ++ keyword whole TEXTDOMAINDIR magenta
14545 ++ keyword whole TEXTDOMAIN magenta
14546 ++ keyword whole VERSION magenta
14547 ++
14548 ++ keyword whole /dev/audio brightblue
14549 ++ keyword whole /dev/dsp brightblue
14550 ++ keyword whole /dev/null brightblue
14551 ++ keyword whole /dev/mixed brightblue
14552 ++ keyword whole /dev/stdin brightblue
14553 ++ keyword whole /dev/stdout brightblue
14554 ++ keyword whole /dev/stderr brightblue
14555 ++ keyword whole /dev/zero brightblue
14556 --- mc-4.6.1.orig/debian/patches/49_64bit.patch
14557 +++ mc-4.6.1/debian/patches/49_64bit.patch
14558 @@ -0,0 +1,54 @@
14559 +--- mc-4.6.1a/src/mountlist.c.64bit 2005-02-08 23:33:52.000000000 +0100
14560 ++++ mc-4.6.1a/src/mountlist.c 2005-05-10 17:09:24.122853504 +0200
14561 +@@ -131,11 +131,19 @@ struct mount_entry
14562 +
14563 + struct fs_usage
14564 + {
14565 ++#ifndef HAVE_SYS_STATVFS_H
14566 + long fsu_blocks; /* Total blocks. */
14567 + long fsu_bfree; /* Free blocks available to superuser. */
14568 + long fsu_bavail; /* Free blocks available to non-superuser. */
14569 + long fsu_files; /* Total file nodes. */
14570 + long fsu_ffree; /* Free file nodes. */
14571 ++#else /* We have sys/statvfs.h, use proper data types when _FILE_OFFSET_BITS=64 */
14572 ++ fsblkcnt_t fsu_blocks;
14573 ++ fsblkcnt_t fsu_bfree;
14574 ++ fsblkcnt_t fsu_bavail;
14575 ++ fsblkcnt_t fsu_files;
14576 ++ fsblkcnt_t fsu_ffree;
14577 ++#endif /* HAVE_SYS_STATVFS_H */
14578 + };
14579 +
14580 + static int get_fs_usage (char *path, struct fs_usage *fsp);
14581 +@@ -665,6 +673,7 @@ my_statfs (struct my_statfs *myfs_stats,
14582 + BLOCKS FROMSIZE-byte blocks, rounding away from zero.
14583 + TOSIZE must be positive. Return -1 if FROMSIZE is not positive. */
14584 +
14585 ++#if !defined(HAVE_SYS_STATFS_H) || !defined(STAT_STATVFS)
14586 + static long
14587 + fs_adjust_blocks (long blocks, int fromsize, int tosize)
14588 + {
14589 +@@ -672,13 +681,21 @@ fs_adjust_blocks (long blocks, int froms
14590 + abort ();
14591 + if (fromsize <= 0)
14592 + return -1;
14593 +-
14594 ++#else
14595 ++static fsblkcnt_t
14596 ++fs_adjust_blocks (fsblkcnt_t blocks, unsigned long fromsize, unsigned long tosize)
14597 ++{
14598 ++ if (!tosize)
14599 ++ abort ();
14600 ++ if (!fromsize)
14601 ++ return -1;
14602 ++#endif
14603 + if (fromsize == tosize) /* E.g., from 512 to 512. */
14604 + return blocks;
14605 + else if (fromsize > tosize) /* E.g., from 2048 to 512. */
14606 + return blocks * (fromsize / tosize);
14607 + else /* E.g., from 256 to 512. */
14608 +- return (blocks + (blocks < 0 ? -1 : 1)) / (tosize / fromsize);
14609 ++ return (blocks + 1) / (tosize / fromsize);
14610 + }
14611 +
14612 + #if defined(_AIX) && defined(_I386)
14613 --- mc-4.6.1.orig/debian/patches/52_utf8-8bits-slang2.patch
14614 +++ mc-4.6.1/debian/patches/52_utf8-8bits-slang2.patch
14615 @@ -0,0 +1,68 @@
14616 +diff -ruN mc-4.6.1.orig/edit/editdraw.c mc-4.6.1/edit/editdraw.c
14617 +--- mc-4.6.1.orig/edit/editdraw.c 2006-06-25 20:34:28.000000000 +0700
14618 ++++ mc-4.6.1/edit/editdraw.c 2006-06-25 20:35:35.475890000 +0700
14619 +@@ -239,7 +239,7 @@
14620 + lowlevel_set_color (color);
14621 + }
14622 + #ifdef UTF8
14623 +- SLsmg_write_char(textchar);
14624 ++ SLsmg_write_nwchars(&textchar, 1);
14625 + #else
14626 + addch (textchar);
14627 + #endif
14628 +diff -ruN mc-4.6.1.orig/src/help.c mc-4.6.1/src/help.c
14629 +--- mc-4.6.1.orig/src/help.c 2006-06-25 20:34:28.000000000 +0700
14630 ++++ mc-4.6.1/src/help.c 2006-06-25 20:36:13.406260500 +0700
14631 +@@ -461,7 +461,7 @@
14632 + len = mbrtowc(&wc, p, MB_CUR_MAX, &mbs);
14633 + if (len <= 0) len = 1; /* skip broken multibyte chars */
14634 +
14635 +- SLsmg_write_char(wc);
14636 ++ SLsmg_write_nwchars(&wc, 1);
14637 + p += len - 1;
14638 + } else
14639 + #endif
14640 +diff -ruN mc-4.6.1.orig/src/util.c mc-4.6.1/src/util.c
14641 +--- mc-4.6.1.orig/src/util.c 2006-06-25 20:34:28.000000000 +0700
14642 ++++ mc-4.6.1/src/util.c 2006-06-25 20:37:52.592459250 +0700
14643 +@@ -59,8 +59,26 @@
14644 + #if SLANG_VERSION >= 20000
14645 + void SLsmg_write_nwchars(wchar_t *s, size_t n)
14646 + {
14647 +- while(n--)
14648 +- SLsmg_write_char(*s++);
14649 ++ if (SLsmg_is_utf8_mode()) { /* slang can handle it directly */
14650 ++ while(n-- && *s)
14651 ++ SLsmg_write_char(*s++);
14652 ++ }
14653 ++ else { /* convert wchars back to 8bit encoding */
14654 ++ mbstate_t mbs;
14655 ++ memset (&mbs, 0, sizeof (mbs));
14656 ++ while (n-- && *s) {
14657 ++ char buf[MB_LEN_MAX + 1]; /* should use 1 char, but to be sure */
14658 ++ if (*s < 0x80) {
14659 ++ SLsmg_write_char(*s++); /* ASCII */
14660 ++ }
14661 ++ else {
14662 ++ if (wcrtomb(buf, *s++, &mbs) == 1)
14663 ++ SLsmg_write_char((wchar_t)(buf[0]));
14664 ++ else
14665 ++ SLsmg_write_char('?'); /* should not happen */
14666 ++ }
14667 ++ }
14668 ++ }
14669 + }
14670 + #endif
14671 +
14672 +diff -ruN mc-4.6.1.orig/src/view.c mc-4.6.1/src/view.c
14673 +--- mc-4.6.1.orig/src/view.c 2006-06-25 20:34:28.000000000 +0700
14674 ++++ mc-4.6.1/src/view.c 2006-06-25 20:38:50.788096250 +0700
14675 +@@ -856,7 +856,7 @@
14676 + #ifndef UTF8
14677 + #define view_add_character(view,c) addch (c)
14678 + #else /* UTF8 */
14679 +-#define view_add_character(view,c) SLsmg_write_char(c)
14680 ++#define view_add_character(view,c) {wchar_t tmp=c; SLsmg_write_nwchars(&tmp, 1);}
14681 + #endif /* UTF8 */
14682 + #define view_add_one_vline() one_vline()
14683 + #define view_add_string(view,s) addstr (s)
14684 --- mc-4.6.1.orig/debian/patches/45_ftpfs_symlink1.patch
14685 +++ mc-4.6.1/debian/patches/45_ftpfs_symlink1.patch
14686 @@ -0,0 +1,11 @@
14687 +--- vfs/ftpfs.c 22 Feb 2005 18:35:23 -0000 1.176
14688 ++++ vfs/ftpfs.c 5 Apr 2005 18:13:23 -0000
14689 +@@ -117,7 +117,7 @@ int ftpfs_use_passive_connections = 1;
14690 + int ftpfs_use_unix_list_options = 1;
14691 +
14692 + /* First "CWD <path>", then "LIST -la ." */
14693 +-int ftpfs_first_cd_then_ls;
14694 ++int ftpfs_first_cd_then_ls = 1;
14695 +
14696 + /* Use the ~/.netrc */
14697 + int use_netrc = 1;
14698 --- mc-4.6.1.orig/debian/patches/37_mcedit-segv.patch
14699 +++ mc-4.6.1/debian/patches/37_mcedit-segv.patch
14700 @@ -0,0 +1,50 @@
14701 +--- edit/edit-widget.h 3 Dec 2004 17:09:27 -0000 1.24
14702 ++++ edit/edit-widget.h 15 Apr 2005 21:33:35 -0000
14703 +@@ -93,6 +93,7 @@ struct WEdit {
14704 + /* syntax higlighting */
14705 + struct _syntax_marker *syntax_marker;
14706 + struct context_rule **rules;
14707 ++ size_t rules_count; /* number of rules that are defined */
14708 + long last_get_rule;
14709 + struct syntax_rule rule;
14710 + char *syntax_type; /* description of syntax highlighting type being used */
14711 +--- edit/syntax.c 22 Feb 2005 17:00:38 -0000 1.73
14712 ++++ edit/syntax.c 15 Apr 2005 21:33:35 -0000
14713 +@@ -678,6 +678,7 @@ edit_read_syntax_rules (WEdit *edit, FIL
14714 + strcpy (whole_right, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_01234567890");
14715 +
14716 + r = edit->rules = g_malloc (alloc_contexts * sizeof (struct context_rule *));
14717 ++ edit->rules_count = 0;
14718 +
14719 + if (!edit->defines)
14720 + edit->defines = g_tree_new ((GCompareFunc) strcmp);
14721 +@@ -908,6 +909,7 @@ edit_read_syntax_rules (WEdit *edit, FIL
14722 + if (num_contexts == -1) {
14723 + return line;
14724 + }
14725 ++ edit->rules_count = num_contexts;
14726 +
14727 + {
14728 + char *first_chars, *p;
14729 +@@ -932,17 +934,18 @@ edit_read_syntax_rules (WEdit *edit, FIL
14730 +
14731 + void edit_free_syntax_rules (WEdit * edit)
14732 + {
14733 +- int i, j;
14734 ++ size_t i, j;
14735 + if (!edit)
14736 + return;
14737 + if (edit->defines)
14738 + destroy_defines (&edit->defines);
14739 + if (!edit->rules)
14740 + return;
14741 +- edit_get_rule (edit, -1);
14742 ++ if (edit->rules_count > 0)
14743 ++ edit_get_rule (edit, -1);
14744 + syntax_g_free (edit->syntax_type);
14745 + edit->syntax_type = 0;
14746 +- for (i = 0; edit->rules[i]; i++) {
14747 ++ for (i = 0; i < edit->rules_count; i++) {
14748 + if (edit->rules[i]->keyword) {
14749 + for (j = 0; edit->rules[i]->keyword[j]; j++) {
14750 + syntax_g_free (edit->rules[i]->keyword[j]->keyword);
14751 --- mc-4.6.1.orig/debian/patches/32_c-vs-cxx.patch
14752 +++ mc-4.6.1/debian/patches/32_c-vs-cxx.patch
14753 @@ -0,0 +1,57 @@
14754 +--- syntax/Makefile.am 6 Dec 2004 23:14:43 -0000 1.22
14755 ++++ syntax/Makefile.am 20 Feb 2005 09:42:01 -0000
14756 +@@ -4,4 +4,5 @@
14757 + aspx.syntax \
14758 + c.syntax \
14759 ++ cxx.syntax \
14760 + cs.syntax \
14761 + changelog.syntax \
14762 +--- syntax/Syntax 3 Nov 2004 20:16:48 -0000 1.27
14763 ++++ syntax/Syntax 20 Feb 2005 09:42:01 -0000
14764 +@@ -69,7 +69,10 @@
14765 + include texinfo.syntax
14766 +
14767 +-file ..\*\\.([chC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
14768 ++file ..\*\\.c$ C\sProgram
14769 + include c.syntax
14770 +
14771 ++file ..\*\\.([hC]|CC|cxx|cc|cpp|CPP|CXX|hxx|h\.in)$ C/C\+\+\sProgram
14772 ++include cxx.syntax
14773 ++
14774 + file ..\*\\.[fF]$ Fortran\sProgram
14775 + include fortran.syntax
14776 +--- syntax/c.syntax 15 Mar 2003 04:41:20 -0000 1.15
14777 ++++ syntax/c.syntax 20 Feb 2005 09:42:01 -0000
14778 +@@ -33,32 +33,5 @@
14779 + keyword whole while yellow
14780 + keyword whole asm yellow
14781 +- keyword whole catch yellow
14782 +- keyword whole class yellow
14783 +- keyword whole friend yellow
14784 +- keyword whole delete yellow
14785 + keyword whole inline yellow
14786 +- keyword whole new yellow
14787 +- keyword whole operator yellow
14788 +- keyword whole private yellow
14789 +- keyword whole protected yellow
14790 +- keyword whole public yellow
14791 +- keyword whole this yellow
14792 +- keyword whole throw yellow
14793 +- keyword whole template yellow
14794 +- keyword whole try yellow
14795 +- keyword whole virtual yellow
14796 +- keyword whole bool yellow
14797 +- keyword whole const_cast yellow
14798 +- keyword whole dynamic_cast yellow
14799 +- keyword whole explicit yellow
14800 +- keyword whole false yellow
14801 +- keyword whole mutable yellow
14802 +- keyword whole namespace yellow
14803 +- keyword whole reinterpret_cast yellow
14804 +- keyword whole static_cast yellow
14805 +- keyword whole true yellow
14806 +- keyword whole typeid yellow
14807 +- keyword whole typename yellow
14808 +- keyword whole using yellow
14809 + keyword whole wchar_t yellow
14810 + keyword whole ... yellow
14811 --- mc-4.6.1.orig/debian/patches/28_mc-dontrewrite.patch
14812 +++ mc-4.6.1/debian/patches/28_mc-dontrewrite.patch
14813 @@ -0,0 +1,11 @@
14814 +--- edit/editcmd.c 2005-03-17 22:18:23.000000000 +0100
14815 ++++ edit/editcmd.c 2005-03-30 09:28:25.076282176 +0200
14816 +@@ -240,7 +240,7 @@ edit_save_file (WEdit *edit, const char
14817 + }
14818 +
14819 + if (!vfs_file_is_local (filename) ||
14820 +- (fd = mc_open (filename, O_WRONLY | O_BINARY)) == -1) {
14821 ++ (fd = mc_open (filename, O_RDONLY | O_BINARY)) == -1) {
14822 + /*
14823 + * The file does not exists yet, so no safe save or
14824 + * backup are necessary.
14825 --- mc-4.6.1.orig/debian/patches/50_utf8-more.patch
14826 +++ mc-4.6.1/debian/patches/50_utf8-more.patch
14827 @@ -0,0 +1,48 @@
14828 +## Small patch for a problem in the status
14829 +## line with UTF-8 locales. Closes: #360427
14830 +--- mc-4.6.1.orig/src/screen.c.orig 2006-06-22 17:50:36.000000000 +0200
14831 ++++ mc-4.6.1/src/screen.c 2006-06-22 17:51:39.000000000 +0200
14832 +@@ -658,7 +658,7 @@
14833 + g_snprintf (buffer, sizeof (buffer), (panel->marked == 1) ?
14834 + _("%s bytes in %d file") : _("%s bytes in %d files"),
14835 + size_trunc_sep (panel->total), panel->marked);
14836 +- if ((int) strlen (buffer) > cols-2){
14837 ++ if ((int) mbstrlen (buffer) > cols-2){
14838 + buffer [cols] = 0;
14839 + p += 2;
14840 + } else
14841 +# Shift-Enter fix.
14842 +--- mc-4.6.1.orig/src/util.c 2006-08-03 14:09:22.000000000 +0200
14843 ++++ mc-4.6.1/src/util.c 2006-08-03 14:17:11.000000000 +0200
14844 +@@ -102,7 +102,7 @@ mbstrlen (const char *str)
14845 +
14846 + if (len > 0) {
14847 + int wcsize = wcwidth(c);
14848 +- width += wcsize > 0 ? wcsize : 0;
14849 ++ width += wcsize >= 0 ? wcsize : 1;
14850 + str += len-1;
14851 + }
14852 + }
14853 +--- mc-4.6.1.orig/src/widget.c 2006-08-03 13:46:47.000000000 +0200
14854 ++++ mc-4.6.1/src/widget.c 2006-08-03 14:17:04.000000000 +0200
14855 +@@ -817,7 +817,7 @@ charcolumn(WInput *in, int idx)
14856 + l = mbrtowc(&wc, in->buffer + pos, len - pos, &mbs);
14857 + if (l <= 0)
14858 + return width;
14859 +- pos += l; width += wcwidth(wc);
14860 ++ pos += l; width += (wcwidth(wc) >= 0 ? wcwidth(wc) : 1);
14861 + i++;
14862 + };
14863 + return width;
14864 +# Wrong mode display patch
14865 +--- mc-4.6.1.orig/src/screen.c 2007-03-18 03:00:48.000000000 +0200
14866 ++++ mc-4.6.1/src/screen.c 2007-03-18 02:58:32.000000000 +0200
14867 +@@ -648,7 +648,7 @@
14868 + SLsmg_write_nwchars (((wchar_t *) buffer)
14869 + + txtlen - n2, n2);
14870 + } else
14871 +- SLsmg_write_nwchars ((wchar_t *) buffer, len);
14872 ++ SLsmg_write_nwchars (((wchar_t *) buffer + still), len);
14873 + } else {
14874 + printw ("%*s", still, "");
14875 + SLsmg_write_nwchars ((wchar_t *) buffer, txtlen);
14876 --- mc-4.6.1.orig/debian/patches/45_ftpfs_symlink2.patch
14877 +++ mc-4.6.1/debian/patches/45_ftpfs_symlink2.patch
14878 @@ -0,0 +1,32 @@
14879 +--- vfs/direntry.c 22 Feb 2005 18:35:23 -0000 1.116
14880 ++++ vfs/direntry.c 6 Apr 2005 14:04:54 -0000
14881 +@@ -251,7 +251,13 @@ vfs_s_find_entry_tree (struct vfs_class
14882 + char * const pathref = g_strdup (a_path);
14883 + char *path = pathref;
14884 +
14885 +- canonicalize_pathname (path);
14886 ++ if (strncmp(me->name, "ftpfs", 5) != 0)
14887 ++ canonicalize_pathname (path);
14888 ++ else {
14889 ++ char *p = path + strlen (path) - 1;
14890 ++ while (p > path && *p == PATH_SEP)
14891 ++ *p-- = 0;
14892 ++ }
14893 +
14894 + while (root) {
14895 + while (*path == PATH_SEP) /* Strip leading '/' */
14896 +@@ -324,7 +330,13 @@ vfs_s_find_entry_linear (struct vfs_clas
14897 + if (root->super->root != root)
14898 + vfs_die ("We have to use _real_ root. Always. Sorry.");
14899 +
14900 +- canonicalize_pathname (path);
14901 ++ if (strncmp (me->name, "ftpfs", 5) != 0)
14902 ++ canonicalize_pathname (path);
14903 ++ else {
14904 ++ char *p = path + strlen (path) - 1;
14905 ++ while (p > path && *p == PATH_SEP)
14906 ++ *p-- = 0;
14907 ++ }
14908 +
14909 + if (!(flags & FL_DIR)) {
14910 + char *dirname, *name, *save;
14911 --- mc-4.6.1.orig/debian/patches/01_mc.ext.in.mime.patch
14912 +++ mc-4.6.1/debian/patches/01_mc.ext.in.mime.patch
14913 @@ -0,0 +1,317 @@
14914 +--- lib/mc.ext.in.orig 2006-06-22 21:05:05.000000000 +0200
14915 ++++ lib/mc.ext.in 2006-10-10 17:53:46.000000000 +0200
14916 +@@ -106,8 +106,8 @@
14917 +
14918 + ### Archives ###
14919 +
14920 +-# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z
14921 +-regex/\.t([gp]?z|ar\.g?[zZ])$
14922 ++# .tgz, .tpz, .tar.gz, .tar.z, .tar.Z, .ipk
14923 ++regex/\.t([gp]?z|ar\.g?[zZ])$|\.ipk$
14924 + Open=%cd %p#utar
14925 + View=%view{ascii} gzip -dc %f 2>/dev/null | tar tvvf -
14926 +
14927 +@@ -132,7 +132,7 @@
14928 + # tar
14929 + regex/\.(tar|TAR)$
14930 + Open=%cd %p#utar
14931 +- View=%view{ascii} tar tvvf %f
14932 ++ View=%view{ascii} tar tvvf - < %f
14933 +
14934 + # lha
14935 + type/^LHa\ .*archive
14936 +@@ -142,7 +142,7 @@
14937 + # arj
14938 + regex/\.a(rj|[0-9][0-9])$
14939 + Open=%cd %p#uarj
14940 +- View=%view{ascii} unarj l %f
14941 ++ View=%view{ascii} arj l %f
14942 +
14943 + # ha
14944 + regex/\.([Hh][Aa])$
14945 +@@ -194,7 +194,16 @@
14946 + # deb
14947 + regex/\.u?deb$
14948 + Open=%cd %p#deb
14949 +- View=%view{ascii} dpkg-deb -c %f
14950 ++ View=%view{ascii} dpkg-deb -I %f && echo && dpkg-deb -c %f
14951 ++
14952 ++# dpkg
14953 ++shell/.debd
14954 ++ Open=%cd %p#debd
14955 ++ View=%view{ascii} dpkg -s `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
14956 ++# apt
14957 ++shell/.deba
14958 ++ Open=%cd %p#deba
14959 ++ View=%view{ascii} apt-cache show `echo %p | sed 's/\([0-9a-z.-]*\).*/\1/'`
14960 +
14961 + # ISO9660
14962 + regex/\.iso$
14963 +@@ -210,28 +219,28 @@
14964 +
14965 + # C
14966 + shell/.c
14967 +- Open=%var{EDITOR:vi} %f
14968 ++ Open=sensible-editor %f
14969 +
14970 + # Fortran
14971 + shell/.f
14972 +- Open=%var{EDITOR:vi} %f
14973 ++ Open=sensible-editor %f
14974 +
14975 + # Header
14976 + regex/\.(h|hpp)$
14977 +- Open=%var{EDITOR:vi} %f
14978 ++ Open=sensible-editor %f
14979 +
14980 + # Object
14981 + shell/.o
14982 +- #Open=%var{PAGER:more} %f
14983 ++ #Open=sensible-pager %f
14984 + View=%view{ascii} file %f && nm %f
14985 +
14986 + # Asm
14987 + shell/.s
14988 +- Open=%var{EDITOR:vi} %f
14989 ++ Open=sensible-editor %f
14990 +
14991 + # C++
14992 + regex/\.(C|cc|cpp)$
14993 +- Open=%var{EDITOR:vi} %f
14994 ++ Open=sensible-editor %f
14995 +
14996 +
14997 + ### Documentation ###
14998 +@@ -252,7 +261,7 @@
14999 + View=%view{ascii} file %f && nm %f
15000 +
15001 + regex/(([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])|\.man)$
15002 +- Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | %var{PAGER:more}
15003 ++ Open=case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac | sensible-pager
15004 + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) cat %f ;; *) nroff @MAN_FLAGS@ @MANDOC@ %f ;; esac
15005 +
15006 + # Troff with me macros.
15007 +@@ -262,25 +271,25 @@
15008 + View=
15009 +
15010 + shell/.me
15011 +- Open=nroff @MAN_FLAGS@ -me %f | %var{PAGER:more}
15012 ++ Open=nroff @MAN_FLAGS@ -me %f | sensible-pager
15013 + View=%view{ascii,nroff} nroff @MAN_FLAGS@ -me %f
15014 +
15015 + # Troff with ms macros.
15016 + shell/.ms
15017 +- Open=nroff @MAN_FLAGS@ -ms %f | %var{PAGER:more}
15018 ++ Open=nroff @MAN_FLAGS@ -ms %f | sensible-pager
15019 + View=%view{ascii,nroff} nroff @MAN_FLAGS@ -ms %f
15020 +
15021 + # Manual page - compressed
15022 + regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.g?[Zz]$
15023 +- Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
15024 ++ Open=case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
15025 + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) gzip -dc %f ;; *) gzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
15026 +
15027 + regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz$
15028 +- Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
15029 ++ Open=case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
15030 + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip -dc %f ;; *) bzip -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
15031 +
15032 + regex/([^0-9]|^[^\.]*)\.([1-9][A-Za-z]*|[ln])\.bz2$
15033 +- Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | %var{PAGER:more}
15034 ++ Open=case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac | sensible-pager
15035 + View=%view{ascii,nroff} case %d/%f in */log/*|*/logs/*) bzip2 -dc %f ;; *) bzip2 -dc %f | nroff @MAN_FLAGS@ @MANDOC@ ;; esac
15036 +
15037 +
15038 +@@ -290,6 +299,7 @@
15039 + Include=image
15040 +
15041 + type/^JPEG
15042 ++ View=%view{ascii} identify %f; test -x /usr/bin/exif && echo && exif %f
15043 + Include=image
15044 +
15045 + type/^PC\ bitmap
15046 +@@ -317,14 +327,16 @@
15047 + Open=gimp %f
15048 +
15049 + shell/.xbm
15050 +- Open=bitmap %f
15051 ++ Include=image
15052 ++ #Open=bitmap %f
15053 +
15054 + shell/.xpm
15055 + Include=image
15056 + View=sxpm %f
15057 +
15058 + include/image
15059 +- Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
15060 ++ Open=see %f
15061 ++ #Open=if [ "$DISPLAY" = "" ]; then zgv %f; else (gqview %f &); fi
15062 + View=%view{ascii} identify %f
15063 + #View=%view{ascii} asciiview %f
15064 +
15065 +@@ -332,25 +344,30 @@
15066 + ### Sound files ###
15067 +
15068 + regex/\.([wW][aA][vV]|[sS][nN][dD]|[vV][oO][cC]|[aA][uU]|[sS][mM][pP]|[aA][iI][fF][fF]|[sS][nN][dD])$
15069 +- Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms -e %f 1>/dev/null 2>&1 &); fi
15070 ++ Open=run-mailcap audio/x-wav:%f
15071 ++ #Open=if [ "$DISPLAY" = "" ]; then play %f; else (xmms -e %f 1>/dev/null 2>&1 &); fi
15072 +
15073 + regex/\.([mM][oO][dD]|[sS]3[mM]|[xX][mM]|[iI][tT]|[mM][tT][mM]|669|[sS][tT][mM]|[uU][lL][tT]|[fF][aA][rR])$
15074 +- Open=mikmod %f
15075 +- #Open=tracker %f
15076 ++ Open=run-mailcap application/x-mod:%f
15077 ++ #Open=mikmod %f
15078 ++ #Open=tracker %f
15079 +
15080 + regex/\.([wW][aA][wW]22)$
15081 + Open=vplay -s 22 %f
15082 +
15083 + regex/\.([mM][pP]3)$
15084 +- Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f &); fi
15085 +- View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/^Title/,/^Comment/p;/^MPEG/,/^Audio/p'
15086 ++ Open=run-mailcap audio/mpeg:%f
15087 ++ #Open=if [ "$DISPLAY" = "" ]; then mpg123 %f; else (xmms %f &); fi
15088 ++ View=%view{ascii} mpg123 -vtn1 %f 2>&1 | sed -n '/Title:/,/Comment:/p;/^MPEG/,/^Audio/p'
15089 +
15090 + regex/\.([oO][gG][gG])$
15091 +- Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f &); fi
15092 ++ Open=run-mailcap application/x-ogg:%f &
15093 ++ #Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f &); fi
15094 + View=%view{ascii} ogginfo %s
15095 +
15096 + regex/\.([mM][iI][dD][iI]?|[rR][mM][iI][dD]?)$
15097 +- Open=timidity %f
15098 ++ Open=run-mailcap audio/midi:%f
15099 ++ #Open=timidity %f
15100 +
15101 + regex/\.([wW][mM][aA])$
15102 + Open=mplayer -vo null %f
15103 +@@ -390,10 +407,12 @@
15104 + Include=video
15105 +
15106 + regex/\.([rR][aA]?[mM])$
15107 +- Open=(realplay %f >/dev/null 2>&1 &)
15108 ++ Open=run-mailcap audio/x-pn-realaudio:%f
15109 ++ #Open=(realplay %f >/dev/null 2>&1 &)
15110 +
15111 + include/video
15112 +- Open=(mplayer %f >/dev/null 2>&1 &)
15113 ++ Open=see %f
15114 ++ #Open=(mplayer %f >/dev/null 2>&1 &)
15115 + #Open=(gtv %f >/dev/null 2>&1 &)
15116 + #Open=(xanim %f >/dev/null 2>&1 &)
15117 +
15118 +@@ -402,12 +421,14 @@
15119 +
15120 + # Postscript
15121 + type/^PostScript
15122 +- Open=(gv %f &)
15123 ++ Open=run-mailcap application/postscript:%f
15124 ++ #Open=(gv %f &)
15125 + View=%view{ascii} ps2ascii %f
15126 +
15127 + # PDF
15128 + type/^PDF
15129 +- Open=(xpdf %f &)
15130 ++ Open=run-mailcap application/pdf:%f &
15131 ++ #Open=(xpdf %f &)
15132 + #Open=(acroread %f &)
15133 + #Open=(ghostview %f &)
15134 + View=%view{ascii} pdftotext %f -
15135 +@@ -417,8 +438,9 @@
15136 +
15137 + # html
15138 + regex/\.([hH][tT][mM][lL]?)$
15139 +- 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
15140 +- View=%view{ascii} lynx -dump -force_html %f
15141 ++ Open=run-mailcap text/html:%f
15142 ++ #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
15143 ++ View=%view{ascii} links -dump %f 2>/dev/null || w3m -dump %f 2>/dev/null || lynx -dump -force_html %f
15144 +
15145 + # StarOffice 5.2
15146 + shell/.sdw
15147 +@@ -435,22 +457,26 @@
15148 +
15149 + # Microsoft Word Document
15150 + regex/\.([Dd][oO][cCtT]|[Ww][rR][iI])$
15151 +- Open=(abiword %f >/dev/null 2>&1 &)
15152 +- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
15153 ++ Open=run-mailcap application/msword:%f
15154 ++ #Open=(abiword %f >/dev/null 2>&1 &)
15155 ++ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
15156 + type/^Microsoft\ Word
15157 + Open=(abiword %f >/dev/null 2>&1 &)
15158 +- View=%view{ascii} catdoc -w %f || word2x -f text %f - || strings %f
15159 ++ View=%view{ascii} antiword -t %f || catdoc -w %f || word2x -f text %f - || strings %f
15160 +
15161 + # RTF document
15162 + regex/\.([rR][tT][fF])$
15163 +- Open=(abiword %f >/dev/null 2>&1 &)
15164 ++ Open=run-mailcap text/rtf:%f
15165 ++ #Open=(abiword %f >/dev/null 2>&1 &)
15166 +
15167 + # Microsoft Excel Worksheet
15168 + regex/\.([xX][lL][sSwW])$
15169 +- Open=(gnumeric %f >/dev/null 2>&1 &)
15170 ++ Open=run-mailcap application/vnd.ms-excel:%f
15171 ++ #Open=(gnumeric %f >/dev/null 2>&1 &)
15172 + View=%view{ascii} xls2csv %f || strings %f
15173 + type/^Microsoft\ Excel
15174 +- Open=(gnumeric %f >/dev/null 2>&1 &)
15175 ++ Open=run-mailcap application/vnd.ms-excel:%f
15176 ++ #Open=(gnumeric %f >/dev/null 2>&1 &)
15177 + View=%view{ascii} xls2csv %f || strings %f
15178 +
15179 + # Use OpenOffice.org to open any MS Office documents
15180 +@@ -463,12 +489,14 @@
15181 +
15182 + # DVI
15183 + regex/\.([dD][vV][iI])$
15184 +- Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
15185 ++ Open=run-mailcap application/x-dvi:%f
15186 ++ #Open=if [ x$DISPLAY = x ]; then dvisvga %f; else (xdvi %f &); fi
15187 + View=%view{ascii} dvi2tty %f
15188 +
15189 + # TeX
15190 + regex/\.([Tt][Ee][Xx])$
15191 +- Open=%var{EDITOR:vi} %f
15192 ++ Open=sensible-editor %f
15193 ++ #Open=%var{EDITOR:vi} %f
15194 +
15195 +
15196 + ### Miscellaneous ###
15197 +@@ -509,24 +537,29 @@
15198 +
15199 + # gzip
15200 + type/^gzip
15201 +- Open=gzip -dc %f | %var{PAGER:more}
15202 ++ Open=gzip -dc %f | sensible-pager
15203 + View=%view{ascii} gzip -dc %f 2>/dev/null
15204 +
15205 + # bzip2
15206 + type/^bzip2
15207 +- Open=bzip2 -dc %f | %var{PAGER:more}
15208 ++ Open=bzip2 -dc %f | sensible-pager
15209 + View=%view{ascii} bzip2 -dc %f 2>/dev/null
15210 +
15211 + # bzip
15212 + type/^bzip
15213 +- Open=bzip -dc %f | %var{PAGER:more}
15214 ++ Open=bzip -dc %f | sensible-pager
15215 + View=%view{ascii} bzip -dc %f 2>/dev/null
15216 +
15217 + # compress
15218 + type/^compress
15219 +- Open=gzip -dc %f | %var{PAGER:more}
15220 ++ Open=gzip -dc %f | sensible-pager
15221 + View=%view{ascii} gzip -dc %f 2>/dev/null
15222 +
15223 ++### Debian additions ###
15224 ++
15225 ++# Gettext Catalogs
15226 ++shell/.mo
15227 ++ View=%view{ascii} msgunfmt %f || cat %f
15228 +
15229 + ### Default ###
15230 +
15231 --- mc-4.6.1.orig/debian/patches/14_cxx.syntax.patch
15232 +++ mc-4.6.1/debian/patches/14_cxx.syntax.patch
15233 @@ -0,0 +1,141 @@
15234 +--- mc-4.6.0-4.6.1-pre4.orig/syntax/Makefile.in
15235 ++++ mc-4.6.0-4.6.1-pre4/syntax/Makefile.in
15236 +@@ -227,6 +227,7 @@
15237 + aspx.syntax \
15238 + assembler.syntax \
15239 + c.syntax \
15240 ++ cxx.syntax \
15241 + cs.syntax \
15242 + changelog.syntax \
15243 + diff.syntax \
15244 +--- mc-4.6.0-4.6.1-pre4.orig/syntax/cxx.syntax
15245 ++++ mc-4.6.0-4.6.1-pre4/syntax/cxx.syntax
15246 +@@ -0,0 +1,128 @@
15247 ++context default
15248 ++ keyword whole auto yellow
15249 ++ keyword whole break yellow
15250 ++ keyword whole case yellow
15251 ++ keyword whole char yellow
15252 ++ keyword whole const yellow
15253 ++ keyword whole continue yellow
15254 ++ keyword whole default yellow
15255 ++ keyword whole do yellow
15256 ++ keyword whole double yellow
15257 ++ keyword whole else yellow
15258 ++ keyword whole enum yellow
15259 ++ keyword whole extern yellow
15260 ++ keyword whole float yellow
15261 ++ keyword whole for yellow
15262 ++ keyword whole goto yellow
15263 ++ keyword whole if yellow
15264 ++ keyword whole int yellow
15265 ++ keyword whole long yellow
15266 ++ keyword whole register yellow
15267 ++ keyword whole return yellow
15268 ++ keyword whole short yellow
15269 ++ keyword whole signed yellow
15270 ++ keyword whole sizeof yellow
15271 ++ keyword whole static yellow
15272 ++ keyword whole struct yellow
15273 ++ keyword whole switch yellow
15274 ++ keyword whole typedef yellow
15275 ++ keyword whole union yellow
15276 ++ keyword whole unsigned yellow
15277 ++ keyword whole void yellow
15278 ++ keyword whole volatile yellow
15279 ++ keyword whole while yellow
15280 ++ keyword whole asm yellow
15281 ++ keyword whole catch yellow
15282 ++ keyword whole class yellow
15283 ++ keyword whole friend yellow
15284 ++ keyword whole delete yellow
15285 ++ keyword whole inline yellow
15286 ++ keyword whole new yellow
15287 ++ keyword whole operator yellow
15288 ++ keyword whole private yellow
15289 ++ keyword whole protected yellow
15290 ++ keyword whole public yellow
15291 ++ keyword whole this yellow
15292 ++ keyword whole throw yellow
15293 ++ keyword whole template yellow
15294 ++ keyword whole try yellow
15295 ++ keyword whole virtual yellow
15296 ++ keyword whole bool yellow
15297 ++ keyword whole const_cast yellow
15298 ++ keyword whole dynamic_cast yellow
15299 ++ keyword whole explicit yellow
15300 ++ keyword whole false yellow
15301 ++ keyword whole mutable yellow
15302 ++ keyword whole namespace yellow
15303 ++ keyword whole reinterpret_cast yellow
15304 ++ keyword whole static_cast yellow
15305 ++ keyword whole true yellow
15306 ++ keyword whole typeid yellow
15307 ++ keyword whole typename yellow
15308 ++ keyword whole using yellow
15309 ++ keyword whole wchar_t yellow
15310 ++ keyword whole ... yellow
15311 ++ keyword whole linestart \{\s\t\}\[\s\t\]#*\n brightmagenta
15312 ++
15313 ++ keyword /\* brown
15314 ++ keyword \*/ brown
15315 ++ keyword // brown
15316 ++
15317 ++ keyword '\\\{"abtnvfr\}' brightgreen
15318 ++ keyword '\\\{0123\}\{01234567\}\{01234567\}' brightgreen
15319 ++ keyword '\\'' brightgreen
15320 ++ keyword '\\\\' brightgreen
15321 ++ keyword '\\0' brightgreen
15322 ++ keyword '\{\s!"#$%&()\*\+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ\}' brightgreen
15323 ++
15324 ++ keyword > yellow
15325 ++ keyword < yellow
15326 ++ keyword \+ yellow
15327 ++ keyword - yellow
15328 ++ keyword \* yellow
15329 ++ keyword / yellow
15330 ++ keyword % yellow
15331 ++ keyword = yellow
15332 ++ keyword != yellow
15333 ++ keyword == yellow
15334 ++ keyword { brightcyan
15335 ++ keyword } brightcyan
15336 ++ keyword ( brightcyan
15337 ++ keyword ) brightcyan
15338 ++ keyword [ brightcyan
15339 ++ keyword ] brightcyan
15340 ++ keyword , brightcyan
15341 ++ keyword : brightcyan
15342 ++ keyword ? brightcyan
15343 ++ keyword ; brightmagenta
15344 ++
15345 ++context exclusive /\* \*/ brown
15346 ++ spellcheck
15347 ++
15348 ++context exclusive // \n brown
15349 ++ spellcheck
15350 ++
15351 ++context linestart # \n brightred
15352 ++ keyword \\\n yellow
15353 ++ keyword /\**\*/ brown
15354 ++ keyword //*\n brown
15355 ++ keyword "+" red
15356 ++ keyword <+> red
15357 ++
15358 ++context " " green
15359 ++ spellcheck
15360 ++ keyword \\" brightgreen
15361 ++ keyword %% brightgreen
15362 ++ keyword %\[#0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[L\]\{eEfgGoxX\} brightgreen
15363 ++ keyword %\[0\s-\+,\]\[0123456789\*\]\[.\]\[0123456789\*\]\[hl\]\{diuxX\} brightgreen
15364 ++ keyword %\[hl\]n brightgreen
15365 ++ keyword %\[-\]\[0123456789\*\]\[.\]\[0123456789\*\]s brightgreen
15366 ++ keyword %[*] brightgreen
15367 ++ keyword %c brightgreen
15368 ++ keyword %p brightgreen
15369 ++ keyword \\\{0123\}\{01234567\}\{01234567\} brightgreen
15370 ++ keyword \\\\ brightgreen
15371 ++ keyword \\' brightgreen
15372 ++ keyword \\\{abtnvfr\} brightgreen
15373 ++
15374 ++
15375 --- mc-4.6.1.orig/debian/copyright
15376 +++ mc-4.6.1/debian/copyright
15377 @@ -0,0 +1,22 @@
15378 +This package was debianized by Paul Seelig <pseelig@mail.uni-mainz.de>
15379 +on Tue Apr 1 14:32:15 1997. It has been maintained by Michael Bramer
15380 +and Martin Bialasinski <mc@internet-treff.uni-koeln.de>.
15381 +
15382 +From Jan 2004 this package is maintained by:
15383 + Stefano Melchior <stefano.melchior@openlabs.it> and Ludovic Drolez <ldrolez@free.fr>
15384 +
15385 +From Dec 2002 to Dec 2004 this package was maintained by:
15386 + Adam Byrtek <alpha@debian.org>
15387 +
15388 +It was downloaded from:
15389 + http://www.ibiblio.org/pub/Linux/utils/file/managers/mc/
15390 +
15391 +Homepage:
15392 + http://www.ibiblio.org/mc/
15393 +
15394 +Authors:
15395 + See /usr/share/doc/mc/AUTHORS
15396 +
15397 +Copyright:
15398 + This software is released under a GPL license - see the
15399 + /usr/share/common-licenses/GPL file.
15400 --- mc-4.6.1.orig/debian/doc-base
15401 +++ mc-4.6.1/debian/doc-base
15402 @@ -0,0 +1,8 @@
15403 +Document: MC-FAQ
15404 +Title: Midnight Commander FAQ
15405 +Author: Janne Kukonlehto <janne@gnome.org>
15406 +Abstract: Midnight Commander Frequently Asked Questions and the Answers
15407 +Section: Apps/Tools
15408 +
15409 +Format: text
15410 +Files: /usr/share/doc/mc/FAQ.gz
15411 --- mc-4.6.1.orig/debian/mc.prerm
15412 +++ mc-4.6.1/debian/mc.prerm
15413 @@ -0,0 +1,12 @@
15414 +#! /bin/sh
15415 +
15416 +set -e
15417 +
15418 +case "$1" in
15419 + remove)
15420 + update-alternatives --remove editor /usr/bin/mcedit-debian
15421 + update-alternatives --remove view /usr/bin/mcview-debian
15422 + ;;
15423 +esac
15424 +
15425 +#DEBHELPER#