Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "DeviceIOConsole.h"
- #include <stdio.h>
- // --------------------------------------------------------------------------------------------------------------------
- void DeviceIOConsole_constructor(DeviceIOAbstract* this)
- {
- this->readIn = DeviceIOConsole_readIn;
- this->writeOut = DeviceIOConsole_writeOut;
- this->writeErr = DeviceIOConsole_writeErr;
- }
- // --------------------------------------------------------------------------------------------------------------------
- int DeviceIOConsole_readIn(char* buffer)
- {
- return fgets (buffer, 256, stdin);
- }
- // --------------------------------------------------------------------------------------------------------------------
- int DeviceIOConsole_writeOut(char* buffer)
- {
- return fprintf (stdout, "%s", buffer);
- }
- // --------------------------------------------------------------------------------------------------------------------
- int DeviceIOConsole_writeErr(char* buffer)
- {
- return fprintf (stderr, "%s", buffer);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement