Diff for /Amaya/amaya/query.c between versions 1.343 and 1.344

version 1.343, 2004/05/03 11:24:58 version 1.344, 2004/06/02 10:54:44
Line 659  ThotBool  AHTReqContext_delete (AHTReqCo Line 659  ThotBool  AHTReqContext_delete (AHTReqCo
                       
        if (me->error_stream != (char *) NULL)         if (me->error_stream != (char *) NULL)
          HT_FREE (me->error_stream);           HT_FREE (me->error_stream);
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
 #ifdef WWW_XWINDOWS       #ifdef WWW_XWINDOWS     
        if (me->read_xtinput_id || me->write_xtinput_id ||         if (me->read_xtinput_id || me->write_xtinput_id ||
            me->except_xtinput_id)             me->except_xtinput_id)
          RequestKillAllXtevents(me);           RequestKillAllXtevents(me);
 #endif /* WWW_XWINDOWS */  #endif /* WWW_XWINDOWS */
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
                 
        if (me->reqStatus == HT_ABORT)         if (me->reqStatus == HT_ABORT)
          {           {
Line 735  static void         Thread_deleteAll (vo Line 735  static void         Thread_deleteAll (vo
     {      {
       if (Amaya->open_requests > 0)        if (Amaya->open_requests > 0)
 #ifdef DEBUG_LIBWWW  #ifdef DEBUG_LIBWWW
       fprintf (stderr, "Thread_deleteAll: Killing %d outstanding "          fprintf (stderr, "Thread_deleteAll: Killing %d outstanding "
                        "requests\n", Amaya->open_requests);                   "requests\n", Amaya->open_requests);
 #endif     #endif   
         {        {
           cur = Amaya->reqlist;          cur = Amaya->reqlist;  
                     /* erase the requests */
           /* erase the requests */          while ((me = (AHTReqContext *) HTList_removeLastObject (cur)))
           while ((me = (AHTReqContext *) HTList_removeLastObject (cur)))            {
             {              if (me->request)
               if (me->request)                {
                 {  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
   
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  
 #ifdef WWW_XWINDOWS   #ifdef WWW_XWINDOWS 
                   RequestKillAllXtevents (me);                  RequestKillAllXtevents (me);
 #endif /* WWW_XWINDOWS */  #endif /* WWW_XWINDOWS */
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
                         if (!HTRequest_kill (me->request))
                   if (!HTRequest_kill (me->request))                    AHTReqContext_delete (me);
                     AHTReqContext_delete (me);                }
                 }            }
             }           /* while */  
             
           /* erase the docid_status entities */  
           while ((docid_status = (AHTDocId_Status *) HTList_removeLastObject ((HTList *) Amaya->docid_status)))  
             TtaFreeMemory ((void *) docid_status);  
                       
         }                       /* if */          /* erase the docid_status entities */
                   while ((docid_status = (AHTDocId_Status *) HTList_removeLastObject ((HTList *) Amaya->docid_status)))
             TtaFreeMemory ((void *) docid_status);
         }
     }      }
 }  }
     
Line 1838  static void         AHTProtocolInit (voi Line 1833  static void         AHTProtocolInit (voi
   /* TODO: verifier que le param YES est adapte pour WX */    /* TODO: verifier que le param YES est adapte pour WX */
   HTProtocol_add ("file", "local", 0, YES, HTLoadFile, NULL);    HTProtocol_add ("file", "local", 0, YES, HTLoadFile, NULL);
 #endif /* _WINDOWS */  #endif /* _WINDOWS */
 #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI)  #if defined(_GTK) || defined(_NOGUI)
   HTProtocol_add ("file", "local", 0, NO, HTLoadFile, NULL);    HTProtocol_add ("file", "local", 0, NO, HTLoadFile, NULL);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_NOGUI) */
   
 #ifdef AMAYA_WWW_CACHE  #ifdef AMAYA_WWW_CACHE
    HTProtocol_add("cache",  "local", 0, YES, HTLoadCache, NULL);     HTProtocol_add("cache",  "local", 0, YES, HTLoadCache, NULL);
Line 1849  static void         AHTProtocolInit (voi Line 1844  static void         AHTProtocolInit (voi
 #endif  #endif
    HTProtocol_add ("ftp", "tcp", FTP_PORT, NO, HTLoadFTP, NULL);     HTProtocol_add ("ftp", "tcp", FTP_PORT, NO, HTLoadFTP, NULL);
   
   
    /* initialize pipelining */     /* initialize pipelining */
   strptr = TtaGetEnvString ("ENABLE_PIPELINING");    strptr = TtaGetEnvString ("ENABLE_PIPELINING");
   if (strptr && *strptr && strcasecmp (strptr, "yes"))    if (strptr && *strptr && strcasecmp (strptr, "yes"))
Line 1892  static void         AHTNetInit (void) Line 1886  static void         AHTNetInit (void)
   HTNet_addAfter (precondition_handler, NULL, NULL, HT_PRECONDITION_FAILED, HT_FILTER_MIDDLE);    HTNet_addAfter (precondition_handler, NULL, NULL, HT_PRECONDITION_FAILED, HT_FILTER_MIDDLE);
 #endif /* AMAYA_LOST_UPDATE */  #endif /* AMAYA_LOST_UPDATE */
   
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
   HTNet_addAfter (AHTLoadTerminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);            HTNet_addAfter (AHTLoadTerminate_handler, NULL, NULL, HT_ALL, HT_FILTER_LAST);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
       
    /**** for later ?? ****/    /**** for later ?? ****/
    /*  HTNet_addAfter(HTInfoFilter,     NULL,           NULL, HT_ALL,           HT_FILTER_LATE); */    /*  HTNet_addAfter(HTInfoFilter,NULL, NULL, HT_ALL, HT_FILTER_LATE); */
   /* @@ JK: Filters for doing ftp authentication */    /* @@ JK: Filters for doing ftp authentication */
   HTNet_addAfter (HTAuthFilter, "ftp://*", NULL, HT_NO_ACCESS, HT_FILTER_MIDDLE);    HTNet_addAfter (HTAuthFilter, "ftp://*", NULL, HT_NO_ACCESS, HT_FILTER_MIDDLE);
   HTNet_addAfter (HTAuthFilter, "ftp://*", NULL, HT_REAUTH, HT_FILTER_MIDDLE);    HTNet_addAfter (HTAuthFilter, "ftp://*", NULL, HT_REAUTH, HT_FILTER_MIDDLE);
Line 2026  static void RecCleanCache (char *dirname Line 2020  static void RecCleanCache (char *dirname
   wxRmdir(wx_dir_name);    wxRmdir(wx_dir_name);
 #endif /* _WX */  #endif /* _WX */
   
 #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI)  #if defined(_GTK) || defined(_NOGUI)
   DIR *dp;    DIR *dp;
   struct stat st;    struct stat st;
 #ifdef HAVE_DIRENT_H  #ifdef HAVE_DIRENT_H
   struct dirent *d;    struct dirent *d;
 #else  #else /* HAVE_DIRENT_H */
   struct direct *d;    struct direct *d;
 #endif /* HAVE_DIRENT_H */  #endif /* HAVE_DIRENT_H */
   char filename[BUFSIZ+1];    char filename[BUFSIZ+1];
Line 2077  static void RecCleanCache (char *dirname Line 2071  static void RecCleanCache (char *dirname
         }          }
     }      }
   closedir (dp);    closedir (dp);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_NOGUI) */
 }  }
 #endif /* AMAYA_WWW_CACHE */  #endif /* AMAYA_WWW_CACHE */
   
Line 2568  void         QueryInit () Line 2562  void         QueryInit ()
    wxAmayaSocketEventLoop::InitSocketLib();     wxAmayaSocketEventLoop::InitSocketLib();
 #endif /* _WX */  #endif /* _WX */
   
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
    HTEvent_setRegisterCallback ( AHTEvent_register);     HTEvent_setRegisterCallback ( AHTEvent_register);
    HTEvent_setUnregisterCallback (AHTEvent_unregister);     HTEvent_setUnregisterCallback (AHTEvent_unregister);
    HTTimer_registerSetTimerCallback ((BOOL (*)(HTTimer*)) AMAYA_SetTimer);     HTTimer_registerSetTimerCallback ((BOOL (*)(HTTimer*)) AMAYA_SetTimer);
    HTTimer_registerDeleteTimerCallback ((BOOL (*)(HTTimer*))AMAYA_DeleteTimer);     HTTimer_registerDeleteTimerCallback ((BOOL (*)(HTTimer*))AMAYA_DeleteTimer);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
   
 #ifdef HTDEBUG  #ifdef HTDEBUG
    /* an undocumented option for being able to generate an HTTP protocol     /* an undocumented option for being able to generate an HTTP protocol
Line 2727  static int          LoopForStop (AHTReqC Line 2721  static int          LoopForStop (AHTReqC
     exit (0);      exit (0);
 #endif /* _WINGUI */  #endif /* _WINGUI */
       
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX)    #if defined(_GTK) || defined(_WX)  
    ThotEvent                ev;     ThotEvent                ev;
   
    /* to test the async calls  */     /* to test the async calls  */
Line 2747  static int          LoopForStop (AHTReqC Line 2741  static int          LoopForStop (AHTReqC
          wxAmayaSocketEvent::CheckSocketStatus( 500 );           wxAmayaSocketEvent::CheckSocketStatus( 500 );
 #endif /* _WX */  #endif /* _WX */
    }     }
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) */  #endif /* #if defined(_GTK) || defined(_WX) */
   
    switch (me->reqStatus) {     switch (me->reqStatus) {
           case HT_ERR:     case HT_ERR:
           case HT_ABORT:     case HT_ABORT:
                status_req = NO;       status_req = NO;
                break;       break;
      case HT_END:
           case HT_END:       status_req = YES;
                status_req = YES;       break;
                break;     default:
        break;
           default:  
                break;  
    }     }
    return (status_req);     return (status_req);
 }  }
