]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_acs.c
ncurses 5.6 - patch 20080329
[ncurses.git] / ncurses / tinfo / lib_acs.c
index 347014fe19ab7ebdb71d0ba9e75efe0ec542941c..6a24285460b3401cc78d078e121f595c7f6bf37d 100644 (file)
 #include <curses.priv.h>
 #include <term.h>              /* ena_acs, acs_chars */
 
-MODULE_ID("$Id: lib_acs.c,v 1.32 2007/03/10 18:47:26 tom Exp $")
+MODULE_ID("$Id: lib_acs.c,v 1.34 2007/09/29 20:37:13 tom Exp $")
 
 #if BROKEN_LINKER || USE_REENTRANT
+#define MyBuffer _nc_prescreen.real_acs_map
 NCURSES_EXPORT_VAR(chtype *)
 _nc_acs_map(void)
 {
-    static chtype *the_map = 0;
-    if (the_map == 0)
-       the_map = typeCalloc(chtype, ACS_LEN);
-    return the_map;
+    if (MyBuffer == 0)
+       MyBuffer = typeCalloc(chtype, ACS_LEN);
+    return MyBuffer;
 }
+#undef MyBuffer
 #else
 NCURSES_EXPORT_VAR(chtype) acs_map[ACS_LEN] =
 {
@@ -165,7 +166,7 @@ _nc_init_acs(void)
     /* Show the equivalent mapping, noting if it does not match the
      * given attribute, whether by re-ordering or duplication.
      */
-    if (_nc_tracing & TRACE_CALLS) {
+    if (USE_TRACEF(TRACE_CALLS)) {
        size_t n, m;
        char show[ACS_LEN * 2 + 1];
        for (n = 1, m = 0; n < ACS_LEN; n++) {
@@ -186,6 +187,7 @@ _nc_init_acs(void)
                   ? "DIFF"
                   : "SAME"),
                _nc_visbuf(show));
+       _nc_unlock_global(tracef);
     }
 #endif /* TRACE */
 }