[608] in Zephyr_Bugs
zwgc prints erroneous regexp output (2.0 beta)
daemon@ATHENA.MIT.EDU (E. Jay Berkenbilt)
Thu Jul 6 11:59:59 1995
Date: Thu, 6 Jul 1995 11:56:45 -0400
From: "E. Jay Berkenbilt" <ejb@ERA.COM>
To: bug-zephyr@MIT.EDU
For each occurence of =~ in a zwgc.desc that is exercied, we are
the output
in regcomp [Ff]rom:
(or whatever the expression is). In other words, errbuf is the empty
string. The zwgc.desc seems to be working properly as far as I know,
but I haven't looked deeply into it. I am not going to persue this
one. This is the patch I have used. This patch is wrong, of course,
but it serves to show you were in the code I'm seeing this behavior.
BTW, I've never seen the regexec print statement -- only the regcomp
one, but I'm not taking any chances. :-)
Jay B
--
E. Jay Berkenbilt (ejb@ERA.COM) | Member, League for Programming Freedom
Engineering Research Associates | lpf@uunet.uu.net, http://www.lpf.org
===========================================================================
--- clients/zwgc/regexp.c.dist Fri Jun 30 17:52:59 1995
+++ clients/zwgc/regexp.c Thu Jul 6 11:55:41 1995
@@ -37,13 +37,17 @@
retval = regcomp(&RE, pattern, REG_EXTENDED|REG_NOSUB);
if (retval != 0) {
regerror(retval, &RE, errbuf, sizeof(errbuf));
+#if 0
fprintf(stderr,"%s in regcomp %s\n",errbuf,pattern);
+#endif
return(0);
}
retval = regexec(&RE, test_string, 0, NULL, 0);
if (retval != 0 && retval != REG_NOMATCH) {
regerror(retval, &RE, errbuf, sizeof(errbuf));
+#if 0
fprintf(stderr,"%s in regexec %s\n",errbuf,pattern);
+#endif
regfree(&RE);
return(0);
}