[Xorg-commit] xc/programs/Xserver/hw/xwin InitOutput.c,1.1.4.1.2.2,1.1.4.1.2.3 winconfig.c,1.1.4.1.2.1,1.1.4.1.2.2 winengine.c,1.1.4.1.2.2,1.1.4.1.2.3 winkeybd.c,1.1.4.1.2.1,1.1.4.1.2.2 winmsg.c,1.1.4.1,1.1.4.1.2.1

Alexander Gottwald xorg-commit at pdx.freedesktop.org
Tue Dec 16 00:54:17 EET 2003


Committed by: ago

Update of /cvs/xorg/xc/programs/Xserver/hw/xwin
In directory pdx:/tmp/cvs-serv28740

Modified Files:
      Tag: CYGWIN
	InitOutput.c winconfig.c winengine.c winkeybd.c winmsg.c 
Log Message:
Bind some messages to a loglevel other than 0. The default loglevel is 4, so
this change does not affect the default output, but -logverbose 0 will be
less noisy if completely finished


Index: InitOutput.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/InitOutput.c,v
retrieving revision 1.1.4.1.2.2
retrieving revision 1.1.4.1.2.3
diff -u -d -r1.1.4.1.2.2 -r1.1.4.1.2.3
--- InitOutput.c	9 Dec 2003 01:37:16 -0000	1.1.4.1.2.2
+++ InitOutput.c	15 Dec 2003 22:54:14 -0000	1.1.4.1.2.3
@@ -29,6 +29,7 @@
 /* $XFree86: xc/programs/Xserver/hw/xwin/InitOutput.c,v 1.35 2003/10/08 11:13:02 eich Exp $ */
 
 #include "win.h"
+#include "winmsg.h"
 #include "winconfig.h"
 #include "winprefs.h"
 
@@ -129,7 +130,7 @@
   dwWidth = GetSystemMetrics (SM_CXSCREEN);
   dwHeight = GetSystemMetrics (SM_CYSCREEN);
 
-  ErrorF ("winInitializeDefaultScreens - w %d h %d\n",
+  winErrorFVerb (2, "winInitializeDefaultScreens - w %d h %d\n",
 	  (int) dwWidth, (int) dwHeight);
 
   /* Set a default DPI, if no parameter was passed */
@@ -173,7 +174,7 @@
   /* Signal that the default screens have been initialized */
   g_fInitializedDefaultScreens = TRUE;
 
-  ErrorF ("winInitializeDefaultScreens - Returning\n");
+  winErrorFVerb (2, "winInitializeDefaultScreens - Returning\n");
 }
 
 
@@ -182,7 +183,7 @@
 ddxGiveUp()
 {
 #if CYGDEBUG
-  ErrorF ("ddxGiveUp\n");
+  winErrorFVerb (2, "ddxGiveUp\n");
 #endif
 
   /* Notify the worker threads we're exiting */
@@ -235,7 +236,7 @@
 AbortDDX (void)
 {
 #if CYGDEBUG
-  ErrorF ("AbortDDX\n");
+  winErrorFVerb (2, "AbortDDX\n");
 #endif
   ddxGiveUp ();
 }
@@ -259,7 +260,7 @@
   /* Add a default screen if no screens were specified */
   if (g_iNumScreens == 0)
     {
-      ErrorF ("OsVendorInit - Creating bogus screen 0\n");
+      winErrorFVerb (2, "OsVendorInit - Creating bogus screen 0\n");
 
       /* 
        * We need to initialize default screens if no arguments
@@ -371,6 +372,8 @@
 
   ErrorF ("-nounicodeclipboard\n"
 	  "\tDo not use Unicode clipboard even if NT-based platform.\n");
+
+  /* TODO: new options */ 
 }
 
 
@@ -422,25 +425,25 @@
        * OsVendorInit () gets called, otherwise we will overwrite
        * settings changed by parameters such as -fullscreen, etc.
        */
-      ErrorF ("ddxProcessArgument - Initializing default screens\n");
+      winErrorFVerb (2, "ddxProcessArgument - Initializing default screens\n");
       winInitializeDefaultScreens ();
     }
 
 #if CYGDEBUG
