httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/include http_config.h
Date Fri, 03 Aug 2001 00:59:02 GMT
wrowe       01/08/02 17:59:02

  Modified:    server   config.c
               include  http_config.h
  Log:
    Provide an ap_set_deprecated() fn for quick-and-dirty 'we don't do this'
    entries in the command table.
  
    (Also fixes a nit about returning a single bit of an apr_int_64 as an int.
    Know how this group loves !! expresssions :)
  
  Revision  Changes    Path
  1.132     +9 -1      httpd-2.0/server/config.c
  
  Index: config.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/config.c,v
  retrieving revision 1.131
  retrieving revision 1.132
  diff -u -r1.131 -r1.132
  --- config.c	2001/08/02 04:25:20	1.131
  +++ config.c	2001/08/03 00:59:01	1.132
  @@ -362,7 +362,7 @@
        * added by a module and registered.
        */
       if (methnum != M_INVALID) {
  -	return  (cmd->limited & (1<<methnum));
  +	return !!(cmd->limited & (1<<methnum));
       }
   
       return 0; /* not found */
  @@ -1169,6 +1169,14 @@
   	p = ap_make_full_path(cmd->pool, ap_server_root, arg);
       *(char **) ((char*)struct_ptr + offset) = p;
       return NULL;
  +}
  +
  +AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd,
  +						  void *struct_ptr,
  +						  const char *arg)
  +{
  +    /* This one's really generic... */
  +    return cmd->cmd->errmsg;
   }
   
   /*****************************************************************
  
  
  
  1.84      +13 -1     httpd-2.0/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/include/http_config.h,v
  retrieving revision 1.83
  retrieving revision 1.84
  diff -u -r1.83 -r1.84
  --- http_config.h	2001/08/02 04:25:19	1.83
  +++ http_config.h	2001/08/03 00:59:01	1.84
  @@ -505,7 +505,19 @@
    * @return An error string or NULL on success
    */
   AP_DECLARE_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, void *struct_ptr, const
char *arg);
  -
  +/**
  + * Generic command handling function to respond with cmd->help as an error
  + * @param cmd The command parameters for this directive
  + * @param struct_ptr pointer into a given type
  + * @param arg The argument to the directive
  + * @return The cmd->help value as the error string
  + * @tip This allows simple declarations such as;
  + * <pre>
  + *     AP_INIT_RAW_ARGS("Foo", ap_set_deprecated, NULL, OR_ALL, 
  + *         "The Foo directive is no longer supported, use Bar"),
  + * </pre>
  + */
  +AP_DECLARE_NONSTD(const char *) ap_set_deprecated(cmd_parms *cmd, void *struct_ptr, const
char *arg);
   /**
    * For modules which need to read config files, open logs, etc. ...
    * this returns the fname argument if it begins with '/'; otherwise
  
  
  

Mime
View raw message