diff options
author | Andrew Cagney <cagney@redhat.com> | 2002-08-24 00:09:22 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2002-08-24 00:09:22 +0000 |
commit | 2ba146cd6fea7b7ba17f7dce0476c970e82c5398 (patch) | |
tree | cae590aed6ce605478cd5f58f92a15ad6a1458b4 /readline | |
parent | 0becb2ae2137bedf861c2afe49665060f5baa680 (diff) | |
download | gdb-2ba146cd6fea7b7ba17f7dce0476c970e82c5398.zip gdb-2ba146cd6fea7b7ba17f7dce0476c970e82c5398.tar.gz gdb-2ba146cd6fea7b7ba17f7dce0476c970e82c5398.tar.bz2 |
Dummy commit. Get CVS off the branch.
Diffstat (limited to 'readline')
-rw-r--r-- | readline/doc/rluserman.texinfo | 6 | ||||
-rw-r--r-- | readline/examples/rlfe.c | 383 | ||||
-rw-r--r-- | readline/rlprivate.h | 221 | ||||
-rw-r--r-- | readline/rlshell.h | 10 | ||||
-rw-r--r-- | readline/xmalloc.h | 6 |
5 files changed, 128 insertions, 498 deletions
diff --git a/readline/doc/rluserman.texinfo b/readline/doc/rluserman.texinfo index 89abe31..e6a3dcd 100644 --- a/readline/doc/rluserman.texinfo +++ b/readline/doc/rluserman.texinfo @@ -10,14 +10,14 @@ @ifinfo @dircategory Libraries @direntry -* RLuserman: (rluserman). The GNU readline library User's Manual. +* Readline: (readline). The GNU readline library API @end direntry This document describes the end user interface of the GNU Readline Library, a utility which aids in the consistency of user interface across discrete programs that need to provide a command line interface. -Copyright (C) 1988-2002 Free Software Foundation, Inc. +Copyright (C) 1988-1999 Free Software Foundation, Inc. Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice @@ -72,7 +72,7 @@ except that this permission notice may be stated in a translation approved by the Free Software Foundation. @vskip 0pt plus 1filll -Copyright @copyright{} 1988-2002 Free Software Foundation, Inc. +Copyright @copyright{} 1988-1999 Free Software Foundation, Inc. @end titlepage @ifinfo diff --git a/readline/examples/rlfe.c b/readline/examples/rlfe.c index d634d7c..5c3c8fd 100644 --- a/readline/examples/rlfe.c +++ b/readline/examples/rlfe.c @@ -64,8 +64,6 @@ #include <unistd.h> #include <sys/ioctl.h> #include <termios.h> -#include <limits.h> -#include <dirent.h> #ifdef READLINE_LIBRARY # include "readline.h" @@ -83,7 +81,6 @@ #endif #ifndef HAVE_MEMMOVE -#ifndef memmove # if __GNUC__ > 1 # define memmove(d, s, n) __builtin_memcpy(d, s, n) # else @@ -92,19 +89,8 @@ #else # define memmove(d, s, n) memcpy(d, s, n) #endif -#endif - -#define APPLICATION_NAME "Rlfe" - -#ifndef errno -extern int errno; -#endif -extern int optind; -extern char *optarg; - -static char *progname; -static char *progversion; +#define APPLICATION_NAME "Fep" static int in_from_inferior_fd; static int out_to_inferior_fd; @@ -124,15 +110,13 @@ char echo_suppress_buffer[ECHO_SUPPRESS_MAX]; int echo_suppress_start = 0; int echo_suppress_limit = 0; -/* #define DEBUG */ - -static FILE *logfile = NULL; +#define DEBUG #ifdef DEBUG -FILE *debugfile = NULL; -#define DPRINT0(FMT) (fprintf(debugfile, FMT), fflush(debugfile)) -#define DPRINT1(FMT, V1) (fprintf(debugfile, FMT, V1), fflush(debugfile)) -#define DPRINT2(FMT, V1, V2) (fprintf(debugfile, FMT, V1, V2), fflush(debugfile)) +FILE *logfile = NULL; +#define DPRINT0(FMT) (fprintf(logfile, FMT), fflush(logfile)) +#define DPRINT1(FMT, V1) (fprintf(logfile, FMT, V1), fflush(logfile)) +#define DPRINT2(FMT, V1, V2) (fprintf(logfile, FMT, V1, V2), fflush(logfile)) #else #define DPRINT0(FMT) /* Do nothing */ #define DPRINT1(FMT, V1) /* Do nothing */ @@ -141,10 +125,6 @@ FILE *debugfile = NULL; struct termios orig_term; -static int rlfe_directory_completion_hook __P((char **)); -static int rlfe_directory_rewrite_hook __P((char **)); -static char *rlfe_filename_completion_function __P((const char *, int)); - /* Pid of child process. */ static pid_t child = -1; @@ -390,20 +370,13 @@ my_rl_getc (FILE *dummy) return ch; } -static void -usage() -{ - fprintf (stderr, "%s: usage: %s [-l filename] [-a] [-n appname] [-hv] [command [arguments...]]\n", - progname, progname); -} - int main(int argc, char** argv) { char *path; - int i, append; + int i; int master; - char *name, *logfname, *appname; + char *name; int in_from_tty_fd; struct sigaction act; struct winsize ws; @@ -414,58 +387,12 @@ main(int argc, char** argv) char *prompt = empty_string; int ioctl_err = 0; - if ((progname = strrchr (argv[0], '/')) == 0) - progname = argv[0]; - else - progname++; - progversion = RL_LIBRARY_VERSION; - - append = 0; - appname = APPLICATION_NAME; - logfname = (char *)NULL; - - while ((i = getopt (argc, argv, "ahl:n:v")) != EOF) - { - switch (i) - { - case 'l': - logfname = optarg; - break; - case 'n': - appname = optarg; - break; - case 'a': - append = 1; - break; - case 'h': - usage (); - exit (0); - case 'v': - fprintf (stderr, "%s version %s\n", progname, progversion); - exit (0); - default: - usage (); - exit (2); - } - } - - argc -= optind; - argv += optind; - - if (logfname) - { - logfile = fopen (logfname, append ? "a" : "w"); - if (logfile == 0) - fprintf (stderr, "%s: warning: could not open log file %s: %s\n", - progname, logfname, strerror (errno)); - } - - rl_readline_name = appname; - #ifdef DEBUG - debugfile = fopen("LOG", "w"); + logfile = fopen("LOG", "w"); #endif + rl_readline_name = APPLICATION_NAME; + if ((master = get_master_pty(&name)) < 0) { perror("ptypair: could not open master pty"); @@ -559,10 +486,10 @@ main(int argc, char** argv) /* now start the shell */ { static char* command_args[] = { COMMAND_ARGS, NULL }; - if (argc < 1) + if (argc <= 1) execvp(COMMAND, command_args); else - execvp(argv[0], &argv[0]); + execvp(argv[1], &argv[1]); } /* should never be reached */ @@ -608,13 +535,6 @@ main(int argc, char** argv) rl_deprep_term_function = null_deprep_terminal; rl_callback_handler_install (prompt, line_handler); -#if 1 - rl_directory_completion_hook = rlfe_directory_completion_hook; - rl_completion_entry_function = rlfe_filename_completion_function; -#else - rl_directory_rewrite_hook = rlfe_directory_rewrite_hook; -#endif - in_from_tty_fd = STDIN_FILENO; FD_ZERO (&in_set); maxfd = in_from_inferior_fd > in_from_tty_fd ? in_from_inferior_fd @@ -724,47 +644,6 @@ main(int argc, char** argv) } old_count = buf_count; - /* Do some minimal carriage return translation and backspace - processing before logging the input line. */ - if (logfile) - { -#ifndef __GNUC__ - char *b; -#else - char b[count + 1]; -#endif - int i, j; - -#ifndef __GNUC__ - b = malloc (count + 1); - if (b) { -#endif - for (i = 0; i < count; i++) - b[i] = buf[buf_count + i]; - b[i] = '\0'; - for (i = j = 0; i <= count; i++) - { - if (b[i] == '\r') - { - if (b[i+1] != '\n') - b[j++] = '\n'; - } - else if (b[i] == '\b') - { - if (i) - j--; - } - else - b[j++] = b[i]; - } - fprintf (logfile, "%s", b); - -#ifndef __GNUC__ - free (b); - } -#endif - } - /* Look for any pending echo that we need to suppress. */ while (echo_suppress_start < echo_suppress_limit && count > 0 @@ -804,239 +683,3 @@ main(int argc, char** argv) } } } - -/* - * - * FILENAME COMPLETION FOR RLFE - * - */ - -#ifndef PATH_MAX -# define PATH_MAX 1024 -#endif - -#define DIRSEP '/' -#define ISDIRSEP(x) ((x) == '/') -#define PATHSEP(x) (ISDIRSEP(x) || (x) == 0) - -#define DOT_OR_DOTDOT(x) \ - ((x)[0] == '.' && (PATHSEP((x)[1]) || \ - ((x)[1] == '.' && PATHSEP((x)[2])))) - -#define FREE(x) if (x) free(x) - -#define STRDUP(s, x) do { \ - s = strdup (x);\ - if (s == 0) \ - return ((char *)NULL); \ - } while (0) - -static int -get_inferior_cwd (path, psize) - char *path; - size_t psize; -{ - int n; - static char procfsbuf[PATH_MAX] = { '\0' }; - - if (procfsbuf[0] == '\0') - sprintf (procfsbuf, "/proc/%d/cwd", (int)child); - n = readlink (procfsbuf, path, psize); - if (n < 0) - return n; - if (n > psize) - return -1; - path[n] = '\0'; - return n; -} - -static int -rlfe_directory_rewrite_hook (dirnamep) - char **dirnamep; -{ - char *ldirname, cwd[PATH_MAX], *retdir, *ld; - int n, ldlen; - - ldirname = *dirnamep; - - if (*ldirname == '/') - return 0; - - n = get_inferior_cwd (cwd, sizeof(cwd) - 1); - if (n < 0) - return 0; - if (n == 0) /* current directory */ - { - cwd[0] = '.'; - cwd[1] = '\0'; - n = 1; - } - - /* Minimally canonicalize ldirname by removing leading `./' */ - for (ld = ldirname; *ld; ) - { - if (ISDIRSEP (ld[0])) - ld++; - else if (ld[0] == '.' && PATHSEP(ld[1])) - ld++; - else - break; - } - ldlen = (ld && *ld) ? strlen (ld) : 0; - - retdir = (char *)malloc (n + ldlen + 3); - if (retdir == 0) - return 0; - if (ldlen) - sprintf (retdir, "%s/%s", cwd, ld); - else - strcpy (retdir, cwd); - free (ldirname); - - *dirnamep = retdir; - - DPRINT1("rl_directory_rewrite_hook returns %s\n", retdir); - return 1; -} - -/* Translate *DIRNAMEP to be relative to the inferior's CWD. Leave a trailing - slash on the result. */ -static int -rlfe_directory_completion_hook (dirnamep) - char **dirnamep; -{ - char *ldirname, *retdir; - int n, ldlen; - - ldirname = *dirnamep; - - if (*ldirname == '/') - return 0; - - n = rlfe_directory_rewrite_hook (dirnamep); - if (n == 0) - return 0; - - ldirname = *dirnamep; - ldlen = (ldirname && *ldirname) ? strlen (ldirname) : 0; - - if (ldlen == 0 || ldirname[ldlen - 1] != '/') - { - retdir = (char *)malloc (ldlen + 3); - if (retdir == 0) - return 0; - if (ldlen) - strcpy (retdir, ldirname); - else - retdir[ldlen++] = '.'; - retdir[ldlen] = '/'; - retdir[ldlen+1] = '\0'; - free (ldirname); - - *dirnamep = retdir; - } - - DPRINT1("rl_directory_completion_hook returns %s\n", retdir); - return 1; -} - -static char * -rlfe_filename_completion_function (text, state) - const char *text; - int state; -{ - static DIR *directory; - static char *filename = (char *)NULL; - static char *dirname = (char *)NULL, *ud = (char *)NULL; - static int flen, udlen; - char *temp; - struct dirent *dentry; - - if (state == 0) - { - if (directory) - { - closedir (directory); - directory = 0; - } - FREE (dirname); - FREE (filename); - FREE (ud); - - if (text && *text) - STRDUP (filename, text); - else - { - filename = malloc(1); - if (filename == 0) - return ((char *)NULL); - filename[0] = '\0'; - } - dirname = (text && *text) ? strdup (text) : strdup ("."); - if (dirname == 0) - return ((char *)NULL); - - temp = strrchr (dirname, '/'); - if (temp) - { - strcpy (filename, ++temp); - *temp = '\0'; - } - else - { - dirname[0] = '.'; - dirname[1] = '\0'; - } - - STRDUP (ud, dirname); - udlen = strlen (ud); - - rlfe_directory_completion_hook (&dirname); - - directory = opendir (dirname); - flen = strlen (filename); - - rl_filename_completion_desired = 1; - } - - dentry = 0; - while (directory && (dentry = readdir (directory))) - { - if (flen == 0) - { - if (DOT_OR_DOTDOT(dentry->d_name) == 0) - break; - } - else - { - if ((dentry->d_name[0] == filename[0]) && - (strlen (dentry->d_name) >= flen) && - (strncmp (filename, dentry->d_name, flen) == 0)) - break; - } - } - - if (dentry == 0) - { - if (directory) - { - closedir (directory); - directory = 0; - } - FREE (dirname); - FREE (filename); - FREE (ud); - dirname = filename = ud = 0; - return ((char *)NULL); - } - - if (ud == 0 || (ud[0] == '.' && ud[1] == '\0')) - temp = strdup (dentry->d_name); - else - { - temp = malloc (1 + udlen + strlen (dentry->d_name)); - strcpy (temp, ud); - strcpy (temp + udlen, dentry->d_name); - } - return (temp); -} diff --git a/readline/rlprivate.h b/readline/rlprivate.h index ccb9144..c05230e 100644 --- a/readline/rlprivate.h +++ b/readline/rlprivate.h @@ -26,7 +26,7 @@ #include "rlconf.h" /* for VISIBLE_STATS */ #include "rlstdc.h" -#include "posixjmp.h" /* defines procenv_t */ +#include "posixjmp.h" /* defines procenv_t */ /************************************************************************* * * @@ -34,6 +34,9 @@ * * *************************************************************************/ +/* terminal.c */ +extern char *rl_get_termcap __P((char *)); + /************************************************************************* * * * Global variables undocumented in texinfo manual and not in readline.h * @@ -48,11 +51,14 @@ extern int rl_visible_stats; /* readline.c */ extern int rl_line_buffer_len; +extern int rl_numeric_arg; extern int rl_arg_sign; +extern int rl_explicit_arg; +extern int rl_editing_mode; extern int rl_visible_prompt_length; +extern Function *rl_last_func; extern int readline_echoing_p; extern int rl_key_sequence_length; -extern int rl_byte_oriented; /* display.c */ extern int rl_display_fixed; @@ -66,17 +72,26 @@ extern int rl_blink_matching_paren; * * *************************************************************************/ +/* bind.c */ +extern char *rl_untranslate_keyseq __P((int)); + /* kill.c */ -extern int rl_set_retained_kills PARAMS((int)); +extern int rl_set_retained_kills __P((int)); + +/* readline.c */ +extern int rl_discard_argument __P((void)); + +/* rltty.c */ +extern int rl_stop_output __P((int, int)); /* terminal.c */ -extern void _rl_set_screen_size PARAMS((int, int)); +extern void _rl_set_screen_size __P((int, int)); /* undo.c */ -extern int _rl_fix_last_undo_of_type PARAMS((int, int, int)); +extern int _rl_fix_last_undo_of_type __P((int, int, int)); /* util.c */ -extern char *_rl_savestring PARAMS((const char *)); +extern char *_rl_savestring __P((char *)); /************************************************************************* * * @@ -96,135 +111,106 @@ extern char *_rl_savestring PARAMS((const char *)); #if defined(READLINE_CALLBACKS) /* readline.c */ -extern void readline_internal_setup PARAMS((void)); -extern char *readline_internal_teardown PARAMS((int)); -extern int readline_internal_char PARAMS((void)); +extern void readline_internal_setup __P((void)); +extern char *readline_internal_teardown __P((int)); +extern int readline_internal_char __P((void)); #endif /* READLINE_CALLBACKS */ /* bind.c */ -extern void _rl_bind_if_unbound PARAMS((const char *, rl_command_func_t *)); - -/* complete.c */ -extern char _rl_find_completion_word PARAMS((int *, int *)); -extern void _rl_free_match_list PARAMS((char **)); +extern void _rl_bind_if_unbound __P((char *, Function *)); /* display.c */ -extern char *_rl_strip_prompt PARAMS((char *)); -extern void _rl_move_cursor_relative PARAMS((int, const char *)); -extern void _rl_move_vert PARAMS((int)); -extern void _rl_save_prompt PARAMS((void)); -extern void _rl_restore_prompt PARAMS((void)); -extern char *_rl_make_prompt_for_search PARAMS((int)); -extern void _rl_erase_at_end_of_line PARAMS((int)); -extern void _rl_clear_to_eol PARAMS((int)); -extern void _rl_clear_screen PARAMS((void)); -extern void _rl_update_final PARAMS((void)); -extern void _rl_redisplay_after_sigwinch PARAMS((void)); -extern void _rl_clean_up_for_exit PARAMS((void)); -extern void _rl_erase_entire_line PARAMS((void)); -extern int _rl_current_display_line PARAMS((void)); +extern char *_rl_strip_prompt __P((char *)); +extern void _rl_move_cursor_relative __P((int, char *)); +extern void _rl_move_vert __P((int)); +extern void _rl_save_prompt __P((void)); +extern void _rl_restore_prompt __P((void)); +extern char *_rl_make_prompt_for_search __P((int)); +extern void _rl_erase_at_end_of_line __P((int)); +extern void _rl_clear_to_eol __P((int)); +extern void _rl_clear_screen __P((void)); +extern void _rl_update_final __P((void)); +extern void _rl_redisplay_after_sigwinch __P((void)); +extern void _rl_clean_up_for_exit __P((void)); +extern void _rl_erase_entire_line __P((void)); +extern int _rl_currentb_display_line __P((void)); /* input.c */ -extern int _rl_any_typein PARAMS((void)); -extern int _rl_input_available PARAMS((void)); -extern int _rl_input_queued PARAMS((int)); -extern void _rl_insert_typein PARAMS((int)); -extern int _rl_unget_char PARAMS((int)); +extern int _rl_any_typein __P((void)); +extern int _rl_input_available __P((void)); +extern void _rl_insert_typein __P((int)); /* macro.c */ -extern void _rl_with_macro_input PARAMS((char *)); -extern int _rl_next_macro_key PARAMS((void)); -extern void _rl_push_executing_macro PARAMS((void)); -extern void _rl_pop_executing_macro PARAMS((void)); -extern void _rl_add_macro_char PARAMS((int)); -extern void _rl_kill_kbd_macro PARAMS((void)); - -/* misc.c */ -extern int _rl_init_argument PARAMS((void)); -extern void _rl_start_using_history PARAMS((void)); -extern int _rl_free_saved_history_line PARAMS((void)); -extern void _rl_set_insert_mode PARAMS((int, int)); +extern void _rl_with_macro_input __P((char *)); +extern int _rl_next_macro_key __P((void)); +extern void _rl_push_executing_macro __P((void)); +extern void _rl_pop_executing_macro __P((void)); +extern void _rl_add_macro_char __P((int)); +extern void _rl_kill_kbd_macro __P((void)); /* nls.c */ -extern int _rl_init_eightbit PARAMS((void)); +extern int _rl_init_eightbit __P((void)); /* parens.c */ -extern void _rl_enable_paren_matching PARAMS((int)); +extern void _rl_enable_paren_matching __P((int)); /* readline.c */ -extern void _rl_init_line_state PARAMS((void)); -extern void _rl_set_the_line PARAMS((void)); -extern int _rl_dispatch PARAMS((int, Keymap)); -extern int _rl_dispatch_subseq PARAMS((int, Keymap, int)); +extern void _rl_init_line_state __P((void)); +extern void _rl_set_the_line __P((void)); +extern int _rl_dispatch __P((int, Keymap)); +extern int _rl_init_argument __P((void)); +extern void _rl_fix_point __P((int)); +extern void _rl_replace_text __P((char *, int, int)); +extern int _rl_char_search_internal __P((int, int, int)); +extern int _rl_set_mark_at_pos __P((int)); /* rltty.c */ -extern int _rl_disable_tty_signals PARAMS((void)); -extern int _rl_restore_tty_signals PARAMS((void)); +extern int _rl_disable_tty_signals __P((void)); +extern int _rl_restore_tty_signals __P((void)); /* terminal.c */ -extern void _rl_get_screen_size PARAMS((int, int)); -extern int _rl_init_terminal_io PARAMS((const char *)); +extern void _rl_get_screen_size __P((int, int)); +extern int _rl_init_terminal_io __P((char *)); #ifdef _MINIX -extern void _rl_output_character_function PARAMS((int)); -#else -extern int _rl_output_character_function PARAMS((int)); -#endif -extern void _rl_output_some_chars PARAMS((const char *, int)); -extern int _rl_backspace PARAMS((int)); -extern void _rl_enable_meta_key PARAMS((void)); -extern void _rl_control_keypad PARAMS((int)); -extern void _rl_set_cursor PARAMS((int, int)); - -/* text.c */ -extern void _rl_fix_point PARAMS((int)); -extern int _rl_replace_text PARAMS((const char *, int, int)); -extern int _rl_insert_char PARAMS((int, int)); -extern int _rl_overwrite_char PARAMS((int, int)); -extern int _rl_overwrite_rubout PARAMS((int, int)); -extern int _rl_rubout_char PARAMS((int, int)); -#if defined (HANDLE_MULTIBYTE) -extern int _rl_char_search_internal PARAMS((int, int, char *, int)); +extern void _rl_output_character_function __P((int)); #else -extern int _rl_char_search_internal PARAMS((int, int, int)); +extern int _rl_output_character_function __P((int)); #endif -extern int _rl_set_mark_at_pos PARAMS((int)); +extern void _rl_output_some_chars __P((char *, int)); +extern int _rl_backspace __P((int)); +extern void _rl_enable_meta_key __P((void)); +extern void _rl_control_keypad __P((int)); /* util.c */ -extern int _rl_abort_internal PARAMS((void)); -extern char *_rl_strindex PARAMS((const char *, const char *)); -extern int _rl_qsort_string_compare PARAMS((char **, char **)); -extern int (_rl_uppercase_p) PARAMS((int)); -extern int (_rl_lowercase_p) PARAMS((int)); -extern int (_rl_pure_alphabetic) PARAMS((int)); -extern int (_rl_digit_p) PARAMS((int)); -extern int (_rl_to_lower) PARAMS((int)); -extern int (_rl_to_upper) PARAMS((int)); -extern int (_rl_digit_value) PARAMS((int)); +extern int alphabetic __P((int)); +extern int _rl_abort_internal __P((void)); +extern char *_rl_strindex __P((char *, char *)); +extern int _rl_qsort_string_compare __P((char **, char **)); +extern int (_rl_uppercase_p) __P((int)); +extern int (_rl_lowercase_p) __P((int)); +extern int (_rl_pure_alphabetic) __P((int)); +extern int (_rl_digit_p) __P((int)); +extern int (_rl_to_lower) __P((int)); +extern int (_rl_to_upper) __P((int)); +extern int (_rl_digit_value) __P((int)); /* vi_mode.c */ -extern void _rl_vi_initialize_line PARAMS((void)); -extern void _rl_vi_reset_last PARAMS((void)); -extern void _rl_vi_set_last PARAMS((int, int, int)); -extern int _rl_vi_textmod_command PARAMS((int)); -extern void _rl_vi_done_inserting PARAMS((void)); +extern void _rl_vi_initialize_line __P((void)); +extern void _rl_vi_reset_last __P((void)); +extern void _rl_vi_set_last __P((int, int, int)); +extern int _rl_vi_textmod_command __P((int)); +extern void _rl_vi_done_inserting __P((void)); /************************************************************************* * Undocumented private variables * *************************************************************************/ -/* bind.c */ -extern const char *_rl_possible_control_prefixes[]; -extern const char *_rl_possible_meta_prefixes[]; - /* complete.c */ extern int _rl_complete_show_all; extern int _rl_complete_mark_directories; -extern int _rl_complete_mark_symlink_dirs; extern int _rl_print_completions_horizontally; extern int _rl_completion_case_fold; -extern int _rl_match_hidden_files; -extern int _rl_page_completions; /* display.c */ extern int _rl_vis_botlin; @@ -232,16 +218,17 @@ extern int _rl_last_c_pos; extern int _rl_suppress_redisplay; extern char *rl_display_prompt; +/* funmap.c */ +extern char *possible_control_prefixes[]; +extern char *possible_meta_prefixes[]; + /* isearch.c */ -extern char *_rl_isearch_terminators; +extern unsigned char *_rl_isearch_terminators; /* macro.c */ +extern int _rl_defining_kbd_macro; extern char *_rl_executing_macro; -/* misc.c */ -extern int _rl_history_preserve_point; -extern int _rl_history_saved_point; - /* readline.c */ extern int _rl_horizontal_scroll_mode; extern int _rl_mark_modified_lines; @@ -261,20 +248,20 @@ extern procenv_t readline_top_level; /* terminal.c */ extern int _rl_enable_keypad; extern int _rl_enable_meta; -extern char *_rl_term_clreol; -extern char *_rl_term_clrpag; -extern char *_rl_term_im; -extern char *_rl_term_ic; -extern char *_rl_term_ei; -extern char *_rl_term_DC; -extern char *_rl_term_up; -extern char *_rl_term_dc; -extern char *_rl_term_cr; -extern char *_rl_term_IC; -extern int _rl_screenheight; -extern int _rl_screenwidth; -extern int _rl_screenchars; -extern int _rl_terminal_can_insert; +extern char *term_clreol; +extern char *term_clrpag; +extern char *term_im; +extern char *term_ic; +extern char *term_ei; +extern char *term_DC; +extern char *term_up; +extern char *term_dc; +extern char *term_cr; +extern char *term_IC; +extern int screenheight; +extern int screenwidth; +extern int screenchars; +extern int terminal_can_insert; extern int _rl_term_autowrap; /* undo.c */ diff --git a/readline/rlshell.h b/readline/rlshell.h index 3c03fba..7a4e699 100644 --- a/readline/rlshell.h +++ b/readline/rlshell.h @@ -25,10 +25,10 @@ #include "rlstdc.h" -extern char *sh_single_quote PARAMS((char *)); -extern void sh_set_lines_and_columns PARAMS((int, int)); -extern char *sh_get_env_value PARAMS((const char *)); -extern char *sh_get_home_dir PARAMS((void)); -extern int sh_unset_nodelay_mode PARAMS((int)); +extern char *single_quote __P((char *)); +extern void set_lines_and_columns __P((int, int)); +extern char *get_env_value __P((char *)); +extern char *get_home_dir __P((void)); +extern int unset_nodelay_mode __P((int)); #endif /* _RL_SHELL_H_ */ diff --git a/readline/xmalloc.h b/readline/xmalloc.h index 9cb08ba..bdf251b 100644 --- a/readline/xmalloc.h +++ b/readline/xmalloc.h @@ -39,8 +39,8 @@ #endif /* !PTR_T */ -extern PTR_T xmalloc PARAMS((size_t)); -extern PTR_T xrealloc PARAMS((void *, size_t)); -extern void xfree PARAMS((void *)); +extern char *xmalloc __P((int)); +extern char *xrealloc __P((void *, int)); +extern void xfree __P((void *)); #endif /* _XMALLOC_H_ */ |