Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xorg-server/dist/hw/sun Remove more redundant...



details:   https://anonhg.NetBSD.org/xsrc/rev/a06c25601452
branches:  trunk
changeset: 10542:a06c25601452
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Tue Aug 11 06:49:09 2020 +0000

description:
Remove more redundant command option arg checks.

diffstat:

 external/mit/xorg-server/dist/hw/sun/sun.h     |   1 +
 external/mit/xorg-server/dist/hw/sun/sunInit.c |   8 ++------
 external/mit/xorg-server/dist/hw/sun/sunIo.c   |  12 +++---------
 3 files changed, 6 insertions(+), 15 deletions(-)

diffs (67 lines):

diff -r 8d49d144ff02 -r a06c25601452 external/mit/xorg-server/dist/hw/sun/sun.h
--- a/external/mit/xorg-server/dist/hw/sun/sun.h        Sun Aug 09 16:01:19 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sun.h        Tue Aug 11 06:49:09 2020 +0000
@@ -298,6 +298,7 @@
 extern Bool            sunSwapLkeys;
 extern Bool            sunForceMono;
 extern Bool            sunDebug;
+extern char            *sunDeviceList;
 extern Bool            sunFlipPixels;
 extern Bool            sunFbInfo;
 extern Bool            sunCG4Frob;
diff -r 8d49d144ff02 -r a06c25601452 external/mit/xorg-server/dist/hw/sun/sunInit.c
--- a/external/mit/xorg-server/dist/hw/sun/sunInit.c    Sun Aug 09 16:01:19 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunInit.c    Tue Aug 11 06:49:09 2020 +0000
@@ -131,6 +131,7 @@
 
 Bool sunSwapLkeys = FALSE;
 Bool sunDebug = FALSE;
+char *sunDeviceList = NULL;
 Bool sunForceMono = FALSE;
 Bool sunFlipPixels = FALSE;
 Bool sunFbInfo = FALSE;
@@ -402,14 +403,9 @@
 {
     int                i;
     char       *envList = NULL;
-    char       *cmdList = NULL;
+    char       *cmdList = sunDeviceList;
     char       **deviceList = NULL;
 
-    for (i = 1; i < argc; i++)
-       if (strcmp (argv[i], "-dev") == 0 && i+1 < argc) {
-           cmdList = argv[i + 1];
-           break;
-       }
     if (!cmdList)
        envList = getenv ("XDEVICE");
 
diff -r 8d49d144ff02 -r a06c25601452 external/mit/xorg-server/dist/hw/sun/sunIo.c
--- a/external/mit/xorg-server/dist/hw/sun/sunIo.c      Sun Aug 09 16:01:19 2020 +0000
+++ b/external/mit/xorg-server/dist/hw/sun/sunIo.c      Tue Aug 11 06:49:09 2020 +0000
@@ -209,7 +209,9 @@
        return 1;
     }
     if (strcmp (argv[i], "-dev") == 0) {       /* -dev /dev/mumble */
-       if (++i >= argc) UseMsg ();
+       if (++i >= argc)
+           UseMsg();
+       sunDeviceList = argv[i];
        return 2;
     }
     if (strcmp (argv[i], "-mono") == 0) {      /* -mono */
@@ -228,14 +230,6 @@
        sunFbInfo = TRUE;
        return 1;
     }
-    if (strcmp (argv[i], "-kbd") == 0) {       /* -kbd */
-       if (++i >= argc) UseMsg();
-       return 2;
-    }
-    if (strcmp (argv[i], "-protect") == 0) {   /* -protect */
-       if (++i >= argc) UseMsg();
-       return 2;
-    }
     if (strcmp (argv[i], "-cg4frob") == 0) {
        sunCG4Frob = TRUE;
        return 1;



Home | Main Index | Thread Index | Old Index