This commit is contained in:
2021-06-15 16:38:30 +01:00
commit 8c5c5c0f45
12 changed files with 468 additions and 0 deletions

17
dprintf.c Normal file
View File

@@ -0,0 +1,17 @@
#include <stdio.h>
#include <stdarg.h>
#include <unistd.h>
#define BUFLEN 4096
void dprintf(int fd, char *format, ...)
{
va_list arglist;
char buffer[BUFLEN];
va_start(arglist, format);
vsnprintf(buffer, BUFLEN, format, arglist);
va_end(arglist);
write(fd, buffer, strlen(buffer));
}