X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_setup.c;h=8cfaf12c5348f9cdbb7dcdcd75792145ebf5ea27;hp=20c14e0fcf7febbc7add1935183548444b031af7;hb=1c2ec25b8186b7973aeb06ec4da6b63656e12f7d;hpb=3ce60e9f58cc00309981ed711d0b0d3362105881 diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index 20c14e0f..8cfaf12c 100644 --- a/ncurses/tinfo/lib_setup.c +++ b/ncurses/tinfo/lib_setup.c @@ -53,7 +53,7 @@ #include /* lines, columns, cur_term */ -MODULE_ID("$Id: lib_setup.c,v 1.109 2008/06/28 15:31:42 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $") /**************************************************************************** * @@ -389,19 +389,21 @@ grab_entry(const char *const tn, TERMTYPE *const tp) static void do_prototype(TERMINAL * termp) { - int i; + unsigned i; char CC; char proto; char *tmp; - tmp = getenv("CC"); - CC = *tmp; - proto = *command_character; + if ((tmp = getenv("CC")) != 0) { + if ((CC = *tmp) != 0) { + proto = *command_character; - for_each_string(i, &(termp->type)) { - for (tmp = termp->type.Strings[i]; *tmp; tmp++) { - if (*tmp == proto) - *tmp = CC; + for_each_string(i, &(termp->type)) { + for (tmp = termp->type.Strings[i]; *tmp; tmp++) { + if (*tmp == proto) + *tmp = CC; + } + } } } }