comparison src/dirfns.cc @ 1804:793ce4135de7

[project @ 1996-01-29 06:45:38 by jwe]
author jwe
date Mon, 29 Jan 1996 06:45:38 +0000
parents 3a16afafc2ee
children 0c0d14cc90cd
comparison
equal deleted inserted replaced
1803:3a16afafc2ee 1804:793ce4135de7
26 The functions listed below were adapted from a similar functions 26 The functions listed below were adapted from a similar functions
27 from GNU Bash, the Bourne Again SHell, copyright (C) 1987, 1989, 1991 27 from GNU Bash, the Bourne Again SHell, copyright (C) 1987, 1989, 1991
28 Free Software Foundation, Inc. 28 Free Software Foundation, Inc.
29 29
30 polite_directory_format absolute_pathname 30 polite_directory_format absolute_pathname
31 absolute_program base_pathname 31 base_pathname
32 make_absolute pathname_backup 32 make_absolute pathname_backup
33 change_to_directory get_working_directory 33 change_to_directory get_working_directory
34 34
35 */ 35 */
36 36
145 } 145 }
146 146
147 return 0; 147 return 0;
148 } 148 }
149 149
150 // Return 1 if STRING is an absolute program name; it is absolute if
151 // it contains any slashes. This is used to decide whether or not to
152 // look up through $PATH.
153
154 static int
155 absolute_program (const string& s)
156 {
157 return (s.find ('/') != NPOS);
158 }
159
160 // Return the `basename' of the pathname in STRING (the stuff after 150 // Return the `basename' of the pathname in STRING (the stuff after
161 // the last '/'). If STRING is not a full pathname, simply return it. 151 // the last '/'). If STRING is not a full pathname, simply return it.
162 152
163 string 153 string
164 base_pathname (const string& s) 154 base_pathname (const string& s)