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
744022c4
Commit
744022c4
authored
5 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[server] Replaces formatter_tag_functions by formatter_stag_functions.
Avoids a compilation warning with ocaml >= 4.08.
parent
c29b11a1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/server/jbuffer.ml
+10
-9
10 additions, 9 deletions
src/plugins/server/jbuffer.ml
src/plugins/server/jbuffer.mli
+2
-2
2 additions, 2 deletions
src/plugins/server/jbuffer.mli
with
12 additions
and
11 deletions
src/plugins/server/jbuffer.ml
+
10
−
9
View file @
744022c4
...
...
@@ -40,7 +40,8 @@ let flush buffer () =
buffer
.
rjson
<-
js
::
buffer
.
rjson
;
FCBuffer
.
clear
t
let
push_tag
buffer
tag
=
let
push_tag
buffer
stag
=
let
tag
=
Transitioning
.
Format
.
string_of_stag
stag
in
flush
buffer
()
;
buffer
.
stack
<-
(
tag
,
buffer
.
rjson
)
::
buffer
.
stack
;
buffer
.
rjson
<-
[]
...
...
@@ -83,15 +84,15 @@ let create ?indent ?margin () =
Format
.
pp_set_max_indent
fmt
(
max
0
(
min
k
(
m
-
10
)))
end
;
begin
let
open
Format
in
pp_set_formatter_tag_functions
fmt
{
print_open_tag
=
no_mark
;
print_close_tag
=
no_mark
;
mark_open_tag
=
mark_open_tag
buffer
;
mark_close_tag
=
mark_close_tag
buffer
;
let
open
Transitioning
.
Format
in
pp_set_formatter_
s
tag_functions
fmt
{
print_open_
s
tag
=
no_mark
;
print_close_
s
tag
=
no_mark
;
mark_open_
s
tag
=
mark_open_tag
buffer
;
mark_close_
s
tag
=
mark_close_tag
buffer
;
}
;
pp_set_print_tags
fmt
false
;
pp_set_mark_tags
fmt
true
;
Format
.
pp_set_print_tags
fmt
false
;
Format
.
pp_set_mark_tags
fmt
true
;
end
;
buffer
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/jbuffer.mli
+
2
−
2
View file @
744022c4
...
...
@@ -46,8 +46,8 @@ val bprintf : buffer -> ('a,Format.formatter,unit) format -> 'a
val
append
:
buffer
->
string
->
int
->
int
->
unit
val
flush
:
buffer
->
unit
->
unit
val
push_tag
:
buffer
->
Format
.
tag
->
unit
val
pop_tag
:
buffer
->
Format
.
tag
->
unit
val
push_tag
:
buffer
->
Transitioning
.
Format
.
s
tag
->
unit
val
pop_tag
:
buffer
->
Transitioning
.
Format
.
s
tag
->
unit
(** Flushes the buffer and returns its JSON enoding. This pops all pending
tags. *)
...
...
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