/* rlprivate.h -- functions and variables global to the readline library,
		  but not intended for use by applications. */

/* Copyright (C) 1999 Free Software Foundation, Inc.

   This file is part of the GNU Readline Library, a library for
   reading lines of text with interactive input and history editing.

   The GNU Readline Library is free software; you can redistribute it
   and/or modify it under the terms of the GNU General Public License
   as published by the Free Software Foundation; either version 2, or
   (at your option) any later version.

   The GNU Readline Library is distributed in the hope that it will be
   useful, but WITHOUT ANY WARRANTY; without even the implied warranty
   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   The GNU General Public License is often shipped with GNU software, and
   is generally kept in a file called COPYING or LICENSE.  If you do not
   have a copy of the license, write to the Free Software Foundation,
   59 Temple Place, Suite 330, Boston, MA 02111 USA. */

#if !defined (_RL_PRIVATE_H_)
#define _RL_PRIVATE_H_

#if __READLINE_EXPORT__
# define READLINE_API __declspec (dllexport)
#elif __READLINE_IMPORT__
# define READLINE_API __declspec (dllimport)
#else
# define READLINE_API
#endif

#include "rlconf.h"	/* for VISIBLE_STATS */
#include "rlstdc.h"
#include "posixjmp.h" /* defines procenv_t */

/*************************************************************************
 *									 *
 * Global functions undocumented in texinfo manual and not in readline.h *
 *									 *
 *************************************************************************/

/* terminal.c */
READLINE_API extern char *rl_get_termcap __P((const char *));

/*************************************************************************
 *									 *
 * Global variables undocumented in texinfo manual and not in readline.h *
 *									 *
 *************************************************************************/

/* complete.c */
READLINE_API extern int rl_complete_with_tilde_expansion;
#if defined (VISIBLE_STATS)
READLINE_API extern int rl_visible_stats;
#endif /* VISIBLE_STATS */

/* readline.c */
READLINE_API extern int rl_line_buffer_len;
READLINE_API extern int rl_arg_sign;
READLINE_API extern int rl_visible_prompt_length;
READLINE_API extern int readline_echoing_p;
READLINE_API extern int rl_key_sequence_length;

/* display.c */
READLINE_API extern int rl_display_fixed;

/* parens.c */
READLINE_API extern int rl_blink_matching_paren;

/*************************************************************************
 *									 *
 * Global functions and variables unsed and undocumented		 *
 *									 *
 *************************************************************************/

/* bind.c */
READLINE_API extern char *rl_untranslate_keyseq __P((int));

/* kill.c */
READLINE_API extern int rl_set_retained_kills __P((int));

/* readline.c */
READLINE_API extern int rl_discard_argument __P((void));

/* rltty.c */
READLINE_API extern int rl_stop_output __P((int, int));

/* terminal.c */
READLINE_API extern void _rl_set_screen_size __P((int, int));

/* undo.c */
READLINE_API extern int _rl_fix_last_undo_of_type __P((int, int, int));

/* util.c */
READLINE_API extern char *_rl_savestring __P((const char *));

/*************************************************************************
 *									 *
 * Functions and variables private to the readline library		 *
 *									 *
 *************************************************************************/

/* NOTE: Functions and variables prefixed with `_rl_' are
   pseudo-global: they are global so they can be shared
   between files in the readline library, but are not intended
   to be visible to readline callers. */

/*************************************************************************
 * Undocumented private functions					 *
 *************************************************************************/

#if defined(READLINE_CALLBACKS)

/* readline.c */
READLINE_API extern void readline_internal_setup __P((void));
READLINE_API extern char *readline_internal_teardown __P((int));
READLINE_API extern int readline_internal_char __P((void));

#endif /* READLINE_CALLBACKS */

/* bind.c */
READLINE_API extern void _rl_bind_if_unbound __P((const char *, rl_command_func_t *));

/* display.c */
READLINE_API extern char *_rl_strip_prompt __P((char *));
READLINE_API extern void _rl_move_cursor_relative __P((int, const char *));
READLINE_API extern void _rl_move_vert __P((int));
READLINE_API extern void _rl_save_prompt __P((void));
READLINE_API extern void _rl_restore_prompt __P((void));
READLINE_API extern char *_rl_make_prompt_for_search __P((int));
READLINE_API extern void _rl_erase_at_end_of_line __P((int));
READLINE_API extern void _rl_clear_to_eol __P((int));
READLINE_API extern void _rl_clear_screen __P((void));
READLINE_API extern void _rl_update_final __P((void));
READLINE_API extern void _rl_redisplay_after_sigwinch __P((void));
READLINE_API extern void _rl_clean_up_for_exit __P((void));
READLINE_API extern void _rl_erase_entire_line __P((void));
READLINE_API extern int _rl_current_display_line __P((void));

/* input.c */
READLINE_API extern int _rl_any_typein __P((void));
READLINE_API extern int _rl_input_available __P((void));
READLINE_API extern void _rl_insert_typein __P((int));

/* macro.c */
READLINE_API extern void _rl_with_macro_input __P((char *));
READLINE_API extern int _rl_next_macro_key __P((void));
READLINE_API extern void _rl_push_executing_macro __P((void));
READLINE_API extern void _rl_pop_executing_macro __P((void));
READLINE_API extern void _rl_add_macro_char __P((int));
READLINE_API extern void _rl_kill_kbd_macro __P((void));

/* nls.c */
READLINE_API extern int _rl_init_eightbit __P((void));

