Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cpdt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
research
cpdt
Commits
475c6b74
Commit
475c6b74
authored
Sep 05, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch [input_line] to [read_line]
parent
e450fe0b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
make_template.ml
tools/make_template.ml
+5
-5
No files found.
tools/make_template.ml
View file @
475c6b74
let
input
_line
()
=
let
read
_line
()
=
try
Some
(
input_line
stdin
)
Some
(
read_line
()
)
with
End_of_file
->
None
let
rec
initial
last_was_empty
=
match
input
_line
()
with
match
read
_line
()
with
|
None
->
()
|
Some
"(* begin thide *)"
->
thide
last_was_empty
|
Some
""
->
...
...
@@ -23,7 +23,7 @@ let rec initial last_was_empty =
end
and
comment
last_was_empty
=
match
input
_line
()
with
match
read
_line
()
with
|
None
->
()
|
Some
line
->
if
String
.
length
line
>=
2
&&
line
.
[
String
.
length
line
-
2
]
=
'
*
'
...
...
@@ -33,7 +33,7 @@ and comment last_was_empty =
comment
last_was_empty
and
thide
last_was_empty
=
match
input
_line
()
with
match
read
_line
()
with
|
None
->
()
|
Some
"(* end thide *)"
->
initial
last_was_empty
|
Some
_
->
thide
last_was_empty
...
...
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