[packages/mc] - cleanup, package mc.hint.et (.kk and .szl omitted, not translated yet)

qboosh qboosh at pld-linux.org
Sat Dec 7 15:25:33 CET 2013


commit dda81e46b494635b20bfc943ea78d8218cbeec7f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Dec 7 15:26:58 2013 +0100

    - cleanup, package mc.hint.et (.kk and .szl omitted, not translated yet)

 mc-home_etc2.patch | 631 -----------------------------------------------------
 mc.spec            |  12 +-
 2 files changed, 5 insertions(+), 638 deletions(-)
---
diff --git a/mc.spec b/mc.spec
index d07badd..c921480 100644
--- a/mc.spec
+++ b/mc.spec
@@ -1,5 +1,3 @@
-# TODO:
-# - check spec-syntax,mo patches
 #
 # Conditional build:
 %bcond_with	ext2undel	# with ext2 undelete fs
@@ -31,8 +29,6 @@ Source3:	http://www.mif.pg.gda.pl/homepages/ankry/man-PLD/%{name}-non-english-ma
 # Source3-md5:	17d7b574e1b85ad6f8ddceda9e841f19
 Source7:	%{name}.desktop
 Source8:	%{name}.png
-
-Patch1:		%{name}-home_etc2.patch
 Patch2:		%{name}-no-ws-visible.patch
 Patch3:		%{name}-noperl-vfs.patch
 # at now syntax highligthing for PLD-update-TODO and CVSROOT/users
@@ -158,9 +154,6 @@ tar, zip ve RPM dosyalarının içeriklerini gösterebilmesidir.
 
 %prep
 %setup -q -a3
-
-# doesn't apply, makes no sense (now mc complies to XDG by default)
-#%patch1 -p1
 %patch2 -p1
 %{!?with_perl_vfs:%patch3 -p1}
 %patch4 -p1
@@ -256,6 +249,7 @@ rm -rf $RPM_BUILD_ROOT
 %lang(el) %{_datadir}/mc/hints/mc.hint.el
 %lang(eo) %{_datadir}/mc/hints/mc.hint.eo
 %lang(es) %{_datadir}/mc/hints/mc.hint.es
+%lang(et) %{_datadir}/mc/hints/mc.hint.et
 %lang(eu) %{_datadir}/mc/hints/mc.hint.eu
 %lang(fa) %{_datadir}/mc/hints/mc.hint.fa
 %lang(fi) %{_datadir}/mc/hints/mc.hint.fi
@@ -268,6 +262,8 @@ rm -rf $RPM_BUILD_ROOT
 %lang(it) %{_datadir}/mc/hints/mc.hint.it
 %lang(ja) %{_datadir}/mc/hints/mc.hint.ja
 %lang(ka) %{_datadir}/mc/hints/mc.hint.ka
+# only English messages inside (as for 4.8.11)
+#%lang(kk) %{_datadir}/mc/hints/mc.hint.kk
 %lang(ko) %{_datadir}/mc/hints/mc.hint.ko
 %lang(lt) %{_datadir}/mc/hints/mc.hint.lt
 %lang(nl) %{_datadir}/mc/hints/mc.hint.nl
@@ -281,6 +277,8 @@ rm -rf $RPM_BUILD_ROOT
 %lang(sr) %{_datadir}/mc/hints/mc.hint.sr
 %lang(sv) %{_datadir}/mc/hints/mc.hint.sv
 %lang(sv) %{_datadir}/mc/hints/mc.hint.sv_SE
+# only English messages inside (as for 4.8.11)
+#%lang(szl) %{_datadir}/mc/hints/mc.hint.szl
 %lang(tr) %{_datadir}/mc/hints/mc.hint.tr
 %lang(uk) %{_datadir}/mc/hints/mc.hint.uk
 %lang(zh) %{_datadir}/mc/hints/mc.hint.zh
