Deleted Added
full compact
touch.c (102084) touch.c (102412)
1/*
2 * Copyright (c) 1993
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

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

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
34#include <sys/cdefs.h>
35
1/*
2 * Copyright (c) 1993
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

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

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
34#include <sys/cdefs.h>
35
36__FBSDID("$FreeBSD: head/usr.bin/touch/touch.c 102084 2002-08-19 03:07:56Z jmallett $");
36__FBSDID("$FreeBSD: head/usr.bin/touch/touch.c 102412 2002-08-25 13:23:09Z charnier $");
37
38#ifndef lint
39static const char copyright[] =
40"@(#) Copyright (c) 1993\n\
41 The Regents of the University of California. All rights reserved.\n";
42#endif
43
44#ifndef lint

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

220 }
221
222 yearset = 0;
223 switch(strlen(arg)) {
224 case 12: /* CCYYMMDDhhmm */
225 t->tm_year = ATOI2(arg);
226 t->tm_year *= 100;
227 yearset = 1;
37
38#ifndef lint
39static const char copyright[] =
40"@(#) Copyright (c) 1993\n\
41 The Regents of the University of California. All rights reserved.\n";
42#endif
43
44#ifndef lint

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

220 }
221
222 yearset = 0;
223 switch(strlen(arg)) {
224 case 12: /* CCYYMMDDhhmm */
225 t->tm_year = ATOI2(arg);
226 t->tm_year *= 100;
227 yearset = 1;
228 /* FALLTHOUGH */
228 /* FALLTHROUGH */
229 case 10: /* YYMMDDhhmm */
230 if (yearset) {
231 yearset = ATOI2(arg);
232 t->tm_year += yearset;
233 } else {
234 yearset = ATOI2(arg);
235 if (yearset < 69)
236 t->tm_year = yearset + 2000;

--- 129 unchanged lines hidden ---
229 case 10: /* YYMMDDhhmm */
230 if (yearset) {
231 yearset = ATOI2(arg);
232 t->tm_year += yearset;
233 } else {
234 yearset = ATOI2(arg);
235 if (yearset < 69)
236 t->tm_year = yearset + 2000;

--- 129 unchanged lines hidden ---