delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/11/18:15:26

From: "Ingo Ruhnke" <grumbel AT gmx DOT de>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: how to get a visual bell for bash and man ?
Date: Sat, 11 Apr 1998 23:57:09 +0200
Organization: Telemedia News Server
Lines: 78
Message-ID: <352fe8ce.0@news2.cityweb.de>
NNTP-Posting-Host: demdwu38.bertelsmann.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:
>
>On Mon, 6 Apr 1998, Ingo Ruhnke wrote:
>
>It depends on how the port of the readline library was done.  DJGPP
>*does* support the visible bell, but I don't know whether the ported
>readline uses this DJGPP feature.  You will have to look into the Bash
>sources to find out.

I think the interessting parts of the source are this:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
static struct _tc_string tc_strings[] =
{
/* ... */
  "vb", &visible_bell,
};
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
and
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
/* Ring the terminal bell. */
int
ding ()
{
  if (readline_echoing_p)
    {
#if !defined (__GO32__) || defined (__DJGPP__)
      switch (_rl_bell_preference)
        {
case NO_BELL:
default:
   break;
case VISIBLE_BELL:
   if (visible_bell)
     {
       tputs (visible_bell, 1, _rl_output_character_function);
       break;
     }
   /* FALLTHROUGH */
case AUDIBLE_BELL:
   fprintf (stderr, "\007");
   fflush (stderr);
   break;
        }
#else /* __GO32__ && !__DJGPP__ */
      fprintf (stderr, "\007");
      fflush (stderr);
#endif /* __GO32__ && !__DJGPP__ */
      return (0);
    }
  return (-1);
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
But I couldn't really find out were visible_bell is defined. I
think the best solution for me is to leave the setting of
"bell-style = none".
Sorry it is the first time that I take a look in some GNU source code.
>> Why is bell-style set to "on" and not to "visible", "audible" or "none"?
>> And what is this visible-stats? I couldn't find any documentation on
that?
>
>It should be described in the documentation of readline library, not
>in Bash docs.  It's a feature of the readline library.
I searched all the docs and the sources, that what I found:
<<<<<<<<<<<<<<<< gnu\bash1147\RELEASE >>>>>>>>
h.  The VISIBLE_STATS completion listing code now follows symlinks
<<<<<<<<<<<<< gnu\bash1147\lib\readline\bind.c >>>>>>>>>>>>
/* Define this to get an indication of file type when listing completions.
*/
#define VISIBLE_STATS

Ingo

--
http://privat.schlund.de/grumbel/




- Raw text -


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