X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_tparm.c;h=b8104eabcd5e57cdf28d930ccbf6947ed6909085;hp=0f0c62a491ba93ce052a90206ebc2d51e98aea28;hb=fae162795e065e5901068152e91f2962b6b247f3;hpb=7503e8d82292a2a0a4d8bb55bdf3f8a203159f68;ds=sidebyside diff --git a/ncurses/tinfo/lib_tparm.c b/ncurses/tinfo/lib_tparm.c index 0f0c62a4..b8104eab 100644 --- a/ncurses/tinfo/lib_tparm.c +++ b/ncurses/tinfo/lib_tparm.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -53,7 +53,7 @@ #include #include -MODULE_ID("$Id: lib_tparm.c,v 1.127 2020/06/13 21:59:52 tom Exp $") +MODULE_ID("$Id: lib_tparm.c,v 1.129 2021/02/14 00:09:49 tom Exp $") /* * char * @@ -405,7 +405,7 @@ parse_format(const char *s, char *format, int *len) * may be cases that we cannot see the explicit parameter numbers. */ NCURSES_EXPORT(int) -_nc_tparm_analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount) +_nc_tparm_analyze(const char *string, char **p_is_s, int *popcount) { size_t len2; int i; @@ -589,7 +589,7 @@ tparm_setup(const char *string, TPARM_DATA * result) if ((fs = typeCalloc(TPARM_DATA, 1)) != 0) { *fs = *result; if ((fs->format = strdup(string)) != 0) { - if ((ft = tsearch(fs, &MyCache, cmp_format)) != 0) { + if (tsearch(fs, &MyCache, cmp_format) != 0) { ++MyCount; } else { rc = ERR; @@ -966,6 +966,13 @@ tparam_internal(const char *string, TPARM_DATA * data) get_space((size_t) 1); TPS(out_buff)[TPS(out_used)] = '\0'; + if (TPS(stack_ptr) && !_nc_tparm_err) { + DEBUG(2, ("tparm: stack has %d item%s on return", + TPS(stack_ptr), + TPS(stack_ptr) == 1 ? "" : "s")); + _nc_tparm_err++; + } + T((T_RETURN("%s"), _nc_visbuf(TPS(out_buff)))); return (TPS(out_buff)); }