seeking pre-upload approval for mksh 40.9.20120630-5 targetting wheezy
Hi,
I would like to put the following patch, which took me 3¼ hours to
find, into mksh in wheezy. It reverts a flag which I mistakenly
converted to bool back to int, as it’s used as a counter. The effect
is that, when you have non-ASCII characters on the command line and
then insert something in the middle, sometimes, the entire display
or parts of it is trashed.
--- edit.c 3 Sep 2012 19:29:14 -0000 1.8
+++ edit.c 26 Nov 2012 22:40:58 -0000
@@ -900,7 +900,7 @@ static bool x_adj_ok;
* we use x_adj_done so that functions can tell
* whether x_adjust() has been called while they are active.
*/
-static bool x_adj_done;
+static int x_adj_done;
static int x_col;
static int x_displen;
@@ -1166,7 +1166,7 @@ x_init_prompt(void)
if (x_col >= xx_cols)
x_col %= xx_cols;
x_displen = xx_cols - 2 - x_col;
- x_adj_done = false;
+ x_adj_done = 0;
pprompt(prompt, 0);
if (x_displen < 1) {
@@ -1339,7 +1339,7 @@ static int
x_ins(const char *s)
{
char *cp = xcp;
- bool adj = x_adj_done;
+ int adj = x_adj_done;
if (x_do_ins(s, strlen(s)) < 0)
return (-1);
@@ -1616,7 +1616,7 @@ x_size2(char *cp, char **dcp)
static void
x_zots(char *str)
{
- bool adj = x_adj_done;
+ int adj = x_adj_done;
x_lastcp();
while (*str && str < xlp && adj == x_adj_done)
@@ -2847,7 +2847,7 @@ static void
x_adjust(void)
{
/* flag the fact that we were called. */
- x_adj_done = true;
+ x_adj_done++;
/*
* we had a problem if the prompt length > xx_cols / 2
*/
@@ -2969,7 +2969,7 @@ x_e_putc3(const char **cp)
static void
x_e_puts(const char *s)
{
- bool adj = x_adj_done;
+ int adj = x_adj_done;
while (*s && adj == x_adj_done)
x_e_putc3(&s);
This reverts everything dealing with x_adj_done to the state
it was in mksh 40.5.
I’ve got another diff queued for wheezy, bumping the versioned
B-D for klibc on armhf to the first version known to actually
work there, but I think this is trivial:
--- debian/control 30 Sep 2012 14:50:07 -0000 1.82
+++ debian/control 6 Oct 2012 13:04:43 -0000 1.83
@@ -19,7 +19,8 @@ Homepage: http://mirbsd.de/mksh
Build-Depends: bsdmainutils, ed,
# # try klibc on any architectures it has ever been built; this aids people
# # trying to debug klibc itself (hppa, powerpcspe, sh4)
- libklibc-dev [alpha amd64 armel armhf hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4 sparc sparc64],
+ libklibc-dev (>= 2.0.1-2~) [armhf],
+ libklibc-dev [alpha amd64 armel hppa i386 ia64 m68k mips mipsel powerpc powerpcspe ppc64 s390 s390x sh4 sparc sparc64],
# # same for dietlibc; the hppa one is optional for now
dietlibc-dev (>= 0.33~cvs20120325-4~) [armhf],
dietlibc-dev (>= 0.33~cvs20111108-5~) [hppa] | dietlibc-doc [hppa],
Thanks in advance,
//mirabilos
--
Darwinism never[…]applied to wizardkind. There's a more than fair amount of[…]
stupidity in its gene-pool[…]never eradicated[…]magic evens the odds that way.
It's[…]harder to die for us than[…]muggles[…]wonder if, as technology[…]better
[…]same will[…]happen there too. Dursleys' continued existence indicates so.
Reply to: