www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/07/25/11:29:36

Message-Id: <199907251528.PAA41436@out4.ibm.net>
From: "Mark E." <snowball3 AT bigfoot DOT com>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>, djgpp-workers AT delorie DOT com
Date: Sun, 25 Jul 1999 11:28:58 -0400
MIME-Version: 1.0
Subject: Re: Current diffs against Readline 4.0
References: <199907102011 DOT UAA247490 AT out1 DOT ibm DOT net>
In-reply-to: <Pine.SUN.3.91.990725105729.27488B-100000@is>
X-mailer: Pegasus Mail for Win32 (v3.11)
Reply-To: djgpp-workers AT delorie DOT com

> by Novell redirectors.  So I suggest simply to lose `isalpha' in
> fragments like the above.

Lost. Thanks.

> 
> 2.bind.c:
> 
>     + #if defined (HAVE_SETMODE) && defined(O_TEXT)
>     +   setmode (file, O_TEXT);
>     + #endif
> 
> Is it safe to read .inputrc in text mode?  Can we be sure that no
> strange unprintable characters will ever be there, in particular in
> the key-binding part?

In this case, yes. All commands are in text form and CR & LF are 
handled with printf-style escapes.

> 
> 3. terminal.c:
> 
> I'm probably missing something here--how is it supposed to work, after
> you remove all this?  The usual code uses termcap functions like
> tgetnum etc., which we don't have.

You're right. Turns out Bash comes with GNU Termcap, but the 
standalone Readline package doesn't. But we could use GNU 
Termcap with Readline, since they're both under the same license. 

> 4. histfile.c:
> 
>     + #if defined (HAVE_SETMODE) && defined (O_TEXT)
>     +   setmode (file, O_TEXT);
>     + #endif
> 
> Same comment as for .inputrc: are we sure that everything that goes to
> the history file is printable text with no strange characters?  If
> not, using binary mode and manually stripping the CRs is safer.

As a test, I typed in 'test' then ctrl-a at the Bash command line. I found 
the ctrl-a unescaped in the history file. If we want to able to store a CR 
not with a LF, then the stripping will need to be done as you suggest.


--- 
Mark Elbrecht, snowball3 AT bigfoot DOT com
http://snowball.frogspace.net/

- Raw text -


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