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

Diff for /src/usr.bin/calendar/day.c between version 1.21 and 1.26

version 1.21, 2008/04/13 00:22:17 version 1.26, 2013/11/12 19:35:47
Line 29 
Line 29 
  * SUCH DAMAGE.   * SUCH DAMAGE.
  */   */
   
 #ifndef lint  
 static const char copyright[] =  
 "@(#) Copyright (c) 1989, 1993\n\  
         The Regents of the University of California.  All rights reserved.\n";  
 #endif /* not lint */  
   
 #ifndef lint  
 #if 0  
 static const char sccsid[] = "@(#)calendar.c  8.3 (Berkeley) 3/25/94";  
 #else  
 static const char rcsid[] = "$OpenBSD$";  
 #endif  
 #endif /* not lint */  
   
 #include <sys/types.h>  #include <sys/types.h>
 #include <sys/uio.h>  #include <sys/uio.h>
   
Line 58 
Line 44 
 #include "pathnames.h"  #include "pathnames.h"
 #include "calendar.h"  #include "calendar.h"
   
   extern struct iovec header[];
   
 #define WEEKLY 1  #define WEEKLY 1
 #define MONTHLY 2  #define MONTHLY 2
 #define YEARLY 3  #define YEARLY 3
Line 90 
Line 78 
 static struct fixs fnmonths[13];      /* full national months names */  static struct fixs fnmonths[13];      /* full national months names */
 static struct fixs nmonths[13];       /* short national month names */  static struct fixs nmonths[13];       /* short national month names */
   
   
 void  void
 setnnames(void)  setnnames(void)
 {  {
Line 203 
Line 190 
         len = strlen(date);          len = strlen(date);
         if (len < 2)          if (len < 2)
                 return((time_t)-1);                  return((time_t)-1);
           bzero(&tm, sizeof tm);
         tm.tm_sec = 0;          tm.tm_sec = 0;
         tm.tm_min = 0;          tm.tm_min = 0;
         /* Avoid getting caught by a timezone shift; set time to noon */          /* Avoid getting caught by a timezone shift; set time to noon */
Line 237 
Line 225 
         }          }
   
 #if DEBUG  #if DEBUG
         printf("Mktime: %d %d %d %s\n", (int)mktime(&tm), (int)t, len,          printf("Mktime: %d %lld %d %s\n", (int)mktime(&tm), (long long)t, len,
             asctime(&tm));              asctime(&tm));
 #endif  #endif
         return(mktime(&tm));          return(mktime(&tm));
 }  }
   
 void  static void
 adjust_calendar(int *day, int *month)  adjust_calendar(int *day, int *month)
 {  {
         switch (calendar) {          switch (calendar) {

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.26