Project

General

Profile

« Previous | Next » 

Revision 90cc3b8e

Added by LĂ©lio Brun over 3 years ago

some rewriting in C backend pretty-printer

View differences:

src/backends/C/c_backend.ml
9 9
(*                                                                  *)
10 10
(********************************************************************)
11 11

  
12
open Format
12
open Utils.Format
13 13
open C_backend_mauve
14 14
(******************************************************************************)
15 15
(*                        Translation function                                *)
......
26 26
  )
27 27
*)
28 28

  
29
let with_out_file file f =
30
  let oc = open_out file in
31
  let fmt = formatter_of_out_channel oc in
32
  f fmt;
33
  close_out oc
34

  
35 29
let c_or_cpp f =
36 30
  if !Options.cpp then f ^ ".cpp" else f ^ ".c" (* Could be changed *)
37 31

  

Also available in: Unified diff