$save nolist /* *============================================================================ * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE * * Permission to use for any purpose, modify, copy, and make enhancements * and derivative works of the software is granted if attribution is given to * R.M. Gillmore, dba the ACME Software Deli, as the author * * While the ACME Software Deli does not work for money, there is nonetheless * a significant amount of work involved. The ACME Software Deli maintains the * rights to all code written, though it may be used and distributed as long as * the following conditions are maintained. * * 1. The copyright statement at the top of each code block is maintained in * your distribution. * 2. You do not identify yourself as the ACME Software Deli * 3. Any changes made to the software are sent to the ACME Software Deli *============================================================================ */ $if not POSIXDIR_EXT_INCLUDED $set (POSIXDIR_EXT_INCLUDED) /* * $Id: posixDir.ext 1157 2025-05-05 00:35:39Z rmgillmore $ */ $include (..\lib\comnDefs.ext) $include (..\lib\dosFind.ext) declare dirPtr_t literally 'pointer', dirEntryPtr_t literally 'pointer', dirHandlePtr_t literally 'pointer'; /* * to interpret the attributes, use the bit definitions in dosFind.ext */ declare attribute_t literally 'word'; declare dirEntry_t literally 'structure ( fileName ( MAX_FILENAME ) char, fileLength qword, fileDate qword, attributes attribute_t )'; /* * struct stat { * dev_t st_dev; // ID of device containing file * ino_t st_ino; // Inode number * mode_t st_mode; // File type and mode * nlink_t st_nlink; // Number of hard links * uid_t st_uid; // User ID of owner * gid_t st_gid; // Group ID of owner * dev_t st_rdev; // Device ID (if special file) * off_t st_size; // Total size, in bytes * blksize_t st_blksize; // Block size for filesystem I/O * blkcnt_t st_blocks; // Number of 512B blocks allocated * * // Since Linux 2.6, the kernel supports nanosecond * // precision for the following timestamp fields. * // For the details before Linux 2.6, see NOTES. * * struct timespec st_atim; // Time of last access * struct timespec st_mtim; // Time of last modification * struct timespec st_ctim; // Time of last status change * * #define st_atime st_atim.tv_sec // Backward compatibility * #define st_mtime st_mtim.tv_sec * #define st_ctime st_ctim.tv_sec * }; */ $if opendirImplementation or readdirImplementation or closedirImplementation or rewinddirImplementation declare dirHandle_t literally 'structure ( fileRecordArray pointer, fileSearchSpecString pointer, directoryName pointer, readComplete boolean, numberEntries word, statusCode word, searchHandle word )'; /* searchData dta_t, */ $endif $if not opendirImplementation opendir: procedure ( pathString ) dirHandlePtr_t external; declare pathString pointer; end opendir; $endif $if not readdirImplementation readdir: procedure ( directoryHandlePtr ) dirEntryPtr_t external; declare directoryHandlePtr dirHandlePtr_t; end readdir; $endif $if not rewinddirImplementation rewinddir: procedure ( directoryHandlePtr ) dirEntryPtr_t external; declare directoryHandlePtr dirHandlePtr_t; end rewinddir; $endif $if not closedirImplementation closedir: procedure ( directoryHandlePtr ) external; declare directoryHandlePtr dirHandlePtr_t; end closedir; $endif $endif $restore