// dos13 - a module for DOS 1.x interaction #pragma once #ifndef __DOS13_H__ #define __DOS13_H__ #include #define FILETYPE_FILE 0 #define FILETYPE_DIR 1 #define FILETYPE_VOLUME 2 // This file requester is only for 1.x, so 31 characters is the // maximum #define MAX_FILENAME_LEN 31 /* * Store file list entries in these entries. Storing a previous pointer allows us to * navigate backwards, e.g. for scrolling up a file list. */ struct FileListEntry { struct FileListEntry *next, *prev; UWORD file_type; UWORD index; // index in the list UWORD selected; char name[MAX_FILENAME_LEN + 1]; }; /* * Scans the specified directory and returns the entries, if dirpath is NULL, * returns the list of all logical volumes. */ extern struct FileListEntry *scan_dir(const char *dirpath, int *num_entries); /* free the resources allocated in the specified entry list */ void free_file_list(struct FileListEntry *entries); #endif