Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libedit term -> terminal



details:   https://anonhg.NetBSD.org/src/rev/d779d5582b92
branches:  trunk
changeset: 767709:d779d5582b92
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Jul 28 01:05:20 2011 +0000

description:
term -> terminal
XXX: need to rename key_ too.

diffstat:

 lib/libedit/Makefile   |     4 +-
 lib/libedit/chared.c   |     6 +-
 lib/libedit/common.c   |    12 +-
 lib/libedit/el.h       |     6 +-
 lib/libedit/eln.c      |    12 +-
 lib/libedit/emacs.c    |     8 +-
 lib/libedit/map.c      |    18 +-
 lib/libedit/parse.c    |    10 +-
 lib/libedit/prompt.c   |     6 +-
 lib/libedit/refresh.c  |   150 ++--
 lib/libedit/term.c     |  1745 -----------------------------------------------
 lib/libedit/term.h     |   125 ---
 lib/libedit/terminal.c |  1749 ++++++++++++++++++++++++++++++++++++++++++++++++
 lib/libedit/terminal.h |   125 +++
 14 files changed, 1990 insertions(+), 1986 deletions(-)

diffs (truncated from 4589 to 300 lines):

diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/Makefile
--- a/lib/libedit/Makefile      Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/Makefile      Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.42 2011/06/21 02:32:55 mrg Exp $
+#      $NetBSD: Makefile,v 1.43 2011/07/28 01:05:20 christos Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/4/93
 
 USE_SHLIBDIR=  yes
@@ -11,7 +11,7 @@
 
 OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
        hist.c key.c map.c chartype.c \
-       parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
+       parse.c prompt.c read.c refresh.c search.c sig.c terminal.c tty.c vi.c
 
 MAN=   editline.3 editrc.5
 
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/chared.c
--- a/lib/libedit/chared.c      Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/chared.c      Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chared.c,v 1.29 2010/08/28 15:44:59 christos Exp $     */
+/*     $NetBSD: chared.c,v 1.30 2011/07/28 01:05:20 christos Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)chared.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: chared.c,v 1.29 2010/08/28 15:44:59 christos Exp $");
+__RCSID("$NetBSD: chared.c,v 1.30 2011/07/28 01:05:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -748,7 +748,7 @@
 
                default:
                        if (len >= EL_BUFSIZ - 16)
-                               term_beep(el);
+                               terminal_beep(el);
                        else {
                                buf[len++] = ch;
                                *cp++ = ch;
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/common.c
--- a/lib/libedit/common.c      Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/common.c      Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos Exp $     */
+/*     $NetBSD: common.c,v 1.25 2011/07/28 01:05:20 christos Exp $     */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)common.c   8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: common.c,v 1.24 2009/12/30 22:37:40 christos Exp $");
+__RCSID("$NetBSD: common.c,v 1.25 2011/07/28 01:05:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -155,7 +155,7 @@
                                return (CC_ERROR);
 #else
                                /* then do an EOF */
-                               term_writec(el, c);
+                               terminal_writec(el, c);
                                return (CC_EOF);
 #endif
                        } else {
@@ -586,7 +586,7 @@
 ed_clear_screen(EditLine *el, Int c __attribute__((__unused__)))
 {
 
-       term_clear_screen(el);  /* clear the whole real screen */
+       terminal_clear_screen(el);      /* clear the whole real screen */
        re_clear_display(el);   /* reset everything */
        return (CC_REFRESH);
 }
@@ -910,10 +910,10 @@
        int tmplen;
 
        tmplen = c_gets(el, tmpbuf, STR("\n: "));
-       term__putc(el, '\n');
+       terminal__putc(el, '\n');
 
        if (tmplen < 0 || (tmpbuf[tmplen] = 0, parse_line(el, tmpbuf)) == -1)
-               term_beep(el);
+               terminal_beep(el);
 
        el->el_map.current = el->el_map.key;
        re_clear_display(el);
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/el.h
--- a/lib/libedit/el.h  Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/el.h  Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: el.h,v 1.22 2011/01/27 23:11:40 christos Exp $ */
+/*     $NetBSD: el.h,v 1.23 2011/07/28 01:05:20 christos Exp $ */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -101,7 +101,7 @@
 #include "tty.h"
 #include "prompt.h"
 #include "key.h"
-#include "term.h"
+#include "terminal.h"
 #include "refresh.h"
 #include "chared.h"
 #include "common.h"
@@ -129,7 +129,7 @@
        void             *el_data;      /* Client data                  */
        el_line_t         el_line;      /* The current line information */
        el_state_t        el_state;     /* Current editor state         */
-       el_term_t         el_term;      /* Terminal dependent stuff     */
+       el_terminal_t     el_terminal;  /* Terminal dependent stuff     */
        el_tty_t          el_tty;       /* Tty dependent stuff          */
        el_refresh_t      el_refresh;   /* Refresh stuff                */
        el_prompt_t       el_prompt;    /* Prompt stuff                 */
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/eln.c
--- a/lib/libedit/eln.c Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/eln.c Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: eln.c,v 1.10 2011/06/20 09:11:17 mrg Exp $     */
+/*     $NetBSD: eln.c,v 1.11 2011/07/28 01:05:20 christos Exp $        */
 
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 #include "config.h"
 #if !defined(lint) && !defined(SCCSID)
-__RCSID("$NetBSD: eln.c,v 1.10 2011/06/20 09:11:17 mrg Exp $");
+__RCSID("$NetBSD: eln.c,v 1.11 2011/07/28 01:05:20 christos Exp $");
 #endif /* not lint && not SCCSID */
 
 #include "histedit.h"
@@ -171,15 +171,15 @@
                        break;
                case EL_TELLTC:
                        wargv[0] = STR("telltc");
-                       ret = term_telltc(el, i, wargv);
+                       ret = terminal_telltc(el, i, wargv);
                        break;
                case EL_SETTC:
                        wargv[0] = STR("settc");
-                       ret = term_settc(el, i, wargv);
+                       ret = terminal_settc(el, i, wargv);
                        break;
                case EL_ECHOTC:
                        wargv[0] = STR("echotc");
-                       ret = term_echotc(el, i, wargv);
+                       ret = terminal_echotc(el, i, wargv);
                        break;
                case EL_SETTY:
                        wargv[0] = STR("setty");
@@ -310,7 +310,7 @@
                        if ((argv[i] = va_arg(ap, char *)) == NULL)
                                break;
                argv[0] = gettc;
-               ret = term_gettc(el, i, argv);
+               ret = terminal_gettc(el, i, argv);
                break;
        }
 
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/emacs.c
--- a/lib/libedit/emacs.c       Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/emacs.c       Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emacs.c,v 1.23 2009/12/30 22:37:40 christos Exp $      */
+/*     $NetBSD: emacs.c,v 1.24 2011/07/28 01:05:20 christos Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)emacs.c    8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: emacs.c,v 1.23 2009/12/30 22:37:40 christos Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.24 2011/07/28 01:05:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -59,14 +59,14 @@
                                        /* if I'm at the end */
                if (el->el_line.cursor == el->el_line.buffer) {
                                        /* and the beginning */
-                       term_writec(el, c);     /* then do an EOF */
+                       terminal_writec(el, c); /* then do an EOF */
                        return (CC_EOF);
                } else {
                        /*
                         * Here we could list completions, but it is an
                         * error right now
                         */
-                       term_beep(el);
+                       terminal_beep(el);
                        return (CC_ERROR);
                }
        } else {
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/map.c
--- a/lib/libedit/map.c Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/map.c Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos Exp $        */
+/*     $NetBSD: map.c,v 1.26 2011/07/28 01:05:20 christos Exp $        */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)map.c      8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: map.c,v 1.25 2009/12/30 22:37:40 christos Exp $");
+__RCSID("$NetBSD: map.c,v 1.26 2011/07/28 01:05:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */
 
@@ -1038,7 +1038,7 @@
        map_init_nls(el);
 
        tty_bind_char(el, 1);
-       term_bind_arrow(el);
+       terminal_bind_arrow(el);
 }
 
 