-  ErrorF ("ddxProcessArgument - arg: %s\n", argv[i]);
+  winErrorFVerb (2, "ddxProcessArgument - arg: %s\n", argv[i]);
 #endif
   
   /*
    * Look for the '-screen scr_num [width height]' argument
    */
-  if (strcmp (argv[i], "-screen") == 0)
+  if (IS_OPTION ("-screen"))
     {
       int		iArgsProcessed = 1;
       int		nScreenNum;
       int		iWidth, iHeight;
 
 #if CYGDEBUG
-      ErrorF ("ddxProcessArgument - screen - argc: %d i: %d\n",
+      winErrorFVerb (2, "ddxProcessArgument - screen - argc: %d i: %d\n",
 	      argc, i);
 #endif
 
@@ -468,7 +471,7 @@
 			  (int *) &iWidth,
 			  (int *) &iHeight))
 	{
-	  ErrorF ("ddxProcessArgument - screen - Found ``WxD'' arg\n");
+	  winErrorFVerb (2, "ddxProcessArgument - screen - Found ``WxD'' arg\n");
 	  iArgsProcessed = 3;
 	  g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
 	  g_ScreenInfo[nScreenNum].dwWidth = iWidth;
@@ -482,7 +485,7 @@
 	       && 1 == sscanf (argv[i + 3], "%d",
 			       (int *) &iHeight))
 	{
-	  ErrorF ("ddxProcessArgument - screen - Found ``W D'' arg\n");
+	  winErrorFVerb (2, "ddxProcessArgument - screen - Found ``W D'' arg\n");
 	  iArgsProcessed = 4;
 	  g_ScreenInfo[nScreenNum].fUserGaveHeightAndWidth = TRUE;
 	  g_ScreenInfo[nScreenNum].dwWidth = iWidth;
@@ -492,7 +495,7 @@
 	}
       else
 	{
-	  ErrorF ("ddxProcessArgument - screen - Did not find size arg. "
+	  winErrorFVerb (2, "ddxProcessArgument - screen - Did not find size arg. "
 		  "dwWidth: %d dwHeight: %d\n",
 		  (int) g_ScreenInfo[nScreenNum].dwWidth,
 		  (int) g_ScreenInfo[nScreenNum].dwHeight);
@@ -530,7 +533,7 @@
   /*
    * Look for the '-engine n' argument
    */
-  if (strcmp (argv[i], "-engine") == 0)
+  if (IS_OPTION ("-engine"))
     {
       DWORD		dwEngine = 0;
       CARD8		c8OnBits = 0;
@@ -579,7 +582,7 @@
   /*
    * Look for the '-fullscreen' argument
    */
-  if (strcmp (argv[i], "-fullscreen") == 0)
+  if (IS_OPTION ("-fullscreen"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -617,7 +620,7 @@
   /*
    * Look for the '-lesspointer' argument
    */
-  if (strcmp (argv[i], "-lesspointer") == 0)
+  if (IS_OPTION ("-lesspointer"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -643,7 +646,7 @@
   /*
    * Look for the '-nodecoration' argument
    */
-  if (strcmp (argv[i], "-nodecoration") == 0)
+  if (IS_OPTION ("-nodecoration"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -669,7 +672,7 @@
   /*
    * Look for the '-rootless' argument
    */
-  if (strcmp (argv[i], "-rootless") == 0)
+  if (IS_OPTION ("-rootless"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -695,7 +698,7 @@
   /*
    * Look for the '-multiwindow' argument
    */
-  if (strcmp (argv[i], "-multiwindow") == 0)
+  if (IS_OPTION ("-multiwindow"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -721,8 +724,8 @@
   /*
    * Look for the '-multiplemonitors' argument
    */
-  if (strcmp (argv[i], "-multiplemonitors") == 0
-      || strcmp (argv[i], "-multimonitors") == 0)
+  if (IS_OPTION ("-multiplemonitors")
+      || IS_OPTION ("-multimonitors"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -748,7 +751,7 @@
   /*
    * Look for the '-scrollbars' argument
    */
-  if (strcmp (argv[i], "-scrollbars") == 0)
+  if (IS_OPTION ("-scrollbars"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -782,7 +785,7 @@
   /*
    * Look for the '-clipboard' argument
    */
-  if (strcmp (argv[i], "-clipboard") == 0)
+  if (IS_OPTION ("-clipboard"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -808,7 +811,7 @@
   /*
    * Look for the '-ignoreinput' argument
    */
-  if (strcmp (argv[i], "-ignoreinput") == 0)
+  if (IS_OPTION ("-ignoreinput"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -834,7 +837,7 @@
   /*
    * Look for the '-emulate3buttons' argument
    */
-  if (strcmp (argv[i], "-emulate3buttons") == 0)
+  if (IS_OPTION ("-emulate3buttons"))
     {
       int	iArgsProcessed = 1;
       int	iE3BTimeout = WIN_DEFAULT_E3B_TIME;
@@ -882,7 +885,7 @@
   /*
    * Look for the '-depth n' argument
    */
-  if (strcmp (argv[i], "-depth") == 0)
+  if (IS_OPTION ("-depth"))
     {
       DWORD		dwBPP = 0;
       
@@ -920,7 +923,7 @@
   /*
    * Look for the '-refresh n' argument
    */
-  if (strcmp (argv[i], "-refresh") == 0)
+  if (IS_OPTION ("-refresh"))
     {
       DWORD		dwRefreshRate = 0;
       
@@ -958,7 +961,7 @@
   /*
    * Look for the '-clipupdates num_boxes' argument
    */
-  if (strcmp (argv[i], "-clipupdates") == 0)
+  if (IS_OPTION ("-clipupdates"))
     {
       DWORD		dwNumBoxes = 0;
       
@@ -996,7 +999,7 @@
   /*
    * Look for the '-emulatepseudo' argument
    */
-  if (strcmp (argv[i], "-emulatepseudo") == 0)
+  if (IS_OPTION ("-emulatepseudo"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1022,7 +1025,7 @@
   /*
    * Look for the '-nowinkill' argument
    */
-  if (strcmp (argv[i], "-nowinkill") == 0)
+  if (IS_OPTION ("-nowinkill"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1048,7 +1051,7 @@
   /*
    * Look for the '-winkill' argument
    */
-  if (strcmp (argv[i], "-winkill") == 0)
+  if (IS_OPTION ("-winkill"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1074,7 +1077,7 @@
   /*
    * Look for the '-nounixkill' argument
    */
-  if (strcmp (argv[i], "-nounixkill") == 0)
+  if (IS_OPTION ("-nounixkill"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1100,7 +1103,7 @@
   /*
    * Look for the '-unixkill' argument
    */
-  if (strcmp (argv[i], "-unixkill") == 0)
+  if (IS_OPTION ("-unixkill"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1126,7 +1129,7 @@
   /*
    * Look for the '-notrayicon' argument
    */
-  if (strcmp (argv[i], "-notrayicon") == 0)
+  if (IS_OPTION ("-notrayicon"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1152,7 +1155,7 @@
   /*
    * Look for the '-trayicon' argument
    */
-  if (strcmp (argv[i], "-trayicon") == 0)
+  if (IS_OPTION ("-trayicon"))
     {
       /* Is this parameter attached to a screen or is it global? */
       if (-1 == g_iLastScreen)
@@ -1293,12 +1296,12 @@
   int		iMaxConsecutiveScreen = 0;
 
 #if CYGDEBUG
-  ErrorF ("InitOutput\n");
+  winErrorFVerb (2, "InitOutput\n");
 #endif
 
   /* Try to read the XF86Config-style configuration file */
   if (!winReadConfigfile ())
-    ErrorF ("InitOutput - Error reading config file\n");
+    winErrorFVerb (1, "InitOutput - Error reading config file\n");
 
   /* Setup global screen info parameters */
   screenInfo->imageByteOrder = IMAGE_BYTE_ORDER;
@@ -1327,7 +1330,7 @@
 					 "_TrackMouseEvent");
   if (g_fpTrackMouseEvent == NULL)
     {
-      ErrorF ("InitOutput - Could not get pointer to function\n"
+      winErrorFVerb (1, "InitOutput - Could not get pointer to function\n"
 	      "\t_TrackMouseEvent in comctl32.dll.  Try installing\n"
 	      "\tInternet Explorer 3.0 or greater if you have not\n"
 	      "\talready.\n");
@@ -1352,7 +1355,7 @@
       if (g_ScreenInfo[i].fExplicitScreen)
 	iMaxConsecutiveScreen = i + 1;
     }
-  ErrorF ("InitOutput - g_iNumScreens: %d iMaxConsecutiveScreen: %d\n",
+  winErrorFVerb (2, "InitOutput - g_iNumScreens: %d iMaxConsecutiveScreen: %d\n",
 	  g_iNumScreens, iMaxConsecutiveScreen);
   if (g_iNumScreens < iMaxConsecutiveScreen)
     FatalError ("InitOutput - Malformed set of screen parameter(s).  "
@@ -1379,6 +1382,6 @@
   LoadPreferences();
 
 #if CYGDEBUG || YES
-  ErrorF ("InitOutput - Returning.\n");
+  winErrorFVerb (2, "InitOutput - Returning.\n");
 #endif
 }

Index: winconfig.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winconfig.c,v
retrieving revision 1.1.4.1.2.1
retrieving revision 1.1.4.1.2.2
diff -u -d -r1.1.4.1.2.1 -r1.1.4.1.2.2
--- winconfig.c	9 Dec 2003 01:37:16 -0000	1.1.4.1.2.1
+++ winconfig.c	15 Dec 2003 22:54:14 -0000	1.1.4.1.2.2
@@ -189,7 +189,7 @@
 			     g_xf86configptr->conf_layout_lst,
 			     NULL))
 	    {
-	      winMsg (X_ERROR, "Unable to determin the screen layout\n");
+	      winMsg (X_ERROR, "Unable to determine the screen layout\n");
 	      return FALSE;
 	    }
 	}

Index: winengine.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winengine.c,v
retrieving revision 1.1.4.1.2.2
retrieving revision 1.1.4.1.2.3
diff -u -d -r1.1.4.1.2.2 -r1.1.4.1.2.3
--- winengine.c	5 Dec 2003 03:37:26 -0000	1.1.4.1.2.2
+++ winengine.c	15 Dec 2003 22:54:14 -0000	1.1.4.1.2.3
@@ -66,12 +66,12 @@
     {
     case VER_PLATFORM_WIN32_NT:
       /* Engine 4 is supported on NT only */
-      ErrorF ("winDetectSupportedEngines - Windows NT/2000/XP\n");
+      winErrorFVerb (2, "winDetectSupportedEngines - Windows NT/2000/XP\n");
       break;
 
     case VER_PLATFORM_WIN32_WINDOWS:
       /* Engine 4 is supported on NT only */
-      ErrorF ("winDetectSupportedEngines - Windows 95/98/Me\n");
+      winErrorFVerb (2, "winDetectSupportedEngines - Windows 95/98/Me\n");
       break;
     }
 
@@ -97,20 +97,20 @@
       if (FAILED (ddrval))
 	{
 	  /* No DirectDraw support */
-	  ErrorF ("winDetectSupportedEngines - DirectDraw not installed\n");
+	  winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw not installed\n");
 	  return;
 	}
       else
 	{
 	  /* We have DirectDraw */
-	  ErrorF ("winDetectSupportedEngines - DirectDraw installed\n");
+	  winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw installed\n");
 	  g_dwEnginesSupported |= WIN_SERVER_SHADOW_DD;
 
 	  /* Allow PrimaryDD engine if NT */
 	  if (osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
 	    {
 	      g_dwEnginesSupported |= WIN_SERVER_PRIMARY_DD;
-	      ErrorF ("winDetectSupportedEngines - Allowing PrimaryDD\n");
+	      winErrorFVerb (2, "winDetectSupportedEngines - Allowing PrimaryDD\n");
 	    }
 	}
       
@@ -121,7 +121,7 @@
       if (SUCCEEDED (ddrval))
 	{
 	  /* We have DirectDraw4 */
-	  ErrorF ("winDetectSupportedEngines - DirectDraw4 installed\n");
+	  winErrorFVerb (2, "winDetectSupportedEngines - DirectDraw4 installed\n");
 	  g_dwEnginesSupported |= WIN_SERVER_SHADOW_DDNL;
 	}
 
@@ -132,7 +132,7 @@
 	IDirectDraw_Release (lpdd);
     }
 
-  ErrorF ("winDetectSupportedEngines - Returning, supported engines %08x\n",
+  winErrorFVerb (2, "winDetectSupportedEngines - Returning, supported engines %08x\n",
 	  (unsigned int) g_dwEnginesSupported);
 }
 

Index: winkeybd.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winkeybd.c,v
retrieving revision 1.1.4.1.2.1
retrieving revision 1.1.4.1.2.2
diff -u -d -r1.1.4.1.2.1 -r1.1.4.1.2.2
--- winkeybd.c	9 Dec 2003 01:37:16 -0000	1.1.4.1.2.1
+++ winkeybd.c	15 Dec 2003 22:54:14 -0000	1.1.4.1.2.2
@@ -407,7 +407,7 @@
 	      names.geometry = g_winInfo.xkb.geometry;
 	    }
 
-	  ErrorF("Rules = \"%s\" Model = \"%s\" Layout = \"%s\""
+	  winErrorFVerb(2, "Rules = \"%s\" Model = \"%s\" Layout = \"%s\""
 		 " Variant = \"%s\" Options = \"%s\"\n",
 		 g_winInfo.xkb.rules, g_winInfo.xkb.model,
 		 g_winInfo.xkb.layout, g_winInfo.xkb.variant,
@@ -433,7 +433,7 @@
             }
           else
             {  
-              ErrorF ("winKeybdProc - Error initializing keyboard AutoRepeat (No XKB)\n");
+              winErrorFVerb (1, "winKeybdProc - Error initializing keyboard AutoRepeat (No XKB)\n");
             }
         }
 #endif

Index: winmsg.c
===================================================================
RCS file: /cvs/xorg/xc/programs/Xserver/hw/xwin/winmsg.c,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.1.2.1
diff -u -d -r1.1.4.1 -r1.1.4.1.2.1
--- winmsg.c	26 Nov 2003 22:49:05 -0000	1.1.4.1
+++ winmsg.c	15 Dec 2003 22:54:14 -0000	1.1.4.1.2.1
@@ -33,14 +33,8 @@
 #include "winmsg.h"
 #include <stdarg.h>
 
-#ifndef VERBOSE_LEVEL
-#define VERBOSE_LEVEL 4
-#endif
-
-
 void winVMsg (int, MessageType, int verb, const char *, va_list);
 
-
 void
 winVMsg (int scrnIndex, MessageType type, int verb, const char *format,
 	 va_list ap)
@@ -64,7 +58,7 @@
 {
   va_list ap;
   va_start (ap, format);
-  LogVMessageVerb(type, 0, format, ap);
+  LogVMessageVerb(type, 1, format, ap);
   va_end (ap);
 }
 





More information about the xorg-commit mailing list