X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;f=progs%2Ftic.c;h=c98cda606ff8c6b6dc18b99d1efd520e570f1063;hb=a6eb34d7fec8170a8715f9e53ca2f96452dd30dd;hp=9560788e8a17750e00986f9d7b5361490ae9e14f;hpb=7884aa084f9440fd964f14fe31853a5f85db5104;p=ncurses.git diff --git a/progs/tic.c b/progs/tic.c index 9560788e..c98cda60 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -49,7 +49,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.288 2020/10/24 17:04:11 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.290 2020/11/14 18:16:33 tom Exp $") #define STDIN_NAME "" @@ -2372,14 +2372,13 @@ check_infotocap(TERMTYPE2 *tp, int i, const char *value) ? parametrized[i] : ((*value == 'k') ? 0 - : has_params(value))); - int to_char = 0; + : has_params(value, FALSE))); char *ti_value; char *tc_value; bool embedded; assert(SIZEOF(parametrized) == STRCOUNT); - if ((ti_value = _nc_tic_expand(value, TRUE, to_char)) == ABSENT_STRING) { + if (!VALID_STRING(value) || (ti_value = strdup(value)) == NULL) { _nc_warning("tic-expansion of %s failed", name); } else if ((tc_value = _nc_infotocap(name, ti_value, params)) == ABSENT_STRING) { _nc_warning("tic-conversion of %s failed", name); @@ -2402,12 +2401,14 @@ check_infotocap(TERMTYPE2 *tp, int i, const char *value) if (strcmp(ti_check, tc_check)) { if (first) { fprintf(stderr, "check_infotocap(%s)\n", name); - fprintf(stderr, "...ti '%s'\n", ti_value); - fprintf(stderr, "...tc '%s'\n", tc_value); + fprintf(stderr, "...ti '%s'\n", _nc_visbuf2(0, ti_value)); + fprintf(stderr, "...tc '%s'\n", _nc_visbuf2(0, tc_value)); first = FALSE; } _nc_warning("tparm-conversion of %s(%d) differs between\n\tterminfo %s\n\ttermcap %s", - name, count, ti_check, tc_check); + name, count, + _nc_visbuf2(0, ti_check), + _nc_visbuf2(1, tc_check)); } free(ti_check); free(tc_check);