initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#include "ifstream.h"
|
||||
#include <c64/kernalio.h>
|
||||
|
||||
namespace opp {
|
||||
|
||||
ifstream::ifstream(char fnum, char device, char channel, const string & name)
|
||||
{
|
||||
this->fnum = fnum;
|
||||
krnio_setnam(name.tocstr());
|
||||
krnio_open(fnum, device, channel);
|
||||
}
|
||||
|
||||
ifstream::~ifstream(void)
|
||||
{
|
||||
krnio_close(fnum);
|
||||
}
|
||||
|
||||
void ifstream::refill(void)
|
||||
{
|
||||
mBufferPos = 0;
|
||||
mBufferFill = krnio_read(fnum, mBuffer, 32);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user