@@ -1072,7 +1072,7 @@
        key_add(el, buf, key_map_cmd(el, EM_EXCHANGE_MARK), XK_CMD);
 
        tty_bind_char(el, 1);
-       term_bind_arrow(el);
+       terminal_bind_arrow(el);
 }
 
 
@@ -1234,7 +1234,7 @@
        (void) fprintf(el->el_outfile, "Multi-character bindings\n");
        key_print(el, STR(""));
        (void) fprintf(el->el_outfile, "Arrow key bindings\n");
-       term_print_arrow(el, STR(""));
+       terminal_print_arrow(el, STR(""));
 }
 
 
@@ -1321,7 +1321,7 @@
        }
        if (rem) {
                if (key) {
-                       (void) term_clear_arrow(el, in);
+                       (void) terminal_clear_arrow(el, in);
                        return (-1);
                }
                if (in[1])
@@ -1334,7 +1334,7 @@
        }
        if (argv[argc] == NULL) {
                if (key)
-                       term_print_arrow(el, in);
+                       terminal_print_arrow(el, in);
                else
                        map_print_key(el, map, in);
                return (0);
@@ -1355,7 +1355,7 @@
                        return (-1);
                }
                if (key)
-                       term_set_arrow(el, in, key_map_str(el, out), ntype);
+                       terminal_set_arrow(el, in, key_map_str(el, out), ntype);
                else
                        key_add(el, in, key_map_str(el, out), ntype);
                map[(unsigned char) *in] = ED_SEQUENCE_LEAD_IN;
@@ -1369,7 +1369,7 @@
                        return (-1);
                }
                if (key)
-                       term_set_arrow(el, in, key_map_str(el, out), ntype);
+                       terminal_set_arrow(el, in, key_map_str(el, out), ntype);
                else {
                        if (in[1]) {
                                key_add(el, in, key_map_cmd(el, cmd), ntype);
diff -r 062e36f4c8f8 -r d779d5582b92 lib/libedit/parse.c
--- a/lib/libedit/parse.c       Thu Jul 28 01:05:00 2011 +0000
+++ b/lib/libedit/parse.c       Thu Jul 28 01:05:20 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.23 2009/12/30 22:37:40 christos Exp $      */
+/*     $NetBSD: parse.c,v 1.24 2011/07/28 01:05:20 christos Exp $      */
 
 /*-
  * Copyright (c) 1992, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)parse.c    8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: parse.c,v 1.23 2009/12/30 22:37:40 christos Exp $");
+__RCSID("$NetBSD: parse.c,v 1.24 2011/07/28 01:05:20 christos Exp $");
 #endif
 #endif /* not lint && not SCCSID */



Home | Main Index | Thread Index | Old Index