random fixes

This commit is contained in:
Jindrich Novy 2005-12-06 12:47:50 +00:00
parent d224d567c2
commit cfc943f443
4 changed files with 60 additions and 11 deletions

20
mc-concat.patch Normal file
View File

@ -0,0 +1,20 @@
--- mc-4.6.1a/src/util.c.jn 2005-12-02 11:08:26.000000000 +0100
+++ mc-4.6.1a/src/util.c 2005-12-02 13:11:19.000000000 +0100
@@ -1515,9 +1515,16 @@
/* If filename is NULL, then we just append PATH_SEP to the dir */
char *
-concat_dir_and_file (const char *dir, const char *file)
+concat_dir_and_file (const char *dir, const char *filename)
{
int i = strlen (dir);
+ const char *file = filename;
+
+ /* Return filename when dir is empty */
+ if (!i) return g_strdup (filename);
+
+ if (file != NULL && *file == PATH_SEP)
+ file++;
if (dir [i-1] == PATH_SEP)
return g_strconcat (dir, file, (char *) NULL);

View File

@ -1,6 +1,6 @@
--- mc-4.6.1a/lib/mc.ext.in.extensions 2005-09-06 11:20:01.000000000 +0200
+++ mc-4.6.1a/lib/mc.ext.in 2005-11-05 11:51:46.000000000 +0100
@@ -216,14 +216,25 @@ shell/.7z
+++ mc-4.6.1a/lib/mc.ext.in 2005-12-06 09:22:37.000000000 +0100
@@ -216,14 +221,25 @@ shell/.7z
# C
shell/.c
@ -28,7 +28,7 @@
Open=%var{EDITOR:vi} %f
# Object
@@ -248,9 +259,11 @@ regex/\.(te?xi|texinfo)$
@@ -248,9 +264,11 @@ regex/\.(te?xi|texinfo)$
# GNU Info page
type/^Info\ text
Open=info -f %f
@ -40,7 +40,7 @@
# Manual page
# Exception - .so libraries are not manual pages
@@ -319,6 +332,12 @@ type/^PPM
@@ -319,6 +337,12 @@ type/^PPM
type/^Netpbm
Include=image
@ -53,7 +53,7 @@
shell/.xcf
Open=gimp %f
@@ -330,7 +349,7 @@ shell/.xpm
@@ -330,7 +354,7 @@ shell/.xpm
View=sxpm %f
include/image
@ -62,7 +62,7 @@
View=%view{ascii} identify %f
#View=%view{ascii} asciiview %f
@@ -348,8 +367,12 @@ regex/\.([wW][aA][wW]22)$
@@ -348,8 +372,12 @@ regex/\.([wW][aA][wW]22)$
Open=vplay -s 22 %f
regex/\.([mM][pP]3)$
@ -77,7 +77,7 @@
regex/\.([oO][gG][gG])$
Open=if [ "$DISPLAY" = "" ]; then ogg123 %f; else (xmms %f &); fi
@@ -362,6 +385,9 @@ regex/\.([wW][mM][aA])$
@@ -362,6 +390,9 @@ regex/\.([wW][mM][aA])$
Open=mplayer -vo null %f
View=%view{ascii} mplayer -quiet -slave -frames 0 -vo null -ao null -identify %f 2>/dev/null | tail +13 || file %f
@ -87,7 +87,7 @@
### Play lists ###
@@ -386,20 +412,27 @@ regex/\.([mM][oO][vV]|[qQ][tT])$
@@ -386,20 +417,27 @@ regex/\.([mM][oO][vV]|[qQ][tT])$
regex/\.([mM][pP]4|[mM][pP][eE]?[gG])$
Include=video
@ -116,7 +116,13 @@
#Open=(gtv %f >/dev/null 2>&1 &)
#Open=(xanim %f >/dev/null 2>&1 &)
@@ -413,7 +446,8 @@ type/^PostScript
@@ -408,12 +446,13 @@ include/video
# Postscript
type/^PostScript
- Open=(gv %f &)
+ Open=(evince %f &)
View=%view{ascii} ps2ascii %f
# PDF
type/^PDF
@ -126,7 +132,7 @@
#Open=(acroread %f &)
#Open=(ghostview %f &)
View=%view{ascii} pdftotext %f -
@@ -424,7 +458,7 @@ type/^PDF
@@ -424,7 +463,7 @@ type/^PDF
# html
regex/\.([hH][tT][mM][lL]?)$
Open=(if test -n "@X11_WWW@" && test -n "$DISPLAY"; then (@X11_WWW@ file://%d/%p &) 1>&2; else links %f || lynx -force_html %f || ${PAGER:-more} %f; fi) 2>/dev/null

11
mc-ministatus.patch Normal file
View File

@ -0,0 +1,11 @@
--- mc-4.6.1a/src/screen.c.ministatus 2005-11-17 22:01:32.000000000 +0100
+++ mc-4.6.1a/src/screen.c 2005-11-17 22:02:31.000000000 +0100
@@ -471,7 +471,7 @@ static struct {
{ "mtime", 12, 0, J_RIGHT, N_("MTime"), 1, string_file_mtime, (sortfn *) sort_time },
{ "atime", 12, 0, J_RIGHT, N_("ATime"), 1, string_file_atime, (sortfn *) sort_atime },
{ "ctime", 12, 0, J_RIGHT, N_("CTime"), 1, string_file_ctime, (sortfn *) sort_ctime },
-{ "perm", 10, 0, J_LEFT, N_("Permission"),1,string_file_permission, NULL },
+{ "perm", 12, 0, J_CENTER, N_("Permission"),1,string_file_permission, NULL },
{ "mode", 6, 0, J_RIGHT, N_("Perm"), 1, string_file_perm_octal, NULL },
{ "nlink", 2, 0, J_RIGHT, N_("Nl"), 1, string_file_nlinks, (sortfn *) sort_links },
{ "inode", 5, 0, J_RIGHT, N_("Inode"), 1, string_inode, (sortfn *) sort_inode },

14
mc.spec
View File

@ -1,7 +1,7 @@
Summary: User-friendly text console file manager and visual shell.
Name: mc
Version: 4.6.1a
Release: 4
Release: 5
Epoch: 1
License: GPL
Group: System Environment/Shells
@ -19,6 +19,9 @@ Patch4: mc-fish-upload.patch
Patch5: mc-userhost.patch
Patch6: mc-64bit.patch
Patch7: mc-utf8-look-and-feel.patch
Patch8: mc-phpfix.patch
Patch9: mc-concat.patch
Patch10: mc-ministatus.patch
%description
Midnight Commander is a visual shell much like a file manager, only
@ -38,6 +41,9 @@ specific files.
%patch5 -p1 -b .userhost
%patch6 -p1 -b .64bit
%patch7 -p1 -b .laf
%patch8 -p1 -b .phpfix
%patch9 -p1 -b .concat
%patch10 -p1 -b .ministatus
# convert files in /lib to UTF-8
pushd lib
@ -175,6 +181,12 @@ rm -rf $RPM_BUILD_ROOT
%dir %{_datadir}/mc
%changelog
* Tue Dec 6 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-5
- correctly concatenate directory and file in concat_dir_and_file()
- highlight PHP files correctly (#174802)
- use evince instead of gv to view ps files
- align mini status bar with main panels
* Fri Dec 1 2005 Jindrich Novy <jnovy@redhat.com> 4.6.1a-4
- don't segfault when LANG is not set, thanks to Andy Shevchenko (#174070)
- drop specsyntax patch, applied upstream