Am Donnerstag, 1. Juni 2006 15:02 schrieb Nabil Sayegh:
> Please find attached a cleaned patch
I'm awfully sorry, but there was still a bug if find_ignore_dirs wasn't
specified at all :(
final patch attached
rgds
--
Nabil Sayegh
diff -uriwbB mc-4.6.1-find_ignore_dirs_regex/src/find.c mc-4.6.1-find_ignore_dirs_regex-2/src/find.c
--- mc-4.6.1-find_ignore_dirs_regex/src/find.c 2006-06-01 13:57:41.000000000 +0200
+++ mc-4.6.1-find_ignore_dirs_regex-2/src/find.c 2006-06-01 16:15:52.000000000 +0200
@@ -69,7 +69,7 @@
} FindProgressStatus;
/* List of directories to be ignored, separated by ':' */
-char *find_ignore_dirs = 0;
+char *find_ignore_dirs = NULL;
static WInput *in_start; /* Start path */
static WInput *in_name; /* Pattern to search */
@@ -606,7 +606,7 @@
stop_idle (h);
return 0;
}
- if (find_ignore_dirs){
+ if (find_ignore_dirs && find_ignore_dirs[0] != '\0'){
int found ;
found = regexp_match (find_ignore_dirs, tmp, match_regex);
if (found)
@@ -624,7 +624,7 @@
char buffer [BUF_SMALL];
g_snprintf (buffer, sizeof (buffer), _("Searching %s"),
- directory);
+ name_trunc (directory, FIND2_X_USE));
status_update (buffer);
}
/* mc_stat should not be called after mc_opendir
diff -uriwbB mc-4.6.1-find_ignore_dirs_regex/src/find.h mc-4.6.1-find_ignore_dirs_regex-2/src/find.h
--- mc-4.6.1-find_ignore_dirs_regex/src/find.h 1998-12-02 22:27:39.000000000 +0100
+++ mc-4.6.1-find_ignore_dirs_regex-2/src/find.h 2006-06-01 14:34:58.000000000 +0200
@@ -1,6 +1,7 @@
#ifndef __FIND_H
#define __FIND_H
+extern char *find_ignore_dirs;
void do_find (void);
#endif
diff -uriwbB mc-4.6.1-find_ignore_dirs_regex/src/setup.c mc-4.6.1-find_ignore_dirs_regex-2/src/setup.c
--- mc-4.6.1-find_ignore_dirs_regex/src/setup.c 2006-05-30 20:55:13.000000000 +0200
+++ mc-4.6.1-find_ignore_dirs_regex-2/src/setup.c 2006-06-01 14:36:25.000000000 +0200
@@ -40,6 +40,7 @@
#include "win.h" /* lookup_key */
#include "cmd.h"
#include "file.h" /* safe_delete */
+#include "find.h"
#ifdef USE_VFS
#include "../vfs/gc.h"
@@ -58,8 +59,6 @@
#endif
-extern char *find_ignore_dirs;
-
extern int num_history_items_recorded;
char *profile_name; /* .mc/ini */
@@ -520,10 +519,7 @@
ftpfs_proxy_host = do_load_string ("Misc", "ftp_proxy_host", "gate");
#endif
- load_string ("Misc", "find_ignore_dirs", "", setup_color_string,
- sizeof (setup_color_string));
- if (setup_color_string [0])
- find_ignore_dirs = g_strconcat ("", setup_color_string, "", (char *) NULL);
+ find_ignore_dirs = do_load_string ("Misc", "find_ignore_dirs", "");
/* The default color and the terminal dependent color */
load_string ("Colors", "base_color", "", setup_color_string,
_______________________________________________
Mc mailing list
http://mail.gnome.org/mailman/listinfo/mc