Deleted Added
full compact
calendar.c (251678) calendar.c (262011)
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. 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

--- 26 unchanged lines hidden (view full) ---

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
39#endif
40#endif
41
42#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993, 1994
3 * The Regents of the University of California. 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

--- 26 unchanged lines hidden (view full) ---

35
36#if 0
37#ifndef lint
38static char sccsid[] = "@(#)calendar.c 8.3 (Berkeley) 3/25/94";
39#endif
40#endif
41
42#include <sys/cdefs.h>
43__FBSDID("$FreeBSD: head/usr.bin/calendar/calendar.c 251678 2013-06-13 04:11:21Z grog $");
43__FBSDID("$FreeBSD: head/usr.bin/calendar/calendar.c 262011 2014-02-17 03:24:00Z eadler $");
44
45#include <err.h>
46#include <errno.h>
47#include <locale.h>
48#include <pwd.h>
49#include <stdio.h>
50#include <stdlib.h>
51#include <string.h>

--- 39 unchanged lines hidden (view full) ---

91 break;
92
93 case 'W': /* we don't need no steenking Fridays */
94 Friday = -1;
95 /* FALLTHROUGH */
96
97 case 'A': /* days after current date */
98 f_dayAfter = atoi(optarg);
44
45#include <err.h>
46#include <errno.h>
47#include <locale.h>
48#include <pwd.h>
49#include <stdio.h>
50#include <stdlib.h>
51#include <string.h>

--- 39 unchanged lines hidden (view full) ---

91 break;
92
93 case 'W': /* we don't need no steenking Fridays */
94 Friday = -1;
95 /* FALLTHROUGH */
96
97 case 'A': /* days after current date */
98 f_dayAfter = atoi(optarg);
99 if (f_dayAfter < 0)
100 errx(1, "number of days must be positive");
99 break;
100
101 case 'B': /* days before current date */
102 f_dayBefore = atoi(optarg);
101 break;
102
103 case 'B': /* days before current date */
104 f_dayBefore = atoi(optarg);
105 if (f_dayBefore < 0)
106 errx(1, "number of days must be positive");
103 break;
104
105 case 'D': /* debug output of sun and moon info */
106 DEBUG = optarg;
107 break;
108
109 case 'd': /* debug output of current date */
110 debug = 1;

--- 118 unchanged lines hidden ---
107 break;
108
109 case 'D': /* debug output of sun and moon info */
110 DEBUG = optarg;
111 break;
112
113 case 'd': /* debug output of current date */
114 debug = 1;

--- 118 unchanged lines hidden ---