int ex_n(void);
int ex_auth_set_mutex(int (*cb)(int vm, int isget, int seconds, char *file, int line), int m);

int ex_init(int (*vimsg)( const char *format ,...),int (*vemsg)( const char *format ,...),int n, char *scmd);
void ex_init_spawn_cmd(char *smcd);

void ex_init_env(char **env);
int ex_init_addenv(char *label, char *value);
int ex_check_ip(char *user, char *pass, char *result, int bfsz, char *ip);
int ex_set_encode_spaces(int t);

int ex_restart(void);
int ex_check(char *user, char *pass, char *result, int bfsz);
int ex_spawn(int i);
int ex_poll(void);
int ex_read(int p, int navail);
int ex_nresets(void);
int ex_restart_one(int p, char *reason);
int ex_reset(int p, char *reason);
int ex_do_cmd(int p, char *cmdline, char *result, int bfsz, int *done);
int ex_cmd(char *cmdline, char *result, int bfsz, int *done, int (*fn)(void *p1, char *s), void *p1, char *user);
int ex_shutdown(void);
int ex_lookup(char *user, char *pass, char *result, int bfsz);
int ex_decode(char *data, char *field, char *result, char *rest, int bfsz);
int ex_set(char *user, char *pass, char *info, char *result, int bfsz);
int ex_del(char *user, char *result, int bfsz);
#define ex_search(a,b,c,d,e) ex_search_from(a,b,c,d,e,__FILE__,__LINE__)
int ex_search_from(char *wild, char *result, int bfsz, int (*fn)(void *p1, char *s), void *p1, char *src, int line);

//int ex_search(char *wild, char *result, int bfsz, int (*fn)(void *p1, char *s), void *p1);
int ex_set_cb(int p, int (*fn)(void *x, char *p1), void *p1);
int ex_set_shutdown(void);
int ex_set_timeout(int x);
int ex_modify(char *userdom, char *var, char *val, char *sresult);
#include "lib.h"
int ex_modify_list(char *userdom, Pair *list, char *sresult, char *newpass);


int ex_shutdown_raw(int force);
void ex_setrestart(int x);
int ex_startall(void);

/* RMH - added to cause logging of authent lines */
/* returns old state */
int ex_logall(int state);

/* RMH - added to cause ascii < 32 and >= 127 to be blocked */
/* returns old state */
int ex_blockascii(int byes);

void ex_exit(void);
