patch: MC for Win32



Hi all,

so here's my patch for mc on Win32.

Note :

- I took a CVS checkout from 27.Okt as a basis
- MC for Win32 is still far from beeing stable.
- Currently ONLY mingw32 (gcc for Win32) is supported
- You also need glib from Tor Lillqvist's "Gimp for Win32" site
- You also need gettext ( i.e. my gettext port
    http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html )

After applying my patch 
( running
  $> gzip -dc patch-mc-win32.gz | patch -p1
  in the mc source directory )

You can build mc.exe by changing to the pc subdir and run
$> make -fMakefile.MIN  

************************************

I added the two files

mc/pc/regex.c
mc/pc/regex.h

from the mc-4.1.36 distribution.
This is just a quick fix.
As the new distribution no longer contains
mc/src/regex.h
and
mc/src/regex.c
was giving trouble.

*******************************************

the mingw32 toolchain I use is
based on gcc-2.95.2-1 , winapi-0.1.5 , mingw-runtime-20000203
I built it from source on my Linux box.
it uses "msvcrt" as c-runtime library.

Later versions of mingw should do just fine.

Additionally I'm using my gettext-port 
(http://home.a-city.de/franco.bez/gettext/gettext_win32_en.html).

*******************************************

glib was downloaded from Tor Lillqvist's "Gimp for Win32" site.

packages needed:
glib-dev-20001226.zip
libiconv-dev-20001007.zip

these packages contain the Headers, Libs and Win32 Dlls.

the header-files are a problem when using a UN*X based mingw-cross-compiler.
they contain CR/LF line termiation.
In order to convert them to the UN*X style LF line termination a tool like 
dos2unix is required.

****************************************

What follows are the comments to my patch.

Ciao,
  Franco

****************************************

mc/edit/edit.c
- Open file in binary mode on Win32 platforms.

mc/pc/Makefile.MIN
- removed ".exe" from mingw-binary names 
   to make build possible on cross-compilers
- fixed compiler and linker flags for use of glib and gettext
- fixed order of flags for linking mc.exe

mc/pc/Makefile.PC
- added/removed files to/from build

mc/pc/chmod.c
- fixed includes for cross-compiler
- added gettext N_() and _() makro calls

mc/pc/config.h
- a few fixes

mc/pc/cons_nt.c
- changes regarding the calculation of the size of the console window on Win32
  fixes a bug with Win2k

mc/pc/dirent.h
- added comment that file seems to be no longer needed

mc/pc/drive.c
- added gettext N_() and _() makro calls
- added workaround for a crash that happens 
   when Changing drive while panel not in DirListing mode

mc/pc/key_nt.c
- fixed a problem with AltGr Key
- added/changed dummy functions (mouse dummys)

mc/pc/slint_pc.c
- added comment -> DO NOT USE GETTEXT HERE

mc/pc/util_nt.c
- fixed includes
- added gettext N_() and _() makro calls
- fixed problem with the display of free disc space
- added dummy functions

mc/slang/slerr.c
- fixed includes

mc/slang/slgetkey.c
- fixed includes

mc/slang/slsmg.c
- fixed includes

mc/slang/sltermin.c
- fixed includes

mc/slang/slvideo.c
- fixed includes
- changes regarding the calculation of the size of the console window on Win32
  fixes a bug with Win2k

mc/slang/slw32tty.c
- fixed includes
- changes regarding the calculation of the size of the console window on Win32
  fixes a bug with Win2k
- added dummy functions

mc/src/cmd.c
- fixed includes

mc/src/command.c
- added handling of internal SET command for Win32

mc/src/ext.c
- no shellbang in temporary command file on windows

mc/src/file.c
- fixed includes
- commented out the detection of cyclic symlinks on Win32
  this is only a Quick Fix
  
mc/src/global.h
- fixed includes

mc/src/main.c
- fixed includes
- director_history_add is broken on Win32 - mc crashes -
   made it a dummy function on Win32
  THIS definately has to be fixed
- made init_xterm_support a dummy on Win32 - there is no xterm there
- made mc ignore Ctrl-C breaks on Win32
- defined the gettext LOCALEDIR for Win32
- added comment that gfree(home_dir); might no longer be needed on Win32

mc/src/myslang.h
- fixed includes

mc/src/treestore.c
- commented out 
   process_special_dirs (&special_dirs, CONFDIR "mc.global");
   for Win32

mc/src/user.h
- fixed includes

mc/src/util.c
- fixed includes
- fixed parameters for bizp2 might be also needed for other platforms
- fixed TEMPDIR for Win32

mc/vfs/vfs.h
- fixed includes

Attachment: patch-mc-win32.gz
Description: my patches

Attachment: regex.c.gz
Description: Add this file to the pc subdir

Attachment: regex.h.gz
Description: Add this file to the pc subdir



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]