# HG changeset patch # User Adam Chlipala # Date 1273942354 14400 # Node ID d7d5b167f267912507a2175f945f26dc5e5651ea # Parent 068f55543d033bd61ee07a53bc40caed5fd7314b Avoid reimplementing conversion to C strings diff -r 068f55543d03 -r d7d5b167f267 src/prim.sml --- a/src/prim.sml Thu May 06 16:05:14 2010 -0400 +++ b/src/prim.sml Sat May 15 12:52:34 2010 -0400 @@ -74,20 +74,7 @@ else str ch ^ pad (n-1, ch, s) -val gccify = String.translate (fn ch => - case ch of - #"\"" => "\\\"" - | #"\\" => "\\\\" - | #"'" => "\\'" - | #"\n" => "\\n" - | #"\r" => "\\r" - | #"\t" => "\\t" - | #" " => " " - | _ => - if Char.isPrint ch then - str ch - else - "\\" ^ pad (3, #"0", Int.fmt StringCvt.OCT (ord ch))) +val gccify = String.toCString fun p_t_GCC t = case t of