Source-Changes-HG archive

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

[src/trunk]: src/external/gpl2/xcvs/dist/src - Put back %, which was removed ...



details:   https://anonhg.NetBSD.org/src/rev/6f698b763b98
branches:  trunk
changeset: 777883:6f698b763b98
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Mar 08 20:41:04 2012 +0000

description:
- Put back %, which was removed from the new format strings
  [with reversed meaning, so that we are still compatible with the new format]
- Fix format strings

diffstat:

 external/gpl2/xcvs/dist/src/subr.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (42 lines):

diff -r 7a9a47a09f80 -r 6f698b763b98 external/gpl2/xcvs/dist/src/subr.c
--- a/external/gpl2/xcvs/dist/src/subr.c        Thu Mar 08 20:39:28 2012 +0000
+++ b/external/gpl2/xcvs/dist/src/subr.c        Thu Mar 08 20:41:04 2012 +0000
@@ -1285,7 +1285,7 @@
                        dellist(&pflist);
                        free(b);
                        error (1, 0,
-"internal error:  unknown integer arg size (%d)",
+"internal error:  unknown integer arg size (%zu)",
                                length);
                        break;
                }
@@ -1328,7 +1328,7 @@
                        dellist(&pflist);
                        free(b);
                        error (1, 0,
-"internal error:  unknown floating point arg size (%d)",
+"internal error:  unknown floating point arg size (%zu)",
                                length);
                        break;
                }
@@ -1458,6 +1458,7 @@
      *        output string into separate arguments
      *
      * %X means sub var "X" into location
+     * NB: The meaning of the following 2 formats is reversed in the new mode
      * %{VWXYZ} means sub V,W,X,Y,Z into location as a single arg.  The shell
      *        || would be to quote the comma separated arguments.  Each list
      *        that V, W, X, Y, and Z represent attributes of will cause a new
@@ -1567,6 +1568,12 @@
                    }
                }
 #endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+               if (*s == ',') {
+#ifdef SUPPORT_OLD_INFO_FMT_STRINGS
+                   if (!oldway)
+#endif /* SUPPORT_OLD_INFO_FMT_STRINGS */
+                       s++, onearg = 1;
+               }
                    
                /* parse the format string and sub in... */
                if (*s == '{')



Home | Main Index | Thread Index | Old Index