changeset 75949:d420b7899f20

(Fformat): Add support for '+' flag.
author Andreas Schwab <schwab@suse.de>
date Fri, 16 Feb 2007 13:18:29 +0000
parents 21bf0516e180
children f7b102b31618
files src/editfns.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Fri Feb 16 12:29:45 2007 +0000
+++ b/src/editfns.c	Fri Feb 16 13:18:29 2007 +0000
@@ -3396,7 +3396,7 @@
 
 The basic structure of a %-sequence is
   % <flags> <width> <precision> character
-where flags is [- #0]+, width is [0-9]+, and precision is .[0-9]+
+where flags is [-+ #0]+, width is [0-9]+, and precision is .[0-9]+
 
 usage: (format STRING &rest OBJECTS)  */)
      (nargs, args)
@@ -3509,7 +3509,7 @@
 
 	   where
 
-	   flags	::= [- #0]+
+	   flags	::= [-+ #0]+
 	   field-width	::= [0-9]+
 	   precision	::= '.' [0-9]*
 
@@ -3523,7 +3523,7 @@
 
 	while (format != end
 	       && (*format == '-' || *format == '0' || *format == '#'
-		   || * format == ' '))
+		   || * format == ' ' || *format == '+'))
 	  ++format;
 
 	if (*format >= '0' && *format <= '9')
@@ -3700,7 +3700,7 @@
 	  discarded[format - format_start] = 1;
 	  format++;
 
-	  while (index("-0# ", *format))
+	  while (index("-+0# ", *format))
 	    {
 	      if (*format == '-')
 		{