From 59f990b372068461fbfd7090a6af739fe7e1d86b Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Mon, 9 Aug 2021 22:57:56 +1200 Subject: [PATCH] vncserver: extract ParseAndProcessCliOptions() --- unix/vncserver | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 6fcac00..399e125 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -31,11 +31,7 @@ &DetectFontPath(); -# Check command line options - -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); -&ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions); -&ProcessCliOptions(); +&ParseAndProcessCliOptions(); &CheckGeometryAndDepth(); @@ -1046,3 +1042,9 @@ sub SetGlobalVariables { chop($host = `uname -n`); } + +sub ParseAndProcessCliOptions { + 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); + &ParseOptionsAndRemoveMatchesFromARGV(@supportedOptions); + &ProcessCliOptions(); +}