Moved most of the file type detection from cbm_dir.c into a new function

called _cbm_filetype().
Added an assembler include file with the file type definitions from cbm.h.
Added a first implementation of readdir() for the CBMs.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5669 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-06-02 22:56:14 +00:00
parent eab5f250ad
commit ebca2991a3
9 changed files with 254 additions and 19 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 1998-2011, Ullrich von Bassewitz */
/* (C) 1998-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -116,7 +116,7 @@ extern char _filetype; /* Defaults to 'u' */
#define CH_LIRA 92
#define CH_ESC 27
/*****************************************************************************/
/* Definitions for directory reading functions */
@@ -149,6 +149,14 @@ struct cbm_dirent {
unsigned char access;
};
unsigned char __fastcall__ _cbm_filetype (unsigned char c);
/* Map the start character for a file type to one of the file types above.
* Note: 'd' will always mapped to CBM_T_DEL. The calling function has to
* look at the following character to determine if the file type is actually
* CBM_T_DIR.
* This is a function used by the implementation. There is usually no need
* to call it from user code.
*/
/*****************************************************************************/