Main Page | Class Hierarchy | Compound List | File List | Compound Members | File Members | Related Pages

FSDrive Class Reference

#include <1541fs.h>

Inheritance diagram for FSDrive:

Inheritance graph
[legend]
Collaboration diagram for FSDrive:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 FSDrive (IEC *iec, char *path)
virtual ~FSDrive ()
virtual uint8 Open (int channel, char *filename)
virtual uint8 Close (int channel)
virtual uint8 Read (int channel, uint8 *byte)
virtual uint8 Write (int channel, uint8 byte, bool eoi)
virtual void Reset (void)

Private Member Functions

bool change_dir (char *dirpath)
uint8 open_file (int channel, char *filename)
uint8 open_directory (int channel, char *filename)
void convert_filename (char *srcname, char *destname, int *filemode, int *filetype, bool *wildflag)
void find_first_file (char *name)
void close_all_channels (void)
void execute_command (char *command)
int chdir_cmd (char *dirpath)
uint8 conv_from_64 (uint8 c, bool map_slash)
uint8 conv_to_64 (uint8 c, bool map_slash)

Private Attributes

char dir_path [256]
char orig_dir_path [256]
char dir_title [16]
FILE * file [16]
char cmd_buffer [44]
int cmd_len
uint8 read_char [16]

Constructor & Destructor Documentation

FSDrive::FSDrive IEC iec,
char *  path
 

Definition at line 53 of file 1541fs.cpp.

References __CHECK_NULL, change_dir(), CTOR, dir_path, file, orig_dir_path, Drive::Ready, Reset(), and strcpy.

FSDrive::~FSDrive  )  [virtual]
 

Definition at line 79 of file 1541fs.cpp.

References close_all_channels(), DTOR, and Drive::Ready.


Member Function Documentation

bool FSDrive::change_dir char *  dirpath  )  [private]
 

Definition at line 94 of file 1541fs.cpp.

References closedir, dir_path, dir_title, opendir, ReadCatalogueInfo(), strcpy, and strncpy.

Referenced by chdir_cmd(), and FSDrive().

int FSDrive::chdir_cmd char *  dirpath  )  [private]
 

Definition at line 670 of file 1541fs.cpp.

References change_dir(), close_all_channels(), conv_from_64(), ERR_NOTREADY, NAMEBUF_LENGTH, orig_dir_path, and Drive::set_error().

Referenced by execute_command(), open_directory(), and open_file().

uint8 FSDrive::Close int  channel  )  [virtual]
 

Implements Drive.

Definition at line 536 of file 1541fs.cpp.

References close_all_channels(), fclose, file, ST_OK, and uint8.

Referenced by close_all_channels().

void FSDrive::close_all_channels void   )  [private]
 

Definition at line 556 of file 1541fs.cpp.

References Close(), and cmd_len.

Referenced by chdir_cmd(), Close(), execute_command(), Reset(), and ~FSDrive().

uint8 FSDrive::conv_from_64 uint8  c,
bool  map_slash
[private]
 

Todo:
use prefs

Definition at line 713 of file 1541fs.cpp.

References uint8.

Referenced by chdir_cmd(), and convert_filename().

uint8 FSDrive::conv_to_64 uint8  c,
bool  map_slash
[private]
 

Todo:
use prefs

Definition at line 734 of file 1541fs.cpp.

References ThePrefs, and uint8.

Referenced by open_directory().

void FSDrive::convert_filename char *  srcname,
char *  destname,
int *  filemode,
int *  filetype,
bool *  wildflag
[private]
 

Definition at line 239 of file 1541fs.cpp.

References conv_from_64(), FMODE_APPEND, FMODE_READ, FMODE_WRITE, FTYPE_PRG, FTYPE_SEQ, NAMEBUF_LENGTH, and strchr().

Referenced by open_directory(), and open_file().

void FSDrive::execute_command char *  command  )  [private]
 

Definition at line 638 of file 1541fs.cpp.

References chdir_cmd(), close_all_channels(), ERR_OK, ERR_SYNTAX30, Reset(), and Drive::set_error().

Referenced by Open(), and Write().

void FSDrive::find_first_file char *  name  )  [private]
 

Definition at line 306 of file 1541fs.cpp.

