[MLton-commit] r7340

Wesley Terpstra wesley at mlton.org
Sun Nov 1 16:51:09 PST 2009


Watch out for confused path formatting.


----------------------------------------------------------------------

U   mlton/trunk/package/mingw/dirs2wix.sml
U   mlton/trunk/package/mingw/files2cmp.sml
U   mlton/trunk/package/mingw/files2wix.sml

----------------------------------------------------------------------

Modified: mlton/trunk/package/mingw/dirs2wix.sml
===================================================================
--- mlton/trunk/package/mingw/dirs2wix.sml	2009-11-02 00:36:47 UTC (rev 7339)
+++ mlton/trunk/package/mingw/dirs2wix.sml	2009-11-02 00:51:08 UTC (rev 7340)
@@ -8,7 +8,8 @@
    \  </Fragment>\n\
    \</Wix>\n"
 
-fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord c)
+fun slashes c = if c = #"\\" then #"/" else c
+fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord (slashes c))
 fun alnum c = if Char.isAlphaNum c orelse c = #"." then c else #"_"
 fun trim s = if String.size s > 40 then String.substring (s, 0, 40) else s
 fun escape s = Word64.toString (foldl hash 0w0 (explode s)) ^ "." ^ 

Modified: mlton/trunk/package/mingw/files2cmp.sml
===================================================================
--- mlton/trunk/package/mingw/files2cmp.sml	2009-11-02 00:36:47 UTC (rev 7339)
+++ mlton/trunk/package/mingw/files2cmp.sml	2009-11-02 00:51:08 UTC (rev 7340)
@@ -14,7 +14,8 @@
    \  </Fragment>\n\
    \</Wix>\n"
 
-fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord c)
+fun slashes c = if c = #"\\" then #"/" else c
+fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord (slashes c))
 fun alnum c = if Char.isAlphaNum c orelse c = #"." then c else #"_"
 fun trim s = if String.size s > 40 then String.substring (s, 0, 40) else s
 fun escape s = Word64.toString (foldl hash 0w0 (explode s)) ^ "." ^ 

Modified: mlton/trunk/package/mingw/files2wix.sml
===================================================================
--- mlton/trunk/package/mingw/files2wix.sml	2009-11-02 00:36:47 UTC (rev 7339)
+++ mlton/trunk/package/mingw/files2wix.sml	2009-11-02 00:51:08 UTC (rev 7340)
@@ -6,7 +6,8 @@
    \  </Fragment>\n\
    \</Wix>\n"
 
-fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord c)
+fun slashes c = if c = #"\\" then #"/" else c
+fun hash (c, w) = w * 0w5746711073709751657 + Word64.fromInt (Char.ord (slashes c))
 fun alnum c = if Char.isAlphaNum c orelse c = #"." then c else #"_"
 fun trim s = if String.size s > 40 then String.substring (s, 0, 40) else s
 fun escape s = Word64.toString (foldl hash 0w0 (explode s)) ^ "." ^ 




More information about the MLton-commit mailing list