1
0
mirror of https://github.com/cc65/cc65.git synced 2024-11-18 00:07:21 +00:00

Merge pull request #25 from cybernesto/master

Promoted _auxtype to a struct to gain access to additional fields
This commit is contained in:
Oliver Schmidt 2013-08-08 09:40:50 -07:00
commit f5844e58d1
2 changed files with 15 additions and 3 deletions

View File

@ -138,8 +138,19 @@ extern unsigned char _dos_type;
/* The file stream implementation and the POSIX I/O functions will use the /* The file stream implementation and the POSIX I/O functions will use the
* following variables to determine the file type and the aux type to use. * following variables to determine the file type and the aux type to use.
*/ */
extern unsigned char _filetype; /* Default 6 */ extern unsigned char _filetype; /* Default: 6 */
extern unsigned int _auxtype; /* Default 0 */ extern unsigned int _auxtype; /* Default: 0 */
extern struct {
struct {
unsigned day :5;
unsigned mon :4;
unsigned year :7;
} createdate; /* Current date: 0 */
struct {
unsigned char min;
unsigned char hour;
} createtime; /* Current time: 0 */
} _datetime;
/* The addresses of the static drivers */ /* The addresses of the static drivers */
#if !defined(__APPLE2ENH__) #if !defined(__APPLE2ENH__)

View File

@ -5,7 +5,7 @@
; ;
.export _open, closedirect, freebuffer .export _open, closedirect, freebuffer
.export __filetype, __auxtype .export __filetype, __auxtype, __datetime
.constructor raisefilelevel .constructor raisefilelevel
.destructor closeallfiles, 5 .destructor closeallfiles, 5
@ -246,5 +246,6 @@ __filetype:
__auxtype: __auxtype:
.word $0000 ; AUX_TYPE: Load address N/A .word $0000 ; AUX_TYPE: Load address N/A
.byte $01 ; STORAGE_TYPE: Standard seedling file .byte $01 ; STORAGE_TYPE: Standard seedling file
__datetime:
.word $0000 ; CREATE_DATE: Current date .word $0000 ; CREATE_DATE: Current date
.word $0000 ; CREATE_TIME: Current time .word $0000 ; CREATE_TIME: Current time