From mint-bounce@lists.fishpool.fi Mon Sep 27 16:37:34 2010 Message-ID: <4CA0FFDE.5040008@online.no> Date: Mon, 27 Sep 2010 22:34:38 +0200 From: Jo Even Skarstein User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 MIME-Version: 1.0 To: mint@lists.fishpool.fi Subject: Re: [MiNT] 2 keyboard-related issues in trunk References: <201009271015.37535.jflemaire@skynet.be> <24B58EFF7DC647C7B262897C1868580B@mercatus.local> <201009271041.37593.jflemaire@skynet.be> <4CA0C8FC.40309@online.no> In-Reply-To: <4CA0C8FC.40309@online.no> Content-Type: multipart/mixed; boundary="------------040008090009030900040607" X-ecartis-version: Ecartis v1.0.0 Sender: mint-bounce@lists.fishpool.fi Errors-to: mint-bounce@lists.fishpool.fi X-original-sender: joska@online.no Precedence: bulk List-help: List-unsubscribe: List-Id: X-List-ID: List-subscribe: List-owner: List-post: This is a multi-part message in MIME format. --------------040008090009030900040607 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 09/27/2010 06:40 PM, Jo Even Skarstein wrote: > It's somehow related to this file. Without it, the + acts normal. Also, > if I load it in KeyEdit and then apply the layout, the + is still > normal. However, if I load your file directly the error occurs. I will > look further into this later tonight. The keyboard.tbl is perfectly legal. There was a bug in keyboard.c, and the one responsible for that bug was me. The bug manifests itself if the deadkeys table is completely missing and an Alt+Caps-table exists. I've attached a fix. Description: Fixed a bug where the keyboard table was not correctly copied if the deadkeys table was missing. Jo Even --------------040008090009030900040607 Content-Type: text/x-patch; name="keyboard.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="keyboard.patch" --- freemint.helmut/sys/keyboard.c Mon May 24 20:17:52 2010 +++ freemint/sys/keyboard.c Mon Sep 27 22:17:52 2010 @@ -1603,7 +1603,7 @@ return ENOMEM; } - mint_bzero(kbuf, size+1); + mint_bzero(kbuf, size+2); if ((*fp->dev->read)(fp, (char *)kbuf, size) == size) { @@ -1611,7 +1611,7 @@ { case 0x2771: /* magic word for std format */ { - quickmove(kbuf, kbuf + sizeof(short), size - sizeof(short) + 1); + quickmove(kbuf, kbuf + sizeof(short), size - sizeof(short) + 2); break; } case 0x2772: /* magic word for ext format */ @@ -1627,7 +1627,7 @@ if ((sbuf[1] >= 0) && (sbuf[1] <= MAXAKP)) gl_kbd = sbuf[1]; - quickmove(kbuf, kbuf + sizeof(long), size - sizeof(long) + 1); + quickmove(kbuf, kbuf + sizeof(long), size - sizeof(long) + 2); break; } case 0x2773: /* the ISO format (as of 30.VII.2004) */ @@ -1646,7 +1646,7 @@ { iso_8859_code = (long)sbuf[3]; quickmove(kbuf, kbuf + (sizeof(long)*2), \ - size - (sizeof(long)*2) + 1); + size - (sizeof(long)*2) + 2); } else { --------------040008090009030900040607--