Re: Update TODO list

2003-02-10 Thread Pavel Machek
Hi!

   Some more TODO entries:
   
   The fishfs is a little buggy, if you start transferring a big
   file and then aborts with ctrl+c, it gets into unusable state,
   and thanks to the vfs dir cache you have to quit mc and restart
   to get it working again...
   Maybe someone familiar with fishfs code could fix it?
  
  Question is if it is possible to fix fishfs. Maybe replacement
 why not possible? in worst case just reopen the connection if it fails
 (now it prints error message but does not work any more after
 ctrl+c)

Problem is that fish is a hack. Imagine putting file full of

rm -rf /

and remote machine going oom and killing both dd-s. I do not see an
easy way to fix that :-(.

Pavel
-- 
Worst form of spam? Adding advertisment signatures ala sourceforge.net.
What goes next? Inserting advertisment *into* email?
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Alternative syntax for perl, html and sh

2003-02-10 Thread Piotr Roszatycki
Hi,

There are syntax files for perl, html and sh. Also there are syntax files
for debian/control and debian/changelog. I think they could be useful as
they're more advanced than default ones. Have a good fun.

-- 
Piotr Roszatycki, Netia Telekom S.A..''`.
mailto:[EMAIL PROTECTED]   : :' :
mailto:[EMAIL PROTECTED]   `. `'
 `-

___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Re: Update TODO list

2003-02-10 Thread Arpi
Hi,

Maybe someone familiar with fishfs code could fix it?
   
   Question is if it is possible to fix fishfs. Maybe replacement
  why not possible? in worst case just reopen the connection if it fails
  (now it prints error message but does not work any more after
  ctrl+c)
 
 Problem is that fish is a hack. Imagine putting file full of
 
 rm -rf /
 
 and remote machine going oom and killing both dd-s. I do not see an

lol :)

 easy way to fix that :-(.

maybe use tricky shell script (command) instead of 'dd'
(ie don't use external program for reading/writing a file, use the shell)

so if OOM kills bash it will be killed so the rm -rf / won't be executed

but it's all unrelated to my problem (fishfs broken after ctrl+c).


A'rpi / Astral  ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu
However, many people beg for its inclusion in Debian. Why? - Gabucino
  Because having new software in Debian is good. - Josselin Mouette
Because having good software in Debian is new. - Gabucino
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel



Patch, sort exe files on top after directories.

2003-02-10 Thread Alexander Riedel
Hello All!

Patch for Exe files sort.
Idea from Dos Navigator.
All x files on top after directories.


diff -urN mc-4.6.0.orig/pc/drive.c mc-4.6.0/pc/drive.c
--- mc-4.6.0.orig/pc/drive.c	Mon Oct 21 06:13:52 2002
+++ mc-4.6.0/pc/drive.c	Mon Feb 10 14:31:47 2003
@@ -151,6 +151,7 @@
 this_panel-sort_type,
 this_panel-reverse,
 this_panel-case_sensitive,
+this_panel-exe_first,
 this_panel-filter);
 			this_panel-top_file = 0;
 			this_panel-selected = 0;
diff -urN mc-4.6.0.orig/src/boxes.c mc-4.6.0/src/boxes.c
--- mc-4.6.0.orig/src/boxes.c	Sun Dec  8 05:16:30 2002
+++ mc-4.6.0/src/boxes.c	Mon Feb 10 14:32:54 2003
@@ -266,17 +266,18 @@
 static char *sort_orders_names [SORT_TYPES];
 
 sortfn *
-sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive)
+sort_box (sortfn *sort_fn, int *reverse, int *case_sensitive, int *exe_first)
 {
 int i, r, l;
 sortfn *result;
-WCheck *c, *case_sense;
+WCheck *c, *case_sense, *exe_sense;
 
 	char* ok_button = _(OK);
 	char* cancel_button = _(Cancel);
 	char* reverse_label = _(Reverse);
 	char* case_label = _(case sensitive);
 	char* sort_title = _(Sort order);
+	char* exe_label = _(exe first);
 
 	static int i18n_sort_flag = 0, check_pos = 0, button_pos = 0;
 
@@ -336,6 +337,8 @@
 		button_new (9, button_pos, B_ENTER, DEFPUSH_BUTTON, ok_button,
 		0, 0, ok-button));
 
+exe_sense = check_new (5, check_pos, *exe_first, exe_label, exe-check);
+add_widget (dd, exe_sense);
 case_sense = check_new (4, check_pos, *case_sensitive, case_label, case-check);
 add_widget (dd, case_sense);
 c = check_new (3, check_pos, *reverse, reverse_label, reverse-check);
