ncal.c (45064) | ncal.c (48566) |
---|---|
1/*- 2 * Copyright (c) 1997 Wolfgang Helbig 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#ifndef lint 28static const char rcsid[] = | 1/*- 2 * Copyright (c) 1997 Wolfgang Helbig 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#ifndef lint 28static const char rcsid[] = |
29 "$Id: ncal.c,v 1.6 1998/01/15 10:23:34 helbig Exp $"; | 29 "$Id: ncal.c,v 1.7 1999/03/27 21:08:13 helbig Exp $"; |
30#endif /* not lint */ 31 32#include <calendar.h> 33#include <err.h> 34#include <locale.h> 35#include <stdio.h> 36#include <stdlib.h> 37#include <string.h> --- 439 unchanged lines hidden (view full) --- 477 mw, year[j + 1].lines[i]); 478 if (mpl == 3) 479 printf("%s\n", year[j + 2].lines[i]); 480 else 481 printf("%-*s%s\n", 482 mw, year[j + 2].lines[i], 483 year[j + 3].lines[i]); 484 } | 30#endif /* not lint */ 31 32#include <calendar.h> 33#include <err.h> 34#include <locale.h> 35#include <stdio.h> 36#include <stdlib.h> 37#include <string.h> --- 439 unchanged lines hidden (view full) --- 477 mw, year[j + 1].lines[i]); 478 if (mpl == 3) 479 printf("%s\n", year[j + 2].lines[i]); 480 else 481 printf("%-*s%s\n", 482 mw, year[j + 2].lines[i], 483 year[j + 3].lines[i]); 484 } |
485 if (flag_weeks) | 485 if (flag_weeks) { |
486 if (mpl == 3) 487 printf(" %-*s%-*s%-s\n", 488 mw, year[j].weeks, 489 mw, year[j + 1].weeks, 490 year[j + 2].weeks); 491 else 492 printf(" %-*s%-*s%-*s%-s\n", 493 mw, year[j].weeks, 494 mw, year[j + 1].weeks, 495 mw, year[j + 2].weeks, 496 year[j + 3].weeks); | 486 if (mpl == 3) 487 printf(" %-*s%-*s%-s\n", 488 mw, year[j].weeks, 489 mw, year[j + 1].weeks, 490 year[j + 2].weeks); 491 else 492 printf(" %-*s%-*s%-*s%-s\n", 493 mw, year[j].weeks, 494 mw, year[j + 1].weeks, 495 mw, year[j + 2].weeks, 496 year[j + 3].weeks); |
497 } |
|
497 } 498} 499 500void 501printyearb(int y, int jd_flag) 502{ 503 struct monthlines year[12]; 504 struct weekdays wds; --- 333 unchanged lines hidden --- | 498 } 499} 500 501void 502printyearb(int y, int jd_flag) 503{ 504 struct monthlines year[12]; 505 struct weekdays wds; --- 333 unchanged lines hidden --- |