From 1c493487405bddc527f558f8c45b60febb7faf90 Mon Sep 17 00:00:00 2001 From: malc Date: Sun, 16 Sep 2007 22:35:26 +0400 Subject: [PATCH] 0.99 --- dep.ml | 4 ++-- dep7.ml | 4 ++-- driver.ml | 2 +- utils.ml | 13 +++++++++++++ 4 files changed, 18 insertions(+), 5 deletions(-) diff --git a/dep.ml b/dep.ml index 7f474dc..7740cf9 100644 --- a/dep.ml +++ b/dep.ml @@ -36,7 +36,7 @@ let invoke target argv arg_start = if code = 0 then begin - print_string target; + Utils.output_quoted_path stdout target; print_string ": "; Utils.StringSet.iter begin @@ -51,7 +51,7 @@ let invoke target argv arg_start = if not (Utils.reject_path unix_path rejrel) then begin - print_string unix_path; + Utils.output_quoted_path stdout unix_path; print_char ' ' end end ifiles; diff --git a/dep7.ml b/dep7.ml index a8acd11..e3edf97 100644 --- a/dep7.ml +++ b/dep7.ml @@ -62,12 +62,12 @@ let invoke_aux deponly oc target argv arg_start = if code = 0 then begin - output_string oc target; + Utils.output_quoted_path oc target; output_string oc ": "; Utils.StringSet.iter begin fun s -> - output_string oc s; + Utils.output_quoted_path oc s; output_char oc ' ' end ifiles; output_string oc "\n"; diff --git a/driver.ml b/driver.ml index ab1722a..956d936 100644 --- a/driver.ml +++ b/driver.ml @@ -63,7 +63,7 @@ let help () = exit 0 let show_usage () = - print_endline "Incredible Mega Thing by extremely cool hacker, Version 0.98"; + print_endline "Incredible Mega Thing by extremely cool hacker, Version 0.99"; print_newline (); print_string "usage: "; print_string (Filename.basename Sys.executable_name); diff --git a/utils.ml b/utils.ml index e3aba6e..d2b676b 100644 --- a/utils.ml +++ b/utils.ml @@ -156,6 +156,19 @@ let build_reject_list () = in collect [] 0 +let output_quoted_path oc s = + if String.contains s ' ' + then + begin + output_char oc '"'; + output_string oc s; + output_char oc '"'; + end + else + begin + output_string oc s; + end + let reject_path s = function | [] -> false | rejrel -> -- 2.11.4.GIT