1 /* $Cambridge: exim/test/src/loaded.c,v 1.1 2006/02/06 16:24:05 ph10 Exp $ */
3 /* This is a test function for dynamic loading in Exim expansions. It uses the
4 number of arguments to control the result. */
6 /* These lines are taken from local_scan.h in the Exim source: */
8 /* ========================================================================== */
9 /* Return codes from the support functions lss_match_xxx(). These are also the
10 codes that dynamically-loaded ${dlfunc functions must return. */
12 #define OK 0 /* Successful match */
13 #define DEFER 1 /* Defer - some problem */
14 #define FAIL 2 /* Matching failed */
15 #define ERROR 3 /* Internal or config error */
17 /* Extra return code for ${dlfunc functions */
19 #define FAIL_FORCED 4 /* "Forced" failure */
20 /* ========================================================================== */
23 int dltest(unsigned char **yield, int argc, unsigned char *argv[])
35 *yield = (unsigned char *)"yield FAIL_FORCED";
39 *yield = (unsigned char *)"yield FAIL";