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

From: jim <jsymolon011comcast.net>
Date: 2004-07-27 15:37:01
Ullrich von Bassewitz wrote:

>On Mon, Jul 26, 2004 at 06:10:50PM -0400, jim wrote:
>  
>
>>Would it be best to map the ProDOS values into the stat structure ?
>>    
>>
>
>I havent't looked at the other platforms and at the POSIX specs for stat().
>It would be necessary to come up with something that works across all
>supported platforms.
>
>  
>
What I was thinking was to have a POSIX call, in which the function maps 
as much as it can into the stat structure and an Apple only call which 
returns all the information.  The example would resemble the DIO calls 
in the Atari namespace.

For example:
  int fstat(int fd, struct stat *buf);  /* standard POSIX call */
  int dio_get_file_info(int fd, struct a2_stat *buf);  /* apple namespace */

>>Is anyone else working on the same routines ?
>>    
>>
>
>Oliver Schmidt is working on the Apple library.
>
>  
>

I am looking for a status of what's been done and if we're even 
compatible.  Oliver might be working on ProDOS 16 implementation where 
I'm working in ProDOS 8.

>>What is the procedure to add the changes into the code base ?
>>    
>>
>
>The usual procedure is to sent patches to me for inclusion (but see
>http://www.cc65.org/#PatchPolicy). It is often a good idea, to check back with
>me early when doing larger changes. For one, someone else might be working on
>it. And second, I (or the platform maintainer) do sometimes have my own ideas
>on how things should be done, which may lead to problems.
>
>Regards
>
>
>        Uz
>  
>

"... my own ideas ob how things should be done..."

I'm not too sure what you mean by this.  Functionally ? Internal 
structure ? Syntax ?

For example: I've coded the Apple libraries to correspond with the POSIX 
calls
 int chdir(const char* path);
 int __fastcall__ close(int fd);
 int creat(const char *name, mode_t mode);
 int flush (int fd);
  ... and so on ...

The hacks in the write and read functions have been worked with so that 
using the STDIO consts work.  Example:
    fwrite(&msg0[0],1,11,stdout);   /* writes to screen - stderr will 
write to screen also */
    f1 = fopen(&filename[0],"w");
    fwrite(&msg1[0],1,6,f1);            /* writes to open file */

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 15:37:12 2004

This archive was generated by hypermail 2.1.8 : 2004-07-27 15:37:20 CEST