version 1.4, 1997/02/25 00:04:50 |
version 1.5, 1998/03/17 04:11:54 |
|
|
* 1. setenv() copies the string, |
* 1. setenv() copies the string, |
* 2. we've already called tgetent which copies the termcap entry. |
* 2. we've already called tgetent which copies the termcap entry. |
*/ |
*/ |
(void) sprintf(buf, "%sco#%d:li#%d:%s", |
(void) snprintf(buf, sizeof buf, "%sco#%d:li#%d:%s", |
WWT_TERMCAP, wp->ww_w.nc, wp->ww_w.nr, wwwintermcap); |
WWT_TERMCAP, wp->ww_w.nc, wp->ww_w.nr, wwwintermcap); |
(void) setenv("TERMCAP", buf, 1); |
(void) setenv("TERMCAP", buf, 1); |
(void) sprintf(buf, "%d", wp->ww_id + 1); |
(void) snprintf(buf, sizeof buf, "%d", wp->ww_id + 1); |
(void) setenv("WINDOW_ID", buf, 1); |
(void) setenv("WINDOW_ID", buf, 1); |
return 0; |
return 0; |
bad: |
bad: |