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

Diff for /src/usr.bin/window/Attic/wwterminfo.c between version 1.6 and 1.7

version 1.6, 1998/01/03 12:32:23 version 1.7, 1998/03/17 04:11:55
Line 68 
Line 68 
         char buf[2048];          char buf[2048];
   
                 /* make the directory */                  /* make the directory */
         (void) sprintf(wwterminfopath, "%swwinXXXXXX", _PATH_TMP);          (void) snprintf(wwterminfopath, sizeof wwterminfopath,
               "%swwinXXXXXX", _PATH_TMP);
         mktemp(wwterminfopath);          mktemp(wwterminfopath);
         if (mkdir(wwterminfopath, 0755) < 0 ||          if (mkdir(wwterminfopath, 0755) < 0 ||
             chmod(wwterminfopath, 00755) < 0) {              chmod(wwterminfopath, 00755) < 0) {
Line 77 
Line 78 
         }          }
         (void) setenv("TERMINFO", wwterminfopath, 1);          (void) setenv("TERMINFO", wwterminfopath, 1);
                 /* make a termcap entry and turn it into terminfo */                  /* make a termcap entry and turn it into terminfo */
         (void) sprintf(buf, "%s/cap", wwterminfopath);          (void) snprintf(buf, sizeof buf, "%s/cap", wwterminfopath);
         if ((fp = fopen(buf, "w")) == NULL) {          if ((fp = fopen(buf, "w")) == NULL) {
                 wwerrno = WWE_SYS;                  wwerrno = WWE_SYS;
                 return -1;                  return -1;
Line 85 
Line 86 
         (void) fprintf(fp, "%sco#%d:li#%d:%s\n",          (void) fprintf(fp, "%sco#%d:li#%d:%s\n",
                 WWT_TERMCAP, wwncol, wwnrow, wwwintermcap);                  WWT_TERMCAP, wwncol, wwnrow, wwwintermcap);
         (void) fclose(fp);          (void) fclose(fp);
         (void) sprintf(buf,          (void) snprintf(buf, sizeof buf,
                 "cd %s; %s cap >info 2>/dev/null; %s info >/dev/null 2>&1",              "cd %s; %s cap >info 2>/dev/null; %s info >/dev/null 2>&1",
                 wwterminfopath, _PATH_CAPTOINFO, _PATH_TIC);              wwterminfopath, _PATH_CAPTOINFO, _PATH_TIC);
         (void) system(buf);          (void) system(buf);             /* XXX */
         return 0;          return 0;
 }  }
   

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7