Revision efcc8d7f
Added by Lélio Brun about 2 years ago
src/backends/C/c_backend_header.ml | ||
---|---|---|
23 | 23 |
|
24 | 24 |
module type MODIFIERS_HDR = sig |
25 | 25 |
val print_machine_decl_prefix: Format.formatter -> machine_t -> unit |
26 |
val pp_import_standard_spec: formatter -> unit -> unit |
|
26 | 27 |
end |
27 | 28 |
|
28 | 29 |
module EmptyMod = struct |
29 | 30 |
let print_machine_decl_prefix = fun _ _ -> () |
31 |
let pp_import_standard_spec _ _ = () |
|
30 | 32 |
end |
31 | 33 |
|
32 | 34 |
module Main = functor (Mod: MODIFIERS_HDR) -> struct |
... | ... | |
36 | 38 |
fprintf fmt |
37 | 39 |
"#include <stdint.h>@,\ |
38 | 40 |
%a\ |
39 |
#include \"%s/arrow.h%s\"" |
|
41 |
#include \"%s/arrow.h%s\"\ |
|
42 |
%a" |
|
40 | 43 |
(if !Options.mpfr then |
41 | 44 |
pp_print_endcut "#include <mpfr.h>" |
42 | 45 |
else pp_print_nothing) () |
43 | 46 |
(Arrow.arrow_top_decl ()).top_decl_owner |
44 | 47 |
(if !Options.cpp then "pp" else "") |
48 |
Mod.pp_import_standard_spec () |
|
45 | 49 |
|
46 | 50 |
let rec print_static_val pp_var fmt v = |
47 | 51 |
match v.value_desc with |
... | ... | |
324 | 328 |
%a\ |
325 | 329 |
%a\ |
326 | 330 |
%a\ |
327 |
%a\ |
|
328 | 331 |
#endif\ |
329 | 332 |
@]" |
330 | 333 |
|
... | ... | |
358 | 361 |
print_machine_struct |
359 | 362 |
~pp_epilogue:pp_print_cutcut) machines |
360 | 363 |
|
361 |
(* Print specification *) |
|
362 |
C_backend_spec.pp_acsl_preamble spec |
|
363 |
|
|
364 | 364 |
(* Print the prototypes of all machines *) |
365 | 365 |
(pp_print_list |
366 | 366 |
~pp_open_box:pp_open_vbox0 |
Also available in: Unified diff
move arrow spec in its own header