X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftic.c;h=cfcbc359152653a5f315400f86d91c1c1b362425;hp=7339f11a0d78bcb32684f0e47cc77f86cf965580;hb=d62b54c082a8564aa0c715cddadb1160498b057f;hpb=1dd25cc0259e0683290fe889707b04979b5fda0a diff --git a/progs/tic.c b/progs/tic.c index 7339f11a..cfcbc359 100644 --- a/progs/tic.c +++ b/progs/tic.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2015,2016 Free Software Foundation, Inc. * + * Copyright (c) 1998-2016,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -48,7 +48,7 @@ #include #include -MODULE_ID("$Id: tic.c,v 1.229 2016/12/04 02:12:38 tom Exp $") +MODULE_ID("$Id: tic.c,v 1.232 2017/04/13 09:12:05 tom Exp $") #define STDIN_NAME "" @@ -62,8 +62,8 @@ static bool showsummary = FALSE; static char **namelst = 0; static const char *to_remove; -static void (*save_check_termtype) (TERMTYPE *, bool); -static void check_termtype(TERMTYPE *tt, bool); +static void (*save_check_termtype) (TERMTYPE2 *, bool); +static void check_termtype(TERMTYPE2 *tt, bool); static const char usage_string[] = "\ [-e names] \ @@ -114,6 +114,7 @@ cleanup(void) #if NO_LEAKS free_namelist(namelst); + _nc_leaks_dump_entry(); #endif if (tmp_fp != 0) fclose(tmp_fp); @@ -1088,7 +1089,7 @@ main(int argc, char *argv[]) * Check if the alternate character-set capabilities are consistent. */ static void -check_acs(TERMTYPE *tp) +check_acs(TERMTYPE2 *tp) { if (VALID_STRING(acs_chars)) { const char *boxes = "lmkjtuvwqxn"; @@ -1128,7 +1129,7 @@ check_acs(TERMTYPE *tp) * Check if the color capabilities are consistent */ static void -check_colors(TERMTYPE *tp) +check_colors(TERMTYPE2 *tp) { if ((max_colors > 0) != (max_pairs > 0) || ((max_colors > max_pairs) && (initialize_pair == 0))) @@ -1287,7 +1288,7 @@ check_ansi_cursor(char *list[4]) #define UNEXPECTED(name) if (PRESENT(name)) _nc_warning("unexpected " #name ", for %s", why) static void -check_noaddress(TERMTYPE *tp, const char *why) +check_noaddress(TERMTYPE2 *tp, const char *why) { UNEXPECTED(column_address); UNEXPECTED(cursor_address); @@ -1299,7 +1300,7 @@ check_noaddress(TERMTYPE *tp, const char *why) } static void -check_cursor(TERMTYPE *tp) +check_cursor(TERMTYPE2 *tp) { int count; char *list[4]; @@ -1418,7 +1419,7 @@ check_cursor(TERMTYPE *tp) * is mapped inconsistently. */ static void -check_keypad(TERMTYPE *tp) +check_keypad(TERMTYPE2 *tp) { char show[80]; @@ -1528,7 +1529,7 @@ check_keypad(TERMTYPE *tp) } static void -check_printer(TERMTYPE *tp) +check_printer(TERMTYPE2 *tp) { PAIRED(enter_doublewide_mode, exit_doublewide_mode); PAIRED(enter_italics_mode, exit_italics_mode); @@ -1564,7 +1565,7 @@ uses_SGR_39_49(const char *value) * Check consistency of termcap extensions related to "screen". */ static void -check_screen(TERMTYPE *tp) +check_screen(TERMTYPE2 *tp) { #if NCURSES_XNAMES if (_nc_user_definable) { @@ -1721,7 +1722,7 @@ expected_params(const char *name) * markers. */ static void -check_params(TERMTYPE *tp, const char *name, char *value) +check_params(TERMTYPE2 *tp, const char *name, char *value) { int expected = expected_params(name); int actual = 0; @@ -1826,7 +1827,6 @@ skip_DECSCNM(const char *value, int *flag) *flag = -1; if (value != 0) { int skip = csi_length(value); - fprintf(stderr, "test %d:%s\n", skip, value); if (skip > 0 && value[skip++] == '?' && value[skip++] == '5') { @@ -1942,7 +1942,7 @@ check_1_infotocap(const char *name, NCURSES_CONST char *value, int count) for (k = 1; k <= NUM_PARM; k++) { numbers[k] = count; _nc_SPRINTF(next, - _nc_SLIMIT(sizeof(blob) - (next - blob)) + _nc_SLIMIT(sizeof(blob) - (size_t) (next - blob)) "XYZ%d", count); strings[k] = next; next += strlen(next) + 1; @@ -2096,7 +2096,7 @@ same_ti_tc(const char *ti, const char *tc, bool * embedded) * Check terminfo to termcap translation. */ static void -check_infotocap(TERMTYPE *tp, int i, const char *value) +check_infotocap(TERMTYPE2 *tp, int i, const char *value) { const char *name = ExtStrname(tp, i, strnames); int params = (((i < (int) SIZEOF(parametrized)) && @@ -2271,7 +2271,7 @@ similar_sgr(int num, char *a, char *b) } static char * -check_sgr(TERMTYPE *tp, char *zero, int num, char *cap, const char *name) +check_sgr(TERMTYPE2 *tp, char *zero, int num, char *cap, const char *name) { char *test; @@ -2337,7 +2337,7 @@ typedef struct { } NAME_VALUE; static NAME_VALUE * -get_fkey_list(TERMTYPE *tp) +get_fkey_list(TERMTYPE2 *tp) { NAME_VALUE *result = typeMalloc(NAME_VALUE, NUM_STRINGS(tp) + 1); const struct tinfo_fkeys *all_fkeys = _nc_tinfo_fkeys; @@ -2388,7 +2388,7 @@ show_fkey_name(NAME_VALUE * data) * last one assigned). */ static void -check_conflict(TERMTYPE *tp) +check_conflict(TERMTYPE2 *tp) { bool conflict = FALSE; unsigned j, k; @@ -2484,7 +2484,7 @@ is_sgr_string(char *value) * Check if the given capability contains a given SGR attribute. */ static void -check_sgr_param(TERMTYPE *tp, int code, const char *name, char *value) +check_sgr_param(TERMTYPE2 *tp, int code, const char *name, char *value) { if (VALID_STRING(value)) { int ncv = ((code != 0) ? (1 << (code - 1)) : 0); @@ -2533,7 +2533,7 @@ check_sgr_param(TERMTYPE *tp, int code, const char *name, char *value) * logic that reads a terminfo entry) */ static void -check_termtype(TERMTYPE *tp, bool literal) +check_termtype(TERMTYPE2 *tp, bool literal) { unsigned j;