CSCE 510 Function Prototypes

struct stat {
        dev_t           st_dev;
        ino_t           st_ino;
        mode_t          st_mode;
        nlink_t         st_nlink;
        uid_t           st_uid;
        gid_t           st_gid;
        dev_t           st_rdev;
        off_t           st_size;
        timestruc_t     st_atim;
        timestruc_t     st_mtim;
        timestruc_t     st_ctim;
        blksize_t       st_blksize;
        blkcnt_t        st_blocks;
        char            st_fstype[_ST_FSTYPSZ];
};
#define S_IRWXU         00700   /* read, write, execute: owner */
#define S_IRUSR         00400   /* read permission: owner */
#define S_IWUSR         00200   /* write permission: owner */
#define S_IXUSR         00100   /* execute permission: owner */
#define S_IRWXG         00070   /* read, write, execute: group */
#define S_IRGRP         00040   /* read permission: group */
#define S_IWGRP         00020   /* write permission: group */
#define S_IXGRP         00010   /* execute permission: group */
#define S_IRWXO         00007   /* read, write, execute: other */
#define S_IROTH         00004   /* read permission: other */
#define S_IWOTH         00002   /* write permission: other */
#define S_IXOTH         00001   /* execute permission: other */

#define S_ISFIFO(mode)  (((mode)&0xF000) == 0x1000)
#define S_ISCHR(mode)   (((mode)&0xF000) == 0x2000)
#define S_ISDIR(mode)   (((mode)&0xF000) == 0x4000)
#define S_ISBLK(mode)   (((mode)&0xF000) == 0x6000)
#define S_ISREG(mode)   (((mode)&0xF000) == 0x8000)
#define S_ISLNK(mode)   (((mode)&0xF000) == 0xa000)
#define S_ISSOCK(mode)  (((mode)&0xF000) == 0xc000)
#define S_ISDOOR(mode)  (((mode)&0xF000) == 0xd000)

stdio.h macros
ar header



URL = http://www.cs.sc.edu/~matthews/Courses/510/FunctionPrototypes.html