X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_tparm.c;h=d9bdfd8faf06ef6860523f6f61d08762dd6d85aa;hb=3f57ad09dfcb62c8ad444e13fa4d450c05e878ba;hp=72d8813801c08487fc1f7403b32bf32e2ee2f270;hpb=493e2f7b3fc309879f561a094fdfc15e5304b3d6;p=ncurses.git diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index 72d88138..d9bdfd8f 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -53,7 +53,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.134 2021/08/21 21:52:08 tom Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.137 2021/11/20 23:29:15 tom Exp $") /* * char * @@ -142,10 +142,8 @@ typedef struct { #if HAVE_TSEARCH #define MyCache _nc_globals.cached_tparm #define MyCount _nc_globals.count_tparm -#if NO_LEAKS static int which_tparm; static TPARM_DATA **delete_tparm; -#endif #endif /* HAVE_TSEARCH */ static char dummy[] = ""; /* avoid const-cast */ @@ -160,10 +158,9 @@ cmp_format(const void *p, const void *q) } #endif -#if NO_LEAKS #if HAVE_TSEARCH static void -visit_nodes(const void *nodep, const VISIT which, const int depth) +visit_nodes(const void *nodep, VISIT which, int depth) { (void) depth; if (which == preorder || which == leaf) { @@ -174,9 +171,9 @@ visit_nodes(const void *nodep, const VISIT which, const int depth) #endif NCURSES_EXPORT(void) -_nc_free_tparm(void) +_nc_free_tparm(TERMINAL *termp) { - TPARM_STATE *tps = get_tparm_state(cur_term); /* FIXME */ + TPARM_STATE *tps = get_tparm_state(termp); #if HAVE_TSEARCH if (MyCount != 0) { delete_tparm = typeCalloc(TPARM_DATA *, MyCount); @@ -204,11 +201,12 @@ _nc_free_tparm(void) FreeAndNull(TPS(fmt_buff)); TPS(fmt_size) = 0; } -#endif static int tparm_error(TPARM_STATE *tps, const char *message) { + (void) tps; + (void) message; DEBUG(2, ("%s: %s", message, _nc_visbuf(TPS(tparam_base)))); return ++_nc_tparm_err; }