delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/07/09/21:00:20

From: HARY <Hary AT address DOT is DOT invalid>
Newsgroups: comp.os.msdos.djgpp
Subject: Bash-crash and other '_inputrc' problems.
Date: 10 Jul 2001 00:49:26 GMT
Organization: Wielki samotnik w swoim zamku.
Lines: 60
Message-ID: <slrn.pl.9kkjeu.f7.Hary@pingwin.domciu.net>
NNTP-Posting-Host: pf5.wroclaw.cvx.ppp.tpnet.pl
X-Trace: news.tpi.pl 994726166 23931 217.99.224.5 (10 Jul 2001 00:49:26 GMT)
X-Complaints-To: usenet AT tpi DOT pl
NNTP-Posting-Date: 10 Jul 2001 00:49:26 GMT
User-Agent: slrn/0.9.7.0 (pl-1.1.1) (Linux)
X-Pi: 3141592653589793
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi!

I wanted to use polish characters under bash. I have a TSR working at
hardware level that changes BIOS keyboard calls for some Alt+letter
combination. For example, when using this TSR, for Alt+a, (which is
"a-ogonek": a-with-a-little-tail) BIOS keyboard call returns scan code
0 and ASCII code 165 (as defined in CP-852).

I have never had any problems/conflicts with this TSR.

When I pressed such a combination (Alt+a) while in bash, it beeped and
did nothing, so I inserted line:

"\245": "\245"

into '_inputrc' in hope it will pass this code 'as-is' (is it legal way
to get national characters?).

Now, when I press this key combination bash 2.03 crashes immediately
with:

"Page fault at eip=0004e480, error=0004".

From registers dump:

eax=00000001 ebx=ffffffa5 ecx=001a3e84 edx=ffffffa5 esi=001960bc edi=00000001
ebp=0018acd8 esp=0018acc0 program=d:\djgpp\bin\BASH.EXE

I see that my "character 165" is in ebx and edx, but as signed value,
and probably is indexing a character conversion array with a negative
index.

Bash 2.04 behaves differently: it "freezes" for few seconds, then
displays:

bash-2.04$ bash: xmalloc: cannot allocate 12 bytes (0 bytes allocated)

or (in DOSEMU):

bash-2.04$ bash: xmalloc: cannot allocate 2 bytes (0 bytes allocated)

and exits. Again, it seems to me that it is signed/unsigned problem.

I'm not sure if the way I'm trying to get national characters is legal
(is it?), but I think that bash should survive even nonsense
configuraton files.

Moreover, there are some example definitions in sample '_inputrc', that
don't work as expected:

"\e[0XA": "Function Key 1"

'F1' key doesn't display string, it displays "A" and beeps. On the
other hand sample definitions for Alt, Shift, Ctl + Fn key _do_ work.
Where are these: "\e[0XA" codes taken from? How can I find what they
should be on my keyboard?

Thanks in advance,

  HARY

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019