Commit ceac869e authored by Erwan Jahier's avatar Erwan Jahier

lurette 1.22 Mon, 08 Mar 2004 13:46:15 +0100 by jahier

Parent-Version:      1.21
Version-Log:

Add a couple of scade files in the distrib so that it is easier
to test scade programs under linux using the generated c files.

source/value.ml
   use T and F instead of t and f for booleans (more visible under xlurette).

share/Makefile.lurette.in:
   Reorganize (clean-up) the file

xlurette/xlurette_glade_main.ml:
share/plot:
   Fix the gnuplot problems (+ <<set mouse>> in share/plot).

source/util.ml:
source/lurettetop.ml:
   Move the gnuplot stuff into lurettetop.

Project-Description: Lurette
parent d115d326
This diff is collapsed.
......@@ -5,7 +5,7 @@
# For updates see:
# http://www.oefai.at/~markus/ocaml_sources
#
# $Id: OcamlMakefile 1.51 Fri, 13 Jun 2003 09:05:17 +0200 jahier $
# $Id: OcamlMakefile 1.52 Mon, 08 Mar 2004 13:46:15 +0100 jahier $
#
###########################################################################
......@@ -178,7 +178,7 @@ endif
export OCAMLDEP
ifndef OCAMLLEX
OCAMLLEX := ocamllex
OCAMLLEX := ocamllex.opt
endif
export OCAMLLEX
......@@ -190,7 +190,7 @@ endif
export OCAMLYACC
ifndef CAMLIDL
CAMLIDL := camlidl
CAMLIDL := camlidl.opt
endif
export CAMLIDL
......
......@@ -18,7 +18,7 @@ xlurette:
probably your best entry point if you want to test your lustre
programs.
Cf doc/lurette-tut.ps and/or check the tool-tip displayed when
Cf doc/lurette-man.pdf and/or check the tool-tip displayed when
mouse pointing at the different buttons of the GUI.
lurettetop:
......@@ -36,11 +36,11 @@ lutin:
There are also tools which are used by the ones above that one might
want to use (you probably need to source the $HOSTTYPE/lucky_init.sh
or $HOSTTYPE/lucky_init.csh to use them directly).
want to use.
gen_fake_lucky:
gen_fake_lutin:
generates a fake lutin file (from C files generated by the
generates a fake lucky/lutin file (from C files generated by the
lustre compiler). It is automatically called from xlurette,
whenever you try to test a program without providing an
environment for it; hence you should not need to use it directly.
......@@ -55,6 +55,15 @@ lucky:
simulate/executes lutin programs outside xlurette can sometimes
be convenient.
sim2chro:
A timing diagram visualiser (.rif files) by Yann Rémond.
gnuplot-rif:
An sh-script that uses gnuplot to visualise timing diagrams
(.rif files). Requires plot (by M. Sternberg) that is provided.
nb : plot requires gawk (gnu awk) that is not provided.
Also confere the tool section at the url http://www-verimag.imag.fr/~synchron/
......@@ -89,5 +98,5 @@ Also confere the tool section at the url http://www-verimag.imag.fr/~synchron/
o Cudd, a BDD library by the University of Colorado
o polka, cuddaux and mlcuddidl by B. Jeannet, IRISA
o sim2chro by Y. Rémond - Verimag
o autoconf, make, emacs, latex, dot, gtk, gnuplot, plot...
o autoconf, make, emacs, latex, dot, gtk, gnuplot...
o plot, by Michael Sternberg (requires gnu-awk)
****** A faire vite *******
* inclure la libc en statique
? Les alias doivent ils etre dans le .rif ??
* Rajouter le step mode dans lurettetop et xlurette
ie, il faut rajouter dans lurette une option --step-inside --step-edges
--step-vertices (et renommer --draw-inside par --try-inside ??)
sed 's/[ ^t]*$//' file
+ Rajouter dans lurettetop les options qui permette d'acceder au step mode
(ie, le mode du tirage pour faire un step)
*********** BUGS
* le parseur est trop lent sur les exemples generes par nbac
* Bug dans le repertoire HS si dans Makefile.lurette on
positionne CFLAGS à -Oi pour i >= 1. Le bug ne se produit
que sur les machines linux possedant gcc 3.
* meme avec x < 20000, il prend en compte la valeur max par defaut (10000)
(via ~max, ca marche en revanche)
* le parseur est trop lent (cf les exemples generes par nbac).
......@@ -32,13 +34,61 @@ et je ne suis plus oblig
*********** A faire
* parse_lucky.ml:
XXX parse_lustre_expression : attention au tilde (virer le hack et ragarder ce que ca change)
+ verifier que 2 vars ne sont définies 2 fois dans le meme fichiers
* Ajouter la possibilité de pouvoir rejouer un séquence et de la continuer
(? redondant avec la graine ?)
* Faire de la pub dans les forum et autres mailing list !
* inclure la libc en statique (comme pascal)
ou mettre tous les .so dans un repertoire (comme matlab) ???
* Mettre Les alias doivent ils etre dans le .rif au meme titre
que les autres variables locales
* plot a besion de gnu-awk ... Je devrais ecrire moi-meme
le programme qui genere le bon format pour gnuplot...
* sim2chro
- le recompiler en statique avec gcc3 et sous solaris
(pour ce faire recompiler librif.a).
* Finir le ocaml-lutin (.mluc)
* Faire une section <<Testing programs that are not lustre or scade programs>>
-> faire un autre mode d'interfacage : le mode stdin/stdout, qui fonctionnerait
grosso-modo ainsi :
<sut write on stout>
var1 (input|output) (bool|int|float)
....
varn (input|output) (bool|int|float)
#go
<sut reads on stdin>
val_1 ... val_ki
-> <stdout> : out_1 ... out_ko
or
#restore
or
#end
* Mettre des iterateurs de tableaux
-> nécessite d'avoir une notion de noeud ou de fonction dans lucky
* Rajouter les fonctions, et notamment les fonctions externes
-> comment faire depuis un tel interpreteur ????
* reporter le contenu de la nouvelle section de d1.1-v2 dans les entetes de modules
* autoriser plusieurs automates dans le meme fichier
* rajouter une option --reactive ou lucky rend ses valeurs precedentes
* rajouter une option --reactive dans lucky où il rend ses valeurs precedentes
si aucune formule n'est satisfiable (ainsi que --reactive-no-warning)
* il faudrait au moins pouvoir avoir des pre sur des var de types structurés
......
......@@ -43,7 +43,8 @@ ICFLAGS = \
#
# i386-linux
XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
# XCFLAGS = -DHAVE_IEEE_754 -DBSD # -mcpu=pentiumpro -malign-double
XCFLAGS = -mcpu=i386 -DHAVE_IEEE_754 -DBSD
# sparc-sun
# XCFLAGS = -mcpu=ultrasparc -DHAVE_IEEE_754 -DUNIX100
......
......@@ -23,10 +23,10 @@ xlurette_exe: dummy
| sed -e 's/\"pixmaps\//((Unix.getenv \"PIXMAP_DIR\") \^ \"/' \
| sed -e 's/.xpm\"/.xpm\")/' \
> xlurette_glade_interface.ml
ocamlc.opt -c -I +lablgtk -labels -c xlurette_glade_interface.ml
ocamlc.opt -c -I +lablgtk -labels -c xlurette_glade_callbacks.ml
ocamlc.opt -c -pp "camlp4o" -I +lablgtk $(THREAD) -c xlurette_glade_main.ml
ocamlc.opt $(THREAD) \
ocamlc.opt -c -I +lablgtk -I $(HOME)/$(HOSTTYPE)/lib -labels -c xlurette_glade_interface.ml
ocamlc.opt -c -I +lablgtk -I $(HOME)/$(HOSTTYPE)/lib -labels -c xlurette_glade_callbacks.ml
ocamlc.opt -c -pp "camlp4o" -I +lablgtk $(THREAD) -I $(HOME)/$(HOSTTYPE)/lib -c xlurette_glade_main.ml
ocamlc.opt $(THREAD) -I $(HOME)/$(HOSTTYPE)/lib \
-I +lablgtk -I +str -o xlurette_exe$(EXE) str.cma unix.cma lablgtk.cma gtkInit.cmo \
xlurette_glade_callbacks.cmo xlurette_glade_interface.cmo xlurette_glade_main.cmo
......
......@@ -28,11 +28,6 @@
<class>GtkNotebook</class>
<name>notebook1</name>
<can_focus>True</can_focus>
<accelerator>
<modifiers>GDK_CONTROL_MASK</modifiers>
<key>GDK_Tab</key>
<signal>switch_page</signal>
</accelerator>
<show_tabs>True</show_tabs>
<show_border>True</show_border>
<tab_pos>GTK_POS_TOP</tab_pos>
......@@ -1078,7 +1073,12 @@ scade
<child_name>Toolbar:button</child_name>
<name>button125</name>
<border_width>4</border_width>
<tooltip>Call sim2chro with the selected file</tooltip>
<tooltip>Call sim2chro with the selected file (c)</tooltip>
<accelerator>
<modifiers>0</modifiers>
<key>GDK_c</key>
<signal>clicked</signal>
</accelerator>
<signal>
<name>clicked</name>
<handler>tdm_sim2chro</handler>
......@@ -1095,7 +1095,12 @@ scade
<border_width>4</border_width>
<width>150</width>
<height>100</height>
<tooltip>Call gnuplot with the selected file (3.7 or higher)</tooltip>
<tooltip>Call gnuplot with the selected file (g)</tooltip>
<accelerator>
<modifiers>0</modifiers>
<key>GDK_g</key>
<signal>clicked</signal>
</accelerator>
<signal>
<name>clicked</name>
<handler>tdm_gnuplot</handler>
......@@ -1125,7 +1130,12 @@ scade
<child_name>Toolbar:button</child_name>
<name>button128</name>
<border_width>4</border_width>
<tooltip> Edit the file -- via the $EDITOR shell variable</tooltip>
<tooltip> Edit the file -- via the $EDITOR shell variable (e)</tooltip>
<accelerator>
<modifiers>0</modifiers>
<key>GDK_e</key>
<signal>clicked</signal>
</accelerator>
<signal>
<name>clicked</name>
<handler>tdm_edit</handler>
......@@ -1140,7 +1150,12 @@ scade
<child_name>Toolbar:button</child_name>
<name>button129</name>
<border_width>4</border_width>
<tooltip>Delete the selected file</tooltip>
<tooltip>Delete the selected file (d)</tooltip>
<accelerator>
<modifiers>0</modifiers>
<key>GDK_d</key>
<signal>clicked</signal>
</accelerator>
<signal>
<name>clicked</name>
<handler>tdm_delete</handler>
......@@ -1239,7 +1254,7 @@ scade
<class>GtkLabel</class>
<child_name>Notebook:tab</child_name>
<name>timing_diagram_label</name>
<label> Timing Diagrams Manager </label>
<label> Timing diagrams manager </label>
<justify>GTK_JUSTIFY_LEFT</justify>
<wrap>False</wrap>
<xalign>0.5</xalign>
......@@ -1299,7 +1314,7 @@ scade
<name>fileselection_oracle</name>
<border_width>10</border_width>
<title>Select File</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_MOUSE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -1343,7 +1358,7 @@ scade
<name>fileselection_env</name>
<border_width>10</border_width>
<title>Select a new environement file</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_MOUSE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -1386,7 +1401,7 @@ scade
<class>GtkWindow</class>
<name>step_by_step_window</name>
<title>Step by step...</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_MOUSE</position>
<modal>False</modal>
<default_width>200</default_width>
......@@ -1817,7 +1832,7 @@ Setting such an oracle is not mandatory however.</label>
<class>GtkWindow</class>
<name>quit_window</name>
<title>Quit xlurette -- save parameters </title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -1931,7 +1946,7 @@ Do you really want to quit xlurette?
<name>extra_env_var_window</name>
<border_width>10</border_width>
<title>Setting environment variables</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2418,7 +2433,7 @@ Do you really want to quit xlurette?
<name>fileselection_extra_cfiles</name>
<border_width>10</border_width>
<title>Select extra C File</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2462,7 +2477,7 @@ Do you really want to quit xlurette?
<name>fileselection_extra_libs</name>
<border_width>10</border_width>
<title>Select external lib (.a)</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2506,7 +2521,7 @@ Do you really want to quit xlurette?
<name>fileselection_extra_libdirs</name>
<border_width>10</border_width>
<title>Select a directory to search librairies in</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2550,7 +2565,7 @@ Do you really want to quit xlurette?
<name>fileselection_extra_includedirs</name>
<border_width>10</border_width>
<title>Select a directory to search header files in</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2593,7 +2608,7 @@ Do you really want to quit xlurette?
<class>GtkWindow</class>
<name>test_thickness_help_window</name>
<title>Help about Test Thickness parameters</title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2704,8 +2719,9 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<widget>
<class>GtkWindow</class>
<name>set_parameters_window</name>
<border_width>3</border_width>
<title> Setting parameters </title>
<type>GTK_WINDOW_TOPLEVEL</type>
<type>GTK_WINDOW_DIALOG</type>
<position>GTK_WIN_POS_NONE</position>
<modal>False</modal>
<allow_shrink>False</allow_shrink>
......@@ -2924,7 +2940,7 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<tooltip>Try one formula</tooltip>
<can_focus>True</can_focus>
<label>One </label>
<active>False</active>
<active>True</active>
<draw_indicator>True</draw_indicator>
<child>
<padding>0</padding>
......@@ -2939,7 +2955,7 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<tooltip>Try all the formula (reachable from the current state) </tooltip>
<can_focus>True</can_focus>
<label>All</label>
<active>True</active>
<active>False</active>
<draw_indicator>True</draw_indicator>
<group>radiobutton_draw_one_formula</group>
<child>
......@@ -3082,7 +3098,7 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>10</value>
<value>0</value>
<lower>0</lower>
<upper>100000</upper>
<step>1</step>
......@@ -3155,7 +3171,7 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
<value>10</value>
<value>0</value>
<lower>0</lower>
<upper>100000</upper>
<step>1</step>
......@@ -3954,6 +3970,11 @@ Note that if one of the Draw All Formula (via DF) or Draw All Vertices (via DV)
<name>close_parameters_window</name>
<border_width>4</border_width>
<tooltip> close this window </tooltip>
<accelerator>
<modifiers>0</modifiers>
<key>GDK_q</key>
<signal>clicked</signal>
</accelerator>
<signal>
<name>clicked</name>
<handler>on_close_parameters_window_clicked</handler>
......
......@@ -26,14 +26,6 @@ let notebook1 = GPack.notebook
()
in
let _ = GtkBase.Widget.set_can_focus notebook1#as_widget true in
let _ = notebook1#misc#add_accelerator
~group:accel_group
GdkKeysyms._Tab
~sgn:{ GtkSignal.name = "switch_page";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[`CONTROL;]
in
let vbox26 = GPack.vbox
~spacing:0
~homogeneous:false
......@@ -708,13 +700,29 @@ let button125 = toolbar31#insert_button
~icon:(GMisc.pixmap (GDraw.pixmap_from_xpm ~file:((Unix.getenv "PIXMAP_DIR") ^ "chrono.xpm") ()) ())#coerce
()
in
let _ = tooltips#set_tip ~text:"Call sim2chro with the selected file" button125#coerce in
let _ = tooltips#set_tip ~text:"Call sim2chro with the selected file (c)" button125#coerce in
let _ = button125#misc#add_accelerator
~group:accel_group
GdkKeysyms._c
~sgn:{ GtkSignal.name = "clicked";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[]
in
let button126 = toolbar31#insert_button
~text: " "
~icon:(GMisc.pixmap (GDraw.pixmap_from_xpm ~file:((Unix.getenv "PIXMAP_DIR") ^ "gnuplot-rif.xpm") ()) ())#coerce
()
in
let _ = tooltips#set_tip ~text:"Call gnuplot with the selected file (3.7 or higher)" button126#coerce in
let _ = tooltips#set_tip ~text:"Call gnuplot with the selected file (g)" button126#coerce in
let _ = button126#misc#add_accelerator
~group:accel_group
GdkKeysyms._g
~sgn:{ GtkSignal.name = "clicked";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[]
in
let button127 = toolbar31#insert_button
~text: "postscript "
~icon:(GMisc.pixmap (GDraw.pixmap_from_xpm ~file:((Unix.getenv "PIXMAP_DIR") ^ "gnuplot-rif.xpm") ()) ())#coerce
......@@ -726,13 +734,29 @@ let button128 = toolbar31#insert_button
~icon:(GMisc.pixmap (GDraw.pixmap_from_xpm ~file:((Unix.getenv "PIXMAP_DIR") ^ "open.xpm") ()) ())#coerce
()
in
let _ = tooltips#set_tip ~text:" Edit the file -- via the $EDITOR shell variable" button128#coerce in
let _ = tooltips#set_tip ~text:" Edit the file -- via the $EDITOR shell variable (e)" button128#coerce in
let _ = button128#misc#add_accelerator
~group:accel_group
GdkKeysyms._e
~sgn:{ GtkSignal.name = "clicked";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[]
in
let button129 = toolbar31#insert_button
~text: " "
~icon:(GMisc.pixmap (GDraw.pixmap_from_xpm ~file:((Unix.getenv "PIXMAP_DIR") ^ "quit.xpm") ()) ())#coerce
()
in
let _ = tooltips#set_tip ~text:"Delete the selected file" button129#coerce in
let _ = tooltips#set_tip ~text:"Delete the selected file (d)" button129#coerce in
let _ = button129#misc#add_accelerator
~group:accel_group
GdkKeysyms._d
~sgn:{ GtkSignal.name = "clicked";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[]
in
let label68 = GMisc.label
~packing:(vbox31#pack ~padding:0
~fill:true
......@@ -793,7 +817,7 @@ let _ = GtkBase.Widget.set_can_default tdm_error_window#as_widget true in
let _ = GtkBase.Widget.grab_default tdm_error_window#as_widget in
let _ = tooltips#set_tip ~text:" Misc output window " tdm_error_window#coerce in
let timing_diagram_label = GMisc.label
~text: " Timing Diagrams Manager "
~text: " Timing diagrams manager "
~xalign:0.5
~yalign:0.5
~xpad:0
......@@ -1037,7 +1061,7 @@ let accel_group = GtkData.AccelGroup.create () in
let step_by_step_window = GWindow.window
~wm_name: "Step by step..."
~position:`MOUSE
~kind:`TOPLEVEL
~kind:`DIALOG
~modal:false
~allow_shrink:false
~allow_grow:true
......@@ -1443,7 +1467,7 @@ let accel_group = GtkData.AccelGroup.create () in
let quit_window = GWindow.window
~wm_name: "Quit xlurette -- save parameters "
~position:`NONE
~kind:`TOPLEVEL
~kind:`DIALOG
~modal:false
~allow_shrink:false
~allow_grow:true
......@@ -1551,7 +1575,7 @@ let accel_group = GtkData.AccelGroup.create () in
let extra_env_var_window = GWindow.window
~wm_name: "Setting environment variables"
~position:`NONE
~kind:`TOPLEVEL
~kind:`DIALOG
~modal:false
~allow_shrink:false
~allow_grow:true
......@@ -2052,7 +2076,7 @@ let accel_group = GtkData.AccelGroup.create () in
let test_thickness_help_window = GWindow.window
~wm_name: "Help about Test Thickness parameters"
~position:`NONE
~kind:`TOPLEVEL
~kind:`DIALOG
~modal:false
~allow_shrink:false
~allow_grow:true
......@@ -2161,11 +2185,12 @@ let accel_group = GtkData.AccelGroup.create () in
let set_parameters_window = GWindow.window
~wm_name: " Setting parameters "
~position:`NONE
~kind:`TOPLEVEL
~kind:`DIALOG
~modal:false
~allow_shrink:false
~allow_grow:true
~auto_shrink:false
~border_width:3
()
in
......@@ -2330,7 +2355,7 @@ let radiobutton_draw_one_formula = GButton.radio_button
)
~label: "One "
~draw_indicator:true
~active:false
~active:true
()
in
let _ = GtkBase.Widget.set_can_focus radiobutton_draw_one_formula#as_widget true in
......@@ -2343,7 +2368,7 @@ let radiobutton_draw_all_formula = GButton.radio_button
)
~label: "All"
~draw_indicator:true
~active:true
~active:false
()
in
let _ = GtkBase.Widget.set_can_focus radiobutton_draw_all_formula#as_widget true in
......@@ -2444,7 +2469,7 @@ let label37 = GMisc.label
()
in
let inside_nb = GEdit.spin_button
~adjustment:(GData.adjustment~value:10.
~adjustment:(GData.adjustment~value:0.
~lower:0.
~upper:100000.
~step_incr:1.
......@@ -2503,7 +2528,7 @@ let label39 = GMisc.label
()
in
let edges_nb = GEdit.spin_button
~adjustment:(GData.adjustment~value:10.
~adjustment:(GData.adjustment~value:0.
~lower:0.
~upper:100000.
~step_incr:1.
......@@ -3136,6 +3161,14 @@ let close_parameters_window = toolbar3#insert_button
()
in
let _ = tooltips#set_tip ~text:" close this window " close_parameters_window#coerce in
let _ = close_parameters_window#misc#add_accelerator
~group:accel_group
GdkKeysyms._q
~sgn:{ GtkSignal.name = "clicked";
GtkSignal.marshaller = GtkSignal.marshal_unit ;
GtkSignal.classe = `base }
~modi:[]
in
let _ = close_parameters_window#connect#clicked
~callback:callbacks#on_close_parameters_window_clicked in
let _ = save_parameter#connect#clicked
......
......@@ -194,7 +194,7 @@ let rec (readfile_line : in_channel -> string list -> string list) =
(** returns the list of nodes of a lustre or saofdm file *)
let (lusinfo : string -> string list) =
let (nodes_info : string -> string list) =
fun file ->
let file_info = Filename.temp_file (Filename.basename file) "nodes_info" in
let file_lus = file in
......@@ -212,7 +212,9 @@ let (lusinfo : string -> string list) =
((Sys.command cmd) <> 0)
then
(
output_string stderr ("*** lusinfo failed.\n" ^ cmd ^ "\n");
output_string stderr cmd ;
output_string stderr
("\n*** getsaonodes failed.\n" ^ cmd ^ "\n");
flush stderr;
[]
)
......@@ -306,7 +308,14 @@ class customized_callbacks = object(self)
self#top_xlurette#tdm_error_window#insert str
method read_ltop_stdout () =
let length = float_of_string self#top_set_parameters_window#test_length#text in
let length =
try
float_of_string self#top_set_parameters_window#test_length#text
with _ ->
(* such a failure happens when the user removes the whole
test length (before typing a new one). *)
1.0
in
let
display = self#put
and
......@@ -315,9 +324,12 @@ class customized_callbacks = object(self)
progress =
( fun f ->
let p = f /. length in
let pi = int_of_float (p *. 100.) in
(* let pi = int_of_float (p0 *. 100.) in *)
self#top_xlurette#step_number_label#set_text
((string_of_int pi) ^ " % \n(" ^ (string_of_int (int_of_float f))
(
(* (string_of_int pi) ^ " % " ^ *)
" \n("
^ (string_of_int (int_of_float f))
^ "/" ^ (string_of_int (int_of_float length)) ^ ")");
self#top_xlurette#progressbar#set_percentage p )
in
......@@ -610,7 +622,7 @@ class customized_callbacks = object(self)
(* to quit xlurette *)
method quit () =