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
3052868a
Commit
3052868a
authored
Jun 30, 2020
by
Virgile Prevosto
Browse files
[preprocessing] make logic preprocessor aware of dos-like line endings.
parent
6aff333e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/kernel_internals/parsing/logic_preprocess.mll
View file @
3052868a
...
...
@@ -94,13 +94,14 @@
let
content
=
Buffer
.
create
80
in
let
rec
ignore_content
()
=
let
s
=
input_line
file
in
if
s
<>
annot_beg
then
ignore_content
()
if
not
(
Extlib
.
string_prefix
annot_beg
s
)
then
ignore_content
()
in
let
rec
get_annot
first
=
let
s
=
input_line
file
in
if
s
=
annot_end
then
false
,
Buffer
.
contents
content
else
if
s
=
annot_end_nl
then
true
,
Buffer
.
contents
content
else
if
s
=
annot_end_comment
then
begin
if
Extlib
.
string_prefix
annot_end
s
then
false
,
Buffer
.
contents
content
else
if
Extlib
.
string_prefix
annot_end_nl
s
then
true
,
Buffer
.
contents
content
else
if
Extlib
.
string_prefix
annot_end_comment
s
then
begin
Buffer
.
add_char
content
'\n'
;
false
,
Buffer
.
contents
content
end
else
begin
...
...
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