#include "m_pd.h"
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include "s_stuff.h"
#include "m_private_utils.h"
#ifdef _WIN32
#ifndef PD_FWPRINTF_NARROW_FORMATTER
#if __USE_MINGW_ANSI_STDIO
#define PD_FWPRINTF_NARROW_FORMATTER …
#else
#define PD_FWPRINTF_NARROW_FORMATTER …
#endif
#endif
#endif
t_printhook sys_printhook = …;
int sys_printtostderr;
#ifdef _WIN32
int pd_vsnprintf(char *buf, size_t size, const char *fmt, va_list argptr)
{
int ret = _vsnprintf(buf, size, fmt, argptr);
if (ret < 0)
{
ret = _vscprintf(fmt, argptr);
buf[size - 1] = '\0';
}
return ret;
}
int pd_snprintf(char *buf, size_t size, const char *fmt, ...)
{
int ret;
va_list ap;
va_start(ap, fmt);
ret = pd_vsnprintf(buf, size, fmt, ap);
va_end(ap);
return ret;
}
#else
int pd_vsnprintf(char *buf, size_t size, const char *fmt, va_list argptr)
{ … }
int pd_snprintf(char *buf, size_t size, const char *fmt, ...)
{ … }
#endif
char* pdgui_strnescape(char *dst, size_t dstlen, const char *src, size_t srclen)
{ … }
static void dopost(const char *s)
{ … }
static void doerror(const void *object, const char *s)
{ … }
static void dologpost(const void *object, const int level, const char *s)
{ … }
void logpost(const void *object, int level, const char *fmt, ...)
{ … }
void startlogpost(const void *object, const int level, const char *fmt, ...)
{ … }
void post(const char *fmt, ...)
{ … }
void startpost(const char *fmt, ...)
{ … }
void poststring(const char *s)
{ … }
void postatom(int argc, const t_atom *argv)
{ … }
void postfloat(t_float f)
{ … }
void endpost(void)
{ … }
#ifdef PD_INTERNAL
EXTERN void error(const char *fmt, ...)
{ … }
#endif
void verbose(int level, const char *fmt, ...)
{ … }
static const void *error_object;
static char error_string[256];
void canvas_finderror(const void *object);
void pd_error(const void *object, const char *fmt, ...)
{ … }
void glob_finderror(t_pd *dummy)
{ … }
void glob_findinstance(t_pd *dummy, t_symbol*s)
{ … }
void bug(const char *fmt, ...)
{ … }
void sys_logerror(const char *object, const char *s) { … }
void sys_unixerror(const char *object) { … }
void sys_ouch(void) { … }