I backed the change out in CVS with the attached patch.   I will send
a new patch with just the pluralisation change, but separately.
Index: ChangeLog
===================================================================
RCS file: /sources/findutils/findutils/ChangeLog,v
retrieving revision 1.301
diff -u -p -r1.301 ChangeLog
--- ChangeLog	20 Dec 2007 10:10:59 -0000	1.301
+++ ChangeLog	20 Dec 2007 21:52:28 -0000
@@ -1,3 +1,12 @@
+2007-12-20  James Youngman  <[EMAIL PROTECTED]>
+
+	* find/fstype.c, find/ftsfind.c, find/parser.c, find/pred.c,
+	find/tree.c, lib/regextype.c, locate/locate.c, xargs/xargs.c,
+	find.c: Backed out positional paremeter change, as the use of 
+	positional parameters was over-complex and unnecessary.  We'll
+	re-apply the pluralisation support change soon, but without the
+	positional parameters.
+
 2007-12-20  Jakub Bogusz <[EMAIL PROTECTED]> (tiny change)
 
 	* xargs/xargs.c (parse_num): Corrected typo in format string
Index: find/find.c
===================================================================
RCS file: /sources/findutils/findutils/find/find.c,v
retrieving revision 1.130
diff -u -p -r1.130 find.c
--- find/find.c	20 Dec 2007 10:05:45 -0000	1.130
+++ find/find.c	20 Dec 2007 21:52:28 -0000
@@ -64,7 +64,6 @@
 # define _(Text) Text
 #define textdomain(Domain)
 #define bindtextdomain(Package, Directory)
-#define ngettext(singular,plural,n) ((1==n) ? singular : plural)
 #endif
 #ifdef gettext_noop
 # define N_(String) gettext_noop (String)
