Files
codezero/loader/libs/c/src/fputc.c
Bahadir Balban 59f30a175a More progress on build scripts
Created a config directory for configuration files.
Moved all absolute path variables to a projpaths.py file
All scripts can now universally learn absolute paths via projpaths.py
Moved the config_symbols class to the configuration.py file.
Moved libs to loader since they are only referred by the loader
2009-09-12 13:42:30 +03:00

20 lines
373 B
C

#include <stdio.h>
int
fputc(int c, FILE *stream)
{
unsigned char ch = (unsigned char) c;
/* This is where we should do output buffering */
lock_stream(stream);
if (stream->write_fn(&ch, stream->current_pos, 1, stream->handle) == 1) {
/* Success */
stream->current_pos++;
unlock_stream(stream);
return c;
} else {
unlock_stream(stream);
return EOF;
}
}