525 |
|
* Read from channel |
526 |
|
*/ |
527 |
|
|
528 |
< |
uint8 T64Drive::Read(int channel, uint8 *byte) |
528 |
> |
uint8 T64Drive::Read(int channel, uint8 &byte) |
529 |
|
{ |
530 |
|
int c; |
531 |
|
|
532 |
|
// Channel 15: Error channel |
533 |
|
if (channel == 15) { |
534 |
< |
*byte = *error_ptr++; |
534 |
> |
byte = *error_ptr++; |
535 |
|
|
536 |
< |
if (*byte != '\r') |
536 |
> |
if (byte != '\r') |
537 |
|
return ST_OK; |
538 |
|
else { // End of message |
539 |
|
set_error(ERR_OK); |
544 |
|
if (!file[channel]) return ST_READ_TIMEOUT; |
545 |
|
|
546 |
|
// Get char from buffer and read next |
547 |
< |
*byte = read_char[channel]; |
547 |
> |
byte = read_char[channel]; |
548 |
|
c = fgetc(file[channel]); |
549 |
|
if (c == EOF) |
550 |
|
return ST_EOF; |