*/
#ifndef lint
-static const char rcsid[] = "$Id: fcgi_stdio.c,v 1.10 2001/06/18 14:44:37 robs Exp $";
+static const char rcsid[] = "$Id: fcgi_stdio.c,v 1.11 2001/06/20 00:56:51 robs Exp $";
#endif /* not lint */
#include "fcgi_config.h"
FCGI_FILE _fcgi_sF[3];
-\f
+
/*
*----------------------------------------------------------------------
*
}
return 0;
}
-\f
+
/*
*----------------------------------------------------------------------
*
FCGI_stderr->fcgx_stream = NULL;
environ = NULL;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_StartFilterData(void)
{
if(FCGI_stdin->stdio_stream) {
return FCGX_StartFilterData(FCGI_stdin->fcgx_stream);
}
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
void FCGI_SetExitStatus(int status)
{
if(FCGI_stdin->fcgx_stream) {
FCGX_SetExitStatus(status, FCGI_stdin->fcgx_stream);
}
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
void FCGI_perror(const char *str)
{
FCGI_fputs(str, FCGI_stderr);
FCGI_fputs(strerror(OS_Errno), FCGI_stderr);
return;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
static FCGI_FILE *FCGI_OpenFromFILE(FILE *stream)
{
FCGI_FILE *fp;
return fp;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
FCGI_FILE *FCGI_fopen(const char *path, const char *mode)
{
FILE * file = fopen(path, mode);
}
return NULL;
}
-\f
+
/*
*----------------------------------------------------------------------
*
if(fp->stdio_stream)
setbuf(fp->stdio_stream, buf);
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fseek(FCGI_FILE *fp, long offset, int whence)
{
if(fp->stdio_stream)
}
}
#endif
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fgetc(FCGI_FILE *fp)
{
if(fp->stdio_stream)
return FCGX_UnGetChar(c, fp->fcgx_stream);
return EOF;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
char *FCGI_fgets(char *str, int size, FCGI_FILE *fp)
{
if(fp->stdio_stream)
* FILE * argument, so the following "wrapper" implements
* gets for both FILE * and FCGX_Stream * in terms of FCGI_getchar.
*/
-
char *FCGI_gets(char *str)
{
char *s;
*s = 0;
return str;
}
-\f
+
/*
*----------------------------------------------------------------------
*
- * --
- *
* Wrappers for functions defined in H&S Section 15.8
*
* XXX: missing: fscanf, scanf
*----------------------------------------------------------------------
*/
-\f
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fputc(int c, FCGI_FILE *fp)
{
if(fp->stdio_stream)
{
return FCGI_fputc(c, FCGI_stdout);
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fputs(const char *str, FCGI_FILE *fp)
{
if(fp->stdio_stream)
}
return EOF;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fprintf(FCGI_FILE *fp, const char *format, ...)
{
va_list ap;
va_end(ap);
return n;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_vfprintf(FCGI_FILE *fp, const char *format, va_list ap)
{
if(fp->stdio_stream)
return FCGX_VFPrintF(FCGI_stdout->fcgx_stream, format, ap);
return EOF;
}
-\f
+
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
size_t FCGI_fread(void *ptr, size_t size, size_t nmemb, FCGI_FILE *fp)
{
int n;
}
return (size_t)EOF;
}
-\f
+
/*
*----------------------------------------------------------------------
*
}
return;
}
-\f
+
/*
*----------------------------------------------------------------------
*
return fcgi_file;
}
-\f
/*
*----------------------------------------------------------------------
*
*
*----------------------------------------------------------------------
*/
-
int FCGI_fileno(FCGI_FILE *fp)
{
if(fp->stdio_stream)
}
return n;
}
-
-/*
- *----------------------------------------------------------------------
- */