aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xnest/Args.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
committermarha <marha@users.sourceforge.net>2012-03-23 10:05:55 +0100
commit0f834b91a4768673833ab4917e87d86c237bb1a6 (patch)
tree363489504ed4b2d360259b8de4c9e392918e5d02 /xorg-server/hw/xnest/Args.c
parentfc72edebf875378459368c5383d9023730cbca54 (diff)
downloadvcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.gz
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.tar.bz2
vcxsrv-0f834b91a4768673833ab4917e87d86c237bb1a6.zip
libX11 xserver fontconfig mesa pixman xkbcomp xkeyboard-config git update
23 Mar 2012
Diffstat (limited to 'xorg-server/hw/xnest/Args.c')
-rw-r--r--xorg-server/hw/xnest/Args.c262
1 files changed, 132 insertions, 130 deletions
diff --git a/xorg-server/hw/xnest/Args.c b/xorg-server/hw/xnest/Args.c
index cdc831133..21faf2e3a 100644
--- a/xorg-server/hw/xnest/Args.c
+++ b/xorg-server/hw/xnest/Args.c
@@ -29,162 +29,164 @@ is" without express or implied warranty.
#include "Display.h"
#include "Args.h"
-char *xnestDisplayName = NULL;
+char *xnestDisplayName = NULL;
Bool xnestSynchronize = False;
Bool xnestFullGeneration = False;
-int xnestDefaultClass;
+int xnestDefaultClass;
Bool xnestUserDefaultClass = False;
int xnestDefaultDepth;
Bool xnestUserDefaultDepth = False;
Bool xnestSoftwareScreenSaver = False;
-int xnestX;
-int xnestY;
+int xnestX;
+int xnestY;
unsigned int xnestWidth;
unsigned int xnestHeight;
int xnestUserGeometry = 0;
-int xnestBorderWidth;
+int xnestBorderWidth;
Bool xnestUserBorderWidth = False;
-char *xnestWindowName = NULL;
+char *xnestWindowName = NULL;
int xnestNumScreens = 0;
Bool xnestDoDirectColormaps = False;
Window xnestParentWindow = 0;
int
-ddxProcessArgument (int argc, char *argv[], int i)
+ddxProcessArgument(int argc, char *argv[], int i)
{
- if (!strcmp(argv[i], "-display")) {
- if (++i < argc) {
- xnestDisplayName = argv[i];
- return 2;
+ if (!strcmp(argv[i], "-display")) {
+ if (++i < argc) {
+ xnestDisplayName = argv[i];
+ return 2;
+ }
+ return 0;
}
- return 0;
- }
- if (!strcmp(argv[i], "-sync")) {
- xnestSynchronize = True;
- return 1;
- }
- if (!strcmp(argv[i], "-full")) {
- xnestFullGeneration = True;
- return 1;
- }
- if (!strcmp(argv[i], "-class")) {
- if (++i < argc) {
- if (!strcmp(argv[i], "StaticGray")) {
- xnestDefaultClass = StaticGray;
- xnestUserDefaultClass = True;
- return 2;
- }
- else if (!strcmp(argv[i], "GrayScale")) {
- xnestDefaultClass = GrayScale;
- xnestUserDefaultClass = True;
- return 2;
- }
- else if (!strcmp(argv[i], "StaticColor")) {
- xnestDefaultClass = StaticColor;
- xnestUserDefaultClass = True;
- return 2;
- }
- else if (!strcmp(argv[i], "PseudoColor")) {
- xnestDefaultClass = PseudoColor;
- xnestUserDefaultClass = True;
- return 2;
- }
- else if (!strcmp(argv[i], "TrueColor")) {
- xnestDefaultClass = TrueColor;
- xnestUserDefaultClass = True;
- return 2;
- }
- else if (!strcmp(argv[i], "DirectColor")) {
- xnestDefaultClass = DirectColor;
- xnestUserDefaultClass = True;
- return 2;
- }
+ if (!strcmp(argv[i], "-sync")) {
+ xnestSynchronize = True;
+ return 1;
}
- return 0;
- }
- if (!strcmp(argv[i], "-cc")) {
- if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultClass) == 1) {
- if (xnestDefaultClass >= 0 && xnestDefaultClass <= 5) {
- xnestUserDefaultClass = True;
- /* lex the OS layer process it as well, so return 0 */
- }
+ if (!strcmp(argv[i], "-full")) {
+ xnestFullGeneration = True;
+ return 1;
}
- return 0;
- }
- if (!strcmp(argv[i], "-depth")) {
- if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultDepth) == 1) {
- if (xnestDefaultDepth > 0) {
- xnestUserDefaultDepth = True;
- return 2;
- }
+ if (!strcmp(argv[i], "-class")) {
+ if (++i < argc) {
+ if (!strcmp(argv[i], "StaticGray")) {
+ xnestDefaultClass = StaticGray;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "GrayScale")) {
+ xnestDefaultClass = GrayScale;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "StaticColor")) {
+ xnestDefaultClass = StaticColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "PseudoColor")) {
+ xnestDefaultClass = PseudoColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "TrueColor")) {
+ xnestDefaultClass = TrueColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ else if (!strcmp(argv[i], "DirectColor")) {
+ xnestDefaultClass = DirectColor;
+ xnestUserDefaultClass = True;
+ return 2;
+ }
+ }
+ return 0;
}
- return 0;
- }
- if (!strcmp(argv[i], "-sss")) {
- xnestSoftwareScreenSaver = True;
- return 1;
- }
- if (!strcmp(argv[i], "-geometry")) {
- if (++i < argc) {
- xnestUserGeometry = XParseGeometry(argv[i],
- &xnestX, &xnestY,
- &xnestWidth, &xnestHeight);
- if (xnestUserGeometry) return 2;
+ if (!strcmp(argv[i], "-cc")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultClass) == 1) {
+ if (xnestDefaultClass >= 0 && xnestDefaultClass <= 5) {
+ xnestUserDefaultClass = True;
+ /* lex the OS layer process it as well, so return 0 */
+ }
+ }
+ return 0;
}
- return 0;
- }
- if (!strcmp(argv[i], "-bw")) {
- if (++i < argc && sscanf(argv[i], "%i", &xnestBorderWidth) == 1) {
- if (xnestBorderWidth >= 0) {
- xnestUserBorderWidth = True;
- return 2;
- }
+ if (!strcmp(argv[i], "-depth")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestDefaultDepth) == 1) {
+ if (xnestDefaultDepth > 0) {
+ xnestUserDefaultDepth = True;
+ return 2;
+ }
+ }
+ return 0;
}
- return 0;
- }
- if (!strcmp(argv[i], "-name")) {
- if (++i < argc) {
- xnestWindowName = argv[i];
- return 2;
+ if (!strcmp(argv[i], "-sss")) {
+ xnestSoftwareScreenSaver = True;
+ return 1;
}
- return 0;
- }
- if (!strcmp(argv[i], "-scrns")) {
- if (++i < argc && sscanf(argv[i], "%i", &xnestNumScreens) == 1) {
- if (xnestNumScreens > 0) {
- if (xnestNumScreens > MAXSCREENS) {
- ErrorF("Maximum number of screens is %d.\n", MAXSCREENS);
- xnestNumScreens = MAXSCREENS;
- }
- return 2;
- }
+ if (!strcmp(argv[i], "-geometry")) {
+ if (++i < argc) {
+ xnestUserGeometry = XParseGeometry(argv[i],
+ &xnestX, &xnestY,
+ &xnestWidth, &xnestHeight);
+ if (xnestUserGeometry)
+ return 2;
+ }
+ return 0;
}
- return 0;
- }
- if (!strcmp(argv[i], "-install")) {
- xnestDoDirectColormaps = True;
- return 1;
- }
- if (!strcmp(argv[i], "-parent")) {
- if (++i < argc) {
- xnestParentWindow = (XID) strtol (argv[i], (char**)NULL, 0);
- return 2;
+ if (!strcmp(argv[i], "-bw")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestBorderWidth) == 1) {
+ if (xnestBorderWidth >= 0) {
+ xnestUserBorderWidth = True;
+ return 2;
+ }
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-name")) {
+ if (++i < argc) {
+ xnestWindowName = argv[i];
+ return 2;
+ }
+ return 0;
+ }
+ if (!strcmp(argv[i], "-scrns")) {
+ if (++i < argc && sscanf(argv[i], "%i", &xnestNumScreens) == 1) {
+ if (xnestNumScreens > 0) {
+ if (xnestNumScreens > MAXSCREENS) {
+ ErrorF("Maximum number of screens is %d.\n", MAXSCREENS);
+ xnestNumScreens = MAXSCREENS;
+ }
+ return 2;
+ }
+ }
+ return 0;
}
- }
- return 0;
+ if (!strcmp(argv[i], "-install")) {
+ xnestDoDirectColormaps = True;
+ return 1;
+ }
+ if (!strcmp(argv[i], "-parent")) {
+ if (++i < argc) {
+ xnestParentWindow = (XID) strtol(argv[i], (char **) NULL, 0);
+ return 2;
+ }
+ }
+ return 0;
}
-void ddxUseMsg(void)
+void
+ddxUseMsg(void)
{
- ErrorF("-display string display name of the real server\n");
- ErrorF("-sync sinchronize with the real server\n");
- ErrorF("-full utilize full regeneration\n");
- ErrorF("-class string default visual class\n");
- ErrorF("-depth int default depth\n");
- ErrorF("-sss use software screen saver\n");
- ErrorF("-geometry WxH+X+Y window size and position\n");
- ErrorF("-bw int window border width\n");
- ErrorF("-name string window name\n");
- ErrorF("-scrns int number of screens to generate\n");
- ErrorF("-install instal colormaps directly\n");
+ ErrorF("-display string display name of the real server\n");
+ ErrorF("-sync sinchronize with the real server\n");
+ ErrorF("-full utilize full regeneration\n");
+ ErrorF("-class string default visual class\n");
+ ErrorF("-depth int default depth\n");
+ ErrorF("-sss use software screen saver\n");
+ ErrorF("-geometry WxH+X+Y window size and position\n");
+ ErrorF("-bw int window border width\n");
+ ErrorF("-name string window name\n");
+ ErrorF("-scrns int number of screens to generate\n");
+ ErrorF("-install instal colormaps directly\n");
}