aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_initscr.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/ncurses/base/lib_initscr.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_initscr.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_initscr.c55
1 files changed, 28 insertions, 27 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_initscr.c b/contrib/ncurses/ncurses/base/lib_initscr.c
index 9a89a077cd44..b6e34ef91a26 100644
--- a/contrib/ncurses/ncurses/base/lib_initscr.c
+++ b/contrib/ncurses/ncurses/base/lib_initscr.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * Copyright (c) 1998 Free Software Foundation, Inc. *
+ * Copyright (c) 1998,2000 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 *
@@ -39,40 +39,41 @@
*/
#include <curses.priv.h>
-#include <tic.h> /* for MAX_ALIAS */
+#include <tic.h> /* for MAX_ALIAS */
#if HAVE_SYS_TERMIO_H
-#include <sys/termio.h> /* needed for ISC */
+#include <sys/termio.h> /* needed for ISC */
#endif
-MODULE_ID("$Id: lib_initscr.c,v 1.26 1998/12/19 23:10:09 tom Exp $")
+MODULE_ID("$Id: lib_initscr.c,v 1.28 2000/12/10 02:43:27 tom Exp $")
-WINDOW *initscr(void)
+NCURSES_EXPORT(WINDOW *)
+initscr(void)
{
-static bool initialized = FALSE;
-NCURSES_CONST char *name;
-int value;
+ static bool initialized = FALSE;
+ NCURSES_CONST char *name;
+ int value;
- T((T_CALLED("initscr()")));
- /* Portable applications must not call initscr() more than once */
- if (!initialized) {
- initialized = TRUE;
+ T((T_CALLED("initscr()")));
+ /* Portable applications must not call initscr() more than once */
+ if (!initialized) {
+ initialized = TRUE;
- if ((name = getenv("TERM")) == 0
- || *name == '\0')
- name = "unknown";
- if (newterm(name, stdout, stdin) == 0) {
- fprintf(stderr, "Error opening terminal: %s.\n", name);
- exit(EXIT_FAILURE);
- }
-
- /* allow user to set maximum escape delay from the environment */
- if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
- ESCDELAY = value;
- }
+ if ((name = getenv("TERM")) == 0
+ || *name == '\0')
+ name = "unknown";
+ if (newterm(name, stdout, stdin) == 0) {
+ fprintf(stderr, "Error opening terminal: %s.\n", name);
+ exit(EXIT_FAILURE);
+ }
- /* def_shell_mode - done in newterm/_nc_setupscreen */
- def_prog_mode();
+ /* allow user to set maximum escape delay from the environment */
+ if ((value = _nc_getenv_num("ESCDELAY")) >= 0) {
+ ESCDELAY = value;
}
- returnWin(stdscr);
+
+ /* def_shell_mode - done in newterm/_nc_setupscreen */
+ def_prog_mode();
+ }
+ returnWin(stdscr);
}