[m-rev.] for review: quote windows paths with spaces

Ralph Becket rafe at cs.mu.OZ.AU
Mon Nov 21 10:29:48 AEDT 2005


Ian MacLarty, Sunday, 20 November 2005:
> Index: compiler/options.m
> ===================================================================
> RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
> retrieving revision 1.477
> diff -u -r1.477 options.m
> --- compiler/options.m	17 Nov 2005 15:57:26 -0000	1.477
> +++ compiler/options.m	19 Nov 2005 09:32:52 -0000
> @@ -2630,13 +2630,10 @@
>      % XXX Instead of using dir__use_windows_paths, this should really
>      % test whether we are using a Unix or Windows shell.
>      ( dir__use_windows_paths ->
> -        ArgList = quote_arg_windows(string__to_char_list(Arg0)),
> -        (
> -            ArgList = [],
> -            Arg = """"""
> +        ( ( string_contains_whitespace(Arg0) ; Arg0 = "" ) ->
> +            Arg = """" ++ Arg0 ++ """"
>          ;
> -            ArgList = [_ | _],
> -            Arg = string__from_char_list(ArgList)
> +            Arg = Arg0
>          )
>      ;
>          ArgList = quote_arg_unix(string__to_char_list(Arg0)),

I really hate the stuttered-quotes Prologism; can you change that to

> +            Arg = "\"" ++ Arg0 ++ "\""

-- Ralph
--------------------------------------------------------------------------
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