aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/tack
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/ncurses/tack')
-rw-r--r--contrib/ncurses/tack/Makefile.in19
-rw-r--r--contrib/ncurses/tack/sysdep.c20
2 files changed, 28 insertions, 11 deletions
diff --git a/contrib/ncurses/tack/Makefile.in b/contrib/ncurses/tack/Makefile.in
index 0c4018fbbc02..48f4619a8bf2 100644
--- a/contrib/ncurses/tack/Makefile.in
+++ b/contrib/ncurses/tack/Makefile.in
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.7 1998/03/28 21:41:21 tom Exp $
+# $Id: Makefile.in,v 1.9 1999/09/18 23:33:48 tom Exp $
# Makefile for tack
#
# The variable 'srcdir' refers to the source-distribution, and can be set with
@@ -15,6 +15,7 @@ THIS = Makefile
CF_MFLAGS = @cf_cv_makeflags@
@SET_MAKE@
+x = @PROG_EXT@
MODEL = ../@DFT_OBJ_SUBDIR@
INSTALL_PREFIX = @INSTALL_PREFIX@
@@ -65,26 +66,28 @@ LINT = @LINT@
LINT_OPTS = @LINT_OPTS@
LINT_LIBS = -lncurses @LIBS@
-PROGS = tack
+PROGS = tack$x
# Default library, for linking applications
DEPS_CURSES = ../lib/libncurses@DFT_DEP_SUFFIX@
################################################################################
-all: $(PROGS)
+all: $(PROGS)
-install: install.tack
-uninstall: uninstall.tack
+sources:
+
+install: install.tack
+uninstall: uninstall.tack
# this line simplifies the configure-script
install.libs:
uninstall.libs:
install.tack: $(PROGS) $(INSTALL_PREFIX)$(bindir)
- $(INSTALL_PROGRAM) tack $(INSTALL_PREFIX)$(bindir)/tack
+ $(INSTALL_PROGRAM) tack$x $(INSTALL_PREFIX)$(bindir)/tack$x
uninstall.tack:
- -@rm -f $(INSTALL_PREFIX)$(bindir)/tack
+ -@rm -f $(INSTALL_PREFIX)$(bindir)/tack$x
$(INSTALL_PREFIX)$(bindir) :
$(srcdir)/../mkinstalldirs $@
@@ -111,7 +114,7 @@ DEPS_TACK = \
$(MODEL)/sysdep.o \
$(MODEL)/tack.o
-tack: $(DEPS_TACK) $(DEPS_CURSES)
+tack$x: $(DEPS_TACK) $(DEPS_CURSES)
@ECHO_LINK@ $(LINK) $(DEPS_TACK) $(LDFLAGS_DEFAULT) -o $@
#
diff --git a/contrib/ncurses/tack/sysdep.c b/contrib/ncurses/tack/sysdep.c
index 763cc66e2a90..c07b4d9d53b9 100644
--- a/contrib/ncurses/tack/sysdep.c
+++ b/contrib/ncurses/tack/sysdep.c
@@ -24,6 +24,10 @@
* global has no effect.
*/
+#if defined(__BEOS__)
+#include <OS.h>
+#endif
+
#include <tack.h>
#include <signal.h>
@@ -39,7 +43,7 @@
#endif
#endif
-MODULE_ID("$Id: sysdep.c,v 1.5 1999/08/21 21:42:25 tom Exp $")
+MODULE_ID("$Id: sysdep.c,v 1.6 1999/09/04 13:45:00 tom Exp $")
#if DECL_ERRNO
extern int errno;
@@ -174,13 +178,13 @@ tty_reset(void)
void
tty_init(void)
{ /* ATT terminal init */
-#ifdef F_GETFL
+#if defined(F_GETFL) && defined(O_NDELAY)
int flags;
flags = fcntl(fileno(stdin), F_GETFL, 0);
nodelay_read = flags & O_NDELAY;
#else
- nodelay_read = FALSE;
+ nodelay_read = FALSE;
#endif
not_a_tty = FALSE;
if (tcgetattr(fileno(stdin), &old_modes) == -1) {
@@ -303,9 +307,19 @@ char_ready(void)
}
#else
+#if defined(__BEOS__)
+int
+char_ready(void)
+{
+ int n = 0;
+ int howmany = ioctl(0, 'ichr', &n);
+ return (howmany >= 0 && n > 0);
+}
+#else
#define char_ready() 1
#endif
#endif
+#endif
/*
** spin_flush()