Soft'N'Design Software
/
projects
/
morep.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2b78c79
)
Revert "enhance parser"
master
author
Mazet Laurent
<laurent.mazet@thalesgroup.com>
Wed, 26 Nov 2025 14:02:33 +0000
(15:02 +0100)
committer
Mazet Laurent
<laurent.mazet@thalesgroup.com>
Wed, 26 Nov 2025 14:02:33 +0000
(15:02 +0100)
This reverts commit
2b78c792406a095bf07db745cd2c79f62acad484
.
parse.c
patch
|
blob
|
blame
|
history
diff --git
a/parse.c
b/parse.c
index c9d535a72eacfc444dba1572e0be568a379d1bb6..e9063ded3923cddc1aa79afb0eb15da2220853da 100644
(file)
--- a/
parse.c
+++ b/
parse.c
@@
-24,7
+24,7
@@
int parse_int (char *str)
{
char *pt = NULL;
int val = strtol (str, &pt, 0);
{
char *pt = NULL;
int val = strtol (str, &pt, 0);
- if ((*pt != '\0') && (*pt != '
\n') && (*pt != '
') && (*pt != '\t')) {
+ if ((*pt != '\0') && (*pt != ' ') && (*pt != '\t')) {
VERBOSE (morep, WARNING, PRINTF ("can't parse '%s' as integer\n", str));
}
return val;
VERBOSE (morep, WARNING, PRINTF ("can't parse '%s' as integer\n", str));
}
return val;
@@
-34,7
+34,7
@@
double parse_double (char *str)
{
char *pt = NULL;
double val = strtod (str, &pt);
{
char *pt = NULL;
double val = strtod (str, &pt);
- if ((*pt != '\0') && (*pt != '
\n') && (*pt != '
') && (*pt != '\t')) {
+ if ((*pt != '\0') && (*pt != ' ') && (*pt != '\t')) {
VERBOSE (morep, WARNING, PRINTF ("can't parse '%s' as double\n", str));
}
return val;
VERBOSE (morep, WARNING, PRINTF ("can't parse '%s' as double\n", str));
}
return val;