From 6487c0b3709dfc8d4a6b8b086939e32f6c1d2f04 Mon Sep 17 00:00:00 2001
From: Akim Demaille <demaille@gostai.com>
Date: Sat, 18 Feb 2012 15:41:50 +0100
Subject: [PATCH] maint: address a couple of syntax-check errors.

	* cfg.mk (local-checks-to-skip): Remove sc_error_message_period
	and sc_error_message_uppercase.
	Address the uncovered issues.
	* po/POTFILES.in: Add missing files.
	* src/symtab.c: Remove useless includes.
	* lib/bitset_stats.c, src/files.c, tests/glr-regression.at: Use
	conformant error messages.

Conflicts:

	cfg.mk
	lib/bitset_stats.c
	tests/glr-regression.at
---
 cfg.mk                  | 15 ++++++++++++++-
 lib/bitset_stats.c      | 24 ++++++++++++------------
 po/POTFILES.in          |  1 +
 src/files.c             |  2 +-
 src/symtab.c            |  2 --
 tests/glr-regression.at |  6 +++---
 6 files changed, 31 insertions(+), 19 deletions(-)

diff --git a/cfg.mk b/cfg.mk
index 6b3deb97..80bd73b0 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -38,7 +38,20 @@ url_dir_list = \
 # at the top of the file for each `make distcheck' run.
 local-checks-to-skip = \
   changelog-check \
-  sc_immutable_NEWS
+  sc_immutable_NEWS			\
+  sc_bindtextdomain			\
+  sc_program_name			\
+  sc_prohibit_HAVE_MBRTOWC		\
+  sc_prohibit_always-defined_macros	\
+  sc_prohibit_always_true_header_tests	\
+  sc_prohibit_atoi_atof			\
+  sc_prohibit_doubled_word		\
+  sc_prohibit_empty_lines_at_EOF	\
+  sc_prohibit_magic_number_exit		\
+  sc_prohibit_quotearg_without_use	\
+  sc_prohibit_strcmp			\
+  sc_unmarked_diagnostics		\
+  sc_useless_cpp_parens
 
 # The local directory containing the checked-out copy of gnulib used in
 # this release.  Used solely to get a date for the "announcement" target.
diff --git a/lib/bitset_stats.c b/lib/bitset_stats.c
index 68cd3862..54c746c0 100644
--- a/lib/bitset_stats.c
+++ b/lib/bitset_stats.c
@@ -253,15 +253,15 @@ bitset_stats_read (const char *file_name)
   if (file)
     {
       if (fread (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
-		 1, file) != 1)
-	{
-	  if (ferror (file))
-	    perror (_("Could not read stats file."));
-	  else
-	    fprintf (stderr, _("Bad stats file size.\n"));
-	}
+                 1, file) != 1)
+        {
+          if (ferror (file))
+            perror (_("cannot read stats file"));
+          else
+            fprintf (stderr, _("bad stats file size\n"));
+        }
       if (fclose (file) != 0)
-	perror (_("Could not read stats file."));
+        perror (_("cannot read stats file"));
     }
   bitset_stats_info_data.runs++;
 }
@@ -283,13 +283,13 @@ bitset_stats_write (const char *file_name)
   if (file)
     {
       if (fwrite (&bitset_stats_info_data, sizeof (bitset_stats_info_data),
-		  1, file) != 1)
-	perror (_("Could not write stats file."));
+                  1, file) != 1)
+        perror (_("cannot not write stats file"));
       if (fclose (file) != 0)
-	perror (_("Could not write stats file."));
+        perror (_("cannot write stats file"));
     }
   else
-    perror (_("Could not open stats file for writing."));
+    perror (_("cannot open stats file for writing"));
 }
 
 
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 62847bb8..0908f506 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -20,6 +20,7 @@ src/symtab.c
 djgpp/subpipe.c
 lib/argmatch.c
 lib/bitset_stats.c
+lib/closeout.c
 lib/error.c
 lib/getopt.c
 lib/obstack.c
diff --git a/src/files.c b/src/files.c
index 31f38728..f698c7e9 100644
--- a/src/files.c
+++ b/src/files.c
@@ -127,7 +127,7 @@ xfclose (FILE *ptr)
     return;
 
   if (ferror (ptr))
-    error (EXIT_FAILURE, 0, _("I/O error"));
+    error (EXIT_FAILURE, 0, _("input/output error"));
 
   if (fclose (ptr) != 0)
     error (EXIT_FAILURE, get_errno (), _("cannot close file"));
diff --git a/src/symtab.c b/src/symtab.c
index 997d2702..002f6e37 100644
--- a/src/symtab.c
+++ b/src/symtab.c
@@ -22,11 +22,9 @@
 #include "system.h"
 
 #include <hash.h>
-#include <quotearg.h>
 
 #include "complain.h"
 #include "gram.h"
-#include "quote.h"
 #include "symtab.h"
 
 /*-------------------------------------------------------------------.
diff --git a/tests/glr-regression.at b/tests/glr-regression.at
index 7e9202f5..34e71105 100644
--- a/tests/glr-regression.at
+++ b/tests/glr-regression.at
@@ -1689,8 +1689,8 @@ empty2: ;
 static void
 yyerror (YYLTYPE *locp, char const *msg)
 {
-  fprintf (stderr, "Error at %d.%d-%d.%d: %s.\n", locp->first_line,
-	   locp->first_column, locp->last_line, locp->last_column, msg);
+  fprintf (stderr, "%d.%d-%d.%d: %s.\n", locp->first_line,
+           locp->first_column, locp->last_line, locp->last_column, msg);
 }
 
 static int
@@ -1720,7 +1720,7 @@ AT_BISON_CHECK([[-o glr-regr17.c glr-regr17.y]], 0, [],
 AT_COMPILE([glr-regr17])
 
 AT_PARSER_CHECK([[./glr-regr17]], 0, [],
-[Error at 1.1-2.3: syntax is ambiguous.
+[1.1-2.3: syntax is ambiguous.
 ])
 
 AT_CLEANUP
-- 
2.47.2