Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
e3-require
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Anders Lindh Olsson
e3-require
Commits
a148eb03
Commit
a148eb03
authored
2 years ago
by
Anders Lindh Olsson
Browse files
Options
Downloads
Patches
Plain Diff
Minor linting fixes
parent
1064b609
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
require-ess/src/expr.c
+5
-5
5 additions, 5 deletions
require-ess/src/expr.c
with
5 additions
and
5 deletions
require-ess/src/expr.c
+
5
−
5
View file @
a148eb03
...
@@ -160,11 +160,11 @@ static int startsWith(const char *p, const char *s) {
...
@@ -160,11 +160,11 @@ static int startsWith(const char *p, const char *s) {
static
int
parseOp
(
const
char
**
pp
)
{
static
int
parseOp
(
const
char
**
pp
)
{
const
char
*
p
=
*
pp
;
const
char
*
p
=
*
pp
;
int
o
,
l
;
skipSpace
(
p
);
skipSpace
(
p
);
if
(
ispunct
((
unsigned
char
)
*
p
))
{
if
(
ispunct
((
unsigned
char
)
*
p
))
{
for
(
o
=
1
;
o
<
(
int
)(
sizeof
(
ops
)
/
sizeof
(
ops
[
0
]));
o
++
)
{
for
(
int
o
=
1
;
o
<
(
int
)(
sizeof
(
ops
)
/
sizeof
(
ops
[
0
]));
o
++
)
{
int
l
;
if
((
l
=
startsWith
(
p
,
ops
[
o
].
str
)))
{
if
((
l
=
startsWith
(
p
,
ops
[
o
].
str
)))
{
/* operator found */
/* operator found */
*
pp
=
p
+
l
;
*
pp
=
p
+
l
;
...
@@ -179,7 +179,7 @@ static int parseSubExpr(const char **pp, long *v, int pr, int o) {
...
@@ -179,7 +179,7 @@ static int parseSubExpr(const char **pp, long *v, int pr, int o) {
const
char
*
p
=
*
pp
;
const
char
*
p
=
*
pp
;
long
val
=
o
?
*
v
:
0
;
long
val
=
o
?
*
v
:
0
;
long
val2
;
long
val2
;
int
o2
=
o
;
int
o2
;
if
(
exprDebug
)
if
(
exprDebug
)
printf
(
"parseExpr(%d): start %ld %s
\"
%s
\"\n
"
,
pr
,
val
,
ops
[
o
].
str
,
p
);
printf
(
"parseExpr(%d): start %ld %s
\"
%s
\"\n
"
,
pr
,
val
,
ops
[
o
].
str
,
p
);
...
@@ -322,10 +322,10 @@ static int parseSubExpr(const char **pp, long *v, int pr, int o) {
...
@@ -322,10 +322,10 @@ static int parseSubExpr(const char **pp, long *v, int pr, int o) {
static
const
char
*
getFormat
(
const
char
**
pp
)
{
static
const
char
*
getFormat
(
const
char
**
pp
)
{
static
char
format
[
20
];
static
char
format
[
20
];
const
char
*
p
=
*
pp
;
const
char
*
p
=
*
pp
;
unsigned
int
i
=
1
;
if
(
exprDebug
)
if
(
exprDebug
)
printf
(
"getFormat %s
\n
"
,
p
);
printf
(
"getFormat %s
\n
"
,
p
);
if
((
format
[
0
]
=
*
p
++
)
==
'%'
)
{
if
((
format
[
0
]
=
*
p
++
)
==
'%'
)
{
unsigned
int
i
=
1
;
while
(
i
<
sizeof
(
format
)
&&
memchr
(
" #-+0"
,
*
p
,
5
))
while
(
i
<
sizeof
(
format
)
&&
memchr
(
" #-+0"
,
*
p
,
5
))
format
[
i
++
]
=
*
p
++
;
format
[
i
++
]
=
*
p
++
;
while
(
i
<
sizeof
(
format
)
&&
*
p
>=
'0'
&&
*
p
<=
'9'
)
while
(
i
<
sizeof
(
format
)
&&
*
p
>=
'0'
&&
*
p
<=
'9'
)
...
@@ -334,7 +334,7 @@ static const char *getFormat(const char **pp) {
...
@@ -334,7 +334,7 @@ static const char *getFormat(const char **pp) {
format
[
i
++
]
=
'l'
;
format
[
i
++
]
=
'l'
;
if
(
i
<
sizeof
(
format
)
&&
memchr
(
"diouxXc"
,
*
p
,
7
))
{
if
(
i
<
sizeof
(
format
)
&&
memchr
(
"diouxXc"
,
*
p
,
7
))
{
format
[
i
++
]
=
*
p
++
;
format
[
i
++
]
=
*
p
++
;
format
[
i
]
=
0
;
format
[
i
]
=
0
;
// FIXME (alo): not our memory!
*
pp
=
p
;
*
pp
=
p
;
if
(
exprDebug
)
if
(
exprDebug
)
printf
(
"format = '%s'
\n
"
,
format
);
printf
(
"format = '%s'
\n
"
,
format
);
...
...
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