source: abuse/tags/pd/macabuse/imlib/port/mac/sys_dirent.h @ 49

Last change on this file since 49 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
  • Property svn:keywords set to Id
File size: 1.3 KB
Line 
1/****************************************************************************************
2 *
3 *      File:           sys_dirent.h
4 *      Created:        7/3/93          By:     George T. Talbot
5 *      Purpose:        Implements UNIX-like directory reading for the Macintosh.
6 *                              Filesystem-independent directory information.
7 *
8 *      Modifications:
9 *
10 *      Notes:
11 *                      1) These routines will NOT work under A/UX.
12 *                      2) WD = working directory
13 *                      3) CD = change directory
14 *                      4) FS = file system
15 *                      5) Mac filesystems allow spaces as part of pathnames!
16 *                      6) All routines which return a path use the default Macintosh path separator,
17 *                         a colon (":").
18 *
19 ****************************************************************************************/
20
21#ifndef __sys_dirent_h
22#define __sys_dirent_h
23
24#include <Files.h>
25
26struct  dirent {
27        /* PRIVATE FIELDS.  Use fields after PUBLIC     */
28        struct dirent   **next;
29        FSSpec                  fsp;
30       
31        /*      PUBLIC. */
32        long                    d_off;                                  /* index (to seekdir()) of this entry */       
33        long                    d_fileno;                               /* File number (dirID) of this entry    */
34#define d_parent        fsp.parID                               /* File number (dirID) of parent        */
35#define d_reclen        sizeof(struct dirent)   /* Size of this record  */
36#define d_namelen       strlen(fsp.name)                /*      Length of the name      */
37#define d_name          fsp.name                                /*      Name    */
38#define d_volume        fsp.vRefNum
39};
40
41#define DIRSIZ(dp) sizeof(struct dirent)
42
43#endif  /* !__sys_dirent_h */
Note: See TracBrowser for help on using the repository browser.