diff options
author | Javier <dev.git@javispedro.com> | 2022-04-12 22:38:20 +0200 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2022-04-12 22:38:20 +0200 |
commit | a109a1193ca3cf64a29265103075922d2dd9fc1b (patch) | |
tree | cde59f7e29ccca176dd150a51e8caf4613a86d1f /sftsr.h | |
parent | 2b9f509a04acb88d9ac72bce23b28099efdc4878 (diff) | |
download | vbados-a109a1193ca3cf64a29265103075922d2dd9fc1b.tar.gz vbados-a109a1193ca3cf64a29265103075922d2dd9fc1b.zip |
add file date/time listing support, closeall call
Diffstat (limited to 'sftsr.h')
-rw-r--r-- | sftsr.h | 32 |
1 files changed, 23 insertions, 9 deletions
@@ -26,30 +26,44 @@ #include "vbox.h" #include "int21dos.h" -#define VERSION_MAJOR 0 -#define VERSION_MINOR 1 - #define LASTDRIVE 'Z' #define MAX_NUM_DRIVE (LASTDRIVE - 'A') #define NUM_DRIVES (MAX_NUM_DRIVE + 1) -typedef struct tsrdata { +/** Maximum number of open files */ +#define NUM_FILES 40 + +/** Directory enumeration needs an open file, this is its index. */ +#define SEARCH_DIR_FILE 0 + +typedef struct { + uint32_t root; + uint64_t handle; +} OPENFILE; + +typedef struct { // TSR installation data /** Previous int2f ISR, storing it for uninstall. */ void (__interrupt __far *prev_int2f_handler)(); + /** Stored pointer for the DOS SDA. */ + DOSSDA __far *dossda; + + // TSR configuration + /** Offset (in seconds/2) of the current timezone */ + int32_t tz_offset; + // Current status /** Array of all possible DOS drives. */ struct { /** VirtualBox "root" for this drive, or NIL if unmounted. */ uint32_t root; } drives[NUM_DRIVES]; - /** Stored pointer for the DOS SDA. */ - DOSSDA __far *dossda; - - /** Handle for the directory we are currently searching in. */ - uint64_t search_dir_handle; + /** All currently open files. + * index 0 is reserved for the file opened during directory enumeration. */ + OPENFILE files[NUM_FILES]; + // VirtualBox communication struct vboxcomm vb; uint32_t hgcm_client_id; } TSRDATA; |