[m-rev.] for review: library changes for `mmc --make' on Windows

Simon Taylor stayl at cs.mu.OZ.AU
Wed Jun 25 15:53:54 AEST 2003


On 23-Jun-2003, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 	% dir__dirname(PathName) = DirName
> 	% Extract the directory part of the given filename.
> 	% Fails for root directories.
> 	% Returns "." for filenames not containing directory information.
> 	% Trailing slashes are removed from PathName before splitting.
> :- func dir__dirname(string) = string is semidet.

On second thoughts, `dir__dirname("/") = "/"' does make sense -- the parent
directory of the root directory is itself.

 	% dir__dirname(PathName) = DirName
 	% Extract the directory part of the given filename.
 	% Returns "." for filenames not containing directory information.
	% For Windows paths such as "X:" (the current directory on drive `X'),
	% returns PathName.
 	% Trailing slashes are removed from PathName before splitting.
:- func dir__dirname(string) = string.

dir__split_name will still fail in this case.

Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list