/*++ /* NAME /* postconf_lookup 3 /* SUMMARY /* parameter lookup routines /* SYNOPSIS /* #include <postconf.h> /* /* const char *pcf_lookup_parameter_value(mode, name, local_scope, node) /* int mode; /* const char *name; /* PCF_MASTER_ENT *local_scope; /* PCF_PARAM_NODE *node; /* /* char *pcf_expand_parameter_value(buf, mode, value, local_scope) /* VSTRING *buf; /* int mode; /* const char *value; /* PCF_MASTER_ENT *local_scope; /* DESCRIPTION /* These functions perform parameter value lookups. The order /* of decreasing precedence is: /* .IP \(bu /* Search name=value parameter settings in master.cf. These /* lookups are disabled with the PCF_SHOW_DEFS flag. /* .IP \(bu /* Search name=value parameter settings in main.cf. These /* lookups are disabled with the PCF_SHOW_DEFS flag. /* .IP \(bu /* Search built-in default parameter settings. These lookups /* are disabled with the PCF_SHOW_NONDEF flag. /* .PP /* pcf_lookup_parameter_value() looks up the value for the /* named parameter, and returns null if the name was not found. /* /* pcf_expand_parameter_value() expands $name in the specified /* parameter value. This function ignores the PCF_SHOW_NONDEF /* flag. The result value is a pointer to storage in a /* user-supplied buffer, or in a buffer that is overwritten /* with each call. /* /* Arguments: /* .IP buf /* Pointer to user-supplied buffer; must not be null. /* .IP mode /* Bit-wise OR of zero or one of the following (other flags /* are ignored): /* .RS /* .IP PCF_SHOW_DEFS /* Search built-in default parameter settings only. /* .IP PCF_SHOW_NONDEF /* Search local (master.cf) and global (main.cf) name=value /* parameter settings only. /* .RE /* .IP name /* The name of a parameter to be looked up. /* .IP value /* The parameter value where $name should be expanded. /* .IP local_scope /* Pointer to master.cf entry with local name=value settings, /* or a null pointer (i.e. no local parameter lookup). /* .IP node /* Global default value for the named parameter, or a null /* pointer (i.e. do the global default lookup anyway). /* DIAGNOSTICS /* Problems are reported to the standard error stream. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
/* Only built-in parameters can be 'raw'. No need to inspect local_scope. */ return ((node = PCF_PARAM_TABLE_FIND(pcf_param_table, key)) != 0
&& PCF_RAW_PARAMETER(node));
}
/* pcf_expand_parameter_value - expand $name in parameter value */
char *pcf_expand_parameter_value(VSTRING *buf, int mode, constchar *value,
PCF_MASTER_ENT *local_scope)
{ constchar *myname = "pcf_expand_parameter_value"; int status;
PCF_EVAL_CTX eval_ctx;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.