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

Diff for /src/usr.bin/leave/leave.c between version 1.17 and 1.18

version 1.17, 2015/10/09 01:37:08 version 1.18, 2018/02/09 23:12:13
Line 113 
Line 113 
   
                 secs = (hours - t->tm_hour) * HOUR;                  secs = (hours - t->tm_hour) * HOUR;
                 secs += (minutes - t->tm_min) * MINUTE;                  secs += (minutes - t->tm_min) * MINUTE;
                   secs -= t->tm_sec;      /* aim for beginning of minute */
         }          }
         doalarm(secs);          doalarm(secs);
         exit(0);          exit(0);
Line 155 
Line 156 
                 sleep(secs - MINUTE);                  sleep(secs - MINUTE);
                 if (puts("\a\aJust one more minute!") == EOF)                  if (puts("\a\aJust one more minute!") == EOF)
                         exit(0);                          exit(0);
                   secs = MINUTE;
         }          }
   
           sleep(secs);
   
         for (bother = 10; bother--;) {          for (bother = 10; bother--;) {
                 sleep(MINUTE);  
                 if (puts("\a\aTime to leave!") == EOF)                  if (puts("\a\aTime to leave!") == EOF)
                         exit(0);                          exit(0);
                   if (bother)
                           sleep(MINUTE);
         }          }
   
         puts("\a\aThat was the last time I'll tell you.  Bye.");          puts("\a\aThat was the last time I'll tell you.  Bye.");

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18