Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/modules/klibc/fwrite.c

Source at commit 1308 created 9 years 5 months ago.
By meklort, Add a few placeholders for file io
1/*
2 * fwrite.c
3 */
4
5#include <unistd.h>
6#include <stdio.h>
7
8size_t _fwrite(const void *buf, size_t count, FILE *f)
9{
10size_t bytes = 0;
11ssize_t rv;
12const char *p = buf;
13
14while (count) {
15rv = 1;
16// TODO: use FILE*
17 putchar(*p);
18
19p += rv;
20bytes += rv;
21count -= rv;
22}
23
24return bytes;
25}
26

Archive Download this file

Revision: 1308