aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/ncurses/base')
-rw-r--r--contrib/ncurses/ncurses/base/lib_beep.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_color.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_flash.c6
-rw-r--r--contrib/ncurses/ncurses/base/lib_freeall.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_mouse.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_newwin.c4
-rw-r--r--contrib/ncurses/ncurses/base/lib_nl.c10
-rw-r--r--contrib/ncurses/ncurses/base/safe_sprintf.c10
-rw-r--r--contrib/ncurses/ncurses/base/version.c48
9 files changed, 70 insertions, 28 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_beep.c b/contrib/ncurses/ncurses/base/lib_beep.c
index 9b89496608da..3428aaf69e16 100644
--- a/contrib/ncurses/ncurses/base/lib_beep.c
+++ b/contrib/ncurses/ncurses/base/lib_beep.c
@@ -42,7 +42,7 @@
#include <curses.priv.h>
#include <term.h> /* beep, flash */
-MODULE_ID("$Id: lib_beep.c,v 1.6 1998/06/29 19:34:16 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_beep.c,v 1.7 1999/10/22 21:39:09 tom Exp $")
/*
* beep()
@@ -62,11 +62,11 @@ int beep(void)
if (bell) {
TPUTS_TRACE("bell");
res = putp(bell);
- fflush(SP->_ofp);
+ _nc_flush();
} else if (flash_screen) {
TPUTS_TRACE("flash_screen");
res = putp(flash_screen);
- fflush(SP->_ofp);
+ _nc_flush();
}
returnCode(res);
diff --git a/contrib/ncurses/ncurses/base/lib_color.c b/contrib/ncurses/ncurses/base/lib_color.c
index cdc943adc6ee..297a14c36d6e 100644
--- a/contrib/ncurses/ncurses/base/lib_color.c
+++ b/contrib/ncurses/ncurses/base/lib_color.c
@@ -41,7 +41,7 @@
#include <term.h>
-MODULE_ID("$Id: lib_color.c,v 1.35 1999/03/15 01:45:14 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_color.c,v 1.36 1999/10/03 00:20:37 Philippe.Blain Exp $")
/*
* These should be screen structure members. They need to be globals for
@@ -345,7 +345,7 @@ bool has_colors(void)
int color_content(short color, short *r, short *g, short *b)
{
T((T_CALLED("color_content(%d,%p,%p,%p)"), color, r, g, b));
- if (color < 0 || color > COLORS)
+ if (color < 0 || color >= COLORS)
returnCode(ERR);
if (r) *r = SP->_color_table[color].red;
@@ -358,7 +358,7 @@ int pair_content(short pair, short *f, short *b)
{
T((T_CALLED("pair_content(%d,%p,%p)"), pair, f, b));
- if ((pair < 0) || (pair > COLOR_PAIRS))
+ if ((pair < 0) || (pair >= COLOR_PAIRS))
returnCode(ERR);
if (f) *f = ((SP->_color_pairs[pair] >> C_SHIFT) & C_MASK);
if (b) *b = (SP->_color_pairs[pair] & C_MASK);
diff --git a/contrib/ncurses/ncurses/base/lib_flash.c b/contrib/ncurses/ncurses/base/lib_flash.c
index faf381f3a645..d0d607f6b0f8 100644
--- a/contrib/ncurses/ncurses/base/lib_flash.c
+++ b/contrib/ncurses/ncurses/base/lib_flash.c
@@ -42,7 +42,7 @@
#include <curses.priv.h>
#include <term.h> /* beep, flash */
-MODULE_ID("$Id: lib_flash.c,v 1.3 1998/06/29 19:34:16 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_flash.c,v 1.4 1999/10/22 21:39:06 tom Exp $")
/*
* flash()
@@ -62,11 +62,11 @@ int flash(void)
if (flash_screen) {
TPUTS_TRACE("flash_screen");
res = putp(flash_screen);
- fflush(SP->_ofp);
+ _nc_flush();
} else if (bell) {
TPUTS_TRACE("bell");
res = putp(bell);
- fflush(SP->_ofp);
+ _nc_flush();
}
returnCode(res);
diff --git a/contrib/ncurses/ncurses/base/lib_freeall.c b/contrib/ncurses/ncurses/base/lib_freeall.c
index e9a11ac36f26..324e7a282741 100644
--- a/contrib/ncurses/ncurses/base/lib_freeall.c
+++ b/contrib/ncurses/ncurses/base/lib_freeall.c
@@ -39,7 +39,7 @@
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.14 1999/04/03 23:17:06 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.15 1999/10/22 21:40:10 tom Exp $")
static void free_slk(SLK *p)
{
@@ -101,8 +101,6 @@ void _nc_freeall(void)
free_slk(SP->_slk);
FreeIfNeeded(SP->_color_pairs);
FreeIfNeeded(SP->_color_table);
- /* it won't free buffer anyway */
-/* _nc_set_buffer(SP->_ofp, FALSE);*/
#if !BROKEN_LINKER
FreeAndNull(SP);
#endif
diff --git a/contrib/ncurses/ncurses/base/lib_mouse.c b/contrib/ncurses/ncurses/base/lib_mouse.c
index 0aefdf3d8219..d34d48342e4f 100644
--- a/contrib/ncurses/ncurses/base/lib_mouse.c
+++ b/contrib/ncurses/ncurses/base/lib_mouse.c
@@ -85,7 +85,7 @@
#endif
#endif
-MODULE_ID("$Id: lib_mouse.c,v 1.44 1999/07/24 21:10:48 tom Exp $")
+MODULE_ID("$Id: lib_mouse.c,v 1.45 1999/10/22 21:39:02 tom Exp $")
#define MY_TRACE TRACE_ICALLS|TRACE_IEVENT
@@ -531,7 +531,7 @@ static void mouse_activate(bool on)
#endif
}
}
- (void) fflush(SP->_ofp);
+ _nc_flush();
}
/**************************************************************************
diff --git a/contrib/ncurses/ncurses/base/lib_newwin.c b/contrib/ncurses/ncurses/base/lib_newwin.c
index 61c0eb3ed548..d7fc02b3216e 100644
--- a/contrib/ncurses/ncurses/base/lib_newwin.c
+++ b/contrib/ncurses/ncurses/base/lib_newwin.c
@@ -42,7 +42,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.20 1998/05/23 23:21:32 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.21 1999/10/03 00:42:03 tom Exp $")
void _nc_freewin(WINDOW *win)
{
@@ -60,7 +60,7 @@ int i;
if (! (win->_flags & _SUBWIN)) {
for (i = 0; i <= win->_maxy && win->_line[i].text; i++)
- free(win->_line[i].text);
+ FreeIfNeeded(win->_line[i].text);
}
free(win->_line);
free(win);
diff --git a/contrib/ncurses/ncurses/base/lib_nl.c b/contrib/ncurses/ncurses/base/lib_nl.c
index d5c426632f5d..75d4a638148d 100644
--- a/contrib/ncurses/ncurses/base/lib_nl.c
+++ b/contrib/ncurses/ncurses/base/lib_nl.c
@@ -43,7 +43,7 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_nl.c,v 1.3 1998/10/14 15:14:08 Alexander.V.Lukyanov Exp $")
+MODULE_ID("$Id: lib_nl.c,v 1.4 1999/10/22 22:31:51 tom Exp $")
#ifdef __EMX__
#include <io.h>
@@ -57,8 +57,8 @@ int nl(void)
SP->_nl = TRUE;
#ifdef __EMX__
- fflush(SP->_ofp);
- _fsetmode(SP->_ofp, "t");
+ _nc_flush();
+ _fsetmode(NC_OUTPUT, "t");
#endif
returnCode(OK);
@@ -71,8 +71,8 @@ int nonl(void)
SP->_nl = FALSE;
#ifdef __EMX__
- fflush(SP->_ofp);
- _fsetmode(SP->_ofp, "b");
+ _nc_flush();
+ _fsetmode(NC_OUTPUT, "b");
#endif
returnCode(OK);
diff --git a/contrib/ncurses/ncurses/base/safe_sprintf.c b/contrib/ncurses/ncurses/base/safe_sprintf.c
index 0809225cd94c..e4d525272627 100644
--- a/contrib/ncurses/ncurses/base/safe_sprintf.c
+++ b/contrib/ncurses/ncurses/base/safe_sprintf.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,1999 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 *
@@ -33,7 +33,7 @@
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: safe_sprintf.c,v 1.10 1999/02/27 19:56:37 tom Exp $")
+MODULE_ID("$Id: safe_sprintf.c,v 1.11 1999/09/11 18:03:27 tom Exp $")
#if USE_SAFE_SPRINTF
@@ -112,7 +112,6 @@ _nc_printf_length(const char *fmt, va_list ap)
case 'Z': /* FALLTHRU */
case 'h': /* FALLTHRU */
case 'l': /* FALLTHRU */
- case 'L': /* FALLTHRU */
done = FALSE;
type = *fmt;
break;
@@ -134,10 +133,7 @@ _nc_printf_length(const char *fmt, va_list ap)
case 'E': /* FALLTHRU */
case 'g': /* FALLTHRU */
case 'G': /* FALLTHRU */
- if (type == 'L')
- VA_FLOAT(long double);
- else
- VA_FLOAT(double);
+ VA_FLOAT(double);
used = 'f';
break;
case 'c':
diff --git a/contrib/ncurses/ncurses/base/version.c b/contrib/ncurses/ncurses/base/version.c
new file mode 100644
index 000000000000..74d46ae9efa4
--- /dev/null
+++ b/contrib/ncurses/ncurses/base/version.c
@@ -0,0 +1,48 @@
+/****************************************************************************
+ * Copyright (c) 1999 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 *
+ * "Software"), to deal in the Software without restriction, including *
+ * without limitation the rights to use, copy, modify, merge, publish, *
+ * distribute, distribute with modifications, sublicense, and/or sell *
+ * copies of the Software, and to permit persons to whom the Software is *
+ * furnished to do so, subject to the following conditions: *
+ * *
+ * The above copyright notice and this permission notice shall be included *
+ * in all copies or substantial portions of the Software. *
+ * *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
+ * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
+ * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
+ * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
+ * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
+ * *
+ * Except as contained in this notice, the name(s) of the above copyright *
+ * holders shall not be used in advertising or otherwise to promote the *
+ * sale, use or other dealings in this Software without prior written *
+ * authorization. *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Author: Thomas E. Dickey <dickey@clark.net> 1999 *
+ ****************************************************************************/
+
+#include <curses.priv.h>
+
+MODULE_ID("$Id: version.c,v 1.1 1999/10/23 13:28:49 tom Exp $")
+
+const char *
+curses_version(void)
+{
+ static char my_version[80];
+
+ T((T_CALLED("curses_version()")));
+ sprintf(my_version, "ncurses %d.%d.%d",
+ NCURSES_VERSION_MAJOR,
+ NCURSES_VERSION_MINOR,
+ NCURSES_VERSION_PATCH);
+ returnPtr(my_version);
+}