ncurses 5.9 - patch 20111001
[ncurses.git] / ncurses / tinfo / lib_data.c
index 8b6ea0cfde786189bb63946fe4aa3d5ad4664c8a..9b816b5a6408061e5aebab389f5cb0cc3f20ade5 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 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            *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -42,7 +42,7 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-MODULE_ID("$Id: lib_data.c,v 1.56 2009/11/21 22:34:17 tom Exp $")
+MODULE_ID("$Id: lib_data.c,v 1.62 2011/09/26 09:48:08 tom Exp $")
 
 /*
  * OS/2's native linker complains if we don't initialize public data when
 
 /*
  * OS/2's native linker complains if we don't initialize public data when
@@ -125,7 +125,7 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
 
     FALSE,                     /* have_tic_directory */
     FALSE,                     /* keep_tic_directory */
 
     FALSE,                     /* have_tic_directory */
     FALSE,                     /* keep_tic_directory */
-    TERMINFO,                  /* tic_directory */
+    0,                         /* tic_directory */
 
     NULL,                      /* dbi_list */
     0,                         /* dbi_size */
 
     NULL,                      /* dbi_list */
     0,                         /* dbi_size */
@@ -155,6 +155,10 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
     0,                         /* safeprint_rows */
 #endif
 
     0,                         /* safeprint_rows */
 #endif
 
+#ifdef USE_TERM_DRIVER
+    0,                         /* term_driver */
+#endif
+
 #ifdef TRACE
     FALSE,                     /* init_trace */
     CHARS_0s,                  /* trace_fname */
 #ifdef TRACE
     FALSE,                     /* init_trace */
     CHARS_0s,                  /* trace_fname */
@@ -189,6 +193,9 @@ NCURSES_EXPORT_VAR(NCURSES_GLOBALS) _nc_globals = {
     0,                         /* nested_tracef */
     0,                         /* use_pthreads */
 #endif
     0,                         /* nested_tracef */
     0,                         /* use_pthreads */
 #endif
+#if USE_PTHREADS_EINTR
+    0,                         /* read_thread */
+#endif
 };
 
 #define STACK_FRAME_0  { { 0 }, 0 }
 };
 
 #define STACK_FRAME_0  { { 0 }, 0 }
@@ -256,8 +263,7 @@ _nc_screen_of(WINDOW *win)
     SCREEN *sp = 0;
 
     if (win != 0) {
     SCREEN *sp = 0;
 
     if (win != 0) {
-       WINDOWLIST *wp = (WINDOWLIST *) win;
-       sp = wp->screen;
+       sp = WINDOW_EXT(win, screen);
     }
     return (sp);
 }
     }
     return (sp);
 }
@@ -342,7 +348,9 @@ _nc_mutex_unlock(pthread_mutex_t * obj)
        return 0;
     return pthread_mutex_unlock(obj);
 }
        return 0;
     return pthread_mutex_unlock(obj);
 }
+#endif /* USE_PTHREADS */
 
 
+#if defined(USE_PTHREADS) || USE_PTHREADS_EINTR
 #if USE_WEAK_SYMBOLS
 /*
  * NB: sigprocmask(2) is global but pthread_sigmask(3p)
 #if USE_WEAK_SYMBOLS
 /*
  * NB: sigprocmask(2) is global but pthread_sigmask(3p)