[m-rev.] for review: fix command line quoting

Simon Taylor stayl at cs.mu.OZ.AU
Wed Aug 7 17:03:19 AEST 2002


On 07-Aug-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> The code now double quotes arguments containing non-alphanumeric
> characters, and puts backslashes before `/', `$', '`' and '"'.

That worked, but was a bit too eager.

Simon.

--- options.m	2002/08/07 06:52:27	1.1
+++ options.m	2002/08/07 06:58:22
@@ -2115,7 +2115,13 @@
 		Arg = """"""
 	;
 		list__member(Char, ArgList),
-		\+ char__is_alnum_or_underscore(Char)
+		\+ ( char__is_alnum_or_underscore(Char)
+		; Char = ('-')
+		; Char = ('/')
+		; Char = ('.')
+		; Char = (',')
+		; Char = (':')
+		)
 	->
 		Arg = """" ++ string__from_char_list(ArgList) ++ """"
 	;
--------------------------------------------------------------------------
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