locate.code.c (18905) | locate.code.c (19213) |
---|---|
1/* 2 * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 3 * Copyright (c) 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * James A. Woods. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * | 1/* 2 * Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin. 3 * Copyright (c) 1989, 1993 4 * The Regents of the University of California. All rights reserved. 5 * 6 * This code is derived from software contributed to Berkeley by 7 * James A. Woods. 8 * --- 20 unchanged lines hidden (view full) --- 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35 * SUCH DAMAGE. 36 * |
37 * $Id: locate.code.c,v 1.5 1996/08/31 14:51:18 wosch Exp $ | 37 * $Id: locate.code.c,v 1.6 1996/10/13 01:44:28 wosch Exp $ |
38 */ 39 40#ifndef lint 41static char copyright[] = 42"@(#) Copyright (c) 1989, 1993\n\ 43 The Regents of the University of California. All rights reserved.\n"; 44#endif /* not lint */ 45 --- 125 unchanged lines hidden (view full) --- 171 while (fgets(path, sizeof(buf2), stdin) != NULL) { 172 173 /* skip empty lines */ 174 if (*path == '\n') 175 continue; 176 177 /* remove newline */ 178 for (cp = path; *cp != '\0'; cp++) { | 38 */ 39 40#ifndef lint 41static char copyright[] = 42"@(#) Copyright (c) 1989, 1993\n\ 43 The Regents of the University of California. All rights reserved.\n"; 44#endif /* not lint */ 45 --- 125 unchanged lines hidden (view full) --- 171 while (fgets(path, sizeof(buf2), stdin) != NULL) { 172 173 /* skip empty lines */ 174 if (*path == '\n') 175 continue; 176 177 /* remove newline */ 178 for (cp = path; *cp != '\0'; cp++) { |
179#ifndef LOCATE_CHAR30 180 /* old locate implementations core'd for char 30 */ 181 if (*cp == SWITCH) 182 *cp = '?'; 183 else 184#endif /* !LOCATE_CHAR30 */ 185 |
|
179 /* chop newline */ 180 if (*cp == '\n') 181 *cp = '\0'; 182 } 183 184 /* Skip longest common prefix. */ 185 for (cp = path; *cp == *oldpath; cp++, oldpath++) 186 if (*cp == '\0') --- 87 unchanged lines hidden --- | 186 /* chop newline */ 187 if (*cp == '\n') 188 *cp = '\0'; 189 } 190 191 /* Skip longest common prefix. */ 192 for (cp = path; *cp == *oldpath; cp++, oldpath++) 193 if (*cp == '\0') --- 87 unchanged lines hidden --- |