summary refs log tree commit diff
diff options
context:
space:
mode:
-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;
     }