truncate.c (63774) | truncate.c (63790) |
---|---|
1/* | 1/* |
2 * Copyright (c) 2000 FreeBSD, Inc. All rights reserved. | 2 * Copyright (c) 2000 Sheldon Hearn <sheldonh@FreeBSD.org>. 3 * All rights reserved. |
3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the --- 6 unchanged lines hidden (view full) --- 17 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 18 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 19 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 20 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 23 * SUCH DAMAGE. 24 * | 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 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the --- 6 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 * |
25 * $FreeBSD: head/usr.bin/truncate/truncate.c 63774 2000-07-23 13:24:01Z sheldonh $ | |
26 */ 27 | 26 */ 27 |
28#ifndef lint 29static const char rcsid[] = 30 "$FreeBSD: head/usr.bin/truncate/truncate.c 63790 2000-07-24 08:56:42Z sheldonh $"; 31#endif 32 |
|
28#include <sys/stat.h> | 33#include <sys/stat.h> |
29#include <sys/types.h> | |
30 31#include <ctype.h> 32#include <err.h> 33#include <errno.h> 34#include <fcntl.h> | 34 35#include <ctype.h> 36#include <err.h> 37#include <errno.h> 38#include <fcntl.h> |
35#include <limits.h> | |
36#include <stdio.h> 37#include <stdlib.h> 38#include <unistd.h> 39 40static off_t parselength __P((char *, off_t *)); 41static void usage __P((void)); 42 43static int no_create; --- 161 unchanged lines hidden --- | 39#include <stdio.h> 40#include <stdlib.h> 41#include <unistd.h> 42 43static off_t parselength __P((char *, off_t *)); 44static void usage __P((void)); 45 46static int no_create; --- 161 unchanged lines hidden --- |