Deleted Added
full compact
cd.c (199631) cd.c (200956)
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

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
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

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

31 */
32
33#ifndef lint
34#if 0
35static char sccsid[] = "@(#)cd.c 8.2 (Berkeley) 5/4/95";
36#endif
37#endif /* not lint */
38#include <sys/cdefs.h>
39__FBSDID("$FreeBSD: head/bin/sh/cd.c 199631 2009-11-21 14:53:22Z stefanf $");
39__FBSDID("$FreeBSD: head/bin/sh/cd.c 200956 2009-12-24 18:41:14Z jilles $");
40
41#include <sys/types.h>
42#include <sys/stat.h>
43#include <stdlib.h>
44#include <string.h>
45#include <unistd.h>
46#include <errno.h>
47#include <limits.h>

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

75STATIC char *curdir = NULL; /* current working directory */
76STATIC char *prevdir; /* previous working directory */
77STATIC char *cdcomppath;
78
79int
80cdcmd(int argc, char **argv)
81{
82 char *dest;
40
41#include <sys/types.h>
42#include <sys/stat.h>
43#include <stdlib.h>
44#include <string.h>
45#include <unistd.h>
46#include <errno.h>
47#include <limits.h>

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

75STATIC char *curdir = NULL; /* current working directory */
76STATIC char *prevdir; /* previous working directory */
77STATIC char *cdcomppath;
78
79int
80cdcmd(int argc, char **argv)
81{
82 char *dest;
83 char *path;
83 const char *path;
84 char *p;
85 struct stat statb;
86 int ch, phys, print = 0;
87
88 optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
89 phys = Pflag;
90 while ((ch = getopt(argc, argv, "LP")) != -1) {
91 switch (ch) {

--- 307 unchanged lines hidden ---
84 char *p;
85 struct stat statb;
86 int ch, phys, print = 0;
87
88 optreset = 1; optind = 1; opterr = 0; /* initialize getopt */
89 phys = Pflag;
90 while ((ch = getopt(argc, argv, "LP")) != -1) {
91 switch (ch) {

--- 307 unchanged lines hidden ---