Displaying 1 result from an estimated 1 matches for "apr_pcalloc".
2006 Oct 07
1
Request to open up getConnection to embedded interface
...so simple redirection is not feasible.
With the above request, here is how RApache can alter stdout's behavior:
...
Rf_initEmbeddedR(argc, argv); /* initialize R */
/* Redirect stdout to apache specific routines */
con = getConnection(1);
con->private = (void *) apr_pcalloc(p,sizeof(struct ApacheOutpcon));
con->text = FALSE; /* allows us to do binary writes */
con->vfprintf = mr_stdout_vfprintf;
con->write = mr_stdout_write;
con->fflush = mr_stdout_fflush;
...
And here are the definitions of the mr_* functions:
int mr_stdout_vfp...