Line 2779  void QueryClose () Line 2771  void QueryClose ()
      a non-existent Amaya window */       a non-existent Amaya window */
   HTEvent_setRegisterCallback ((HTEvent_registerCallback *) NULL);    HTEvent_setRegisterCallback ((HTEvent_registerCallback *) NULL);
   HTEvent_setUnregisterCallback ((HTEvent_unregisterCallback *) NULL);    HTEvent_setUnregisterCallback ((HTEvent_unregisterCallback *) NULL);
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
   /** need to erase all existing timers too **/    /** need to erase all existing timers too **/
    HTTimer_registerSetTimerCallback (NULL);     HTTimer_registerSetTimerCallback (NULL);
    HTTimer_registerDeleteTimerCallback (NULL);     HTTimer_registerDeleteTimerCallback (NULL);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
   HTHost_setActivateRequestCallback (NULL);    HTHost_setActivateRequestCallback (NULL);
   Thread_deleteAll ();    Thread_deleteAll ();
     
Line 3789  void                StopAllRequests (int Line 3781  void                StopAllRequests (int
                          }                           }
                        cur = Amaya->reqlist;                         cur = Amaya->reqlist;
                      }                       }
 #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI)  #if defined(_GTK) || defined(_WX) || defined(_NOGUI)
 #ifdef WWW_XWINDOWS  #ifdef WWW_XWINDOWS
                    /* to be on the safe side, remove all outstanding                      /* to be on the safe side, remove all outstanding 
                       X events */                        X events */
                    else                      else 
                      RequestKillAllXtevents (me);                       RequestKillAllXtevents (me);
 #endif /* WWW_XWINDOWS */  #endif /* WWW_XWINDOWS */
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_WX) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_WX) || defined(_NOGUI) */
                  }                   }
              }               }
            /* Delete remaining channels */             /* Delete remaining channels */
Line 3930  ThotBool CheckSingleInstance (char *pid_ Line 3922  ThotBool CheckSingleInstance (char *pid_
   return TRUE;    return TRUE;
 #endif /* _WX */  #endif /* _WX */
   
 #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI)  #if defined(_GTK) || defined(_NOGUI)
   int instances;    int instances;
   char *ptr;    char *ptr;
   pid_t pid;    pid_t pid;
Line 3995  ThotBool CheckSingleInstance (char *pid_ Line 3987  ThotBool CheckSingleInstance (char *pid_
     }      }
   closedir (dp);    closedir (dp);
   return (instances == 0);    return (instances == 0);
 #endif /* #if defined(_MOTIF) || defined(_GTK) || defined(_NOGUI) */  #endif /* #if defined(_GTK) || defined(_NOGUI) */
   
 }  }
   

Removed from v.1.343  
changed lines
  Added in v.1.344


Webmaster