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

Diff for /src/usr.bin/cvs/edit.c between version 1.19 and 1.20

version 1.19, 2007/01/05 08:52:37 version 1.20, 2007/01/05 09:15:00
Line 244 
Line 244 
         FILE *fp;          FILE *fp;
         struct tm *t;          struct tm *t;
         time_t now;          time_t now;
         char *bfpath, *fdate, thishost[MAXHOSTNAMELEN];          char *bfpath, timebuf[64], thishost[MAXHOSTNAMELEN];
   
         if (cvs_noexec == 1)          if (cvs_noexec == 1)
                 return;                  return;
Line 257 
Line 257 
         if ((t = gmtime(&now)) == NULL)          if ((t = gmtime(&now)) == NULL)
                 fatal("gmtime failed");                  fatal("gmtime failed");
   
         fdate = asctime(t);          asctime_r(t, timebuf);
           if (timebuf[strlen(timebuf) - 1] == '\n')
                   timebuf[strlen(timebuf) - 1] = '\0';
   
         if (gethostname(thishost, sizeof(thishost)) == -1)          if (gethostname(thishost, sizeof(thishost)) == -1)
                 fatal("gethostname failed");                  fatal("gethostname failed");
   
         (void)fprintf(fp, "E%s\t%s GMT\t%s\t%s\t\n",          (void)fprintf(fp, "E%s\t%s GMT\t%s\t%s\t\n",
             cf->file_name, fdate, thishost, cf->file_wd);              cf->file_name, timebuf, thishost, cf->file_wd);
   
         if (edit_aflags & E_EDIT)          if (edit_aflags & E_EDIT)
                 (void)fprintf(fp, "E");                  (void)fprintf(fp, "E");
Line 303 
Line 305 
         struct stat st;          struct stat st;
         struct tm *t;          struct tm *t;
         time_t now;          time_t now;
         char *bfpath, *fdate, thishost[MAXHOSTNAMELEN];          char *bfpath, timebuf[64], thishost[MAXHOSTNAMELEN];
   
         if (cvs_noexec == 1)          if (cvs_noexec == 1)
                 return;                  return;
Line 339 
Line 341 
         if ((t = gmtime(&now)) == NULL)          if ((t = gmtime(&now)) == NULL)
                 fatal("gmtime failed");                  fatal("gmtime failed");
   
         fdate = asctime(t);          asctime_r(t, timebuf);
           if (timebuf[strlen(timebuf) - 1] == '\n')
                   timebuf[strlen(timebuf) - 1] = '\0';
   
         if (gethostname(thishost, sizeof(thishost)) == -1)          if (gethostname(thishost, sizeof(thishost)) == -1)
                 fatal("gethostname failed");                  fatal("gethostname failed");
   
         (void)fprintf(fp, "U%s\t%s GMT\t%s\t%s\t\n",          (void)fprintf(fp, "U%s\t%s GMT\t%s\t%s\t\n",
             cf->file_name, fdate, thishost, cf->file_wd);              cf->file_name, timebuf, thishost, cf->file_wd);
   
         (void)fclose(fp);          (void)fclose(fp);
   

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20