diff --git a/mc-home_etc2.patch b/mc-home_etc2.patch
deleted file mode 100644
index 148d490..0000000
--- a/mc-home_etc2.patch
+++ /dev/null
@@ -1,631 +0,0 @@
-diff -urN mc-4.6.1-pre1.org/doc/mc.1.in mc-4.6.1-pre1/doc/mc.1.in
---- mc-4.6.1-pre1.org/doc/mc.1.in	2004-06-06 23:19:36.014422424 +0200
-+++ mc-4.6.1-pre1/doc/mc.1.in	2004-06-06 23:20:01.380566184 +0200
-@@ -3231,6 +3231,9 @@
- .IP
- The default system-wide extensions file.
- .PP
-+.I $HOME_ETC/.mc/bindings
-+.IP
-+or
- .I ~/.mc/bindings
- .IP
- User's own extension, view configuration and edit configuration
-@@ -3250,6 +3253,9 @@
- .\"Terminal databases"
- are loaded from mc.lib.
- .PP
-+.I $HOME_ETC/.mc/ini
-+.IP
-+or
- .I ~/.mc/ini
- .IP
- User's own setup. If this file is present then the setup is loaded
-@@ -3263,11 +3269,17 @@
- .IP
- This file contains the default system-wide applications menu.
- .PP
-+.I $HOME_ETC/.mc/menu
-+.IP
-+or
- .I ~/.mc/menu
- .IP
- User's own application menu. If this file is present it is used instead
- of the system-wide applications menu.
- .PP
-+.I $HOME_ETC/.mc/Tree
-+.IP
-+or
- .I ~/.mc/Tree
- .IP
- The directory list for the directory tree and tree view features.
-diff -urN mc-4.6.1-pre1.org/doc/mcedit.1.in mc-4.6.1-pre1/doc/mcedit.1.in
---- mc-4.6.1-pre1.org/doc/mcedit.1.in	2004-06-06 23:19:36.031419840 +0200
-+++ mc-4.6.1-pre1/doc/mcedit.1.in	2004-06-06 23:21:26.082689504 +0200
-@@ -479,11 +479,17 @@
- The default system-wide syntax files for mcedit, used only if
- the corresponding user's own ~/.mc/cedit/ file is missing.
- .PP
-+.I $HOME_ETC/.mc/ini
-+.IP
-+or
- .I $HOME/.mc/ini
- .IP
- User's own setup.  If this file is present then the setup is loaded
- from here instead of the system-wide setup file.
- .PP
-+.I $HOME_ETC/.mc/ini
-+.IP
-+or
- .I $HOME/.mc/cedit/
- .IP
- User's own directory where block commands are processed and saved and
-diff -urN mc-4.6.1-pre1.org/doc/mcview.1.in mc-4.6.1-pre1/doc/mcview.1.in
---- mc-4.6.1-pre1.org/doc/mcview.1.in	2004-06-06 23:19:36.018421816 +0200
-+++ mc-4.6.1-pre1/doc/mcview.1.in	2004-06-06 23:20:01.387565120 +0200
-@@ -75,6 +75,9 @@
- Global settings for the Midnight Commander.  Settings in this file
- affect all users, whether they have ~/.mc/ini or not.
- .PP
-+.I $HOME_ETC/.mc/ini
-+.IP
-+or
- .I $HOME/.mc/ini
- .IP
- User's own setup.  If this file is present, the setup is loaded from
-diff -urN mc-4.6.1-pre1.org/man/pl/man1/mc.1 mc-4.6.1-pre1/man/pl/man1/mc.1
---- mc-4.6.1-pre1.org/man/pl/man1/mc.1	2004-06-06 23:19:36.088411176 +0200
-+++ mc-4.6.1-pre1/man/pl/man1/mc.1	2004-06-06 23:20:01.437557520 +0200
-@@ -2758,10 +2758,14 @@
- .IP
- Standardowy plik rozszerze� plik�w.
- .PP
-+$HOME_ETC/.mc/ext
-+.IP albo
-+.PP
- ~/.mc/ext
- .IP
- W�asny plik u�ytkownika, konfiguruje podgl�d i edycje plik�w. Ma wy�szy
--priorytet ni� plik systemowy.
-+priorytet ni� plik systemowy. Gdy ustawiona jest zmienna $HOME_ETC plik
-+$HOME_ETC/.mc/ext jest u�ywany w miejsce ~/.mc/ext.
- .PP
- /usr/lib/mc/mc.ini
- .IP
-@@ -2774,10 +2778,15 @@
- uwzgl�dniane przez wszystkie sesje Midnight Commandera, u�yteczne do
- definiowania og�lnosystemowych ustawie� terminali.
- .PP
-+$HOME_ETC/.mc/ini
-+.IP
-+albo
-+.PP
- ~/.mc/ini
- .IP
- W�asny setup u�ytkownika. Je�li ten plik jest dost�pny, jest �adowany
--zamiast pliku globalnego.
-+zamiast pliku globalnego. Gdy ustawiona jest zmienna $HOME_ETC plik
-+$HOME_ETC/.mc/ini jest u�ywany zamiast ~/.mc/ini.
- .PP
- /usr/lib/mc/mc.hint
- .IP
-@@ -2787,10 +2796,19 @@
- .IP
- Ten plik zawiera informacje o og�lnosystemowych aplikacjach w menu.
- .PP
-+$HOME_ETC/.mc/menu
-+.IP
-+albo
-+.PP
- ~/.mc/menu
- .IP
- W�asny plik menu u�ytkownika. Je�li ten plik jest obecny jest u�ywany
--zamiast pliku globalnego.
-+zamiast pliku globalnego. Gdy ustawiona jest zmienna $HOME_ETC plik
-+$HOME_ETC/.mc/menu jest u�ywany zamiast ~/.mc/menu.
-+.PP
-+$HOME_ETC
-+.IP
-+albo
- .PP
- ~/.mc/tree
- .IP
-@@ -2799,7 +2817,8 @@
- Linie zaczynaj�ce si� od numeru maj� tyle znak�w ile poprzedni katalog.
- Je�li chcesz mo�esz stworzy� plik u�ywaj�c komendy "find / -type d
- -print | sort > ~/.mc/tree". Normalnie nie ma sensu tego czyni�, gdy�
--Midnight Commander robi to sam za ciebie.
-+Midnight Commander robi to sam za ciebie. Gdy ustawiona jest zmienna
-+$HOME_ETC plik $HOME_ETC/.mc/tree jest u�ywany zamiast ~/.mc/tree
- .PP
- \&./.mc.menu
- .IP
-diff -urN mc-4.6.1-pre1.org/man/pl/man1/mcedit.1 mc-4.6.1-pre1/man/pl/man1/mcedit.1
---- mc-4.6.1-pre1.org/man/pl/man1/mcedit.1	2004-06-06 23:19:36.089411024 +0200
-+++ mc-4.6.1-pre1/man/pl/man1/mcedit.1	2004-06-06 23:20:01.442556760 +0200
-@@ -418,15 +418,23 @@
- dla ka�dej sesji Midnight Commandera. Przydatny do zdefiniowania ustawie�
- terminala obowi�zuj�cych dla ca�ego systemu (site-global).
- .PP
-+.I $HOME_ETC/.mc.ini
-+.IP
-+albo
- .I $HOME/.mc.ini
- .IP
- Prywatna konfiguracja u�ytkownika. Je�li istnieje, to konfiguracja odczytywana
- jest z tego w�a�nie pliku, zamiast z og�lnosystemowego pliku startowego.
-+Zmienna �rodowiskowa $HOME_ETC ma pierwsze�stwo przed $HOME.
- .PP
-+.I $HOME_ETC/.cedit
-+.IP
-+albo
- .I $HOME/.cedit/
- .IP
- Tymczasowy katalog u�ytkownika. Przetwarzane i zapisywane s� w nim polecenia
--operuj�ce na blokach tekstu.
-+operuj�ce na blokach tekstu. Zmienna �rodowiskowa $HOME_ETC ma pierwsze�stwo
-+przed $HOME.
- .SH LICENCJA
- Niniejszy program jest rozpowszechniany na warunkach licencji
- GNU General Public Licence opublikowanych przez Free Software Foundation.
-diff -urN mc-4.6.1-pre1.org/slang/sltermin.c mc-4.6.1-pre1/slang/sltermin.c
---- mc-4.6.1-pre1.org/slang/sltermin.c	2004-06-06 23:19:35.596485960 +0200
-+++ mc-4.6.1-pre1/slang/sltermin.c	2004-06-06 23:20:01.448555848 +0200
-@@ -265,7 +265,7 @@
-    /* If we are on a termcap based system, use termcap */
-    if (0 == tcap_getent (term, ti)) return ti;
- 
--   if (NULL != (home = _pSLsecure_getenv ("HOME")))
-+   if (NULL != (home = _pSLsecure_getenv ("HOME_ETC") ? _pSLsecure_getenv("HOME_ETC") : _pSLsecure_getenv("HOME")))
-      {
- 	strncpy (home_ti, home, sizeof (home_ti) - 11);
- 	home_ti [sizeof(home_ti) - 11] = 0;
-diff -urN mc-4.6.1-pre1.org/src/cmd.c mc-4.6.1-pre1/src/cmd.c
---- mc-4.6.1-pre1.org/src/cmd.c	2004-06-06 23:19:35.633480336 +0200
-+++ mc-4.6.1-pre1/src/cmd.c	2004-06-06 23:20:01.455554784 +0200
-@@ -588,7 +588,7 @@
-     extdir = mhl_str_dir_plus_file (mc_home, MC_LIB_EXT);
- 
-     if (dir == 0){
--	buffer = mhl_str_dir_plus_file (home_dir, MC_USER_EXT);
-+	buffer = mhl_str_dir_plus_file (etc_dir, MC_USER_EXT);
- 	check_for_default (extdir, buffer);
- 	do_edit (buffer);
- 	g_free (buffer);
-@@ -624,7 +624,7 @@
- 	    break;
- 
- 	case 1:
--	    buffer = mhl_str_dir_plus_file (home_dir, where ? CEDIT_HOME_MENU : MC_HOME_MENU);
-+	    buffer = mhl_str_dir_plus_file (etc_dir, where ? CEDIT_HOME_MENU : MC_HOME_MENU);
- 	    check_for_default (menufile, buffer);
- 	    break;
- 	
-@@ -691,7 +691,7 @@
-     extdir = mhl_str_dir_plus_file (mc_home, "syntax" PATH_SEP_STR "Syntax");
- 
-     if (dir == 0) {
--	buffer = mhl_str_dir_plus_file (home_dir, SYNTAX_FILE);
-+	buffer = mhl_str_dir_plus_file (etc_dir, SYNTAX_FILE);
- 	check_for_default (extdir, buffer);
- 	do_edit (buffer);
- 	g_free (buffer);
-diff -urN mc-4.6.1-pre1.org/src/ext.c mc-4.6.1-pre1/src/ext.c
---- mc-4.6.1-pre1.org/src/ext.c	2004-06-06 23:19:35.645478512 +0200
-+++ mc-4.6.1-pre1/src/ext.c	2004-06-06 23:20:01.458554328 +0200
-@@ -434,7 +434,7 @@
- 	int mc_user_ext = 1;
- 	int home_error = 0;
- 
--	extension_file = mhl_str_dir_plus_file (home_dir, MC_USER_EXT);
-+	extension_file = mhl_str_dir_plus_file (etc_dir, MC_USER_EXT);
- 	if (!exist_file (extension_file)) {
- 	    g_free (extension_file);
- 	  check_stock_mc_ext:
-diff -urN mc-4.6.1-pre1.org/src/hotlist.c mc-4.6.1-pre1/src/hotlist.c
---- mc-4.6.1-pre1.org/src/hotlist.c	2004-06-06 23:19:35.661476080 +0200
-+++ mc-4.6.1-pre1/src/hotlist.c	2004-06-06 23:20:01.470552504 +0200
-@@ -1384,7 +1384,7 @@
-     }
- 
-     if (!hotlist_file_name)
--	hotlist_file_name = mhl_str_dir_plus_file (home_dir, HOTLIST_FILENAME);
-+	hotlist_file_name = mhl_str_dir_plus_file (etc_dir, HOTLIST_FILENAME);
-     
-     hotlist	       = new_hotlist ();
-     hotlist->type      = HL_TYPE_GROUP;
-diff -urN mc-4.6.1-pre1.org/src/main.c mc-4.6.1-pre1/src/main.c
---- mc-4.6.1-pre1.org/src/main.c	2004-06-06 23:19:35.720467112 +0200
-+++ mc-4.6.1-pre1/src/main.c	2004-06-06 23:20:01.482550680 +0200
-@@ -229,6 +229,9 @@
- /* We need to paint it after CONSOLE_RESTORE, see: load_prompt */
- int update_prompt = 0;
- 
-+/* Configuration directory */
-+char *etc_dir;
-+
- /* The home directory */
- char *home_dir;
- 
-@@ -2142,11 +2145,13 @@
-     OS_Setup ();
- 
-     /* This variable is used by the subshell */
--    home_dir = getenv ("HOME");
-+    etc_dir = getenv ("HOME_ETC");
-+		home_dir = getenv ("HOME");
-     if (!home_dir) {
- 	/* mc_home was computed by OS_Setup */
- 	home_dir = mc_home;
-     }
-+    if (!etc_dir) etc_dir = home_dir;
- 
-     vfs_init ();
- 
-diff -urN mc-4.6.1-pre1.org/src/poptconfig.c mc-4.6.1-pre1/src/poptconfig.c
---- mc-4.6.1-pre1.org/src/poptconfig.c	2004-06-06 23:19:35.689471824 +0200
-+++ mc-4.6.1-pre1/src/poptconfig.c	2004-06-06 23:20:01.484550376 +0200
-@@ -134,8 +134,10 @@
-     rc = poptReadConfigFile(con, "/etc/popt");
-     if (rc) return rc;
-     if (getuid() != geteuid()) return 0;
-+    home = getenv("HOME_ETC");
-+		if (!home) home = getenv("HOME");
- 
--    if ((home = getenv("HOME"))) {
-+    if (home) {
- 	fn = alloca(strlen(home) + 20);
- 	strcpy(fn, home);
- 	strcat(fn, "/.popt");
-diff -urN mc-4.6.1-pre1.org/src/setup.c mc-4.6.1-pre1/src/setup.c
---- mc-4.6.1-pre1.org/src/setup.c	2004-06-06 23:19:35.635480032 +0200
-+++ mc-4.6.1-pre1/src/setup.c	2004-06-06 23:20:01.489549616 +0200
-@@ -264,7 +264,7 @@
-     int  i;
-     char buffer [BUF_TINY];
- 
--    profile = mhl_str_dir_plus_file (home_dir, PROFILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, PROFILE_NAME);
- 
-     /* Save integer options */
-     for (i = 0; layout [i].opt_name; i++){
-@@ -281,7 +281,7 @@
-     char *profile;
-     int  i;
- 
--    profile = mhl_str_dir_plus_file (home_dir, PROFILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, PROFILE_NAME);
- 
-     /* Save integer options */
-     for (i = 0; options [i].opt_name; i++)
-@@ -324,7 +324,7 @@
-     char *profile;
- 
-     saving_setup = 1;
--    profile = mhl_str_dir_plus_file (home_dir, PROFILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, PROFILE_NAME);
- 
-     save_configure ();
- 
-@@ -462,7 +462,7 @@
-     if (profile_name)
- 	    return profile_name;
- 
--    profile = mhl_str_dir_plus_file (home_dir, PROFILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, PROFILE_NAME);
-     if (!exist_file (profile)){
- 	inifile = mhl_str_dir_plus_file (mc_home, "mc.ini");
- 	if (exist_file (inifile)){
-diff -urN mc-4.6.1-pre1.org/src/treestore.c mc-4.6.1-pre1/src/treestore.c
---- mc-4.6.1-pre1.org/src/treestore.c	2004-06-06 23:19:35.666475320 +0200
-+++ mc-4.6.1-pre1/src/treestore.c	2004-06-06 23:20:01.495548704 +0200
-@@ -263,7 +263,7 @@
-     char *name;
-     int retval;
- 
--    name = mhl_str_dir_plus_file(home_dir, MC_TREE);
-+    name = mhl_str_dir_plus_file(etc_dir, MC_TREE);
-     retval = tree_store_load_from(name);
-     g_free(name);
- 
-@@ -368,7 +368,7 @@
-     char *name;
-     int retval;
- 
--    tmp = mhl_str_dir_plus_file(home_dir, MC_TREE_TMP);
-+    tmp = mhl_str_dir_plus_file(etc_dir, MC_TREE_TMP);
-     retval = tree_store_save_to(tmp);
- 
-     if (retval) {
-@@ -376,7 +376,7 @@
- 	return retval;
-     }
- 
--    name = mhl_str_dir_plus_file(home_dir, MC_TREE);
-+    name = mhl_str_dir_plus_file(etc_dir, MC_TREE);
-     retval = rename(tmp, name);
- 
-     g_free(tmp);
-diff -urN mc-4.6.1-pre1.org/src/user.c mc-4.6.1-pre1/src/user.c
---- mc-4.6.1-pre1.org/src/user.c	2004-06-06 23:19:35.688471976 +0200
-+++ mc-4.6.1-pre1/src/user.c	2004-06-06 23:20:01.500547944 +0200
-@@ -699,7 +699,7 @@
-     if (!exist_file (menu) || !menu_file_own (menu)){
- 	g_free (menu);
-         menu = mhl_str_dir_plus_file \
--                            (home_dir, edit_widget ? CEDIT_HOME_MENU : MC_HOME_MENU);
-+                            (etc_dir, edit_widget ? CEDIT_HOME_MENU : MC_HOME_MENU);
- 	if (!exist_file (menu)){
- 	    g_free (menu);
- 	    menu = mhl_str_dir_plus_file \
-diff -urN mc-4.6.1-pre1.org/src/util.c mc-4.6.1-pre1/src/util.c
---- mc-4.6.1-pre1.org/src/util.c	2004-06-06 23:19:35.638479576 +0200
-+++ mc-4.6.1-pre1/src/util.c	2004-06-06 23:20:01.506547032 +0200
-@@ -1305,7 +1305,7 @@
-     *column = 0;
- 
-     /* open file with positions */
--    fn = mhl_str_dir_plus_file (home_dir, MC_FILEPOS);
-+    fn = mhl_str_dir_plus_file (etc_dir, MC_FILEPOS);
-     f = fopen (fn, "r");
-     g_free (fn);
-     if (!f)
-@@ -1348,8 +1348,8 @@
- 
-     len = strlen (filename);
- 
--    tmp = mhl_str_dir_plus_file (home_dir, MC_FILEPOS_TMP);
--    fn = mhl_str_dir_plus_file (home_dir, MC_FILEPOS);
-+    tmp = mhl_str_dir_plus_file (etc_dir, MC_FILEPOS_TMP);
-+    fn = mhl_str_dir_plus_file (etc_dir, MC_FILEPOS);
- 
-     /* open temporary file */
-     t = fopen (tmp, "w");
-diff -urN mc-4.6.1-pre1.org/src/widget.c mc-4.6.1-pre1/src/widget.c
---- mc-4.6.1-pre1.org/src/widget.c	2004-06-06 23:19:35.650477752 +0200
-+++ mc-4.6.1-pre1/src/widget.c	2004-06-06 23:22:25.357678336 +0200
-@@ -820,7 +820,7 @@
- 	return NULL;
-     if (!*input_name)
- 	return NULL;
--    profile = mhl_str_dir_plus_file (home_dir, HISTORY_FILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, HISTORY_FILE_NAME);
-     for (i = 0;; i++) {
- 	char key_name[BUF_TINY];
- 	char this_entry[BUF_LARGE];
-@@ -858,7 +858,7 @@
-     if (!num_history_items_recorded)	/* this is how to disable */
- 	return;
- 
--    profile = mhl_str_dir_plus_file (home_dir, HISTORY_FILE_NAME);
-+    profile = mhl_str_dir_plus_file (etc_dir, HISTORY_FILE_NAME);
- 
-     if ((i = open (profile, O_CREAT | O_EXCL, S_IRUSR | S_IWUSR)) != -1)
- 	close (i);
-diff -urN mc-4.6.1-pre1.org/vfs/ftpfs.c mc-4.6.1-pre1/vfs/ftpfs.c
---- mc-4.6.1-pre1.org/vfs/ftpfs.c	2004-06-06 23:19:36.011422880 +0200
-+++ mc-4.6.1-pre1/vfs/ftpfs.c	2004-06-06 23:20:01.534542776 +0200
-@@ -1834,7 +1834,7 @@
-     }
- 
-     /* Load current .netrc */
--    netrcname = mhl_str_dir_plus_file (home_dir, ".netrc");
-+    netrcname = mhl_str_dir_plus_file (etc_dir, ".netrc");
-     netrcp = netrc = load_file (netrcname);
-     if (netrc == NULL) {
- 	g_free (netrcname);
---- ./src/global.h.org	2005-06-13 14:14:31.432261200 +0200
-+++ ./src/global.h	2005-06-13 14:15:29.690404616 +0200
-@@ -157,6 +157,7 @@
- #include "vfsdummy.h"
- #endif
- 
-+extern char *etc_dir;
- extern const char *home_dir;
- 
- #ifdef min
---- ./src/user.c.org	2005-06-13 14:18:27.989299064 +0200
-+++ ./src/user.c	2005-06-13 14:19:10.824787080 +0200
-@@ -216,7 +216,7 @@
-     case 'k':			/* block file name */
-     case 'b':			/* block file name / strip extension */  {
- 	    if (edit_widget) {
--		char *file = g_strconcat (home_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL);
-+		char *file = g_strconcat (etc_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL);
- 		fname = (*quote_func) (file, 0);
- 		g_free (file);
- 		return fname;
---- ./edit/editwidget.c.org	2005-06-13 14:12:20.457172440 +0200
-+++ ./edit/editwidget.c	2005-06-13 14:12:38.053497392 +0200
-@@ -176,7 +176,7 @@
-     WButtonBar *edit_bar;
- 
-     if (!made_directory) {
--	char *dir = mhl_str_dir_plus_file (home_dir, EDIT_DIR);
-+	char *dir = mhl_str_dir_plus_file (etc_dir, EDIT_DIR);
- 	made_directory = (mkdir (dir, 0700) != -1 || errno == EEXIST);
- 	g_free (dir);
-     }
---- ./edit/editcmd.c.org	2005-06-13 14:10:53.448399784 +0200
-+++ ./edit/editcmd.c	2005-06-13 14:12:04.249636360 +0200
-@@ -649,7 +649,7 @@
- {
-     const char *filename;
-     int file;
--    filename = catstrs (home_dir, PATH_SEP_STR MACRO_FILE, (char *) NULL);
-+    filename = catstrs (etc_dir, PATH_SEP_STR MACRO_FILE, (char *) NULL);
-     if ((file = open (filename, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)) == -1)
- 	return 0;
-     close (file);
-@@ -687,7 +687,7 @@
-     if (saved_macros_loaded)
- 	if ((j = macro_exists (k)) < 0)
- 	    return 0;
--    g = fopen (catstrs (home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL), "w");
-+    g = fopen (catstrs (etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL), "w");
-     if (!g) {
- 	edit_error_dialog (_(" Delete macro "),
- 		 get_sys_error (_(" Cannot open temp file ")));
-@@ -717,7 +717,7 @@
-     }
-     fclose (f);
-     fclose (g);
--    if (rename (catstrs (home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL), catstrs (home_dir, PATH_SEP_STR MACRO_FILE, (char *) NULL)) == -1) {
-+    if (rename (catstrs (etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL), catstrs (etc_dir, PATH_SEP_STR MACRO_FILE, (char *) NULL)) == -1) {
- 	edit_error_dialog (_(" Delete macro "),
- 	   get_sys_error (_(" Cannot overwrite macro file ")));
- 	return 1;
-@@ -2281,7 +2281,7 @@
- /* copies a block to clipboard file */
- static int edit_save_block_to_clip_file (WEdit * edit, long start, long finish)
- {
--    return edit_save_block (edit, catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL), start, finish);
-+    return edit_save_block (edit, catstrs (etc_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL), start, finish);
- }
- 
- 
-@@ -2320,7 +2320,7 @@
- 
- void edit_paste_from_X_buf_cmd (WEdit * edit)
- {
--    edit_insert_file (edit, catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
-+    edit_insert_file (edit, catstrs (etc_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
- }
- 
- 
-@@ -2375,7 +2375,7 @@
-     exp =
- 	input_expand_dialog (_(" Save Block "), _(" Enter file name: "),
- 			     MC_HISTORY_EDIT_SAVE_BLOCK, 
--			    catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
-+			    catstrs (etc_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
-     edit_push_action (edit, KEY_PRESS + edit->start_display);
-     if (exp) {
- 	if (!*exp) {
-@@ -2405,7 +2405,7 @@
- {
-     char *exp = input_expand_dialog (_(" Insert File "), _(" Enter file name: "),
- 				     MC_HISTORY_EDIT_INSERT_FILE,
--				     catstrs (home_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
-+				     catstrs (etc_dir, PATH_SEP_STR CLIP_FILE, (char *) NULL));
-     edit_push_action (edit, KEY_PRESS + edit->start_display);
-     if (exp) {
- 	if (!*exp) {
-@@ -2440,7 +2440,7 @@
- 	edit_error_dialog (_(" Sort block "), _(" You must first highlight a block of text. "));
- 	return 0;
-     }
--    edit_save_block (edit, catstrs (home_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL), start_mark, end_mark);
-+    edit_save_block (edit, catstrs (etc_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL), start_mark, end_mark);
- 
-     exp = input_dialog (_(" Run Sort "),
- 	_(" Enter sort options (see manpage) separated by whitespace: "),
-@@ -2451,7 +2451,7 @@
-     g_free (old);
-     old = exp;
- 
--    e = system (catstrs (" sort ", exp, " ", home_dir, PATH_SEP_STR BLOCK_FILE, " > ", home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-+    e = system (catstrs (" sort ", exp, " ", etc_dir, PATH_SEP_STR BLOCK_FILE, " > ", etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-     if (e) {
- 	if (e == -1 || e == 127) {
- 	    edit_error_dialog (_(" Sort "),
-@@ -2469,7 +2469,7 @@
- 
-     if (edit_block_delete_cmd (edit))
- 	return 1;
--    edit_insert_file (edit, catstrs (home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-+    edit_insert_file (edit, catstrs (etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-     return 0;
- }
- 
-@@ -2491,7 +2491,7 @@
-     if (!exp)
- 	return 1;
- 
--    e = system (catstrs (exp, " > ", home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-+    e = system (catstrs (exp, " > ", etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-     g_free (exp);
- 
-     if (e) {
-@@ -2502,7 +2502,7 @@
- 
-     edit->force |= REDRAW_COMPLETELY;
- 
--    edit_insert_file (edit, catstrs (home_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-+    edit_insert_file (edit, catstrs (etc_dir, PATH_SEP_STR TEMP_FILE, (char *) NULL));
-     return 0;
- }
- 
-@@ -2523,8 +2523,8 @@
-     char *quoted_name = NULL;
- 
-     o = catstrs (mc_home, shell_cmd, (char *) NULL);	/* original source script */
--    h = catstrs (home_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, (char *) NULL);	/* home script */
--    b = catstrs (home_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL);	/* block file */
-+    h = catstrs (etc_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, (char *) NULL);	/* home script */
-+    b = catstrs (etc_dir, PATH_SEP_STR BLOCK_FILE, (char *) NULL);	/* block file */
- 
-     if (!(script_home = fopen (h, "r"))) {
- 	if (!(script_home = fopen (h, "w"))) {
-@@ -2576,8 +2576,8 @@
- 	 *   $3 - file where error messages should be put
- 	 *        (for compatibility with old scripts).
- 	 */
--	system (catstrs (" ", home_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, " ", quoted_name,
--			 " ", home_dir, PATH_SEP_STR BLOCK_FILE " /dev/null", (char *) NULL));
-+	system (catstrs (" ", etc_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, " ", quoted_name,
-+			 " ", etc_dir, PATH_SEP_STR BLOCK_FILE " /dev/null", (char *) NULL));
- 
-     } else {
- 	/*
-@@ -2585,7 +2585,7 @@
- 	 * Arguments:
- 	 *   $1 - name of the edited file.
- 	 */
--	system (catstrs (" ", home_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, " ",
-+	system (catstrs (" ", etc_dir, PATH_SEP_STR EDIT_DIR, shell_cmd, " ",
- 			 quoted_name, (char *) NULL));
-     }
-     g_free (quoted_name);
---- ./edit/syntax.c.org	2005-06-13 14:12:50.360626424 +0200
-+++ ./edit/syntax.c	2005-06-13 14:13:22.331766072 +0200
-@@ -624,7 +624,7 @@
- 	return fopen (filename, "r");
- 
-     g_free (error_file_name);
--    error_file_name = g_strconcat (home_dir, PATH_SEP_STR EDIT_DIR PATH_SEP_STR,
-+    error_file_name = g_strconcat (etc_dir, PATH_SEP_STR EDIT_DIR PATH_SEP_STR,
- 				   filename, (char *) NULL);
-     f = fopen (error_file_name, "r");
-     if (f)
-@@ -1110,7 +1110,7 @@
- 	if (!*edit->filename && !type)
- 	    return;
-     }
--    f = mhl_str_dir_plus_file (home_dir, SYNTAX_FILE);
-+    f = mhl_str_dir_plus_file (etc_dir, SYNTAX_FILE);
-     r = edit_read_syntax_file (edit, pnames, f, edit ? edit->filename : 0,
- 			       get_first_editor_line (edit), type);
-     if (r == -1) {
---- ./edit/edit.c.org	2005-06-13 14:09:12.420758320 +0200
-+++ ./edit/edit.c	2005-06-13 14:10:10.282961928 +0200
-@@ -2652,7 +2652,7 @@
-     int nomark;
-     struct stat status;
-     long start_mark, end_mark;
--    char *block_file = mhl_str_dir_plus_file (home_dir, BLOCK_FILE);
-+    char *block_file = mhl_str_dir_plus_file (etc_dir, BLOCK_FILE);
-     int rc = 0;
- 
-     nomark = eval_marks (edit, &start_mark, &end_mark);
---- ./edit/usermap.c.orig	2009-02-01 20:30:21.000000000 +0100
-+++ ./edit/usermap.c	2009-02-04 00:38:01.000000000 +0100
-@@ -597,7 +597,7 @@
-     if (edit_key_emulation != EDIT_KEY_EMULATION_USER)
- 	return TRUE;
- 
--    file = mhl_str_dir_plus_file(home_dir, MC_USERMAP);
-+    file = mhl_str_dir_plus_file(etc_dir, MC_USERMAP);
- 
-     if (stat(file, &s) < 0) {
- 	char *msg = g_strdup_printf(_("%s not found!"), file);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mc.git/commitdiff/dda81e46b494635b20bfc943ea78d8218cbeec7f



More information about the pld-cvs-commit mailing list