X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_acs.c;h=6a24285460b3401cc78d078e121f595c7f6bf37d;hp=615d2a4b729051f65cc8753a39eb481490932695;hb=bd7ef7c2309fd00aa4576168c46f557c622cb9c3;hpb=82a087c4c47679fcfa59bb6d7bdbe587355ba3f6 diff --git a/ncurses/tinfo/lib_acs.c b/ncurses/tinfo/lib_acs.c index 615d2a4b..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.31 2007/03/03 21:12:34 tom Exp $") +MODULE_ID("$Id: lib_acs.c,v 1.34 2007/09/29 20:37:13 tom Exp $") -#if BROKEN_LINKER +#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 */ }