diff options
author | sin <sin@2f30.org> | 2019-08-03 22:30:50 +0100 |
---|---|---|
committer | sin <sin@2f30.org> | 2019-08-03 22:31:34 +0100 |
commit | 1a5eb40d84cc39bdc4420ff3e591068bdfbf6669 (patch) | |
tree | 3aa3a27da5a0b5ad3535f332bbc3cf528cda0703 /noice.c | |
parent | 50592339bf450037972b85777d1c524e35545aa8 (diff) | |
download | noice-1a5eb40d84cc39bdc4420ff3e591068bdfbf6669.tar.gz |
Factor out dprintf()
Diffstat (limited to 'noice.c')
-rw-r--r-- | noice.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -11,7 +11,6 @@ #include <locale.h> #include <regex.h> #include <signal.h> -#include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -95,21 +94,6 @@ void printmsg(char *); void printwarn(void); void printerr(int, char *); -int -dprintf(int fd, const char *fmt, ...) -{ - char buf[BUFSIZ]; - int r; - va_list ap; - - va_start(ap, fmt); - r = vsnprintf(buf, sizeof(buf), fmt, ap); - if (r > 0) - write(fd, buf, r); - va_end(ap); - return r; -} - void * xmalloc(size_t size) { |