[cc65] Apple2 Libraries - Current status of file io ?

From: jim <jsymolon011comcast.net>
Date: 2004-07-27 00:10:50
I've been developing the file I/O routines for the Apple2 and so far 
I've made decent progress.  I've been developing under ProDOS 8 and have 
these functions working:
    open, close, write, creat(e), lseek, ftruncate, feof, fileno

The library routines tie into the STDIO routines and I/O using the 
STDIN, STDOUT, STDERR work correctly.

What is left (other than lots):
  read - coded, needs testing
  chdir = set prefix
  read/write blocks
  rename
  fflush - coded, needs testing
  fgetpos
  fsetpos
  ftell
  getcwd = getprefix
  remove = destroy
  rewind = (setmark = 0)
  setbuf

What might be left unimplemented:
    alloc interrupt, dealloc interrupt, get buffer, newline

I've tried to follow the POSIX most of the time, however, certain items 
are just different.  For example: the file info call returns:
              struct stat {
                  dev_t         st_dev;      /* device */
                  ino_t         st_ino;      /* inode */
                  mode_t        st_mode;     /* protection */
                  nlink_t       st_nlink;    /* number of hard links */
                  uid_t         st_uid;      /* user ID of owner */
                  gid_t         st_gid;      /* group ID of owner */
                  dev_t         st_rdev;     /* device type (if inode 
device) */
                  off_t         st_size;     /* total size, in bytes */
                  blksize_t     st_blksize;  /* blocksize for filesystem 
I/O */
                  blkcnt_t      st_blocks;   /* number of blocks 
allocated */
                  time_t        st_atime;    /* time of last access */
                  time_t        st_mtime;    /* time of last modification */
                  time_t        st_ctime;    /* time of last change */
              };

The ProDOS function returns:
           byte     Access privs
           byte     data stored (TXT,BIN...)
           word    aux data (length or start or size depending on file type)
           byte     storage type - close to inode level
           word    reserved
           word    date last modification
           word    time last modification
           word    date file creation
           word    time file creation

Would it be best to map the ProDOS values into the stat structure ?

Is anyone else working on the same routines ?

What is the procedure to add the changes into the code base ?  For the 
most part a .zip of the apple2 libsrc will work, however,  I've also 
added a few CONST items to the errno.inc and fcntl.inc files.

Thanks
Jim

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Jul 27 00:10:54 2004

This archive was generated by hypermail 2.1.8 : 2004-07-27 00:11:03 CEST