bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diagnostics format improvement


From: Paul Eggert
Subject: diagnostics format improvement
Date: Tue, 20 Nov 2012 09:50:20 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121029 Thunderbird/16.0.2

I pushed this as obvious:

>From 78777de736c93b0c3b9a731014de6992976d5195 Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
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

[Prev in Thread] Current Thread [Next in Thread]