[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PSPP-BUG: [bug #38647] Unicode Box character is rendered incorrectly
From: |
Ben Pfaff |
Subject: |
Re: PSPP-BUG: [bug #38647] Unicode Box character is rendered incorrectly. |
Date: |
Thu, 4 Apr 2013 09:34:57 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
These patches look good to me. Thank you!
On Wed, Apr 03, 2013 at 11:36:18AM +0200, John Darrington wrote:
> Attached are a couple of patches I propose to improve this.
>
> J'
>
> On Tue, Apr 02, 2013 at 06:13:05AM +0000, John Darrington wrote:
>
> Process this syntax:
>
> data list notable list /x *.
> begin data.
> 1
> 2
> 3
> end data.
>
>
> DESCRIPTIVES x.
>
> with this command:
>
> pspp -O box=unicode foo.sps
>
> Where the horizontal double line crosses the vertical double line,
> a NULL character appears instead of the correct character U+256C
>
>
>
> --
> PGP Public key ID: 1024D/2DE827B3
> fingerprint = 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3
> See http://keys.gnupg.net or any PGP keyserver for public key.
>
> From b0ff6c353ec979c9f22c4db1603da437d79a580d Mon Sep 17 00:00:00 2001
> From: John Darrington <address@hidden>
> Date: Wed, 3 Apr 2013 09:20:13 +0200
> Subject: [PATCH] Fixed bug displaying unicode box characters.
>
> Also added a test for this. Closes bug #38647
> ---
> src/output/ascii.c | 1 +
> tests/output/ascii.at | 26 ++++++++++++++++++++++++++
> 2 files changed, 27 insertions(+), 0 deletions(-)
>
> diff --git a/src/output/ascii.c b/src/output/ascii.c
> index 756235c..bc1b225 100644
> --- a/src/output/ascii.c
> +++ b/src/output/ascii.c
> @@ -120,6 +120,7 @@ static const ucs4_t unicode_box_chars[N_BOX] =
> 0x2564, 0x256a, 0x256c,
> 0x2564, 0x256a, 0x256c,
> 0x2554, 0x2560, 0x2560,
> + 0x2560, 0x256c, 0x256c,
> 0x2566, 0x256c, 0x256c,
> };
>
> diff --git a/tests/output/ascii.at b/tests/output/ascii.at
> index a3f66b9..b4de688 100644
> --- a/tests/output/ascii.at
> +++ b/tests/output/ascii.at
> @@ -627,3 +627,29 @@ included in the variable list.
> ])
>
> AT_CLEANUP
> +
> +AT_SETUP([ASCII unicode box chars])
> +
> +AT_DATA([uc.sps], [dnl
> +SET FORMAT=F8.4.
> +DATA LIST NOTABLE LIST /x * .
> +BEGIN DATA.
> +1
> +2
> +3
> +END DATA.
> +
> +DESCRIPTIVES X.
> +])
> +
> +
> +AT_CHECK([pspp -O box=unicode uc.sps], [0], [dnl
> +Valid cases = 3; cases with missing value(s) = 0.
> +?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> +???Variable???N??? Mean ???Std Dev???Minimum???Maximum???
> +?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> +???x ???3???2.0000??? 1.0000??? 1.0000??? 3.0000???
> +?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
> +])
> +
> +AT_CLEANUP
> --
> 1.7.2.5
>
> From 0d8411b975a9eae76956f9a9b48ec40e9ae8d256 Mon Sep 17 00:00:00 2001
> From: John Darrington <address@hidden>
> Date: Wed, 3 Apr 2013 09:37:17 +0200
> Subject: [PATCH] ascii.c: Use symbol instead of constant literal
>
> ---
> src/output/ascii.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/output/ascii.c b/src/output/ascii.c
> index bc1b225..00806b4 100644
> --- a/src/output/ascii.c
> +++ b/src/output/ascii.c
> @@ -1,5 +1,5 @@
> /* PSPP - a program for statistical analysis.
> - Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012 Free Software
> Foundation, Inc.
> + Copyright (C) 1997-9, 2000, 2007, 2009, 2010, 2011, 2012, 2013 Free
> Software Foundation, Inc.
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> @@ -127,7 +127,7 @@ static const ucs4_t unicode_box_chars[N_BOX] =
> static inline int
> make_box_index (int left, int right, int top, int bottom)
> {
> - return ((right * 3 + bottom) * 3 + left) * 3 + top;
> + return ((right * RENDER_N_LINES + bottom) * RENDER_N_LINES + left) *
> RENDER_N_LINES + top;
> }
>
> /* How to emphasize text. */
> --
> 1.7.2.5
>
> _______________________________________________
> Bug-gnu-pspp mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-gnu-pspp