Source-Changes-HG archive

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

[src/netbsd-6]: src/lib/libterminfo Pull up following revision(s) (requested ...



details:   https://anonhg.NetBSD.org/src/rev/d493f34e0cc6
branches:  netbsd-6
changeset: 775719:d493f34e0cc6
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Mar 14 15:40:58 2013 +0000

description:
Pull up following revision(s) (requested by roy in ticket #834):
        lib/libterminfo/tparm.c: revision 1.10
Fix %t logic and don't output any %; or %e parts.
Fixes PR lib/47490 thanks to Julien Oster

diffstat:

 lib/libterminfo/tparm.c |  18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 deletions(-)

diffs (56 lines):

diff -r 76925f661848 -r d493f34e0cc6 lib/libterminfo/tparm.c
--- a/lib/libterminfo/tparm.c   Tue Feb 19 04:52:48 2013 +0000
+++ b/lib/libterminfo/tparm.c   Thu Mar 14 15:40:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tparm.c,v 1.7.4.1 2012/12/11 04:26:26 riz Exp $ */
+/* $NetBSD: tparm.c,v 1.7.4.2 2013/03/14 15:40:58 riz Exp $ */
 
 /*
  * Copyright (c) 2009, 2011 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: tparm.c,v 1.7.4.1 2012/12/11 04:26:26 riz Exp $");
+__RCSID("$NetBSD: tparm.c,v 1.7.4.2 2013/03/14 15:40:58 riz Exp $");
 
 #include <assert.h>
 #include <ctype.h>
@@ -453,7 +453,7 @@
                        break;
                case 't': /* then */
                        pop(&val, NULL, &stack);
-                       if (val != 0) {
+                       if (val == 0) {
                                l = 0;
                                for (; *str != '\0'; str++) {
                                        if (*str != '%')
@@ -464,10 +464,14 @@
                                        else if (*str == ';') {
                                                if (l > 0)
                                                        l--;
-                                               else
+                                               else {
+                                                       str++;
                                                        break;
-                                       } else if (*str == 'e' && l == 0)
+                                               }
+                                       } else if (*str == 'e' && l == 0) {
+                                               str++;
                                                break;
+                                       }
                                }
                        }
                        break;
@@ -482,8 +486,10 @@
                                else if (*str == ';') {
                                        if (l > 0)
                                                l--;
-                                       else
+                                       else {
+                                               str++;
                                                break;
+                                       }
                                }
                        }
                        break;



Home | Main Index | Thread Index | Old Index