View | Details | Raw Unified | Return to bug 99428
Collapse All | Expand All

(-)mc/files/patch-src-cmd.c (+11 lines)
Line 0 Link Here
1
--- src/cmd.c.orig	Sat Jun 24 19:44:21 2006
2
+++ src/cmd.c	Sat Jun 24 19:45:46 2006
3
@@ -510,7 +510,7 @@
4
 		continue;
5
 	}
6
 	c = regexp_match (reg_exp_t, current_panel->dir.list[i].fname,
7
-			  match_file);
8
+			  match_file, 0);
9
 	if (c == -1) {
10
 	    message (1, MSG_ERROR, _("  Malformed regular expression  "));
11
 	    g_free (reg_exp);
(-)mc/files/patch-src-dir.c (+11 lines)
Line 0 Link Here
1
--- src/dir.c.orig	Sat Jun 24 19:51:05 2006
2
+++ src/dir.c	Sat Jun 24 19:51:31 2006
3
@@ -405,7 +405,7 @@
4
 	    *stale_link = 1;
5
     }
6
     if (!(S_ISDIR (buf1->st_mode) || *link_to_dir) && filter
7
-	&& !regexp_match (filter, dp->d_name, match_file))
8
+	&& !regexp_match (filter, dp->d_name, match_file, 0))
9
 	return 0;
10
 
11
     /* Need to grow the *list? */
(-)mc/files/patch-src-ext.c (+25 lines)
Line 0 Link Here
1
--- src/ext.c.orig	Sat Jun 24 19:52:00 2006
2
+++ src/ext.c	Sat Jun 24 19:52:21 2006
3
@@ -394,7 +394,7 @@
4
     }
5
 
6
     if (content_string[0]
7
-	&& regexp_match (ptr, content_string + content_shift, match_regex)) {
8
+	&& regexp_match (ptr, content_string + content_shift, match_regex, 0)) {
9
 	found = 1;
10
     }
11
 
12
@@ -534,11 +534,11 @@
13
 		/* Do not transform shell patterns, you can use shell/ for
14
 		 * that
15
 		 */
16
-		if (regexp_match (p, filename, match_regex))
17
+		if (regexp_match (p, filename, match_regex, 0))
18
 		    found = 1;
19
 	    } else if (!strncmp (p, "directory/", 10)) {
20
 		if (S_ISDIR (mystat.st_mode)
21
-		    && regexp_match (p + 10, filename, match_regex))
22
+		    && regexp_match (p + 10, filename, match_regex, 0))
23
 		    found = 1;
