且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将一个va_list作为参数传递给另一个

更新时间:2023-02-14 15:31:12

您必须在Fast CGI库中找到 vfprintf()的类比。至少有一个合理的可能性,有一个;实现 FCGX_FPrintF()的简单方法是:

You would have to find the analogue of vfprintf() in the Fast CGI library. It is at least moderately plausible that there is one; the easy way to implement FCGX_FPrintF() is:

void FCGX_FPrintF(FILE *out, char *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    FCGX_VFPrintF(out, fmt, args);
    va_end(args);
}

所以很有可能函数存在;您需要检查它是否正式公开。

So it is highly probable that the function exists; you will need to check whether it is exposed officially or not.

快速访问 Fast CGI网站揭示了FCGX前缀由fgciapp.h头中声明的函数使用,并且依次包含:

A quick visit to the Fast CGI web site reveals that the FCGX prefix is used by functions declared in the fgciapp.h header, and that in turn contains:

/*
 *----------------------------------------------------------------------
 *
 * FCGX_FPrintF, FCGX_VFPrintF --
 *
 *      Performs printf-style output formatting and writes the results
 *      to the output stream.
 *
 * Results:
 *      number of bytes written for normal return,
 *      EOF (-1) if an error occurred.
 *
 *----------------------------------------------------------------------
 */
DLLAPI int FCGX_FPrintF(FCGX_Stream *stream, const char *format, ...);

DLLAPI int FCGX_VFPrintF(FCGX_Stream *stream, const char *format, va_list arg);

所以,接口已经完成了。

So, there's the function with the interface completed.