Deleted Added
full compact
day.c (26839) day.c (29574)
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

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
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

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

25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * $Id$
33 * $Id: day.c,v 1.9 1997/06/23 06:52:12 charnier Exp $
34 */
35
36
37#include <ctype.h>
38#include <locale.h>
39#include <stdio.h>
40#include <string.h>
41#include <sys/types.h>

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

181 tm.tm_hour = 0;
182 tm.tm_wday = 0;
183 tm.tm_mday = tp->tm_mday;
184 tm.tm_mon = tp->tm_mon;
185 tm.tm_year = tp->tm_year;
186
187
188 /* day */
34 */
35
36
37#include <ctype.h>
38#include <locale.h>
39#include <stdio.h>
40#include <string.h>
41#include <sys/types.h>

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

181 tm.tm_hour = 0;
182 tm.tm_wday = 0;
183 tm.tm_mday = tp->tm_mday;
184 tm.tm_mon = tp->tm_mon;
185 tm.tm_year = tp->tm_year;
186
187
188 /* day */
189 *(date+2) = NULL;
189 *(date+2) = '\0';
190 tm.tm_mday = atoi(date);
191
192 /* month */
193 if (len >= 4) {
190 tm.tm_mday = atoi(date);
191
192 /* month */
193 if (len >= 4) {
194 *(date+5) = NULL;
194 *(date+5) = '\0';
195 tm.tm_mon = atoi(date+3) - 1;
196 }
197
198 /* Year */
199 if (len >= 7) {
200 tm.tm_year = atoi(date+6);
201
202 /* tm_year up 1900 ... */

--- 285 unchanged lines hidden ---
195 tm.tm_mon = atoi(date+3) - 1;
196 }
197
198 /* Year */
199 if (len >= 7) {
200 tm.tm_year = atoi(date+6);
201
202 /* tm_year up 1900 ... */

--- 285 unchanged lines hidden ---