char * /* O - New string pointer */
_mxml_vstrdupf(const char *format, /* I - Printf-style format string */
va_list ap) /* I - Pointer to additional arguments */
//--error!!!!!!1>..\mxml-string.c(417) : error C2040: '_mxml_vstrdupf' : 'char *(const char *,va_list)' differs in levels of indirection from 'int ()'
{
int bytes; /* Number of bytes required */
char *buffer, /* String buffer */
temp[256]; /* Small buffer for first vsnprintf */ bytes = vsnprintf(temp, sizeof(temp), format, ap); if (bytes < sizeof(temp))
{
return (char *)(strdup(temp));
}
if ((buffer = calloc(1, bytes + 1)) != NULL)
vsnprintf(buffer, bytes + 1, format, ap); return (buffer);
}
_mxml_vstrdupf(const char *format, /* I - Printf-style format string */
va_list ap) /* I - Pointer to additional arguments */
//--error!!!!!!1>..\mxml-string.c(417) : error C2040: '_mxml_vstrdupf' : 'char *(const char *,va_list)' differs in levels of indirection from 'int ()'
{
int bytes; /* Number of bytes required */
char *buffer, /* String buffer */
temp[256]; /* Small buffer for first vsnprintf */ bytes = vsnprintf(temp, sizeof(temp), format, ap); if (bytes < sizeof(temp))
{
return (char *)(strdup(temp));
}
if ((buffer = calloc(1, bytes + 1)) != NULL)
vsnprintf(buffer, bytes + 1, format, ap); return (buffer);
}
char *_mxml_vstrdupf(const char *format,...)
如果有的话,对比一下