Deleted Added
full compact
1/* $FreeBSD: head/contrib/libreadline/terminal.c 136758 2004-10-21 20:02:02Z peter $ */
2
3/* terminal.c -- controlling the terminal with termcap. */
4
5/* Copyright (C) 1996 Free Software Foundation, Inc.
6
7 This file is part of the GNU Readline Library, a library for
8 reading lines of text with interactive input and history editing.
9
10 The GNU Readline Library is free software; you can redistribute it

--- 5 unchanged lines hidden (view full) ---

16 useful, but WITHOUT ANY WARRANTY; without even the implied warranty
17 of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
19
20 The GNU General Public License is often shipped with GNU software, and
21 is generally kept in a file called COPYING or LICENSE. If you do not
22 have a copy of the license, write to the Free Software Foundation,
23 59 Temple Place, Suite 330, Boston, MA 02111 USA. */
22/* $FreeBSD: head/contrib/libreadline/terminal.c 119614 2003-08-31 18:29:38Z ache $ */
24#define READLINE_LIBRARY
25
26#if defined (HAVE_CONFIG_H)
27# include <config.h>
28#endif
29
30#include <sys/types.h>
31#include "posixstat.h"

--- 312 unchanged lines hidden (view full) ---

344static void
345get_term_capabilities (bp)
346 char **bp;
347{
348#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
349 register int i;
350
351 for (i = 0; i < NUM_TC_STRINGS; i++)
351# ifdef __LCC__
352 *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
353# else
354 *(tc_strings[i].tc_value) = tgetstr (tc_strings[i].tc_var, bp);
355# endif
353#endif
354 tcap_initialized = 1;
355}
356
357int
358_rl_init_terminal_io (terminal_name)
359 const char *terminal_name;
360{

--- 121 unchanged lines hidden (view full) ---

482bind_termcap_arrow_keys (map)
483 Keymap map;
484{
485 Keymap xkeymap;
486
487 xkeymap = _rl_keymap;
488 _rl_keymap = map;
489
493 _rl_bind_if_unbound (_rl_term_ku, rl_get_previous_history);
494 _rl_bind_if_unbound (_rl_term_kd, rl_get_next_history);
495 _rl_bind_if_unbound (_rl_term_kr, rl_forward);
496 _rl_bind_if_unbound (_rl_term_kl, rl_backward);
490 rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history);
491 rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history);
492 rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char);
493 rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char);
494
498 _rl_bind_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
499 _rl_bind_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
495 rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
496 rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
497
498 _rl_keymap = xkeymap;
499}
500
501char *
502rl_get_termcap (cap)
503 const char *cap;
504{

--- 156 unchanged lines hidden ---