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

Diff for /src/usr.bin/cal/cal.c between version 1.9 and 1.10

version 1.9, 2003/06/03 02:56:06 version 1.10, 2003/06/10 22:20:45
Line 134 
Line 134 
 void    yearly(int);  void    yearly(int);
   
 int  int
 main(argc, argv)  main(int argc, char *argv[])
         int argc;  
         char **argv;  
 {  {
         struct tm *local_time;          struct tm *local_time;
         time_t now;          time_t now;
Line 196 
Line 194 
 #define J_HEAD_SEP      2  #define J_HEAD_SEP      2
   
 void  void
 monthly(month, year)  monthly(int month, int year)
         int month, year;  
 {  {
         int col, row, len, days[MAXDAYS];          int col, row, len, days[MAXDAYS];
         char *p, lineout[30];          char *p, lineout[30];
Line 219 
Line 216 
 }  }
   
 void  void
 j_yearly(year)  j_yearly(int year)
         int year;  
 {  {
         int col, *dp, i, month, row, which_cal;          int col, *dp, i, month, row, which_cal;
         int days[12][MAXDAYS];          int days[12][MAXDAYS];
Line 254 
Line 250 
 }  }
   
 void  void
 yearly(year)  yearly(int year)
         int year;  
 {  {
         int col, *dp, i, month, row, which_cal;          int col, *dp, i, month, row, which_cal;
         int days[12][MAXDAYS];          int days[12][MAXDAYS];
Line 297 
Line 292 
  *      builds that array for any month from Jan. 1 through Dec. 9999.   *      builds that array for any month from Jan. 1 through Dec. 9999.
  */   */
 void  void
 day_array(month, year, days)  day_array(int month, int year, int *days)
         int month, year;  
         int *days;  
 {  {
         int day, dw, dm;          int day, dw, dm;
   
Line 321 
Line 314 
  *      return the 1 based day number within the year   *      return the 1 based day number within the year
  */   */
 int  int
 day_in_year(day, month, year)  day_in_year(int day, int month, int year)
         int day, month, year;  
 {  {
         int i, leap;          int i, leap;
   
Line 340 
Line 332 
  *      missing days.   *      missing days.
  */   */
 int  int
 day_in_week(day, month, year)  day_in_week(int day, int month, int year)
         int day, month, year;  
 {  {
         long temp;          long temp;
   
Line 355 
Line 346 
 }  }
   
 void  void
 ascii_day(p, day)  ascii_day(char *p, int day)
         char *p;  
         int day;  
 {  {
         int display, val;          int display, val;
         static char *aday[] = {          static char *aday[] = {
Line 397 
Line 386 
 }  }
   
 void  void
 trim_trailing_spaces(s)  trim_trailing_spaces(char *s)
         char *s;  
 {  {
         char *p;          char *p;
   
Line 412 
Line 400 
 }  }
   
 void  void
 center(str, len, separate)  center(char *str, int len, int separate)
         char *str;  
         int len;  
         int separate;  
 {  {
   
         len -= strlen(str);          len -= strlen(str);
Line 425 
Line 410 
 }  }
   
 void  void
 usage()  usage(void)
 {  {
   
         (void)fprintf(stderr, "usage: cal [-jy] [[month] year]\n");          (void)fprintf(stderr, "usage: cal [-jy] [[month] year]\n");

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10