source: trunk/sys/dietlibc/vfdprintf.c @ 291

Last change on this file since 291 was 1, checked in by alain, 8 years ago

First import

File size: 360 bytes
RevLine 
[1]1#include <stdarg.h>
2#include <unistd.h>
3#include <stdlib.h>
4#include "dietstdio.h"
5
6static int __fwrite(void*ptr, size_t nmemb, int fd) {
7  return write(fd,ptr,nmemb);
8}
9
10int vfdprintf(int fd, const char *format, va_list arg_ptr)
11{
12  struct arg_printf ap = { (void*)(long)fd, (int(*)(void*,size_t,void*)) __fwrite };
13  return __v_printf(&ap,format,arg_ptr);
14}
Note: See TracBrowser for help on using the repository browser.