|
|
@ -143,6 +143,7 @@ type cdecl =
|
|
|
|
(** C function declaration. *)
|
|
|
|
(** C function declaration. *)
|
|
|
|
| Cdecl_constant of string * cty * cexpr
|
|
|
|
| Cdecl_constant of string * cty * cexpr
|
|
|
|
(** C constant declaration (alias, name)*)
|
|
|
|
(** C constant declaration (alias, name)*)
|
|
|
|
|
|
|
|
| Cdecl_extern of string * cty
|
|
|
|
|
|
|
|
|
|
|
|
(** C function definitions *)
|
|
|
|
(** C function definitions *)
|
|
|
|
type cfundef = {
|
|
|
|
type cfundef = {
|
|
|
@ -353,6 +354,9 @@ let pp_cdecl fmt cdecl = match cdecl with
|
|
|
|
| Cdecl_constant (n, cty, ce) ->
|
|
|
|
| Cdecl_constant (n, cty, ce) ->
|
|
|
|
fprintf fmt "@[<v>static const %a = %a;@ @]@\n"
|
|
|
|
fprintf fmt "@[<v>static const %a = %a;@ @]@\n"
|
|
|
|
pp_vardecl (n, cty) pp_cconst_expr ce
|
|
|
|
pp_vardecl (n, cty) pp_cconst_expr ce
|
|
|
|
|
|
|
|
| Cdecl_extern (n, cty) ->
|
|
|
|
|
|
|
|
fprintf fmt "@[<v>extern %a;@ @]@\n"
|
|
|
|
|
|
|
|
pp_vardecl (n, cty)
|
|
|
|
|
|
|
|
|
|
|
|
let pp_cdef fmt cdef = match cdef with
|
|
|
|
let pp_cdef fmt cdef = match cdef with
|
|
|
|
| Cfundef cfd ->
|
|
|
|
| Cfundef cfd ->
|
|
|
|