References dir_env::buffsize, closedir, dir_path, dirent, dir_env::match, match(), NAMEBUF_LENGTH, dir_env::offset, opendir, readdir, ReadDirName(), dir_env::readno, strcmp, and strncpy.

Referenced by open_file().

uint8 FSDrive::Open int  channel,
char *  filename
[virtual]
 

Implements Drive.

Definition at line 127 of file 1541fs.cpp.

References ERR_NOCHANNEL, ERR_OK, execute_command(), fclose, file, open_directory(), open_file(), Drive::set_error(), ST_OK, and uint8.

uint8 FSDrive::open_directory int  channel,
char *  filename
[private]
 

Definition at line 360 of file 1541fs.cpp.

References AppDirPath, dir_env::buffsize, chdir_cmd(), closedir, conv_to_64(), convert_filename(), DeleteFile(), dir_path, dir_title, dirent, ERR_NOTREADY, fgetc, file, fopen, fwrite, dir_full_info::length, dir_env::match, match(), memset, dir_full_info::name, NAMEBUF_LENGTH, dir_env::offset, opendir, dir_full_info::otype, read_char, readdir, ReadDirNameInfo(), dir_env::readno, rewind, RO_TEMPFILE, Drive::set_error(), ST_OK, stat, strcmp, strcpy, strlen, tmpfile, and uint8.

Referenced by Open().

uint8 FSDrive::open_file int  channel,
char *  filename
[private]
 

Definition at line 159 of file 1541fs.cpp.

References AppDirPath, chdir_cmd(), convert_filename(), dir_path, ERR_FILENOTFOUND, ERR_NOTREADY, ERR_SYNTAX33, fgetc, file, find_first_file(), FMODE_APPEND, FMODE_READ, FMODE_WRITE, fopen, FTYPE_PRG, NAMEBUF_LENGTH, read_char, Drive::set_error(), sprintf, ST_OK, and uint8.

Referenced by Open().

uint8 FSDrive::Read int  channel,
uint8 byte
[virtual]
 

Implements Drive.

Definition at line 569 of file 1541fs.cpp.

References EOF, ERR_OK, Drive::error_ptr, fgetc, file, read_char, Drive::set_error(), ST_EOF, ST_OK, ST_READ_TIMEOUT, and uint8.

void FSDrive::Reset void   )  [virtual]
 

Implements Drive.

Definition at line 699 of file 1541fs.cpp.

References close_all_channels(), cmd_len, ELOG1, ERR_STARTUP, and Drive::set_error().

Referenced by execute_command(), and FSDrive().

uint8 FSDrive::Write int  channel,
uint8  byte,
bool  eoi
[virtual]
 

Implements Drive.

Definition at line 603 of file 1541fs.cpp.

References cmd_buffer, cmd_len, EOF, ERR_FILENOTOPEN, ERR_WRITEERROR, execute_command(), file, fputc, Drive::set_error(), ST_OK, ST_TIMEOUT, and uint8.


Member Data Documentation

char FSDrive::cmd_buffer[44] [private]
 

Definition at line 40 of file 1541fs.h.

Referenced by Write().

int FSDrive::cmd_len [private]
 

Definition at line 41 of file 1541fs.h.

Referenced by close_all_channels(), Reset(), and Write().

char FSDrive::dir_path[256] [private]
 

Definition at line 35 of file 1541fs.h.

Referenced by change_dir(), find_first_file(), FSDrive(), open_directory(), and open_file().

char FSDrive::dir_title[16] [private]
 

Definition at line 37 of file 1541fs.h.

Referenced by change_dir(), and open_directory().

FILE* FSDrive::file[16] [private]
 

Definition at line 38 of file 1541fs.h.

Referenced by Close(), FSDrive(), Open(), open_directory(), open_file(), Read(), and Write().

char FSDrive::orig_dir_path[256] [private]
 

Definition at line 36 of file 1541fs.h.

Referenced by chdir_cmd(), and FSDrive().

uint8 FSDrive::read_char[16] [private]
 

Definition at line 43 of file 1541fs.h.

Referenced by open_directory(), open_file(), and Read().


The documentation for this class was generated from the following files:
Generated on Tue Feb 8 04:12:09 2005 for E32frodo by doxygen 1.3.3