Commit 5aa5231d authored by Erwan Jahier's avatar Erwan Jahier
Browse files

lurette perso.3 Wed, 31 Oct 2001 16:46:14 +0100 by jahier

Parent-Version:      perso.2
Version-Log:

camlidl marche!!!
J'arrive a executer edge.c depuis caml.

Project-Description: Lurette
parent eb3e0007
......@@ -13,7 +13,7 @@
(Mercury/Mmakefile 102 1002789994 1_Mmakefile 1.3)
(doc/archi.fig 3693 1003928781 20_archi.fig 1.1)
(Makefile 212 1004539865 18_Makefile 1.2)
(interface/generate_lurette_interface.ml 10950 1004539865 24_generate_l 1.2)
(interface/generate_lurette_interface.ml 10959 1004543174 24_generate_l 1.3)
(interface/Makefile 127 1004519854 25_Makefile 1.1)
(OcamlMakefile 15015 1004519854 17_OcamlMakef 1.2)
(interface/TAGS 608 1004519854 26_TAGS 1.1)
......@@ -26,4 +26,4 @@
(graph.ml 2397 1003932490 14_graph.ml 1.2)
(lurette.mli 514 1003928781 11_lurette.ml 1.1)
(TAGS 4544 1004539865 21_TAGS 1.3)
(lurette.ml 477 1004539865 12_lurette.ml 1.2)
(lurette.ml 780 1004543174 12_lurette.ml 1.3)
......@@ -188,12 +188,12 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
(*
** variable declarations
*)
List.iter (fun (t, v) -> put (t ^ "\t" ^ v ^ ";\n")) vi ;
List.iter (fun (t, v) -> put (t ^ "\t" ^ v ^ ";\n")) vo ;
List.iter (fun (t, v) -> put ("static " ^ t ^ "\t" ^ v ^ ";\n")) vi ;
List.iter (fun (t, v) -> put ("static " ^ t ^ "\t" ^ v ^ ";\n")) vo ;
put "\n" ;
put ("struct " ^ mod_name ^ "_ctx* prg; \n") ;
put ("struct " ^ mod_name ^ "_ctx* prg_copy; \n") ;
put ("static struct " ^ mod_name ^ "_ctx *prg; \n") ;
put ("static struct " ^ mod_name ^ "_ctx *prg_copy; \n") ;
put "\n" ;
(*
......@@ -201,7 +201,7 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
*)
put "// Program state initialisation \n" ;
put ("void " ^ str ^ "_init() {\n" ^
" struct " ^ mod_name ^ "_ctx* prg = " ^ mod_name ^ "_new_ctx(NULL); }\n") ;
" prg = " ^ mod_name ^ "_new_ctx(NULL); }\n") ;
put "\n" ;
(*
......@@ -210,7 +210,7 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
put "// Output procedures (get the output values) \n" ;
List.iter
(fun (t, v) ->
put ("void " ^ mod_name ^ "_O_" ^ v ^ "(void* client_data, " ^ t ^ " " ^ v ^ "_toto) {\n" ^
put ("void " ^ mod_name ^ "_O_" ^ v ^ "(void *client_data, " ^ t ^ " " ^ v ^ "_toto) {\n" ^
" " ^ v ^ " = " ^ v ^ "_toto ; }\n\n")
)
vo ;
......@@ -223,15 +223,15 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
put ("void " ^ str ^ "_step(") ;
List.iter (fun (t, v) -> put (t ^ " " ^ v ^ ", ")) vi ;
List.iter (fun (t, v) -> put (t ^ "* " ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ "* " ^ lo_v ^ "_ptr) {\n");
List.iter (fun (t, v) -> put (t ^ " *" ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ " *" ^ lo_v ^ "_ptr) {\n");
List.iter
(fun (t, v) -> put (" " ^ mod_name ^ "_I_" ^ v ^ "(prg, " ^ v ^ ");\n"))
vi ;
put (" " ^ mod_name ^ "_step(prg);\n") ;
List.iter (fun (t, v) -> put (" " ^ v ^ "_ptr = &" ^ v ^ ";\n")) vo ;
List.iter (fun (t, v) -> put (" *" ^ v ^ "_ptr = " ^ v ^ ";\n")) vo ;
put "}\n" ;
(*
......@@ -242,8 +242,8 @@ let (generate_stub_c : module_name -> string -> input_vars -> output_vars -> uni
put ("void " ^ str ^ "_try(") ;
List.iter (fun (t, v) -> put (t ^ " " ^ v ^ ", ")) vi ;
List.iter (fun (t, v) -> put (t ^ "* " ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ "* " ^ lo_v ^ "_ptr) {\n");
List.iter (fun (t, v) -> put (t ^ " *" ^ v ^ "_ptr, ")) vo_pre ;
put (lo_t ^ " *" ^ lo_v ^ "_ptr) {\n");
put " prg_copy = prg ;\n" ;
put (" " ^ str ^ "_step(") ;
......@@ -287,8 +287,8 @@ let (generate_idl : module_name -> string -> typedef_alias -> input_vars -> outp
put ("void " ^ str ^ "_step(\n") ;
List.iter (fun (t, v) -> put (" [in] " ^ (List.assoc t type_alias) ^ " \t" ^ v ^ ", \n")) vi ;
List.iter (fun (t, v) -> put (" [out] " ^ (List.assoc t type_alias) ^ "* \t" ^ v ^ "_ptr,\n")) vo_pre ;
put (" [out] " ^ (List.assoc lo_t type_alias) ^ "* \t" ^ lo_v ^ "_ptr\n); \n");
List.iter (fun (t, v) -> put (" [out] " ^ (List.assoc t type_alias) ^ " \t*" ^ v ^ "_ptr,\n")) vo_pre ;
put (" [out] " ^ (List.assoc lo_t type_alias) ^ " \t*" ^ lo_v ^ "_ptr\n); \n");
close_out oc
......
......@@ -11,17 +11,33 @@ let (main : unit -> 'a) =
Sut_idl_stub.sut_init ();
print_int (sut_step 1);
print_int (sut_step 0);
print_string "\n";
flush stdout ;
print_int (sut_step 0);
print_string "\n";
flush stdout ;
print_int (sut_step 0);
print_string "\n";
flush stdout ;
print_int (sut_step 1);
print_string "\n\n";
flush stdout ;
print_int (sut_step 1);
print_string "\n\n";
flush stdout ;
print_int (sut_step 0);
print_string "\n\n";
flush stdout ;
print_int (sut_step 1);
print_string "\n\n";
flush stdout ;
;;
......
;; -*- Prcs -*-
(Created-By-Prcs-Version 1 3 3)
(Project-Description "Lurette")
(Project-Version lurette perso 2)
(Parent-Version lurette perso 1)
(Version-Log "")
(Project-Version lurette perso 3)
(Parent-Version lurette perso 2)
(Version-Log "
camlidl marche!!!
J'arrive a executer edge.c depuis caml.
")
(New-Version-Log "")
(Checkin-Time "Wed, 31 Oct 2001 14:51:05 +0000")
(Checkin-Time "Wed, 31 Oct 2001 15:46:14 +0000")
(Checkin-Login jahier)
(Populate-Ignore ())
(Project-Keywords)
......@@ -17,7 +20,7 @@
;; Sources files
(lurette.mli (lurette/11_lurette.ml 1.1 644))
(lurette.ml (lurette/12_lurette.ml 1.2 644))
(lurette.ml (lurette/12_lurette.ml 1.3 644))
(graph.mli (lurette/13_graph.mli 1.2 644))
(graph.ml (lurette/14_graph.ml 1.2 644))
......@@ -26,7 +29,7 @@
(env.ml (lurette/16_env.ml 1.4 644))
(interface/generate_lurette_interface.mli (lurette/23_generate_l 1.1 644))
(interface/generate_lurette_interface.ml (lurette/24_generate_l 1.2 644))
(interface/generate_lurette_interface.ml (lurette/24_generate_l 1.3 644))
;; Make files
(OcamlMakefile (lurette/17_OcamlMakef 1.2 644))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment