httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk.vanGu...@jrc.it
Subject set_flag_slot()
Date Mon, 23 Dec 1996 10:41:18 GMT

Wading through the code; I noticed for the to-maniest time that
set_string_slot() really needs a friend for the set_flag_slot()
versions needed elsewhere.

If this get commited; I'll promise to run a patch for any module spefic 
versions of 'flag_slot()' I can find. :-)

Dw.


Index: http_config.c
===================================================================
RCS file: /home/cvs/apache/src/http_config.c,v
retrieving revision 1.1.1.1
diff -c -3 -r1.1.1.1 http_config.c
*** http_config.c	1996/12/05 16:58:05	1.1.1.1
--- http_config.c	1996/12/22 16:40:43
***************
*** 697,702 ****
--- 697,711 ----
      return NULL;
  }
  
+ const char *set_flag_slot (cmd_parms *cmd, char *struct_ptr, int arg)
+ {
+     /* This one's pretty generic too... */
+   
+     int offset = (int)cmd->info; 
+     *(int *)(struct_ptr + offset) = arg ? 1 : 0;
+     return NULL;
+ }
+ 
  /*****************************************************************
   *
   * Reading whole config files...
Index: http_config.h
===================================================================
RCS file: /home/cvs/apache/src/http_config.h,v
retrieving revision 1.1.1.1
diff -c -3 -r1.1.1.1 http_config.h
*** http_config.h	1996/12/05 16:58:11	1.1.1.1
--- http_config.h	1996/12/22 16:32:16
***************
*** 238,243 ****
--- 238,244 ----
  /* Generic command handling function... */
  
  const char *set_string_slot (cmd_parms *, char *, char *);
+ const char *set_flag_slot (cmd_parms *, char *, int);
  
  /* 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