comparison src/compiler.sml @ 2067:88841212f0ba

In computing command lines, put filenames inside of quotes, to support spaces and other funky characters nicely
author Adam Chlipala <adam@chlipala.net>
date Thu, 04 Sep 2014 08:40:14 -0400
parents a9159911c3ba
children 6b7749da1ddc ef766ef6e242
comparison
equal deleted inserted replaced
2066:7214a14a6fe2 2067:88841212f0ba
1 (* Copyright (c) 2008-2012, Adam Chlipala 1 (* Copyright (c) 2008-2012, 2014, Adam Chlipala
2 * All rights reserved. 2 * All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met: 5 * modification, are permitted provided that the following conditions are met:
6 * 6 *
1481 print = CjrPrint.p_sql CjrEnv.empty 1481 print = CjrPrint.p_sql CjrEnv.empty
1482 } 1482 }
1483 1483
1484 val toSqlify = transform sqlify "sqlify" o toMono_opt2 1484 val toSqlify = transform sqlify "sqlify" o toMono_opt2
1485 1485
1486 val escapeFilename = String.translate (fn #" " => "\\ " | #"\"" => "\\\"" | #"'" => "\\'" | ch => str ch) 1486 fun escapeFilename s =
1487 "\""
1488 ^ String.translate (fn #"\"" => "\\\"" | #"\\" => "\\\\" | ch => str ch) s
1489 ^ "\""
1487 1490
1488 val beforeC = ref (fn () => ()) 1491 val beforeC = ref (fn () => ())
1489 1492
1490 structure StringSet = BinarySetFn(struct 1493 structure StringSet = BinarySetFn(struct
1491 type ord_key = string 1494 type ord_key = string