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:
@@ -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.
|
||||
*/
|
||||
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
@@ -84,9 +84,9 @@ struct dirent {
|
||||
struct dirent {
|
||||
char d_name[16+1];
|
||||
unsigned int d_off;
|
||||
unsigned int d_reclen;
|
||||
unsigned int d_blocks;
|
||||
unsigned char d_type;
|
||||
|
||||
|
||||
/* bsd extensions */
|
||||
unsigned char d_namlen;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user