Make pwd work even if the resulting name is so long that getcwd fails.
authorJim Meyering <jim@meyering.net>
Mon, 19 Apr 2004 15:12:31 +0000 (15:12 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 19 Apr 2004 15:12:31 +0000 (15:12 +0000)
commitaf719b0318b8a3b6c0f736940016bb4c63a3504b
tree10fb24c144292259a5d90c262eb14bdd3ff4eed3
parente17c7db93bdc0d9c347c41f9f08c3e0e9a717803
Make pwd work even if the resulting name is so long that getcwd fails.

(path_free, path_init, path_prepend): New functions.
(nth_parent, find_dir_entry, robust_getcwd): New functions.
(main): First try getcwd, then, upon failure, robust_getcwd.
src/pwd.c