From 3278b75942bdbe706f7a0fba87729bb1e935b68b Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:25 -0800 Subject: Import Upstream version 5d2 --- crs.c | 41 ++++++++++++++++++----------------------- 1 file changed, 18 insertions(+), 23 deletions(-) (limited to 'crs.c') diff --git a/crs.c b/crs.c index 5a4a5f1..bab7c52 100644 --- a/crs.c +++ b/crs.c @@ -1,18 +1,18 @@ /* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. - * + * * This program 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. - * + * * This program 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. - * + * * You should have received a copy of the GNU General Public License * along with this software; see the file COPYING. If not, write to - * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. + * the Free Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111, USA. * * As a special exception, the Free Software Foundation gives permission * for additional uses of the text contained in its release of GUILE. @@ -36,7 +36,7 @@ * * If you write modifications of your own for GUILE, it is your choice * whether to permit this exception to apply to your modifications. - * If you do not wish that, delete this exception notice. + * If you do not wish that, delete this exception notice. */ /* "crs.c" interface to `curses' interactive terminal control library. @@ -64,12 +64,6 @@ int freewindow(win) delwin(win); return 0; } -int prinwindow(exp, port, writing) - SCM exp; SCM port; int writing; -{ - prinport(exp, port, "window"); - return !0; -} int bwaddch(c, win) int c; WINDOW *win; {waddch(win, c);return c;} int bwaddstr(str, win) char *str; WINDOW *win; {waddstr(win, str);return 0;} sizet bwwrite(str, siz, num, win) @@ -82,9 +76,10 @@ sizet bwwrite(str, siz, num, win) } int tc16_window; static ptobfuns winptob = { + "window", mark0, freewindow, - prinwindow, + 0, equal0, bwaddch, bwaddstr, @@ -101,7 +96,7 @@ SCM mkwindow(win) NEWCELL(z); DEFER_INTS; SETCHARS(z, win); - CAR(z) = tc16_window | OPN | RDNG | WRTNG; + CAR(z) = scm_port_entry(tc16_window, OPN | RDNG | WRTNG); ALLOW_INTS; return z; } @@ -187,7 +182,7 @@ SCM loverwrite(srcwin, dstwin) return ERR==overwrite(WIN(srcwin), WIN(dstwin)) ? BOOL_F : BOOL_T; } -static char s_wmove[] = "wmove", s_wadd[] = "wadd", s_winsert[] = "winsert", +static char s_wmove[] = "wmove", s_wadd[] = "wadd", s_winsch[] = "winsch", s_box[] = "box"; SCM lwmove(win, y, x) SCM win, y, x; @@ -210,13 +205,13 @@ SCM lwadd(win, obj) return ERR==waddstr(WIN(win), CHARS(obj)) ? BOOL_F : BOOL_T; } -SCM lwinsert(win, obj) +SCM lwinsch(win, obj) SCM win, obj; { - ASSERT(NIMP(win) && WINP(win), win, ARG1, s_winsert); + ASSERT(NIMP(win) && WINP(win), win, ARG1, s_winsch); if INUMP(obj) return ERR==winsch(WIN(win), INUM(obj)) ? BOOL_F : BOOL_T; - ASSERT(ICHRP(obj), obj, ARG2, s_winsert); + ASSERT(ICHRP(obj), obj, ARG2, s_winsch); return ERR==winsch(WIN(win), ICHR(obj)) ? BOOL_F : BOOL_T; } @@ -361,12 +356,12 @@ static iproc subr1s[] = { {ASSERT(NIMP(w) && WINP(w), w, ARG1, sn);\ return ERR==n(WIN(w), BOOL_F != b)?BOOL_F:BOOL_T;} -/* SUBROPT(lclearok, clearok, s_clearok, "clearok") */ -/* SUBROPT(lidlok, idlok, s_idlok, "idlok") */ +SUBROPT(lidlok, idlok, s_idlok, "idlok") SUBROPT(lleaveok, leaveok, s_leaveok, "leaveok") SUBROPT(lscrollok, scrollok, s_scrollok, "scrollok") -/* SUBROPT(lnodelay, nodelay, s_nodelay, "nodelay") */ +SUBROPT(lnodelay, nodelay, s_nodelay, "nodelay") +/* SUBROPT(lclearok, clearok, s_clearok, "clearok") */ static char s_clearok[] = "clearok"; SCM lclearok(w, b) SCM w, b; { @@ -379,12 +374,12 @@ static iproc subr2s[] = { {s_overlay, loverlay}, {s_overwrite, loverwrite}, {s_wadd, lwadd}, - {s_winsert, lwinsert}, + {s_winsch, lwinsch}, {s_clearok, lclearok}, - /* {s_idlok, lidlok}, */ + {s_idlok, lidlok}, {s_leaveok, lleaveok}, {s_scrollok, lscrollok}, -/* {s_nodelay, lnodelay}, */ + {s_nodelay, lnodelay}, {0, 0}}; void init_crs() -- cgit v1.2.3