mirror of
https://github.com/cc65/cc65.git
synced 2025-02-06 12:31:12 +00:00
Defined a struct to contain the date and time data
To keep backward compatibility auxtype and the date/time are kept separated. A struct similar to the one used in dirent.h is used to access the create_date and create_time fields.
This commit is contained in:
parent
be7c24177c
commit
9b157a5b1e
@ -139,12 +139,18 @@ extern unsigned char _dos_type;
|
|||||||
* 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 struct {
|
extern struct {
|
||||||
unsigned int aux;
|
struct {
|
||||||
unsigned char storage;
|
unsigned day :5;
|
||||||
unsigned int date;
|
unsigned mon :4;
|
||||||
unsigned int time;
|
unsigned year :7;
|
||||||
} _auxtype; /* Default 0 */
|
} createdate;
|
||||||
|
struct {
|
||||||
|
unsigned char min;
|
||||||
|
unsigned char hour;
|
||||||
|
} createtime;
|
||||||
|
} _datetime;
|
||||||
|
|
||||||
/* The addresses of the static drivers */
|
/* The addresses of the static drivers */
|
||||||
#if !defined(__APPLE2ENH__)
|
#if !defined(__APPLE2ENH__)
|
||||||
|
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user