Re: [cc65] Directory reading functions

Date view Thread view Subject view

From: Greg King (gngking_at_erols.com)
Date: 2003-01-18 03:21:15


-----Original Message-----
From: josef.soucek_at_ct.cz
Date: Friday, January 17, 2003, 12:34 PM
>
> I have designed two functions for opening directory and for reading
> directory entry.
> It is very 'simplified' version of POSIX opendir() and readdir().
>
> The preliminary header file:
>
> /* ls_cbm.h */
> /* This is header-file for directory-oriented functions for CBM systems. */
>
> #ifndef _LS_CBM_H
> #define _LS_CBM_H
>
> /* CBM TYPES */
>
> #define T_PRG   1
> #define T_SEQ   2
> #define T_USR   3
> #define T_DIR   4
> #define T_OTHER 5          /* Undefined file types */

They should be defined with the values that are stored in the disk-directory:
#define T_DEL    0
#define T_SEQ    1
#define T_PRG    2
#define T_USR    3
#define T_REL    4
#define T_CBM    5        /* 1581 sub-partition */
#define T_DIR    6        /* CMD sub-directory */
#define T_VRP    8        /* Vorpal fast-loadable format */
#define T_OTHER 15        /* Undefined file-types */

> ...
> ...
> ...
>
> /* Close directory by cbm_close(unsigned char lfn) and cbm_k_clrch() */

cbm_k_clrch() must be called by cbm_readdir() before it returns.

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2003-01-18 03:40:39 CET