Project

General

Profile

Revision 01d48bb0 src/backends/C/c_backend.ml

View differences:

src/backends/C/c_backend.ml
26 26
*)
27 27

  
28 28
let gen_files funs basename prog machines dependencies header_file source_lib_file source_main_file makefile_file machines =
29

  
29 30
  let header_out = open_out header_file in
30 31
  let header_fmt = formatter_of_out_channel header_out in
31 32
  let source_lib_out = open_out source_lib_file in
32 33
  let source_lib_fmt = formatter_of_out_channel source_lib_out in
33
  
34

  
34 35
  let print_header, print_lib_c, print_main_c, print_makefile = funs in
35 36
  (* Generating H file *)
36 37
  print_header header_fmt basename prog machines dependencies;
37
  
38
 
38 39
  (* Generating Lib C file *)
39 40
  print_lib_c source_lib_fmt basename prog machines dependencies;
40

  
41
 
41 42
  close_out header_out;
42 43
  close_out source_lib_out;
43 44

  
......
64 65
    end
65 66
  )
66 67

  
67
let translate_to_c header source_lib source_main makefile basename prog machines dependencies  =
68

  
68
let translate_to_c header source_lib source_main makefile basename prog machines dependencies =
69 69
  match !Options.spec with
70 70
  | "no" -> begin
71 71
    let module HeaderMod = C_backend_header.EmptyMod in
......
77 77
    let module Source = C_backend_src.Main (SourceMod) in
78 78
    let module SourceMain = C_backend_main.Main (SourceMainMod) in
79 79
    let module Makefile = C_backend_makefile.Main (MakefileMod) in
80
        
80

  
81 81
    let funs = 
82 82
      Header.print_alloc_header, 
83 83
      Source.print_lib_c, 
......
100 100
    let module Source = C_backend_src.Main (SourceMod) in
101 101
    let module SourceMain = C_backend_main.Main (SourceMainMod) in
102 102
    let module Makefile = C_backend_makefile.Main (MakefileMod) in
103
        
103

  
104 104
    let funs = 
105 105
      Header.print_alloc_header, 
106 106
      Source.print_lib_c,

Also available in: Unified diff