X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_setup.c;h=8cfaf12c5348f9cdbb7dcdcd75792145ebf5ea27;hp=dddf808fd07236a05169fb13096ff5749547beae;hb=1c2ec25b8186b7973aeb06ec4da6b63656e12f7d;hpb=01cec7497c02ab7ca6f0791cc2c7dfbdb2ba9272 diff --git a/ncurses/tinfo/lib_setup.c b/ncurses/tinfo/lib_setup.c index dddf808f..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.110 2008/07/12 18:40:23 tom Exp $") +MODULE_ID("$Id: lib_setup.c,v 1.111 2008/08/03 22:42:33 tom Exp $") /**************************************************************************** * @@ -394,14 +394,16 @@ do_prototype(TERMINAL * termp) 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; + } + } } } }