WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-3.1-testing] figlet: Fix handling of full final lin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] figlet: Fix handling of full final line of octal output.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 23 Apr 2008 01:30:22 -0700
Delivery-date: Wed, 23 Apr 2008 01:30:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1208937809 -3600
# Node ID 776e39a33bc18422faca01df67b3a74852337710
# Parent  be8a806d1865163a52bda40f9e74d2a68a2599e4
figlet: Fix handling of full final line of octal output.
It should not be terminated with a backslash.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
xen-unstable changeset:   17502:4f9284a5d3ab4fb402e6838f39fb2e43ee833779
xen-unstable date:        Wed Apr 23 09:02:15 2008 +0100
---
 xen/tools/figlet/figlet.c |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)

diff -r be8a806d1865 -r 776e39a33bc1 xen/tools/figlet/figlet.c
--- a/xen/tools/figlet/figlet.c Tue Apr 22 12:00:55 2008 +0100
+++ b/xen/tools/figlet/figlet.c Wed Apr 23 09:03:29 2008 +0100
@@ -1488,18 +1488,7 @@ static void myputchar(unsigned char c)
 
     putc(c, stderr);
 
-    if ( nr_chars == 0 )
-        putchar('"');
-
-    putchar('\\');
-    putchar('0' + ((c>>6)&7));
-    putchar('0' + ((c>>3)&7));
-    putchar('0' + ((c>>0)&7));
-
-    if ( c == '\n' )
-        startline = 1;
-
-    if ( ++nr_chars == 18 ) 
+    if ( nr_chars == 18 ) 
     {
         nr_chars = 0;
         putchar('"');
@@ -1507,6 +1496,17 @@ static void myputchar(unsigned char c)
         putchar('\\');
         putchar('\n');
     }
+
+    if ( nr_chars++ == 0 )
+        putchar('"');
+
+    putchar('\\');
+    putchar('0' + ((c>>6)&7));
+    putchar('0' + ((c>>3)&7));
+    putchar('0' + ((c>>0)&7));
+
+    if ( c == '\n' )
+        startline = 1;
 }
 
 void putstring(string)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] figlet: Fix handling of full final line of octal output., Xen patchbot-3.1-testing <=