diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-05-08 19:32:29 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-05-08 19:32:29 -0700 |
commit | 115fc7e79d6becb1e14f98ef1c6f15c27b6f3d10 (patch) | |
tree | 25306ca3a33278e8eee6b14f0ef84bda28366cf8 | |
parent | 54e5e8ff848b84ea3837cd34eea352c1c2cecc5b (diff) | |
download | klibc-115fc7e79d6becb1e14f98ef1c6f15c27b6f3d10.tar.gz |
[klibc] Remove unused fputc implementation
Remove unused "native" fputc implementation, intended to not require
the whole fwrite machinery.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | usr/klibc/stdio/fputc.c | 24 | ||||
-rw-r--r-- | usr/klibc/stdio/stdioint.h | 1 |
2 files changed, 0 insertions, 25 deletions
diff --git a/usr/klibc/stdio/fputc.c b/usr/klibc/stdio/fputc.c deleted file mode 100644 index 8fd3452261b2f..0000000000000 --- a/usr/klibc/stdio/fputc.c +++ /dev/null @@ -1,24 +0,0 @@ -/* - * fputc.c - */ - -#include "stdioint.h" - -int __fputc(int c, FILE *f) -{ - if (f->bytes >= f->bufsiz) - fflush(f); - - *f->buf++ = c; - f->flags |= _IO_FILE_FLAG_WRITE; - - if (f->flags & _IO_FILE_LINE_BUF && c == '\n') - fflush(f); -} - -int fputc(int c, FILE *f) -{ - __fputc(c, f); - if (f->flags & _IO_FILE_UNBUF) - fflush(f); -} diff --git a/usr/klibc/stdio/stdioint.h b/usr/klibc/stdio/stdioint.h index da9e27c83d838..e9555003226ff 100644 --- a/usr/klibc/stdio/stdioint.h +++ b/usr/klibc/stdio/stdioint.h @@ -30,7 +30,6 @@ struct _IO_file { __extern int __parse_open_mode(const char *mode); __extern FILE *__fxopen(int fd, int flags, int close_on_err); -__extern int __fputc(int c, FILE *f); __extern struct _IO_file __stdio_headnode; |