X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_acs.c;h=6a24285460b3401cc78d078e121f595c7f6bf37d;hp=347014fe19ab7ebdb71d0ba9e75efe0ec542941c;hb=e0371a7943009d611a4dc080dcddfcdfba9f589b;hpb=0be808514502f3149b379d036ab3a83cbb4d4c02 diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c index 347014fe..6a242854 100644 --- a/ncurses/tinfo/lib_acs.c +++ b/ncurses/tinfo/lib_acs.c @@ -35,17 +35,18 @@ #include #include /* 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 */ }