Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
925f5899
Commit
925f5899
authored
Jan 02, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Args.c: do not parse nx/nx marker as option
slight optimization
parent
ee3afe30
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
9 deletions
+32
-9
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+32
-9
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
925f5899
...
...
@@ -1528,6 +1528,30 @@ static void nxagentParseOptionString(char *string)
SAFE_free
(
dup
);
}
char
*
nxagentSkipNXMarker
(
char
*
string
)
{
if
(
strncasecmp
(
string
,
"nx/nx,"
,
6
)
==
0
||
strncasecmp
(
string
,
"nx/nx:"
,
6
)
==
0
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: skipping [%6.6s]
\n
"
,
__func__
,
string
);
#endif
return
string
+
6
;
}
else
if
(
strncasecmp
(
string
,
"nx,"
,
3
)
==
0
||
strncasecmp
(
string
,
"nx:"
,
3
)
==
0
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: skipping [%3.3s]
\n
"
,
__func__
,
string
);
#endif
return
string
+
3
;
}
else
{
return
string
;
}
}
void
nxagentProcessOptions
(
char
*
string
)
{
if
(
!
string
)
...
...
@@ -1540,15 +1564,10 @@ void nxagentProcessOptions(char * string)
/* if the "filename" starts with an nx marker treat it
as an option _string_ instead of a filename */
if
(
strncasecmp
(
string
,
"nx/nx,"
,
6
)
==
0
||
strncasecmp
(
string
,
"nx/nx:"
,
6
)
==
0
)
char
*
skipped
=
nxagentSkipNXMarker
(
string
);
if
(
skipped
!=
string
)
{
nxagentParseOptionString
(
string
+
6
);
}
else
if
(
strncasecmp
(
string
,
"nx,"
,
3
)
==
0
||
strncasecmp
(
string
,
"nx:"
,
3
)
==
0
)
{
nxagentParseOptionString
(
string
+
3
);
nxagentParseOptionString
(
skipped
);
}
else
{
...
...
@@ -1659,7 +1678,11 @@ void nxagentProcessOptionsFile(char * filename)
data
[
offset
]
=
'\0'
;
nxagentParseOptionString
(
data
);
#ifdef DEBUG
fprintf
(
stderr
,
"%s: first line of options file [%s]
\n
"
,
__func__
,
data
);
#endif
nxagentParseOptionString
(
nxagentSkipNXMarker
(
data
));
nxagentProcessOptionsFileExit:
...
...
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