Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
22405c3d
Commit
22405c3d
authored
Apr 30, 2002
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
command line handling
parent
dae41e0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
5 deletions
+15
-5
cargs.c
cargs.c
+14
-5
rfb.h
rfb.h
+1
-0
No files found.
cargs.c
View file @
22405c3d
...
...
@@ -35,6 +35,17 @@ rfbUsage(void)
exit
(
1
);
}
/* purges COUNT arguments from ARGV at POSITION and decrements ARGC.
POSITION points to the first non purged argument afterwards. */
void
rfbPurgeArguments
(
int
*
argc
,
int
*
position
,
int
count
,
char
*
argv
[])
{
int
amount
=
(
*
argc
)
-
(
*
position
)
-
count
;
if
(
amount
)
memmove
(
argv
+
(
*
position
),
argv
+
(
*
position
)
+
count
,
sizeof
(
char
*
)
*
amount
);
(
*
argc
)
-=
count
;
(
*
position
)
--
;
}
void
rfbProcessArguments
(
rfbScreenInfoPtr
rfbScreen
,
int
*
argc
,
char
*
argv
[])
{
...
...
@@ -80,12 +91,10 @@ rfbProcessArguments(rfbScreenInfoPtr rfbScreen,int* argc, char *argv[])
rfbScreen
->
height
=
atoi
(
argv
[
++
i
]);
}
else
{
/* we just remove the processed arguments from the list */
if
(
i
!=
i1
)
{
memmove
(
argv
+
i1
,
argv
+
i
,
sizeof
(
char
*
)
*
(
*
argc
-
i
));
*
argc
-=
i
-
i1
;
}
if
(
i
!=
i1
)
rfbPurgeArguments
(
argc
,
&
i
,
i1
-
i
,
argv
);
i1
++
;
i
=
i1
-
1
;
i
++
;
}
}
*
argc
-=
i
-
i1
;
...
...
rfb.h
View file @
22405c3d
...
...
@@ -760,6 +760,7 @@ extern int rfbSelectBox(rfbScreenInfoPtr rfbScreen,
/* cargs.c */
extern
void
rfbUsage
();
extern
void
rfbPurgeArguments
(
int
*
argc
,
int
*
position
,
int
count
,
char
*
argv
[]);
extern
void
rfbProcessArguments
(
rfbScreenInfoPtr
rfbScreen
,
int
*
argc
,
char
*
argv
[]);
extern
void
rfbProcessSizeArguments
(
int
*
width
,
int
*
height
,
int
*
bpp
,
int
*
argc
,
char
*
argv
[]);
...
...
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