httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-2.0/src/main util_script.c
Date Sun, 31 Oct 1999 09:26:05 GMT
bjh         99/10/31 01:26:04

  Modified:    src/modules/standard mod_asis.c
               src/include util_script.h
               src/main util_script.c
  Log:
  Eliminate use of FILE * & ap_get_os_file() in mod_asis by APRizing
  ap_scan_script_header_err().
  
  Revision  Changes    Path
  1.11      +1 -8      apache-2.0/src/modules/standard/mod_asis.c
  
  Index: mod_asis.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/standard/mod_asis.c,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- mod_asis.c	1999/10/20 12:50:07	1.10
  +++ mod_asis.c	1999/10/31 09:26:00	1.11
  @@ -68,8 +68,6 @@
       ap_file_t *f;
       ap_status_t status;
       const char *location;
  -    FILE *thefile;         /* XXX leave these alone until we convert */
  -    int thefd;             /* everything to use apr_file_t's. */ 
   
       r->allowed |= (1 << M_GET);
       if (r->method_number != M_GET)
  @@ -87,10 +85,7 @@
   	return FORBIDDEN;
       }
   
  -    ap_get_os_file(&thefd, f); 
  -    thefile = fdopen(thefd, "r");
  -    
  -    ap_scan_script_header_err(r, thefile, NULL);
  +    ap_scan_script_header_err(r, f, NULL);
       location = ap_table_get(r->headers_out, "Location");
   
       if (location && location[0] == '/' &&
  @@ -113,8 +108,6 @@
   
       ap_send_http_header(r);
       if (!r->header_only) {
  -        ap_off_t zero = 0;
  -	ap_seek(f, APR_CUR, &zero);
   	ap_send_fd(f, r);
       }
   
  
  
  
  1.4       +1 -1      apache-2.0/src/include/util_script.h
  
  Index: util_script.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/util_script.h,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- util_script.h	1999/10/24 19:23:43	1.3
  +++ util_script.h	1999/10/31 09:26:03	1.4
  @@ -74,7 +74,7 @@
   API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info);
   API_EXPORT(void) ap_add_cgi_vars(request_rec *r);
   API_EXPORT(void) ap_add_common_vars(request_rec *r);
  -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f, char *buffer);
  +API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f, char *buffer);
   API_EXPORT(int) ap_scan_script_header_err_buff(request_rec *r, BUFF *f,
                                                  char *buffer);
   API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
  
  
  
  1.17      +2 -2      apache-2.0/src/main/util_script.c
  
  Index: util_script.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_script.c,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- util_script.c	1999/10/31 09:02:54	1.16
  +++ util_script.c	1999/10/31 09:26:03	1.17
  @@ -605,10 +605,10 @@
   
   static int getsfunc_FILE(char *buf, int len, void *f)
   {
  -    return fgets(buf, len, (FILE *) f) != NULL;
  +    return ap_fgets(buf, len, (ap_file_t *) f) == APR_SUCCESS;
   }
   
  -API_EXPORT(int) ap_scan_script_header_err(request_rec *r, FILE *f,
  +API_EXPORT(int) ap_scan_script_header_err(request_rec *r, ap_file_t *f,
   					  char *buffer)
   {
       return ap_scan_script_header_err_core(r, buffer, getsfunc_FILE, f);
  
  
  

Mime
View raw message