/* parens.c */
READLINE_API extern void _rl_enable_paren_matching __P((int));

/* readline.c */
READLINE_API extern void _rl_init_line_state __P((void));
READLINE_API extern void _rl_set_the_line __P((void));
READLINE_API extern int _rl_dispatch __P((int, Keymap));
READLINE_API extern int _rl_init_argument __P((void));
READLINE_API extern void _rl_fix_point __P((int));
READLINE_API extern void _rl_replace_text __P((const char *, int, int));
READLINE_API extern int _rl_char_search_internal __P((int, int, int));
READLINE_API extern int _rl_set_mark_at_pos __P((int));
READLINE_API extern int _rl_free_saved_history_line __P((void));

/* rltty.c */
READLINE_API extern int _rl_disable_tty_signals __P((void));
READLINE_API extern int _rl_restore_tty_signals __P((void));

/* terminal.c */
READLINE_API extern void _rl_get_screen_size __P((int, int));
READLINE_API extern int _rl_init_terminal_io __P((const char *));
#ifdef _MINIX
READLINE_API extern void _rl_output_character_function __P((int));
#else
READLINE_API extern int _rl_output_character_function __P((int));
#endif
READLINE_API extern void _rl_output_some_chars __P((const char *, int));
READLINE_API extern int _rl_backspace __P((int));
READLINE_API extern void _rl_enable_meta_key __P((void));
READLINE_API extern void _rl_control_keypad __P((int));

/* util.c */
READLINE_API extern int rl_alphabetic __P((int));
READLINE_API extern int _rl_abort_internal __P((void));
READLINE_API extern char *_rl_strindex __P((const char *, const char *));
READLINE_API extern char *_rl_strpbrk __P((const char *, const char *));
READLINE_API extern int _rl_qsort_string_compare __P((char **, char **));
READLINE_API extern int (_rl_uppercase_p) __P((int));
READLINE_API extern int (_rl_lowercase_p) __P((int));
READLINE_API extern int (_rl_pure_alphabetic) __P((int));
READLINE_API extern int (_rl_digit_p) __P((int));
READLINE_API extern int (_rl_to_lower) __P((int));
READLINE_API extern int (_rl_to_upper) __P((int));
READLINE_API extern int (_rl_digit_value) __P((int));

/* vi_mode.c */
READLINE_API extern void _rl_vi_initialize_line __P((void));
READLINE_API extern void _rl_vi_reset_last __P((void));
READLINE_API extern void _rl_vi_set_last __P((int, int, int));
READLINE_API extern int _rl_vi_textmod_command __P((int));
READLINE_API extern void _rl_vi_done_inserting __P((void));

/*************************************************************************
 * Undocumented private variables					 *
 *************************************************************************/

/* bind.c */
READLINE_API extern const char *_rl_possible_control_prefixes[];
READLINE_API extern const char *_rl_possible_meta_prefixes[];

/* complete.c */
READLINE_API extern int _rl_complete_show_all;
READLINE_API extern int _rl_complete_mark_directories;
READLINE_API extern int _rl_print_completions_horizontally;
READLINE_API extern int _rl_completion_case_fold;

/* display.c */
READLINE_API extern int _rl_vis_botlin;
READLINE_API extern int _rl_last_c_pos;
READLINE_API extern int _rl_suppress_redisplay;
READLINE_API extern char *rl_display_prompt;

/* isearch.c */
READLINE_API extern unsigned char *_rl_isearch_terminators;

/* macro.c */
READLINE_API extern int _rl_defining_kbd_macro;
READLINE_API extern char *_rl_executing_macro;

/* readline.c */
READLINE_API extern int _rl_horizontal_scroll_mode;
READLINE_API extern int _rl_mark_modified_lines;
READLINE_API extern int _rl_bell_preference;
READLINE_API extern int _rl_meta_flag;
READLINE_API extern int _rl_convert_meta_chars_to_ascii;
READLINE_API extern int _rl_output_meta_chars;
READLINE_API extern char *_rl_comment_begin;
READLINE_API extern unsigned char _rl_parsing_conditionalized_out;
READLINE_API extern Keymap _rl_keymap;
READLINE_API extern FILE *_rl_in_stream;
READLINE_API extern FILE *_rl_out_stream;
READLINE_API extern int _rl_last_command_was_kill;
READLINE_API extern int _rl_eof_char;
READLINE_API extern procenv_t readline_top_level;

/* terminal.c */
READLINE_API extern int _rl_enable_keypad;
READLINE_API extern int _rl_enable_meta;
READLINE_API extern char *_rl_term_clreol;
READLINE_API extern char *_rl_term_clrpag;
READLINE_API extern char *_rl_term_im;
READLINE_API extern char *_rl_term_ic;
READLINE_API extern char *_rl_term_ei;
READLINE_API extern char *_rl_term_DC;
READLINE_API extern char *_rl_term_up;
READLINE_API extern char *_rl_term_dc;
READLINE_API extern char *_rl_term_cr;
READLINE_API extern char *_rl_term_IC;
READLINE_API extern int _rl_screenheight;
READLINE_API extern int _rl_screenwidth;
READLINE_API extern int _rl_screenchars;
READLINE_API extern int _rl_terminal_can_insert;
READLINE_API extern int _rl_term_autowrap;

/* undo.c */
READLINE_API extern int _rl_doing_an_undo;
READLINE_API extern int _rl_undo_group_level;

#endif /* _RL_PRIVATE_H_ */
