ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/1541fs.cpp
(Generate patch)

Comparing Frodo4/Src/1541fs.cpp (file contents):
Revision 1.4 by cebix, 2004-01-11T00:09:51Z vs.
Revision 1.8 by cebix, 2004-01-14T17:23:46Z

# Line 1 | Line 1
1   /*
2   *  1541fs.cpp - 1541 emulation in host file system
3   *
4 < *  Frodo (C) 1994-1997,2002-2003 Christian Bauer
4 > *  Frodo (C) 1994-1997,2002-2004 Christian Bauer
5   *
6   *  This program is free software; you can redistribute it and/or modify
7   *  it under the terms of the GNU General Public License as published by
# Line 55 | Line 55 | static bool match(const char *p, const c
55   *  Constructor: Prepare emulation
56   */
57  
58 < FSDrive::FSDrive(IEC *iec, char *path) : Drive(iec)
58 > FSDrive::FSDrive(IEC *iec, const char *path) : Drive(iec)
59   {
60          strcpy(orig_dir_path, path);
61          dir_path[0] = 0;
# Line 325 | Line 325 | uint8 FSDrive::open_directory(int channe
325  
326          // Convert pattern to ASCII
327          char ascii_pattern[NAMEBUF_LENGTH];
328 <        petscii2ascii(ascii_pattern, (const char *)pattern, NAMEBUF_LENGTH);
328 >        petscii2ascii(ascii_pattern, pattern, NAMEBUF_LENGTH);
329  
330          // Open directory for reading and skip '.' and '..'
331          if ((dir = opendir(dir_path)) == NULL) {
# Line 512 | Line 512 | void FSDrive::close_all_channels(void)
512   *  Read from channel
513   */
514  
515 < uint8 FSDrive::Read(int channel, uint8 *byte)
515 > uint8 FSDrive::Read(int channel, uint8 &byte)
516   {
517          int c;
518  
519          // Channel 15: Error channel
520          if (channel == 15) {
521 <                *byte = *error_ptr++;
521 >                byte = *error_ptr++;
522  
523 <                if (*byte != '\r')
523 >                if (byte != '\r')
524                          return ST_OK;
525                  else {  // End of message
526                          set_error(ERR_OK);
# Line 531 | Line 531 | uint8 FSDrive::Read(int channel, uint8 *
531          if (!file[channel]) return ST_READ_TIMEOUT;
532  
533          // Read one byte
534 <        *byte = read_char[channel];
534 >        byte = read_char[channel];
535          c = fgetc(file[channel]);
536          if (c == EOF)
537                  return ST_EOF;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines