--- Frodo4/Src/1541fs.cpp 2004/01/11 00:09:51 1.4 +++ Frodo4/Src/1541fs.cpp 2005/06/27 19:55:48 1.9 @@ -1,7 +1,7 @@ /* * 1541fs.cpp - 1541 emulation in host file system * - * Frodo (C) 1994-1997,2002-2003 Christian Bauer + * Frodo (C) 1994-1997,2002-2005 Christian Bauer * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -55,7 +55,7 @@ static bool match(const char *p, const c * Constructor: Prepare emulation */ -FSDrive::FSDrive(IEC *iec, char *path) : Drive(iec) +FSDrive::FSDrive(IEC *iec, const char *path) : Drive(iec) { strcpy(orig_dir_path, path); dir_path[0] = 0; @@ -325,7 +325,7 @@ uint8 FSDrive::open_directory(int channe // Convert pattern to ASCII char ascii_pattern[NAMEBUF_LENGTH]; - petscii2ascii(ascii_pattern, (const char *)pattern, NAMEBUF_LENGTH); + petscii2ascii(ascii_pattern, pattern, NAMEBUF_LENGTH); // Open directory for reading and skip '.' and '..' if ((dir = opendir(dir_path)) == NULL) { @@ -512,15 +512,15 @@ void FSDrive::close_all_channels(void) * Read from channel */ -uint8 FSDrive::Read(int channel, uint8 *byte) +uint8 FSDrive::Read(int channel, uint8 &byte) { int c; // Channel 15: Error channel if (channel == 15) { - *byte = *error_ptr++; + byte = *error_ptr++; - if (*byte != '\r') + if (byte != '\r') return ST_OK; else { // End of message set_error(ERR_OK); @@ -531,7 +531,7 @@ uint8 FSDrive::Read(int channel, uint8 * if (!file[channel]) return ST_READ_TIMEOUT; // Read one byte - *byte = read_char[channel]; + byte = read_char[channel]; c = fgetc(file[channel]); if (c == EOF) return ST_EOF;