Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lutils
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
lutils
Commits
52d447c3
Commit
52d447c3
authored
7 years ago
by
erwan
Browse files
Options
Downloads
Patches
Plain Diff
Make sure an int string is not an ident before trying a big_int convertion
parent
e9db055e
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
_oasis
+1
-1
1 addition, 1 deletion
_oasis
doc/version.tex
+3
-3
3 additions, 3 deletions
doc/version.tex
src/META
+2
-2
2 additions, 2 deletions
src/META
src/localGenlex.ml
+13
-9
13 additions, 9 deletions
src/localGenlex.ml
src/lutilsVersion.ml
+2
-2
2 additions, 2 deletions
src/lutilsVersion.ml
with
21 additions
and
17 deletions
_oasis
+
1
−
1
View file @
52d447c3
OASISFormat: 0.4
OASISFormat: 0.4
Name: lutils
Name: lutils
Version: 1.1
3
Version: 1.1
4
Authors: Erwan Jahier
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
Maintainers: erwan.jahier@imag.fr
License: GPL-3
License: GPL-3
...
...
This diff is collapsed.
Click to expand it.
doc/version.tex
+
3
−
3
View file @
52d447c3
\newcommand
{
\version
}{
1.1
3
}
\newcommand
{
\version
}{
1.1
4
}
\newcommand
{
\sha
}{
001363
5
}
\newcommand
{
\sha
}{
e9db05
5
}
\newcommand
{
\versionname
}{
none
}
\newcommand
{
\versionname
}{
none
}
\newcommand
{
\versiondate
}{
1
2-06-17
}
\newcommand
{
\versiondate
}{
2
2-06-17
}
This diff is collapsed.
Click to expand it.
src/META
+
2
−
2
View file @
52d447c3
# OASIS_START
# OASIS_START
# DO NOT EDIT (digest:
15d9e918ed9eb34ce3e848dd1e1775a7
)
# DO NOT EDIT (digest:
bd2a3dd8b4c274b4d60cc3825abe018b
)
version = "1.1
3
"
version = "1.1
4
"
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
description = "shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
requires = "unix str camlp4 num"
requires = "unix str camlp4 num"
archive(byte) = "lutils.cma"
archive(byte) = "lutils.cma"
...
...
This diff is collapsed.
Click to expand it.
src/localGenlex.ml
+
13
−
9
View file @
52d447c3
...
@@ -27,15 +27,19 @@ let big_max_int = Big_int.big_int_of_nativeint Nativeint.max_int
...
@@ -27,15 +27,19 @@ let big_max_int = Big_int.big_int_of_nativeint Nativeint.max_int
let
local_int_of_string
str
=
let
local_int_of_string
str
=
try
int_of_string
str
try
int_of_string
str
with
_
->
with
_
->
let
big_i0
=
Big_int
.
big_int_of_string
str
in
if
Str
.
string_match
(
Str
.
regexp
"[a-z]"
)
str
0
let
big_i
=
Big_int
.
mod_big_int
big_i0
(
Big_int
.
succ_big_int
big_max_int
)
in
then
failwith
(
"Cannot convert "
^
str
^
" into an int"
)
let
i
=
Nativeint
.
to_int
(
Big_int
.
nativeint_of_big_int
big_i
)
in
else
if
(
Big_int
.
big_int_of_int
i
<>
big_i0
)
then
(
let
big_i0
=
Big_int
.
big_int_of_string
str
in
Printf
.
eprintf
"Warning: integer overflow (%s truncated to %s)
\n
"
let
big_i
=
Big_int
.
mod_big_int
big_i0
(
Big_int
.
succ_big_int
big_max_int
)
in
(
Big_int
.
string_of_big_int
big_i0
)
(
string_of_int
i
);
let
i
=
Nativeint
.
to_int
(
Big_int
.
nativeint_of_big_int
big_i
)
in
flush
stderr
if
(
Big_int
.
big_int_of_int
i
<>
big_i0
)
then
(
);
Printf
.
eprintf
"Warning: integer overflow (%s truncated to %s)
\n
"
i
(
Big_int
.
string_of_big_int
big_i0
)
(
string_of_int
i
);
flush
stderr
);
i
...
...
This diff is collapsed.
Click to expand it.
src/lutilsVersion.ml
+
2
−
2
View file @
52d447c3
let
str
=
"1.1
3
"
let
str
=
"1.1
4
"
let
sha
=
"
001363
5"
let
sha
=
"
e9db05
5"
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