Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
0a4f0f78
Commit
0a4f0f78
authored
2 years ago
by
Allan Blanchard
Committed by
Andre Maroneze
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[kernel] changes symbolics dirs registration
parent
3f8cd009
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
src/libraries/utils/filepath.ml
+5
-4
5 additions, 4 deletions
src/libraries/utils/filepath.ml
with
5 additions
and
4 deletions
src/libraries/utils/filepath.ml
+
5
−
4
View file @
0a4f0f78
...
...
@@ -185,11 +185,15 @@ let normalize ?(existence=Indifferent) ?base_name path_name =
let
symbolic_dirs
=
Hashtbl
.
create
3
let
add_symbolic_dir
name
dir
=
Hashtbl
.
replace
symbolic_dirs
name
dir
;
Hashtbl
.
replace
symbolic_dirs
dir
name
;
(
insert
cwd
(
dir
:>
string
))
.
symbolic_name
<-
Some
name
let
reset_symbolic_dirs
()
=
Hashtbl
.
clear
symbolic_dirs
let
all_symbolic_dirs
()
=
List
.
sort
Extlib
.
compare_basic
@@
Hashtbl
.
fold
(
fun
dir
name
acc
->
(
name
,
dir
)
::
acc
)
symbolic_dirs
[]
let
rec
add_uri_path
buffer
path
=
let
open
Buffer
in
match
path
.
symbolic_name
with
...
...
@@ -222,9 +226,6 @@ let rec skip_dot file_name =
skip_dot
(
String
.
sub
file_name
2
(
String
.
length
file_name
-
2
))
else
file_name
let
all_symbolic_dirs
()
=
Hashtbl
.
fold
(
fun
name
dir
acc
->
(
name
,
dir
)
::
acc
)
symbolic_dirs
[]
let
pretty
file_name
=
if
Filename
.
is_relative
file_name
then
skip_dot
file_name
...
...
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