Diff for /Amaya/amaya/query.c between versions 1.82 and 1.83

version 1.82, 1997/09/08 08:14:11 version 1.83, 1997/09/10 12:05:33
Line 6 Line 6
  */   */
   
 /*  /*
  * query.c : contains all the functions for requesting iand publishing   * query.c : contains all the functions for requesting and publishing
  * URLs via libwww. It handles any eventual HTTP error code   * URLs via libwww. It handles any eventual HTTP error code
  * (redirection, authentication needed, not found, etc.)   * (redirection, authentication needed, not found, etc.)
  *   *
Line 445  static void         Thread_deleteAll () Line 445  static void         Thread_deleteAll ()
 }  }
   
 /*----------------------------------------------------------------------  /*----------------------------------------------------------------------
     AHTOpen_file
     ----------------------------------------------------------------------*/
   #ifdef __STDC__
   int                 AHTOpen_file (HTRequest * request, void * param, int mode)
   #else
   int                 AHTOpen_file (request, param, mode)
   HTRequest           *request;
   void                *param;
   int                  mode;
   
   #endif /* __STDC__ */
   {
     AHTReqContext      *me;      /* current request */
   
     me = HTRequest_context (request);
   
   #ifdef DEBUG_LIBWWW
     fprintf(stderr, "AHTOpen_file\n");
   #endif /* DEBUG_LIBWWW */
   
     if (!(me->output) && 
         (me->output != stdout) && 
   #ifndef _WINDOWS
         (me->output = fopen (me->outputfile, "w")) == NULL)
       {
   #else
       (me->output = fopen (me->outputfile, "wb")) == NULL) 
       {
   #endif /* !_WINDOWS */
   
         me->outputfile[0] = '\0'; /* file could not be opened */
         TtaSetStatus (me->docid, 1, 
                       TtaGetMessage (AMAYA, AM_CANNOT_CREATE_FILE),
                       me->outputfile);
         me->reqStatus = HT_ERR;
         return (HT_ERROR);
       }
             
     HTRequest_setOutputStream (me->request,
                                AHTFWriter_new (me->request, 
                                                me->output, YES));
     me->reqStatus = HT_WAITING;
     
     return HT_OK;
   }
   
   /*----------------------------------------------------------------------
   redirection_handler    redirection_handler
   this function is registered to handle permanent and temporary    this function is registered to handle permanent and temporary
   redirections.    redirections.
Line 906  static void         AHTNetInit (void) Line 953  static void         AHTNetInit (void)
   
   HTNet_addBefore (HTCredentialsFilter, "http://*", NULL, 6);    HTNet_addBefore (HTCredentialsFilter, "http://*", NULL, 6);
   HTNet_addBefore (HTProxyFilter, NULL, NULL, 10);    HTNet_addBefore (HTProxyFilter, NULL, NULL, 10);
     HTNet_addBefore (AHTOpen_file, NULL, NULL, 11);
   
 /*      register AFTER filters  /*      register AFTER filters
 **      The AFTER filters handle error messages, logging, redirection,  **      The AFTER filters handle error messages, logging, redirection,
Line 935  static void         AHTAlertInit () Line 983  static void         AHTAlertInit ()
 {  {
    HTAlert_add (AHTProgress, HT_A_PROGRESS);     HTAlert_add (AHTProgress, HT_A_PROGRESS);
 #  ifndef _WINDOWS  #  ifndef _WINDOWS
    HTAlert_add ((HTAlertCallback *) Add_NewSocket_to_Loop, HT_PROG_CONNECT);     /*   HTAlert_add ((HTAlertCallback *) Add_NewSocket_to_Loop, HT_PROG_CONNECT); */
 #  else  /* _WINDOWS */  #  else  /* _WINDOWS */
    HTAlert_add ((HTAlertCallback *) WIN_Activate_Request, HT_PROG_CONNECT);     HTAlert_add ((HTAlertCallback *) WIN_Activate_Request, HT_PROG_CONNECT);
 #  endif /* _WINDOWS */  #  endif /* _WINDOWS */

Removed from v.1.82  
changed lines
  Added in v.1.83


Webmaster