mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-06-25 04:01:30 +02:00
vncserver: refactor
This commit is contained in:
parent
21b42e462b
commit
a0f09dea15
@ -68,9 +68,8 @@ chop($host = `uname -n`);
|
|||||||
|
|
||||||
# Check command line options
|
# Check command line options
|
||||||
|
|
||||||
&ParseOptions("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,
|
my @supportedOptions = ("-geometry",1,"-depth",1,"-pixelformat",1,"-name",1,"-kill",1,"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1);
|
||||||
"-help",0,"-h",0,"--help",0,"-fp",1,"-list",0,"-fg",0,"-autokill",0,"-noxstartup",0,"-xstartup",1);
|
&ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions);
|
||||||
|
|
||||||
&ProcessCliOptions();
|
&ProcessCliOptions();
|
||||||
|
|
||||||
&CheckGeometryAndDepth();
|
&CheckGeometryAndDepth();
|
||||||
@ -481,13 +480,13 @@ sub Kill
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ParseOptions takes a list of possible options and a boolean indicating
|
# ParseOptionsAndRemoveMatchesFromARGV takes a list of possible options and a
|
||||||
# whether the option has a value following, and sets up an associative array
|
# boolean indicating whether the option has a value following, and sets up an
|
||||||
# %opt of the values of the options given on the command line. It removes all
|
# associative array %opt of the values of the options given on the command line.
|
||||||
# the arguments it uses from @ARGV and returns them in @optArgs.
|
# It removes all the arguments it uses from @ARGV and returns them in @optArgs.
|
||||||
#
|
#
|
||||||
|
|
||||||
sub ParseOptions
|
sub ParseOptionsAndRemoveMatchesFromARGV
|
||||||
{
|
{
|
||||||
local (@optval) = @_;
|
local (@optval) = @_;
|
||||||
local ($opt, @opts, %valFollows, @newargs);
|
local ($opt, @opts, %valFollows, @newargs);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user