X-Git-Url: http://git.hcoop.net/bpt/coccinelle.git/blobdiff_plain/6756e19d8b45188ff250016a494aafe46dec86c5..f537ebc4bbd27866c9ac3e1198b6756ebab7f2ba:/parsing_c/unparse_c.ml diff --git a/parsing_c/unparse_c.ml b/parsing_c/unparse_c.ml index 8472aba..5540f35 100644 --- a/parsing_c/unparse_c.ml +++ b/parsing_c/unparse_c.ml @@ -837,12 +837,12 @@ let add_newlines toks tabbing_unit = let (stack,space_cell) = info in let rest = match hint with - None -> loop info (count + (String.length s)) xs + None -> loop info (string_length s count) xs | Some Unparse_cocci.StartBox -> - let count = count + (String.length s) in + let count = string_length s count in loop (count::stack,space_cell) count xs | Some Unparse_cocci.EndBox -> - let count = count + (String.length s) in + let count = string_length s count in (match stack with [x] -> (match check_for_newline count x space_cell with @@ -850,7 +850,7 @@ let add_newlines toks tabbing_unit = | None -> loop ([],None) count xs) | _ -> loop (List.tl stack,space_cell) count xs) | Some (Unparse_cocci.SpaceOrNewline sp) -> - let count = count + (String.length s) + 1 (*space*) in + let count = string_length s (count + 1 (*space*)) in (match stack with [x] -> (match check_for_newline count x space_cell with