@@ -488,8 +487,7 @@ wd_sanity_check(const char *thing_to_sta
 	  {
 	    fstype = filesystem_type(newinfo, current_dir);
 	    error (1, 0,
-		   _("%1$s%2$s changed during execution of %3$s "
-		     "(old device number %4$ld, new device number %5$ld, file system type is %6$s) [ref %7$ld]"),
+		   _("%s%s changed during execution of %s (old device number %ld, new device number %ld, file system type is %s) [ref %ld]"),
 		   safely_quote_err_filename(0, specific_what),
 		   parent ? "/.." : "",
 		   safely_quote_err_filename(1, progname),
@@ -526,8 +524,8 @@ wd_sanity_check(const char *thing_to_sta
       
       error ((isfatal == FATAL_IF_SANITY_CHECK_FAILS) ? 1 : 0,
 	     0,			/* no relevant errno value */
-	     _("%1$s%2$s changed during execution of %3$s "
-	       "(old inode number %4$ld, new inode number %5$ld, file system type is %6$s) [ref %7$ld]"),
+	     _("%s%s changed during execution of %s "
+	       "(old inode number %ld, new inode number %ld, file system type is %s) [ref %ld]"),
 	     safely_quote_err_filename(0, specific_what), 
 	     parent ? "/.." : "",
 	     safely_quote_err_filename(1, progname),
@@ -1124,14 +1122,12 @@ issue_loop_warning(const char *name, con
        * to /a/b/c.
        */
       error(0, 0,
-	    ngettext(
-		     "Filesystem loop detected; %1$s has the same device number and inode as "
-		     "a directory which is %2$d level higher in the file system hierarchy",
-		     "Filesystem loop detected; %1$s has the same device number and inode as "
-		     "a directory which is %2$d levels higher in the file system hierarchy",
-		     (long)distance),
+	    _("Filesystem loop detected; %s has the same device number and inode as a directory which is %d %s."),
 	    safely_quote_err_filename(0, pathname),
-	    distance);
+	    distance,
+	    (distance == 1 ?
+	     _("level higher in the file system hierarchy") :
+	     _("levels higher in the file system hierarchy")));
     }
 }
 
@@ -1420,12 +1416,7 @@ process_dir (char *pathname, char *name,
 		   * doesn't really handle hard links with Unix semantics.
 		   * In the latter case, -noleaf should be used routinely.
 		   */
-		  error(0, 0, _("WARNING: Hard link count is wrong for %1$s "
-				"(saw only st_nlink=%2$d but we already saw %3$d subdirectories): "
-				"this may be a bug in your file system driver.  "
-				"Automatically turning on find's -noleaf option.  "
-				"Earlier results may have failed to include directories "
-				"that should have been searched."),
+		  error(0, 0, _("WARNING: Hard link count is wrong for %s (saw only st_nlink=%d but we already saw %d subdirectories): this may be a bug in your file system driver.  Automatically turning on find's -noleaf option.  Earlier results may have failed to include directories that should have been searched."),
 			safely_quote_err_filename(0, pathname),
 			statp->st_nlink,
 			dircount);
Index: find/fstype.c
===================================================================
RCS file: /sources/findutils/findutils/find/fstype.c,v
retrieving revision 1.38
diff -u -p -r1.38 fstype.c
--- find/fstype.c	19 Dec 2007 21:16:33 -0000	1.38
+++ find/fstype.c	20 Dec 2007 21:52:29 -0000
@@ -246,12 +246,8 @@ file_system_type_uncached (const struct 
 
   /* Don't cache unknown values. */
   fstype_known = (type != NULL);
-  if (type)
-    return type;
-  else
-    return xstrdup(_("unknown"
-		     /* TRANSLATORS: this is essentially an abbreviation 
-			for "unknown file system type" */));
+  
+  return type ? type : xstrdup(_("unknown"));
 }
 
 
Index: find/ftsfind.c
===================================================================
RCS file: /sources/findutils/findutils/find/ftsfind.c,v
retrieving revision 1.37
diff -u -p -r1.37 ftsfind.c
--- find/ftsfind.c	19 Dec 2007 21:16:33 -0000	1.37
+++ find/ftsfind.c	20 Dec 2007 21:52:29 -0000
@@ -296,7 +296,7 @@ issue_loop_warning(FTSENT * ent)
        */
       error(0, 0,
 	    _("File system loop detected; "
-	      "%1$s is part of the same file system loop as %2$s."),
+	      "%s is part of the same file system loop as %s."),
 	    safely_quote_err_filename(0, ent->fts_path),
 	    partial_quotearg_n(1,
 			       ent->fts_cycle->fts_path,
@@ -607,10 +607,7 @@ find(char *arg)
   p = fts_open(arglist, ftsoptions, NULL);
   if (NULL == p)
     {
-      error (0, errno, _("cannot search %s"
-			 /* TRANSLATORS: the argument is either
-			    a file or a directory. */
-			 ),
+      error (0, errno, _("cannot search %s"),
 	     safely_quote_err_filename(0, arg));
     }
   else
Index: find/parser.c
===================================================================
RCS file: /sources/findutils/findutils/find/parser.c,v
retrieving revision 1.137
diff -u -p -r1.137 parser.c
--- find/parser.c	19 Dec 2007 21:16:33 -0000	1.137
+++ find/parser.c	20 Dec 2007 21:52:31 -0000
@@ -527,9 +527,9 @@ found_parser(const char *original_arg, c
 	    {
 	      /* option which follows a non-option */
 	      error (0, 0,
-		     _("warning: you have specified the %1$s "
-		       "option after a non-option argument %2$s, "
-		       "but options are not positional (%3$s affects "
+		     _("warning: you have specified the %s "
+		       "option after a non-option argument %s, "
+		       "but options are not positional (%s affects "
 		       "tests specified before it as well as those "
 		       "specified after it).  Please specify options "
 		       "before other arguments.\n"),
@@ -1063,9 +1063,9 @@ parse_group (const struct parser_table* 
 	      else
 		{
 		  /* XXX: no test in test suite for this */
-		  error(1, 0, _("%1$s is not the name of an existing group and"
+		  error(1, 0, _("%s is not the name of an existing group and"
 				" it does not look like a numeric group ID "
-				"because it has the unexpected suffix %2$s"),
+				"because it has the unexpected suffix %s"),
 			quotearg_n_style(0, options.err_quoting_style, groupname),
 			quotearg_n_style(1, options.err_quoting_style, groupname+gid_len));
 		  return false;
@@ -1346,7 +1346,7 @@ insert_depthspec(const struct parser_tab
 	      return parse_noop(entry, argv, arg_ptr);
 	    }
 	}
-      error(1, 0, _("Expected a positive decimal integer argument to %1$s, but got %2$s"),
+      error(1, 0, _("Expected a positive decimal integer argument to %s, but got %s"),
 	    predicate,
 	    quotearg_n_style(0, options.err_quoting_style, depthstr));
       return false;
@@ -1846,10 +1846,7 @@ parse_perm (const struct parser_table* e
     {
       change = mode_compile (perm_expr + mode_start);
       if (NULL == change)
-	error (1, 0, _("invalid mode %s"
-		       /* TRANSLATORS: the argument is a 
-			* file permission string like 'u=rw,go='
-			*/),
+	error (1, 0, _("invalid mode %s"),
 	       quotearg_n_style(0, options.err_quoting_style, perm_expr));
     }
   perm_val[0] = mode_adjust (0, false, 0, change, NULL);
@@ -2982,9 +2979,9 @@ check_path_safety(const char *action, ch
       else if ('/' != s[0])
 	{
 	  /* Relative paths are also dangerous in $PATH. */
-	  error(1, 0, _("The relative path %1$s is included in the PATH "
+	  error(1, 0, _("The relative path %s is included in the PATH "
 			"environment variable, which is insecure in "
-			"combination with the %2$s action of find.  "
+			"combination with the %s action of find.  "
 			"Please remove that entry from $PATH"),
 		safely_quote_err_filename(0, s),
 		action);
Index: find/pred.c
===================================================================
RCS file: /sources/findutils/findutils/find/pred.c,v
retrieving revision 1.109
diff -u -p -r1.109 pred.c
--- find/pred.c	19 Dec 2007 21:16:33 -0000	1.109
+++ find/pred.c	20 Dec 2007 21:52:31 -0000
@@ -408,12 +408,7 @@ pred_delete (const char *pathname, struc
 		}
 	    }
 	}
-      error (0, errno, _("cannot delete %s"
-			 /* TRANSLATORS: the argument is either a
-			  * file or a directory, but we do not know which.
-			  * Mail [EMAIL PROTECTED] if you cannot correctly 
-			  * translate the string without knowing.
-			  */),
+      error (0, errno, _("cannot delete %s"),
 	     safely_quote_err_filename(0, pathname));
       /* Previously I had believed that having the -delete action
        * return false provided the user with control over whether an
@@ -1416,11 +1411,7 @@ is_ok(const char *program, const char *a
      This standard does not have requirements for locales other than POSIX
   */
   /* XXX: printing UNTRUSTED data here. */
-  fprintf (stderr, _("< %s ... %s > ? "
-		     /* TRANSLATORS: we would like, if possible, the final non-blank 
-		      * character of this string to be '?', but it is not 
-		      * wholly essential. */
-		     ), program, arg);
+  fprintf (stderr, _("< %s ... %s > ? "), program, arg);
   fflush (stderr);
   return yesno();
 }
@@ -1978,7 +1969,7 @@ launch (const struct buildcmd_control *c
   
   if (WIFSIGNALED (wait_status))
     {
-      error (0, 0, _("%1$s terminated by signal %2$d"),
+      error (0, 0, _("%s terminated by signal %d"),
 	     quotearg_n_style(0, options.err_quoting_style,
 			      buildstate->cmd_argv[0]),
 	     WTERMSIG (wait_status));
Index: find/tree.c
===================================================================
RCS file: /sources/findutils/findutils/find/tree.c,v
retrieving revision 1.44
diff -u -p -r1.44 tree.c
--- find/tree.c	19 Dec 2007 21:16:33 -0000	1.44
+++ find/tree.c	20 Dec 2007 21:52:31 -0000
@@ -1259,7 +1259,7 @@ build_expression_tree(int argc, char *ar
 		}
 	      else
 		{
-		  error (1, 0, _("invalid argument `%1$s' to `%2$s'"),
+		  error (1, 0, _("invalid argument `%s' to `%s'"),
 			 argv[i], predicate_name);
 		}
 	    }
Index: lib/regextype.c
===================================================================
RCS file: /sources/findutils/findutils/lib/regextype.c,v
retrieving revision 1.10
diff -u -p -r1.10 regextype.c
--- lib/regextype.c	19 Dec 2007 21:16:33 -0000	1.10
+++ lib/regextype.c	20 Dec 2007 21:52:31 -0000
@@ -103,7 +103,7 @@ get_regex_type(const char *s)
       p += sprintf(p, "%s", quote(regex_map[i].name));
     }
   
-  error(1, 0, _("Unknown regular expression type %1$s; valid types are %2$s."),
+  error(1, 0, _("Unknown regular expression type %s; valid types are %s."),
 	quote(s),
 	buf);
   /*NOTREACHED*/
Index: locate/locate.c
===================================================================
RCS file: /sources/findutils/findutils/locate/locate.c,v
retrieving revision 1.92
diff -u -p -r1.92 locate.c
--- locate/locate.c	19 Dec 2007 21:16:33 -0000	1.92
+++ locate/locate.c	20 Dec 2007 21:52:31 -0000
@@ -103,7 +103,6 @@
 # define _(Text) Text
 #define textdomain(Domain)
 #define bindtextdomain(Package, Directory)
-#define ngettext(singular,plural,n) ((1==n) ? singular : plural)
 #endif
 #ifdef gettext_noop
 # define N_(String) gettext_noop (String)
@@ -890,34 +889,30 @@ visit_count(struct process_data *procdat
 static void
 print_stats(int argc, size_t database_file_size)
 {
-  char hbuf1[LONGEST_HUMAN_READABLE + 1];
-  char hbuf2[LONGEST_HUMAN_READABLE + 1];
-  char hbuf3[LONGEST_HUMAN_READABLE + 1];
-  char hbuf4[LONGEST_HUMAN_READABLE + 1];
-  
-  printf(ngettext("Locate database size: %s byte\n",
-		  "Locate database size: %s bytes\n",
-		  database_file_size),
+  char hbuf[LONGEST_HUMAN_READABLE + 1];
+  
+  printf(_("Locate database size: %s bytes\n"),
 	 human_readable ((uintmax_t) database_file_size,
-			 hbuf1, human_ceiling, 1, 1));
+			 hbuf, human_ceiling, 1, 1));
   
   printf( (results_were_filtered ? 
-	   _("Matching Filenames: %s\n") :
-	   _("All Filenames: %s\n")),
-	  human_readable (statistics.total_filename_count,
-			 hbuf1, human_ceiling, 1, 1));
-  /* XXX: We would ideally use ngettext() here, but I don't know 
-   *      how to use it to handle more than one possibly-plural thing/
-   */
-  printf(_("File names have a cumulative length of %1$s bytes.\n"
-	   "Of those file names,\n"
-	   "\n\t%2$s contain whitespace, "
-	   "\n\t%3$s contain newline characters, "
-	   "\n\tand %4$s contain characters with the high bit set.\n"),
-	 human_readable (statistics.total_filename_length,  hbuf1, human_ceiling, 1, 1),
-	 human_readable (statistics.whitespace_count,       hbuf2, human_ceiling, 1, 1),
-	 human_readable (statistics.newline_count,          hbuf3, human_ceiling, 1, 1),
-	 human_readable (statistics.highbit_filename_count, hbuf4, human_ceiling, 1, 1));
+	   _("Matching Filenames: %s ") :
+	   _("All Filenames: %s ")),
+	 human_readable (statistics.total_filename_count,
+			 hbuf, human_ceiling, 1, 1));
+  printf(_("with a cumulative length of %s bytes"),
+	 human_readable (statistics.total_filename_length,
+			 hbuf, human_ceiling, 1, 1));
+  
+  printf(_("\n\tof which %s contain whitespace, "),
+	 human_readable (statistics.whitespace_count,
+			 hbuf, human_ceiling, 1, 1));
+  printf(_("\n\t%s contain newline characters, "),
+	 human_readable (statistics.newline_count,
+			 hbuf, human_ceiling, 1, 1));
+  printf(_("\n\tand %s contain characters with the high bit set.\n"),
+	 human_readable (statistics.highbit_filename_count,
+			 hbuf, human_ceiling, 1, 1));
   
   if (!argc)
     {
@@ -998,8 +993,8 @@ looking_at_slocate_locatedb (const char 
 		   * We don't know how to handle those.
 		   */
 		  error(0, 0,
-			_("locate database %1$s looks like an slocate "
-			  "database but it seems to have security level %2$c, "
+			_("locate database %s looks like an slocate "
+			  "database but it seems to have security level %c, "
 			  "which GNU findutils does not currently support"),
 			quotearg_n_style(0, locale_quoting_style, filename),
 			data[1]);
@@ -1129,7 +1124,7 @@ search_one_database (int argc,
 	   * so do nothing further 
 	   */
 	  error(0, 0,
-		_("%1$s is an slocate database of unsupported security level %2$d; skipping it."),
+		_("%s is an slocate database of unsupported security level %d; skipping it."),
 		quotearg_n_style(0, locale_quoting_style, procdata.dbfile),
 		slocate_seclevel);
 	  return 0;
@@ -1347,7 +1342,7 @@ search_one_database (int argc,
 
   if (stats)
     {
-      printf(_("Database %1$s is in the %2$s format.\n"),
+      printf(_("Database %s is in the %s format.\n"),
 	     procdata.dbfile,
 	     format_name);
     }
@@ -1864,12 +1859,10 @@ dolocate (int argc, char **argv, int sec
 		  /* For example:
 		     warning: database `fred' is more than 8 days old (actual age is 10 days)*/
 		  error (0, 0,
-			 _("warning: database %1$s is more than %2$d %3$s old (actual age is %4$.1f %5$s)"),
+			 _("warning: database %s is more than %d %s old (actual age is %.1f %s)"),
 			 quotearg_n_style(0,  locale_quoting_style, e), 
-			 warn_number_units,
-			 _(warn_name_units),
-			 (age/(double)SECONDS_PER_UNIT),
-			 _(warn_name_units));
+			 warn_number_units,              _(warn_name_units),
+			 (age/(double)SECONDS_PER_UNIT), _(warn_name_units));
 		}
 	    }
 	}
Index: xargs/xargs.c
===================================================================
RCS file: /sources/findutils/findutils/xargs/xargs.c,v
retrieving revision 1.77
diff -u -p -r1.77 xargs.c
--- xargs/xargs.c	20 Dec 2007 10:10:59 -0000	1.77
+++ xargs/xargs.c	20 Dec 2007 21:52:31 -0000
@@ -318,15 +318,13 @@ get_char_oct_or_hex_escape(const char *s
       if (16 == base)
 	{
 	  error(1, 0,
-		_("Invalid escape sequence %1$s in input delimiter specification; "
-		  "character values must not exceed %2$lx."),
+		_("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lx."),
 		s, (unsigned long)UCHAR_MAX);
 	}
       else
 	{
 	  error(1, 0,
-		_("Invalid escape sequence %1$s in input delimiter specification; "
-		  "character values must not exceed %2$lo."),
+		_("Invalid escape sequence %s in input delimiter specification; character values must not exceed %lo."),
 		s, (unsigned long)UCHAR_MAX);
 	}
     }
@@ -335,8 +333,7 @@ get_char_oct_or_hex_escape(const char *s
   if (0 != *endp)
     {
       error(1, 0,
-	    _("Invalid escape sequence %1$s in input delimiter specification; "
-	      "the trailing characters %2$s were not recognised."),
+	    _("Invalid escape sequence %s in input delimiter specification; trailing characters %s not recognised."),
 	    s, endp);
     }
   
@@ -381,9 +378,7 @@ get_input_delimiter(const char *s)
       else
 	{
 	  error(1, 0,
-		_("Invalid input delimiter specification %s: "
-		  "the delimiter must be either a single character "
-		  "or an escape sequence starting with \\."),
+		_("Invalid input delimiter specification %s: the delimiter must be either a single character or an escape sequence starting with \\."),
 		s);
 	  /*NOTREACHED*/
 	  return 0;
@@ -585,8 +580,8 @@ main (int argc, char **argv)
 	    if (arg_size > bc_ctl.posix_arg_size_max)
 	      {
 		error (0, 0,
-		       _("warning: value %1$ld for -s option is too large, "
-			 "using %2$ld instead"),
+		       _("warning: value %ld for -s option is too large, "
+			 "using %ld instead"),
 		       arg_size, bc_ctl.posix_arg_size_max);
 		arg_size = bc_ctl.posix_arg_size_max;
 	      }
@@ -843,11 +838,8 @@ read_line (void)
 	  if (state == QUOTE)
 	    {
 	      exec_if_possible ();
-	      if (quotc == '"')
-		error (1, 0, _("unmatched double quote; by default quotes are special to xargs unless you use the -0 option"));
-	      else
-		error (1, 0, _("unmatched single quote; by default quotes are special to xargs unless you use the -0 option"));
-
+	      error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"),
+		     quotc == '"' ? _("double") : _("single"));
 	    }
 	  if (first && EOF_STR (linebuf))
 	    return -1;
@@ -939,10 +931,8 @@ read_line (void)
 	  if (c == '\n')
 	    {
 	      exec_if_possible ();
-	      if (quotc == '"')
-		error (1, 0, _("unmatched double quote; by default quotes are special to xargs unless you use the -0 option"));
-	      else
-		error (1, 0, _("unmatched single quote; by default quotes are special to xargs unless you use the -0 option"));
+	      error (1, 0, _("unmatched %s quote; by default quotes are special to xargs unless you use the -0 option"),
+		     quotc == '"' ? _("double") : _("single"));
 	    }
 	  if (c == quotc)
 	    {
@@ -1274,14 +1264,14 @@ parse_num (char *str, int option, long i
   val = strtol (str, &eptr, 10);
   if (eptr == str || *eptr)
     {
-      fprintf (stderr, _("%1$s: invalid number for -%2$c option\n"),
+      fprintf (stderr, _("%s: invalid number for -%c option\n"),
 	       program_name, option);
       usage (stderr);
       exit(1);
     }
   else if (val < min)
     {
-      fprintf (stderr, _("%1$s: value for -%2$c option should be >= %3$ld\n"),
+      fprintf (stderr, _("%s: value for -%c option should be >= %ld\n"),
 	       program_name, option, min);
       if (fatal)
 	{
@@ -1295,7 +1285,7 @@ parse_num (char *str, int option, long i
     }
   else if (max >= 0 && val > max)
     {
-      fprintf (stderr, _("%1$s: value for -%2$c option should be < %3$ld\n"),
+      fprintf (stderr, _("%s: value for -%c option should be < %ld\n"),
 	       program_name, option, max);
       if (fatal)
 	{
_______________________________________________
Findutils-patches mailing list
Findutils-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/findutils-patches

Reply via email to