Unsere Konsole ist jetzt UTF8-Fit.
[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 +-