X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Fcomp_parse.c;h=7d02a90c10fb015812f6258ebb305a40788601dd;hp=2bc9485342742708c0452ea90076b9a83837a189;hb=64eb5fae1961774e65e46953fa536d12c12f6d76;hpb=ad14e224ecf8bc5e6faeffeecd44c3cfa31827e4 diff --git a/ncurses/tinfo/comp_parse.c b/ncurses/tinfo/comp_parse.c index 2bc94853..7d02a90c 100644 --- a/ncurses/tinfo/comp_parse.c +++ b/ncurses/tinfo/comp_parse.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2020,2021 Thomas E. Dickey * + * Copyright 2018-2021,2022 Thomas E. Dickey * * Copyright 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -48,7 +48,7 @@ #include -MODULE_ID("$Id: comp_parse.c,v 1.113 2021/05/08 15:03:42 tom Exp $") +MODULE_ID("$Id: comp_parse.c,v 1.114 2022/04/02 22:13:54 tom Exp $") static void sanity_check2(TERMTYPE2 *, bool); NCURSES_IMPEXP void (NCURSES_API *_nc_check_termtype2) (TERMTYPE2 *, bool) = sanity_check2; @@ -298,7 +298,9 @@ extended_captype(TERMTYPE2 *p, unsigned which) } else { limit += p->ext_Strings; if (limit != 0 && which < limit) { - result = STRING; + result = ((p->Strings[STRCOUNT + which] != CANCELLED_STRING) + ? STRING + : CANCEL); } else if (which >= limit) { result = CANCEL; } @@ -354,24 +356,19 @@ invalid_merge(TERMTYPE2 *to, TERMTYPE2 *from) && tf <= STRING && (tt == STRING) != (tf == STRING)) { if (from_name != 0 && strcmp(to_name, from_name)) { - DEBUG(2, - ("merge of %s to %s changes type of %s from %s to %s", - from_name, - to_name, - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt))); + _nc_warning("merge of %s to %s changes type of %s from %s to %s", + from_name, + to_name, + from->ext_Names[n], + name_of_captype(tf), + name_of_captype(tt)); } else { - DEBUG(2, ("merge of %s changes type of %s from %s to %s", - to_name, - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt))); + _nc_warning("merge of %s changes type of %s from %s to %s", + to_name, + from->ext_Names[n], + name_of_captype(tf), + name_of_captype(tt)); } - _nc_warning("merge changes type of %s from %s to %s", - from->ext_Names[n], - name_of_captype(tf), - name_of_captype(tt)); rc = TRUE; } }