Esempio n. 1
0
int
vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
{

	sbuf = buf;
	ebuf = buf + size - 1;
	kdoprnt(sputchar, fmt, ap);
	*sbuf = '\0';
	return sbuf - buf;
}
Esempio n. 2
0
void
vprintf(const char *fmt, va_list ap)
{

	kdoprnt(putchar, fmt, ap);
#if defined(__minix) && defined(LIBSA_PRINTF_WIDTH_SUPPORT)
	/* BJG: our libminc kputc() relies on a 0 to flush the diag buffer. */
	putchar(0);
#endif /* defined(__minix) && defined(LIBSA_PRINTF_WIDTH_SUPPORT) */
}
Esempio n. 3
0
int
vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
{

	sbuf = buf;
	ebuf = buf + size - 1;
#if defined(__minix)
	scount = 0; /* use scount to keep track of written items */
#endif /* defined(__minix) */

	kdoprnt(sputchar, fmt, ap);

#if defined(__minix)
	if (sbuf){ /* handle case where sbuf == NULL */
		*sbuf = '\0';
	}
	return scount;
#else /* __minix is not defined */
	*sbuf = '\0';
	return sbuf - buf;
#endif  /* defined(__minix) */
}
Esempio n. 4
0
void
vprintf(const char *fmt, va_list ap)
{

	kdoprnt(putchar, fmt, ap);
}