mod_annot editor

Annotate Section

Implementing Configuration Directives

my_cmds above is a null-terminated array containing the commands implemented by the module. Normally they are defined using macros defined in http_config.h. For example,

static const cmd_rec my_cmds[] = {
  AP_INIT_TAKE1("MyFirstDirective", my_first_cmd_func, my_ptr, OR_ALL,
	"This is My First Directive"),
  /* more directives as applicable */
  { NULL }
} ;

AP_INIT_TAKE1 is one of many such macros, all having the same prototype (more later). The arguments to it are as follows:

  1. Directive Name.
  2. Function implementing the directive.
  3. Data pointer (often NULL).
  4. Where this directive is allowed.
  5. A brief Help message for the directive.