Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sasa
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
verimag
synchrone
sasa
Commits
e85a88d5
Commit
e85a88d5
authored
2 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
fix: try harder to find a working pdf reader
parent
fb6fdca8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/rdbg4sasa/sasa-rdbg-cmds.ml
+14
-8
14 additions, 8 deletions
tools/rdbg4sasa/sasa-rdbg-cmds.ml
with
14 additions
and
8 deletions
tools/rdbg4sasa/sasa-rdbg-cmds.ml
+
14
−
8
View file @
e85a88d5
...
...
@@ -239,7 +239,7 @@ let _ =
(* split the vars into returns (the enab vars, the activated vars,
the other vars) nb: in the "Enab" prefix is removed from enab vars
names; ie we leave only the pid and the action name *)
type
s
=
(
string
*
string
*
Data
.
v
)
type
s
=
(
string
string
*
Data
.
v
)
let
split_data
(
l
:
Data
.
subst
list
)
:
s
list
*
s
list
*
s
list
=
let
l
=
List
.
map
(
fun
(
x
,
v
)
->
Str
.
split
(
Str
.
regexp
"_"
)
x
,
v
)
l
in
let
rec
sortv
(
enab
,
other
)
(
x
,
v
)
=
...
...
@@ -438,14 +438,20 @@ let l () =
(**********************************************************************)
(* ok, let's start the debugging session! *)
let
pdf_viewer
=
if
Sys
.
command
"which zathura"
=
0
then
"zathura"
else
let
pdf_viewer
=
(* try hard to find a working pdf viewer! *)
try
let
res
=
Unix
.
getenv
"PDF_VIEWER"
in
(* may raise Not_found *)
if
Sys
.
command
(
Printf
.
sprintf
"which %s"
res
)
=
0
then
res
else
raise
Not_found
with
Not_found
->
if
Sys
.
command
"which see"
=
0
then
"see"
else
if
Sys
.
command
"which zathura"
=
0
then
"zathura"
else
if
Sys
.
command
"which okular"
=
0
then
"okular"
else
if
Sys
.
command
"which xpdf"
=
0
then
"xpdf"
else
if
Sys
.
command
"which
acroread
"
=
0
then
"
acroread
"
else
if
Sys
.
command
"which
evince
"
=
0
then
"
evince
"
else
(
Printf
.
printf
"Warning: no pdf viewer
is
found to visualize %s
\n
%!"
dotfile
;
"ls"
)
if
Sys
.
command
"which
evince
"
=
0
then
"
evince
"
else
if
Sys
.
command
"which
acroread
"
=
0
then
"
acroread
"
else
(
Printf
.
printf
"Warning: no pdf viewer found to visualize %s
\n
%!"
dotfile
;
"ls"
)
let
graph_view
()
=
!
dot_view
()
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment