[BACK]Return to wwenviron.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / window

Diff for /src/usr.bin/window/Attic/wwenviron.c between version 1.4 and 1.5

version 1.4, 1997/02/25 00:04:50 version 1.5, 1998/03/17 04:11:54
Line 99 
Line 99 
          * 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:

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5