W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2000

Re: Patch for EventList_dump (void) in HTEvtLst.c

From: Karl-Otto Linn <linn@informatik.fh-wiesbaden.de>
Date: Thu, 17 Aug 2000 08:34:12 +0200
Message-ID: <399B8763.17F02293@informatik.fh-wiesbaden.de>
To: www-lib@w3.org


Hi,
I think that Ihave found a bug in HTEvtLst.c:

PRIVATE void EventList_dump (void)
{
    .
    .
    .
     int i;
     HTTRACE(ALL_TRACE, "%3d \n" _ pres->s);
     for (i = 0; i < HTEvent_TYPES; i++)
  if (pres->events[i]) {
      static char * names[HTEvent_TYPES] = {"read", "writ", "xcpt"};
      HTTRACE(ALL_TRACE, "%s " _ names[i]);
      Event_trace(pres->events[i]);
      HTTRACE(ALL_TRACE, " ");
      Timer_trace(pres->timeouts[i]);
      HTTRACE(ALL_TRACE, " ");
  }


Since the value of  HTEvent_TYPES is 3 or 6 depending on WWW_WIN_ASYNC
(see HTEvent.h) the code should read something like this:

     int i;
     HTTRACE(ALL_TRACE, "%3d \n" _ pres->s);
     for (i = 0; i < HTEvent_TYPES; i++)
  if (pres->events[i]) {
#ifdef WWW_WIN_ASYNC /* HTEvent_TYPES == 6 */
      static char * names[HTEvent_TYPES] = {"read", "writ", "oob",
"xcpt", "conn","cls"};
#else /* HTEvent_TYPES == 3 */
      static char * names[HTEvent_TYPES] = {"read", "writ", "xcpt"};
#endif
      HTTRACE(ALL_TRACE, "%s " _ names[i]);
      Event_trace(pres->events[i]);
      HTTRACE(ALL_TRACE, " ");
    .
    .

Karl-Otto
Received on Thursday, 17 August 2000 02:31:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:37 GMT