SYNOPSIS

#include <cgi/cgiwrap.h>

void cgiwrap_init_emu (void *data, READ_FUNC read_cb,

    WRITEF_FUNC writef_cb, WRITE_FUNC write_cb, GETENV_FUNC getenv_cb,
    PUTENV_FUNC putenv_cb, ITERENV_FUNC iterenv_cb);

ARGUMENTS

data - user data to be passed to the specified callbacks

read_cb - a cb to replace fread(stdin)

writef_cb - a cb to repalce fprintf(stdout)

write_cb - a cb to replace fwrite(stdout)

getenv_cb - a cb to replace getenv

putenv_cb - a cb to replace putenv

iterenv_cb - a cb to replace the default environment iteration

function (which just wraps walking the envp array)

DESCRIPTION

cgiwrap_init_emu sets up the cgiwrap subsystem for use in an emulated environment where you are providing routines to use in place of the standard routines, ie when used to interface with a server or scripting language. See cgi/cgiwrap.h for the exact definitions of the callback functions.

RETURN VALUE

None

RELATED TO cgiwrap_init_emu…