Latest CVS Compilation error
Harold L Hunt II
huntharo@msu.edu
Wed Sep 17 23:21:00 GMT 2003
Alexander,
I have submitted your change to XFree86 as part of a large patch set.
See bug 701:
http://bugs.xfree86.org/show_bug.cgi?id=701
Harold
Alexander Gottwald wrote:
> Harold L Hunt II wrote:
>
>
>>Please resubmit your earlier patch when you have this completed.
>
>
> Stupid me. Has forgotten to attach the patch *g*.
>
> bye
> ago
>
> NP: Welle:Erdball - Starfighter F-104G (2)
>
>
> ------------------------------------------------------------------------
>
> Index: winmsg.c
> ===================================================================
> RCS file: /cvs/xc/programs/Xserver/hw/xwin/winmsg.c,v
> retrieving revision 1.1
> diff -u -r1.1 winmsg.c
> --- winmsg.c 17 Oct 2002 08:18:22 -0000 1.1
> +++ winmsg.c 15 Sep 2003 19:27:26 -0000
> @@ -45,26 +45,7 @@
> winVMsg (int scrnIndex, MessageType type, int verb, const char *format,
> va_list ap)
> {
> - const char *prefix = NULL;
> -
> - if (verb && verb > VERBOSE_LEVEL)
> - return;
> -
> -#undef __msg
> -#define __msg(name,string) case name: prefix = string; break;
> -#undef _msg
> -#define _msg(name,string) __msg(name,string)
> - switch (type)
> - {
> - MESSAGE_STRINGS default:prefix = NULL;
> - break;
> - }
> -#undef __msg
> -#undef _msg
> -
> - if (prefix != NULL)
> - ErrorF ("%s ", prefix);
> - VErrorF (format, ap);
> + LogVMessageVerb(type, verb, format, ap);
> }
>
>
> @@ -73,7 +54,7 @@
> {
> va_list ap;
> va_start (ap, format);
> - winVMsg (scrnIndex, type, 0, format, ap);
> + LogVMessageVerb(type, 0, format, ap);
> va_end (ap);
> }
>
> @@ -83,7 +64,7 @@
> {
> va_list ap;
> va_start (ap, format);
> - winVMsg (0, type, 0, format, ap);
> + LogVMessageVerb(type, 0, format, ap);
> va_end (ap);
> }
>
> @@ -94,7 +75,7 @@
> {
> va_list ap;
> va_start (ap, format);
> - winVMsg (scrnIndex, type, verb, format, ap);
> + LogVMessageVerb(type, verb, format, ap);
> va_end (ap);
> }
>
> @@ -104,7 +85,7 @@
> {
> va_list ap;
> va_start (ap, format);
> - winVMsg (0, type, verb, format, ap);
> + LogVMessageVerb(type, verb, format, ap);
> va_end (ap);
> }
>
> @@ -114,6 +95,6 @@
> {
> va_list ap;
> va_start (ap, format);
> - winVMsg (0, X_NONE, verb, format, ap);
> + LogVMessageVerb(X_NONE, verb, format, ap);
> va_end (ap);
> }
> Index: winmsg.h
> ===================================================================
> RCS file: /cvs/xc/programs/Xserver/hw/xwin/winmsg.h,v
> retrieving revision 1.1
> diff -u -r1.1 winmsg.h
> --- winmsg.h 17 Oct 2002 08:18:22 -0000 1.1
> +++ winmsg.h 15 Sep 2003 19:27:26 -0000
> @@ -32,31 +32,6 @@
> #ifndef __WIN_MSG_H__
> #define __WIN_MSG_H__
>
> -
> -#define __msg_name(name,string) name
> -#define __msg(name,string) __msg_name(name,string)
> -#define _msg(name,string) __msg(name,string),
> -
> -#define MESSAGE_STRINGS \
> - _msg(X_PROBED,"(--)" /* Value was probed */)\
> - _msg(X_CONFIG,"(**)" /* Value was given in the config file */)\
> - _msg(X_DEFAULT,"(==)" /* Value is a default */)\
> - _msg(X_CMDLINE,"(++)" /* Value was given on the command line */)\
> - _msg(X_NOTICE,"(!!)" /* Notice */) \
> - _msg(X_ERROR,"(EE)" /* Error message */) \
> - _msg(X_WARNING,"(WW)" /* Warning message */) \
> - _msg(X_INFO,"(II)" /* Informational message */) \
> - _msg(X_UNKNOWN,"(?""?)" /* Unknown, trigraph fix */) \
> - _msg(X_NONE,NULL /* No prefix */) \
> - __msg(X_NOT_IMPLEMENTED,"(NI)" /* Not implemented */)
> -
> -typedef enum
> -{
> - MESSAGE_STRINGS
> -}
> -MessageType;
> -
> -
> /*
> * Function prototypes
> */
> Index: InitOutput.c
> ===================================================================
> RCS file: /cvs/xc/programs/Xserver/hw/xwin/InitOutput.c,v
> retrieving revision 1.33
> diff -u -r1.33 InitOutput.c
> --- InitOutput.c 29 Jul 2003 21:25:15 -0000 1.33
> +++ InitOutput.c 15 Sep 2003 19:27:27 -0000
> @@ -47,13 +47,15 @@
> int g_iWindowPrivateIndex = -1;
> unsigned long g_ulServerGeneration = 0;
> Bool g_fInitializedDefaultScreens = FALSE;
> -FILE *g_pfLog = NULL;
> DWORD g_dwEnginesSupported = 0;
> HINSTANCE g_hInstance = 0;
> HWND g_hDlgDepthChange = NULL;
> HWND g_hDlgExit = NULL;
> Bool g_fCalledSetLocale = FALSE;
> Bool g_fCalledXInitThreads = FALSE;
> +int g_iLogVerbose = 4;
> +char * g_pszLogFile = WIN_LOG_FNAME;
> +Bool g_fLogInited = FALSE;
>
>
> /*
> @@ -190,15 +192,11 @@
> g_fdMessageQueue = WIN_FD_INVALID;
> }
>
> - /* Close the log file handle */
> - if (g_pfLog != NULL)
> - {
> - /* Close log file */
> - fclose (g_pfLog);
> -
> - /* Set the file handle to invalid */
> - g_pfLog = NULL;
> - }
> + if (!g_fLogInited) {
> + LogInit(g_pszLogFile, NULL);
> + g_fLogInited = TRUE;
> + }
> + LogClose();
>
> /*
> * At this point we aren't creating any new screens, so
> @@ -242,12 +240,15 @@
> #ifdef DDXOSVERRORF
> if (!OsVendorVErrorFProc)
> OsVendorVErrorFProc = OsVendorVErrorF;
> -
> - /* Open log file if not yet open */
> - if (g_pfLog == NULL)
> - g_pfLog = fopen (WIN_LOG_FNAME, "w");
> #endif
>
> + if (!g_fLogInited) {
> + LogInit(g_pszLogFile, NULL);
> + g_fLogInited = TRUE;
> + }
> + LogSetParameter(XLOG_FLUSH, 1);
> + LogSetParameter(XLOG_VERBOSITY, g_iLogVerbose);
> +
> /* Add a default screen if no screens were specified */
> if (g_iNumScreens == 0)
> {
> @@ -402,10 +403,6 @@
> * that are generated before OsInit () is called.
> */
> OsVendorVErrorFProc = OsVendorVErrorF;
> -
> - /* Open log file if not yet open */
> - if (g_pfLog == NULL)
> - g_pfLog = fopen (WIN_LOG_FNAME, "w");
> #endif
>
> s_fBeenHere = TRUE;
> @@ -1205,6 +1202,26 @@
> {
> CHECK_ARGS (1);
> g_cmdline.keyboard = argv[++i];
> + return 2;
> + }
> +
> + /*
> + * Look for the '-logfile' argument
> + */
> + if (IS_OPTION ("-logfile"))
> + {
> + CHECK_ARGS (1);
> + g_pszLogFile = argv[++i];
> + return 2;
> + }
> +
> + /*
> + * Look for the '-logverbose' argument
> + */
> + if (IS_OPTION ("-logverbose"))
> + {
> + CHECK_ARGS (1);
> + g_iLogVerbose = atoi(argv[++i]);
> return 2;
> }
>
> Index: winerror.c
> ===================================================================
> RCS file: /cvs/xc/programs/Xserver/hw/xwin/winerror.c,v
> retrieving revision 1.5
> diff -u -r1.5 winerror.c
> --- winerror.c 29 Jul 2003 21:25:17 -0000 1.5
> +++ winerror.c 15 Sep 2003 19:27:27 -0000
> @@ -31,25 +31,17 @@
>
> #include "win.h"
>
> -extern FILE *g_pfLog;
> -
> #ifdef DDXOSVERRORF
> void
> OsVendorVErrorF (const char *pszFormat, va_list va_args)
> {
> static pthread_mutex_t s_pmPrinting = PTHREAD_MUTEX_INITIALIZER;
>
> - /* Check we opened the log file first */
> - if (g_pfLog == NULL) return;
> -
> /* Lock the printing mutex */
> pthread_mutex_lock (&s_pmPrinting);
>
> /* Print the error message to a log file, could be stderr */
> - vfprintf (g_pfLog, pszFormat, va_args);
> -
> - /* Flush after every write, to make updates show up quickly */
> - fflush (g_pfLog);
> + LogVWrite(0, pszFormat, va_args);
>
> /* Unlock the printing mutex */
> pthread_mutex_unlock (&s_pmPrinting);
> Index: winconfig.c
> ===================================================================
> RCS file: /cvs/xc/programs/Xserver/hw/xwin/winconfig.c,v
> retrieving revision 1.2
> diff -u -r1.2 winconfig.c
> --- winconfig.c 29 Jul 2003 21:25:16 -0000 1.2
> +++ winconfig.c 15 Sep 2003 19:27:28 -0000
> @@ -145,16 +145,7 @@
> }
> xf86closeConfigFile ();
>
> - winMsg (X_NONE, "Markers: ");
> - winMsg (X_PROBED, "probed, ");
> - winMsg (X_CONFIG, "from config file, ");
> - winMsg (X_DEFAULT, "default setting,\n ");
> - winMsg (X_CMDLINE, "from command line, ");
> - winMsg (X_NOTICE, "notice, ");
> - winMsg (X_INFO, "informational,\n ");
> - winMsg (X_WARNING, "warning, ");
> - winMsg (X_ERROR, "error, ");
> - winMsg (X_UNKNOWN, "unknown.\n");
> + LogPrintMarkers();
>
> /* set options from data structure */
>
More information about the Cygwin-xfree
mailing list