I realized that last email contained 5M attachment too late. Re-sending.
On 04/18/2016 02:18 PM, Pedro Alves wrote:
On 04/18/2016 11:57 AM, Yury Gribov wrote:On 04/18/2016 01:19 PM, Pedro Alves wrote: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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I wasn't expecting to ever see a "rl_" symbol here? What was the logic used to decide whether a symbol should be exported?I only kept symbols which are present in public headers....All three are declared in a file with descriptive name rlprivate.h.Ah. I wonder why they're named that way instead of using the _rl_ prefix? In any case, seems to me that whatever policy applied to _rl_ symbols used by applications should be applied to these, and there's at least one program using rl_complete_with_tilde_expansion.
FYI I have prepared a simple scanner for Debian packages (attached). It takes all users of readline and checks whether they require any of readline's symbols. On Ubuntu 14 in addition to already public symbols this returns completion_matches ding filename_completion_function _rl_abort_internal _rl_clean_up_for_exit _rl_clear_screen _rl_mark_modified_lines _rl_move_vert _rl_vis_botlin sh_get_env_value sh_get_home_dir This does not include rl_complete_with_tilde_expansion because Ubuntu lacks nmcli and also I wasn't able to apply to python3.2 and octave3.2 (those seem to not be downloadable today). Perhaps someone could implement and run similar script for Fedora and yum?
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 */ so I'd assume that that's a public symbol and that those examples no longer link after your patch?Examples do link and run (most probably because they link static version of readline).That may well be. It'd be good to make sure the readline and history examples still work with a shared library version of readline. In this particular case, I have no idea whether it's the examples that should be using something else or whether it's the symbol that should be declared public. But this looks like something that should be addressed one way or the other. Not good to be giving out examples that don't work, IMO.
I agree I'll see what they use and add relevant symbols to export tomorrow. -Y
find-used-symbols.sh
Description: application/shellscript
add_history add_history_time append_history clear_history completion_matches current_history ding emacs_ctlx_keymap emacs_meta_keymap emacs_standard_keymap filename_completion_function free_history_entry funmap get_history_event history_arg_extract history_base history_comment_char history_expand history_expansion_char history_get history_get_history_state history_get_time history_inhibit_expansion_function history_is_stifled history_length history_list history_max_entries history_no_expand_chars history_quotes_inhibit_expansion history_search history_search_delimiter_chars history_search_pos history_search_prefix history_set_history_state history_set_pos history_subst_char history_tokenize history_total_bytes history_truncate_file history_word_delimiters history_write_timestamps max_input_history next_history previous_history read_history read_history_range readline remove_history replace_history_entry _rl_abort_internal rl_add_defun rl_add_funmap_entry rl_add_undo rl_alphabetic rl_already_prompted rl_attempted_completion_function rl_attempted_completion_over rl_basic_quote_characters rl_basic_word_break_characters rl_begin_undo_group rl_binding_keymap rl_bind_key rl_bind_key_if_unbound rl_bind_key_if_unbound_in_map rl_bind_key_in_map rl_bind_keyseq rl_bind_keyseq_if_unbound rl_bind_keyseq_if_unbound_in_map rl_bind_keyseq_in_map rl_callback_handler_install rl_callback_handler_remove rl_callback_read_char rl_catch_signals rl_catch_sigwinch rl_char_is_quoted_p rl_cleanup_after_signal _rl_clean_up_for_exit rl_clear_message rl_clear_pending_input _rl_clear_screen rl_clear_screen rl_clear_signals rl_complete rl_complete_internal rl_completer_quote_characters rl_completer_word_break_characters rl_completion_append_character rl_completion_display_matches_hook rl_completion_entry_function rl_completion_found_quote rl_completion_invoking_key rl_completion_mark_symlink_dirs rl_completion_matches rl_completion_mode rl_completion_query_items rl_completion_quote_character rl_completion_suppress_append rl_completion_suppress_quote rl_completion_type rl_completion_word_break_hook rl_copy_keymap rl_copy_text rl_crlf rl_delete rl_delete_text rl_deprep_term_function rl_deprep_terminal rl_ding rl_directory_completion_hook rl_directory_rewrite_hook rl_discard_argument rl_discard_keymap rl_dispatching rl_display_match_list rl_display_prompt rl_done rl_do_undo rl_dump_functions _rl_echoing_p rl_echo_signal_char rl_editing_mode rl_emacs_editing_mode rl_end rl_end_undo_group rl_erase_empty_line rl_event_hook rl_execute_next rl_executing_keymap rl_executing_macro rl_expand_prompt rl_explicit_arg rl_extend_line_buffer rl_filename_completion_desired rl_filename_completion_function rl_filename_dequoting_function rl_filename_quote_characters rl_filename_quoting_desired rl_filename_quoting_function rl_forced_update_display rl_free rl_free_line_state rl_free_undo_list rl_function_dumper rl_function_of_keyseq rl_funmap_names rl_generic_bind rl_getc rl_getc_function rl_get_keymap rl_get_keymap_by_name rl_get_keymap_name rl_get_next_history rl_get_previous_history rl_get_screen_size rl_get_termcap rl_gnu_readline_p rl_history_search_backward rl_history_search_forward _rl_horizontal_scroll_mode rl_ignore_completion_duplicates rl_ignore_some_completions_function rl_inhibit_completion rl_initialize rl_initialize_funmap rl_insert rl_insert_close rl_insert_mode rl_insert_text rl_instream rl_invoking_keyseqs rl_invoking_keyseqs_in_map rl_kill_full_line rl_kill_text rl_last_func rl_library_version rl_line_buffer rl_list_funmap_names rl_macro_bind rl_macro_dumper rl_make_bare_keymap rl_make_keymap rl_mark _rl_mark_modified_lines rl_menu_complete rl_message rl_modifying _rl_move_vert rl_named_function rl_newline rl_num_chars_to_read rl_numeric_arg rl_on_new_line rl_on_new_line_with_prompt rl_outstream rl_parse_and_bind rl_pending_input rl_point rl_prefer_env_winsize rl_pre_input_hook rl_prep_term_function rl_prep_terminal _rl_print_completions_horizontally rl_prompt rl_push_macro_input _rl_qsort_string_compare rl_read_init_file rl_read_key rl_readline_name rl_readline_state rl_readline_version rl_redisplay rl_redisplay_function rl_refresh_line rl_replace_line rl_re_read_init_file rl_reset_after_signal rl_reset_line_state rl_reset_screen_size rl_reset_terminal rl_resize_terminal rl_restore_prompt rl_reverse_search_history rl_save_prompt rl_set_key rl_set_keyboard_input_timeout rl_set_keymap rl_set_paren_blink_timeout rl_set_prompt rl_set_screen_size rl_set_signals rl_show_char rl_sort_completion_matches rl_special_prefixes rl_startup_hook rl_stuff_char rl_terminal_name rl_translate_keyseq rl_tty_set_default_bindings rl_tty_unset_default_bindings rl_unbind_command_in_map rl_unbind_function_in_map rl_unbind_key rl_unbind_key_in_map rl_undo_command rl_undo_list rl_username_completion_function rl_variable_bind rl_variable_dumper rl_variable_value rl_vi_editing_mode _rl_vis_botlin sh_get_env_value sh_get_home_dir stifle_history tilde_expand unstifle_history using_history vi_insertion_keymap vi_movement_keymap where_history write_history xfree xmalloc xrealloc
_______________________________________________ Bug-readline mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-readline