@@ -352,6 +355,7 @@
 	result = (sortfn *) sort_orders [my_radio-sel].sort_fn;
 	*reverse = c-state  C_BOOL;
 	*case_sensitive = case_sense-state  C_BOOL;
+	*exe_first = exe_sense-state  C_BOOL;
 } else
 	result = sort_fn;
 destroy_dlg (dd);
diff -urN mc-4.6.0.orig/src/boxes.h mc-4.6.0/src/boxes.h
--- mc-4.6.0.orig/src/boxes.h	Mon Aug 19 03:01:20 2002
+++ mc-4.6.0/src/boxes.h	Mon Feb 10 14:31:31 2003
@@ -4,7 +4,7 @@
 int display_box  (WPanel *p, char **user, char **mini,
 			  int *use_msformat, int num);
 sortfn *sort_box (sortfn *sort_fn, int *reverse,
-			  int *case_sensitive);
+			  int *case_sensitive, int *exe_first);
 voidconfirm_box  (void);
 voiddisplay_bits_box (void);
 voidconfigure_vfs(void);
diff -urN mc-4.6.0.orig/src/dir.c mc-4.6.0/src/dir.c
--- mc-4.6.0.orig/src/dir.c	Tue Jan 21 01:41:45 2003
+++ mc-4.6.0/src/dir.c	Mon Feb 10 14:37:44 2003
@@ -44,7 +44,12 @@
 /* Are the files sorted case sensitively? */
 static int case_sensitive = OS_SORT_CASE_SENSITIVE_DEFAULT;
 
+/* Are the files sorted with exe first? */
+static int exe_first = OS_SORT_EXE_FIRST_DEFAULT;
+
 #define MY_ISDIR(x) ( (S_ISDIR (x-buf.st_mode) || x-f.link_to_dir) ? 1 : 0)
+// Alexander Riedel
+#define MY_ISEXEC(x) ( ((x-buf.st_mode  00100 || x-buf.st_mode  00010 || x-buf.st_mode  1) ) ? 1 : 0)
 
 sort_orders_t sort_orders [SORT_TYPES_TOTAL] = {
 { N_(Unsorted),unsorted },
@@ -119,6 +124,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files)
 	return string_sortcomp (a-fname, b-fname) * reverse;
 return bd-ad;
@@ -132,6 +142,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files){
 	exta = extension (a-fname);
 	extb = extension (b-fname);
@@ -150,6 +165,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files)
 	return string_sortcomp (get_owner (a-buf.st_uid), get_owner (a-buf.st_uid)) * reverse;
 return bd-ad;
@@ -161,6 +181,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files)
 	return string_sortcomp (get_group (a-buf.st_gid), get_group (a-buf.st_gid)) * reverse;
 return bd-ad;
@@ -172,6 +197,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files)
 	return (a-buf.st_mtime - b-buf.st_mtime) * reverse;
 else
@@ -184,6 +214,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || mix_all_files)
 	return (a-buf.st_ctime - b-buf.st_ctime) * reverse;
 else
@@ -196,6 +231,11 @@
 int ad = MY_ISDIR (a);
 int bd = MY_ISDIR (b);
 
+if (exe_first  !(ad || bd)){
+	ad = MY_ISEXEC (a);
+	bd = MY_ISEXEC (b);
+}
+
 if (ad == bd || 

Re: AMC-4.6 CVS available

2003-02-10 Thread Pavel Roskin
Hello!

 Because of merging in my patches goes so slowly (does it go at all? :))
 and as i have lots of small changes what hard to handle as patches/patchets,
 i've decided to setup CVS tree for my patched mc-4.6.x tree, so
 - users interested in it can easily get  test it
 - it's easier to me to commit  trace independent changes, patches
 - nice changelog can be generated easily from cvs log
 - you can get any change as patch using cvs diff
 - i can import new mc releases/snapshots without messing up my patchset

You have an option of submitting the patches to the patch tracker on
savannah.gnu.org.  I'm very busy now, but I'll start with applying patches
as soon as I have time for that.  Keeping patches separate will make it
easier to apply them.

The problem with testing is that many bugs are not found for a long time.
Sometimes they are mistaken for missing features.  Every single bug is
easy to miss, but when there are dozens of them, the probability to hit
one becomes significant.

Systematic testing and review of the code needs time and experience, and
superficial testing of CVS builds is a bad substitute for that.  Anyway,
let's see if your CVS will help with improving the code quality.

-- 
Regards,
Pavel Roskin
___
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel