aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/tty/tty_update.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/tty/tty_update.c')
-rw-r--r--contrib/ncurses/ncurses/tty/tty_update.c53
1 files changed, 17 insertions, 36 deletions
diff --git a/contrib/ncurses/ncurses/tty/tty_update.c b/contrib/ncurses/ncurses/tty/tty_update.c
index 298c11ed0a21..d292ad35b975 100644
--- a/contrib/ncurses/ncurses/tty/tty_update.c
+++ b/contrib/ncurses/ncurses/tty/tty_update.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998,1999,2000 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999,2000,2001 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
@@ -70,7 +70,7 @@
#include <term.h>
-MODULE_ID("$Id: tty_update.c,v 1.146 2000/10/07 01:11:44 tom Exp $")
+MODULE_ID("$Id: tty_update.c,v 1.151 2001/02/03 23:41:55 tom Exp $")
/*
* This define controls the line-breakout optimization. Every once in a
@@ -274,18 +274,6 @@ check_pending(void)
return FALSE;
}
-/*
- * No one supports recursive inline functions. However, gcc is quieter if we
- * instantiate the recursive part separately.
- */
-#if CC_HAS_INLINE_FUNCS
-static void callPutChar(chtype const);
-#else
-#define callPutChar(ch) PutChar(ch)
-#endif
-
-static inline void PutChar(chtype const ch); /* forward declaration */
-
/* put char at lower right corner */
static void
PutCharLR(chtype const ch)
@@ -307,7 +295,7 @@ PutCharLR(chtype const ch)
} else if ((enter_insert_mode && exit_insert_mode)
|| insert_character || parm_ich) {
GoTo(screen_lines - 1, screen_columns - 2);
- callPutChar(ch);
+ PutAttrChar(ch);
GoTo(screen_lines - 1, screen_columns - 2);
InsStr(newscr->_line[screen_lines - 1].text + screen_columns - 2, 1);
}
@@ -508,21 +496,13 @@ PutRange(
return EmitRange(ntext + first, last - first + 1);
}
-#if CC_HAS_INLINE_FUNCS
-static void
-callPutChar(chtype const ch)
-{
- PutChar(ch);
-}
-#endif
-
/* leave unbracketed here so 'indent' works */
#define MARK_NOCHANGE(win,row) \
win->_line[row].firstchar = _NOCHANGE; \
win->_line[row].lastchar = _NOCHANGE; \
if_USE_SCROLL_HINTS(win->_line[row].oldindex = row)
-int
+NCURSES_EXPORT(int)
doupdate(void)
{
int i;
@@ -764,20 +744,20 @@ doupdate(void)
/* mark line changed successfully */
if (i <= newscr->_maxy) {
- MARK_NOCHANGE(newscr, i)
+ MARK_NOCHANGE(newscr, i);
}
if (i <= curscr->_maxy) {
- MARK_NOCHANGE(curscr, i)
+ MARK_NOCHANGE(curscr, i);
}
}
}
/* put everything back in sync */
for (i = nonempty; i <= newscr->_maxy; i++) {
- MARK_NOCHANGE(newscr, i)
+ MARK_NOCHANGE(newscr, i);
}
for (i = nonempty; i <= curscr->_maxy; i++) {
- MARK_NOCHANGE(curscr, i)
+ MARK_NOCHANGE(curscr, i);
}
if (!newscr->_leaveok) {
@@ -1279,7 +1259,7 @@ ClearScreen(chtype blank)
#if NCURSES_EXT_FUNCS
if (SP->_coloron
&& !SP->_default_color) {
- _nc_do_color(COLOR_PAIR(SP->_current_attr), 0, FALSE, _nc_outch);
+ _nc_do_color((int) COLOR_PAIR(SP->_current_attr), 0, FALSE, _nc_outch);
if (!back_color_erase) {
fast_clear = FALSE;
}
@@ -1414,7 +1394,7 @@ DelChar(int count)
** Emit a string without waiting for update.
*/
-void
+NCURSES_EXPORT(void)
_nc_outstr(const char *str)
{
(void) putp(str);
@@ -1607,8 +1587,9 @@ scroll_idl(int n, int del, int ins, chtype blank)
return OK;
}
-int
-_nc_scrolln(int n, int top, int bot, int maxy)
+NCURSES_EXPORT(int)
+_nc_scrolln
+(int n, int top, int bot, int maxy)
/* scroll region from top to bot by n lines */
{
chtype blank = ClrBlank(stdscr);
@@ -1729,7 +1710,7 @@ _nc_scrolln(int n, int top, int bot, int maxy)
return (OK);
}
-void
+NCURSES_EXPORT(void)
_nc_screen_resume(void)
{
/* make sure terminal is in a sane known state */
@@ -1755,14 +1736,14 @@ _nc_screen_resume(void)
putp(auto_right_margin ? enter_am_mode : exit_am_mode);
}
-void
+NCURSES_EXPORT(void)
_nc_screen_init(void)
{
_nc_screen_resume();
}
/* wrap up screen handling */
-void
+NCURSES_EXPORT(void)
_nc_screen_wrap(void)
{
UpdateAttrs(A_NORMAL);
@@ -1783,7 +1764,7 @@ _nc_screen_wrap(void)
}
#if USE_XMC_SUPPORT
-void
+NCURSES_EXPORT(void)
_nc_do_xmc_glitch(attr_t previous)
{
attr_t chg = XMC_CHANGES(previous ^ SP->_current_attr);