bug-readline
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-readline] [PATCH] Enable visibility annotations


From: Chet Ramey
Subject: Re: [Bug-readline] [PATCH] Enable visibility annotations
Date: Tue, 19 Apr 2016 10:45:51 -0700
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

On 4/18/16 3:19 AM, Pedro Alves wrote:

>> I've also fixed an issue in script and added fixed patch which
>> additionally visualizes _rl_horizontal_scroll_mode (required by trunk gdb).
> 
> I ran this now and got:
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Symbols which may be used and are missing in new libreadline:
> rl_complete_with_tilde_expansion
> _rl_mark_modified_lines

These two correspond to bindable readline variables.  The former retains
its rl_ prefix for backwards (and historical) compatibility.

> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> I wasn't expecting to ever see a "rl_" symbol here?  What was the
> logic used to decide whether a symbol should be exported?
> 
> Here's the diff between your rl_orig.lst rl_new.lst files.  There
> are more "rl_" files being hidden, e.g.:
> 
>  rl_blink_matching_paren
>  rl_byte_oriented
>  rl_display_fixed.

The first two correspond to bindable variables.  They should probably
have been private in the first place, but hindsight is always perfect.
The same with the third in that it should probably have been private
from the beginning but was not and now exists for backwards compatibility.

> 
> There are other symbols here that look like should probably be public.
> For example, history_offset is used by readline's examples:
> 
>  readline/src/examples/hist_purgecmd.c:44:extern int history_offset;
>  readline/src/examples/hist_purgecmd.c:142:        history_offset--;     /* 
> moving backwards in history list */
>  readline/src/examples/hist_erasedups.c:41:extern int history_offset;
>  readline/src/examples/hist_erasedups.c:114:           history_offset--; 
        /* moving backwards in history list */

All of the public symbols in history.h are part of the history library,
which can be built both as part of readline and separately.  We were a
little careless 25 years ago with the public function names, and it's too
late to change those now, but all of the history library variables have a
`history_' prefix.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]