I pushed this as obvious:

>From 78777de736c93b0c3b9a731014de6992976d5195 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email protected]>
Date: Tue, 20 Nov 2012 09:49:14 -0800
Subject: [PATCH] grep: normalize diagnostics

* src/pcresearch.c (Pcompile): Use similar format diagnostics
as elsewhere, and translate them.
---
 src/pcresearch.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/pcresearch.c b/src/pcresearch.c
index 89bfbec..b32b6e1 100644
--- a/src/pcresearch.c
+++ b/src/pcresearch.c
@@ -66,7 +66,7 @@ Pcompile (char const *pattern, size_t size)
 #endif
 
   /* FIXME: Remove these restrictions.  */
-  if (memchr(pattern, '\n', size))
+  if (memchr (pattern, '\n', size))
     error (EXIT_TROUBLE, 0, _("the -P option only supports a single pattern"));
 
   *n = '\0';
@@ -112,18 +112,18 @@ Pcompile (char const *pattern, size_t size)
     error (EXIT_TROUBLE, 0, "%s", ep);
 
 #if PCRE_STUDY_JIT_COMPILE
-  if (pcre_fullinfo(cre, extra, PCRE_INFO_JIT, &e))
-    error (EXIT_TROUBLE, 0, "Internal error (should never happen).");
+  if (pcre_fullinfo (cre, extra, PCRE_INFO_JIT, &e))
+    error (EXIT_TROUBLE, 0, _("internal error (should never happen)"));
 
   if (e)
     {
       /* A 32K stack is allocated for the machine code by default, which
          can grow to 512K if necessary. Since JIT uses far less memory
-         than the interpreter, this should be enough in practice. */
+         than the interpreter, this should be enough in practice.  */
       jit_stack = pcre_jit_stack_alloc (32 * 1024, 512 * 1024);
       if (!jit_stack)
-        error (EXIT_TROUBLE, 0, "Cannot allocate memory for the JIT stack.");
-      pcre_assign_jit_stack(extra, NULL, jit_stack);
+        error (EXIT_TROUBLE, 0, _("cannot allocate memory for the JIT stack"));
+      pcre_assign_jit_stack (extra, NULL, jit_stack);
     }
   free (re);
 #endif
-- 
1.7.11.7


Reply via email to