Chameleon

Chameleon Svn Source Tree

Root/branches/xZen/i386/modules/klibc/fwrite.c

Source at commit 1209 created 12 years 8 months ago.
By meklort, Use printf from klibc instead of from console.c
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 putchar(*p);
17
18p += rv;
19bytes += rv;
20count -= rv;
21}
22
23return bytes;
24}
25

Archive Download this file

Revision: 1209