24
 	    } else if (!strncmp (p, "shell/", 6)) {
25
 		p += 6;
(-)mc/files/patch-src-find.c (+29 lines)
Line 0 Link Here
1
--- src/find.c.orig	Sat Jun 24 20:36:41 2006
2
+++ src/find.c	Sat Jun 24 20:37:58 2006
3
@@ -575,6 +575,7 @@
4
     struct stat tmp_stat;
5
     static int pos;
6
     static int subdirs_left = 0;
7
+    int cflags = 0;
8
 
9
     if (!h) { /* someone forces me to close dirp */
10
 	if (dirp) {
11
@@ -586,6 +587,9 @@
12
         dp = 0;
13
 	return 1;
14
     }
15
+
16
+    if (case_sensitive == 0)
17
+	cflags |= REG_ICASE;
18
  do_search_begin:
19
     while (!dp){
20
 	
21
@@ -662,7 +666,7 @@
22
 	g_free (tmp_name);
23
     }
24
 
25
-    if (regexp_match (find_pattern, dp->d_name, match_file)){
26
+    if (regexp_match (find_pattern, dp->d_name, match_file, cflags)){
27
 	if (content_pattern) {
28
 	    if (search_content (h, directory, dp->d_name)) {
29
 		return 1;
(-)mc/files/patch-src-subshell.c (-11 lines)
Lines 1-11 Link Here
1
--- src/subshell.c.orig	Wed Jun 14 15:45:12 2006
2
+++ src/subshell.c	Wed Jun 14 15:45:39 2006
3
@@ -395,6 +395,8 @@
4
 	    subshell_type = ZSH;
5
 	else if (strstr (shell, "/tcsh"))
6
 	    subshell_type = TCSH;
7
+	else if (strstr (shell, "/csh"))
8
+	    subshell_type = TCSH;
9
 	else if (strstr (shell, "/bash") || getenv ("BASH"))
10
 	    subshell_type = BASH;
11
 	else {
(-)mc/files/patch-src-user.c (+24 lines)
Line 0 Link Here
1
--- src/user.c.orig	Sat Jun 24 19:54:48 2006
2
+++ src/user.c	Sat Jun 24 19:55:10 2006
3
@@ -412,18 +412,18 @@
4
 	    break;
5
 	case 'f': /* file name pattern */
6
 	    p = extract_arg (p, arg, sizeof (arg));
7
-	    *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file);
8
+	    *condition = panel && regexp_match (arg, panel->dir.list [panel->selected].fname, match_file, 0);
9
 	    break;
10
 	case 'y': /* syntax pattern */
11
             if (edit_widget && edit_widget->syntax_type) {
12
 	        p = extract_arg (p, arg, sizeof (arg));
13
 	        *condition = panel &&
14
-                    regexp_match (arg, edit_widget->syntax_type, match_normal);
15
+                    regexp_match (arg, edit_widget->syntax_type, match_normal, 0);
16
 	    }
17
             break;
18
 	case 'd':
19
 	    p = extract_arg (p, arg, sizeof (arg));
20
-	    *condition = panel && regexp_match (arg, panel->cwd, match_file);
21
+	    *condition = panel && regexp_match (arg, panel->cwd, match_file, 0);
22
 	    break;
23
 	case 't':
24
 	    p = extract_arg (p, arg, sizeof (arg));
(-)mc/files/patch-src-util.c (+34 lines)
Line 0 Link Here
1
--- src/util.c.orig	Sat Jun 24 19:55:21 2006
2
+++ src/util.c	Sat Jun 24 19:57:49 2006
3
@@ -563,25 +563,28 @@
4
 	return  g_strdup (pattern);
5
 }
6
 
7
-int regexp_match (const char *pattern, const char *string, int match_type)
8
+int regexp_match (const char *pattern, const char *string, int match_type, int cflags)
9
 {
10
     static regex_t r;
11
     static char *old_pattern = NULL;
12
     static int old_type;
13
+	static int old_cflags;
14
     int    rval;
15
     char *my_pattern;
16
 
17
-    if (!old_pattern || STRCOMP (old_pattern, pattern) || old_type != match_type){
18
+    if (!old_pattern || STRCOMP (old_pattern, pattern) || 
19
+		old_type != match_type || cflags != old_cflags){
20
 	if (old_pattern){
21
 	    regfree (&r);
22
 	    g_free (old_pattern);
23
 	    old_pattern = NULL;
24
 	}
25
 	my_pattern = convert_pattern (pattern, match_type, 0);
26
-	if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS)) {
27
+	if (regcomp (&r, my_pattern, REG_EXTENDED|REG_NOSUB|MC_ARCH_FLAGS|cflags)) {
28
 	    g_free (my_pattern);
29
 	    return -1;
30
 	}
31
+	old_cflags = cflags;
32
 	old_pattern = my_pattern;
33
 	old_type = match_type;
34
     }
(-)mc/files/patch-src-util.h (+11 lines)
Line 0 Link Here
1
--- src/util.h.orig	Sat Jun 24 19:57:50 2006
2
+++ src/util.h	Sat Jun 24 19:58:03 2006
3
@@ -116,7 +116,7 @@
4
 
5
 extern int easy_patterns;
6
 char *convert_pattern (const char *pattern, int match_type, int do_group);
7
-int regexp_match (const char *pattern, const char *string, int match_type);
8
+int regexp_match (const char *pattern, const char *string, int match_type, int cflags);
9
 
10
 /* Error pipes */
11
 void open_error_pipe (void);

Return to bug 99428