cd.c (b97fa2ef508bb1cc99621edb8b6d03845b55b8bd) | cd.c (afb033d5c4f01a464f57fe8e68d741246d9df492) |
---|---|
1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * | 1/*- 2 * Copyright (c) 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Kenneth Almquist. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 19 unchanged lines hidden (view full) --- 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * |
36 * $Id$ | 36 * $Id: cd.c,v 1.14 1997/02/22 13:58:22 peter Exp $ |
37 */ 38 39#ifndef lint 40static char const sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95"; 41#endif /* not lint */ 42 43#include <sys/types.h> 44#include <sys/stat.h> --- 105 unchanged lines hidden (view full) --- 150 151/* 152 * Get the next component of the path name pointed to by cdcomppath. 153 * This routine overwrites the string pointed to by cdcomppath. 154 */ 155STATIC char * 156getcomponent() 157{ | 37 */ 38 39#ifndef lint 40static char const sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95"; 41#endif /* not lint */ 42 43#include <sys/types.h> 44#include <sys/stat.h> --- 105 unchanged lines hidden (view full) --- 150 151/* 152 * Get the next component of the path name pointed to by cdcomppath. 153 * This routine overwrites the string pointed to by cdcomppath. 154 */ 155STATIC char * 156getcomponent() 157{ |
158 register char *p; | 158 char *p; |
159 char *start; 160 161 if ((p = cdcomppath) == NULL) 162 return NULL; 163 start = cdcomppath; 164 while (*p != '/' && *p != '\0') 165 p++; 166 if (*p == '\0') { --- 71 unchanged lines hidden --- | 159 char *start; 160 161 if ((p = cdcomppath) == NULL) 162 return NULL; 163 start = cdcomppath; 164 while (*p != '/' && *p != '\0') 165 p++; 166 if (*p == '\0') { --- 71 unchanged lines hidden --- |