about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2004-03-16 19:41:00 +0000
committerClint Adams <clint@users.sourceforge.net>2004-03-16 19:41:00 +0000
commit851c3882edc21ce0df065321ef5903e89137710e (patch)
treed6f06769323c0f648abc07138dd25741b8fbedb6
parentbefd90b84787b2508ee32549f7a38859d0056b55 (diff)
downloadzsh-851c3882edc21ce0df065321ef5903e89137710e.tar.gz
zsh-851c3882edc21ce0df065321ef5903e89137710e.tar.xz
zsh-851c3882edc21ce0df065321ef5903e89137710e.zip
* 19640: Src/Modules/pcre.c: improve error reporting a bit.
-rw-r--r--ChangeLog2
-rw-r--r--Src/Modules/pcre.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 862f71a61..32c92839c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2004-03-16  Clint Adams  <clint@zsh.org>
 
+	* 19640: Src/Modules/pcre.c: improve error reporting a bit.
+
 	* 19631: Doc/Zsh/mod_pcre.yo, Src/Modules/pcre.c: avoid segfault
 	when pcre_study is called before pcre_compile; documentation on
 	pcre_compile options.
diff --git a/Src/Modules/pcre.c b/Src/Modules/pcre.c
index 030d1c78a..41c37b03c 100644
--- a/Src/Modules/pcre.c
+++ b/Src/Modules/pcre.c
@@ -74,8 +74,8 @@ bin_pcre_study(char *nam, char **args, Options ops, int func)
 
     if (pcre_pattern == NULL)
     {
-	zwarnnam(nam, "no pattern has been compiled for study: %s",
-		 pcre_error, 0);
+	zwarnnam(nam, "no pattern has been compiled for study",
+		 NULL, 0);
 	return 1;
     }
     
@@ -112,9 +112,9 @@ bin_pcre_match(char *nam, char **args, Options ops, int func)
 	}
     }
     
-    if (pcre_fullinfo(pcre_pattern, pcre_hints, PCRE_INFO_CAPTURECOUNT, &capcount))
+    if (ret = pcre_fullinfo(pcre_pattern, pcre_hints, PCRE_INFO_CAPTURECOUNT, &capcount))
     {
-	zwarnnam(nam, "error in fullinfo", NULL, 0);
+	zwarnnam(nam, "error %d in fullinfo", NULL, ret);
 	return 1;
     }