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

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

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

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

343static void
344get_term_capabilities (bp)
345 char **bp;
346{
347#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
348 register int i;
349
350 for (i = 0; i < NUM_TC_STRINGS; i++)
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);
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
356#endif
357 tcap_initialized = 1;
358}
359
360int
361_rl_init_terminal_io (terminal_name)
362 const char *terminal_name;
363{

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

485bind_termcap_arrow_keys (map)
486 Keymap map;
487{
488 Keymap xkeymap;
489
490 xkeymap = _rl_keymap;
491 _rl_keymap = map;
492
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);
497
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 */
500
501 _rl_keymap = xkeymap;
502}
503
504char *
505rl_get_termcap (cap)
506 const char *cap;
507{

--- 156 unchanged lines hidden ---
497
498 _rl_keymap = xkeymap;
499}
500
501char *
502rl_get_termcap (cap)
503 const char *cap;
504{

--- 156 unchanged lines hidden ---