Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
pub
frama-c
Commits
1d2c7495
Commit
1d2c7495
authored
Oct 16, 2020
by
Virgile Prevosto
Browse files
[gui] accomodate for the change in module name between OCamlgraph 1.8 and 2.0
parent
3dc87d94
Changes
4
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
1d2c7495
...
...
@@ -722,12 +722,24 @@ GENERATED+=src/plugins/gui/gtk_compat.ml
ifeq
($(HAS_DGRAPH),yes)
DGRAPHFILES
:=
debug_manager
src/plugins/gui/dgraph_helper.ml
:
src/plugins/gui/dgraph_helper.yes.ml
$(CP)
$<
$@
GENERATED
+=
src/plugins/gui/debug_manager.ml
ifeq
($(HAS_OCAMLGRAPH_2), yes)
DGRAPH_MODULE
=
Graph_gtk
DGRAPH_ERROR
=
Graph_gtk.DGraphMake.DotError
else
DGRAPH_MODULE
=
Dgraph
DGRAPH_ERROR
=
Dgraph.DGraphModel.DotError
endif
src/plugins/gui/debug_manager.ml
\
src/plugins/gui/dgraph_helper.ml
\
src/plugins/callgraph/cg_viewer.ml
:
%.ml: %.yes.ml Makefile
$(RM)
$@
$(SED)
-e
's/DGRAPH_MODULE/
$(DGRAPH_MODULE)
/g'
\
-e
's/DGRAPH_ERROR/
$(DGRAPH_ERROR)
/g'
$<
>
$@
$(CHMOD_RO)
$@
else
DGRAPHFILES
:=
src/plugins/gui/dgraph_helper.ml
:
src/plugins/gui/dgraph_helper.no.ml
src/plugins/gui/dgraph_helper.ml
:
src/plugins/gui/dgraph_helper.no.ml
Makefile
$(CP)
$<
$@
$(CHMOD_RO)
$@
endif
...
...
@@ -794,6 +806,7 @@ PLUGIN_DIR:=src/plugins/callgraph
PLUGIN_CMO
:=
options journalize subgraph cg services uses register
ifeq
($(HAS_DGRAPH),yes)
PLUGIN_GUI_CMO
:=
cg_viewer
PLUGIN_GENERATED
:=
$(PLUGIN_DIR)
/cg_viewer.ml
else
PLUGIN_GUI_CMO
:=
PLUGIN_DISTRIB_EXTERNAL
:=
cg_viewer.ml
...
...
src/plugins/callgraph/cg_viewer.ml
→
src/plugins/callgraph/cg_viewer.
yes.
ml
View file @
1d2c7495
...
...
@@ -20,7 +20,7 @@
(* *)
(**************************************************************************)
open
D
graph
open
D
GRAPH_MODULE
let
(
$
)
f
x
=
f
x
...
...
src/plugins/gui/debug_manager.ml
→
src/plugins/gui/debug_manager.
yes.
ml
View file @
1d2c7495
...
...
@@ -20,9 +20,9 @@
(* *)
(**************************************************************************)
(* Require Dgraph included in Ocamlgraph, thus GnomeCanvas *)
(* Require Dgraph included in
OCamlgraph/
Ocamlgraph
_gtk
, thus GnomeCanvas *)
open
D
graph
open
D
GRAPH_MODULE
let
graph_view
~
packing
mk_dot
=
let
f
=
...
...
src/plugins/gui/dgraph_helper.yes.ml
View file @
1d2c7495
...
...
@@ -20,6 +20,8 @@
(* *)
(**************************************************************************)
open
DGRAPH_MODULE
let
graph_window
~
parent
~
title
make_view
=
let
height
=
int_of_float
(
float
parent
#
default_height
*.
3
.
/.
4
.
)
in
let
width
=
int_of_float
(
float
parent
#
default_width
*.
3
.
/.
4
.
)
in
...
...
@@ -46,13 +48,13 @@ let graph_window_through_dot ~parent ~title dot_formatter =
Format
.
pp_print_flush
fmt
()
;
let
view
=
snd
(
Dgraph
.
DGraphContainer
.
Dot
.
from_dot_with_commands
~
packing
temp_file
)
(
DGraphContainer
.
Dot
.
from_dot_with_commands
~
packing
temp_file
)
in
view
in
try
graph_window
~
parent
~
title
make_view
with
D
graph
.
DGraphModel
.
DotError
_
as
exn
->
with
D
GRAPH_ERROR
_
as
exn
->
Gui_parameters
.
error
"@[cannot display dot graph:@ %s@]"
(
Printexc
.
to_string
exn
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment