[14222] in Athena Bugs
re bugs 14220 dsgrep
daemon@ATHENA.MIT.EDU (Brett David Rosen)
Wed Feb 28 22:52:00 1996
From: Brett David Rosen <bdrosen@MIT.EDU>
To: bugs@MIT.EDU
Reply-To: bdrosen@MIT.EDU
Date: Wed, 28 Feb 1996 22:51:55 EST
This patch should fix the case insensitive problem.
(/usr/kathena/src/discuss/dsgrep/dsgrep.c is the original if
i messed up the diff command)
--------------------------------
*** /usr/kathena/src/discuss/dsgrep/dsgrep.c Sun Feb 5 12:33:16 1995
--- /usr/athena/src/discuss/dsgrep/dsgrep.c Wed Feb 28 22:43:51 1996
***************
*** 46,51 ****
--- 46,52 ----
extern char *optarg;
char *meetings_file,*homedir,*getenv();
+ char *holder;
name_blk *meetings,*tmp_mtg;
mtg_info meeting_info[MAX_MEETINGS];
char tmp_meeting_file[MAXPATHLEN];
***************
*** 101,106 ****
--- 102,108 ----
fprintf(stderr,"dsgrep: Invalid regular expression %s\n",optarg);
exit(1);
}
+ holder = optarg;
use_re = 1;
break;
case 'f':
***************
*** 205,210 ****
--- 207,215 ----
if (!search_deleted && (ti.flags & TRN_FDELETED))
continue;
if (case_insens) s_to_lower(ti.subject);
+ if((case_insens) && (use_re)) {
+ s_to_lower(holder);
+ search_re = regcomp(holder);}
if (!use_re || regexec(search_re,ti.subject) ||
(search_trans &&
s_trans(meetings[i],j,ti.num_chars,search_re,case_insens))) {