X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=progs%2Ftic.c;h=8182e2eea7aa9d8a0f2c1d4682bfac67c5d1dbe0;hb=fe7c48d7d5115212f09b4ec0d84b189a76953f0d;hp=a9a4edc531e0c508faac4c691fb02eaa6655b76d;hpb=aabb3a65ee5d88949abe529b5131adedb9cfab84;p=ncurses.git diff --git a/progs/tic.c b/progs/tic.c index a9a4edc5..8182e2ee 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.209 2015/04/04 14:53:41 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.210 2015/05/27 00:58:18 tom Exp $") #define STDIN_NAME "" @@ -907,16 +907,17 @@ main(int argc, char *argv[]) } } - if (infodump) { + if (infodump || check_only) { dump_init(tversion, smart_defaults ? outform : F_LITERAL, - sortmode, width, height, debug_level, formatted); + sortmode, width, height, debug_level, formatted || + check_only, check_only); } else if (capdump) { dump_init(tversion, outform, - sortmode, width, height, debug_level, FALSE); + sortmode, width, height, debug_level, FALSE, FALSE); } /* parse entries out of the source file */ @@ -954,7 +955,21 @@ main(int argc, char *argv[]) } /* write or dump all entries */ - if (!check_only) { + if (check_only) { + /* this is in case infotocap() generates warnings */ + _nc_curr_col = _nc_curr_line = -1; + + for_entry_list(qp) { + if (matches(namelst, qp->tterm.term_names)) { + /* this is in case infotocap() generates warnings */ + _nc_set_type(_nc_first_name(qp->tterm.term_names)); + _nc_curr_line = (int) qp->startline; + repair_acsc(&qp->tterm); + dump_entry(&qp->tterm, suppress_untranslatable, + limited, numbers, NULL); + } + } + } else { if (!infodump && !capdump) { _nc_set_writedir(outdir); for_entry_list(qp) {