Annotation of researchv10no/cmd/odist/pax/include/ls.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * G. S. Fowler
        !             3:  * AT&T Bell Laboratories
        !             4:  *
        !             5:  * ls formatter interface definitions
        !             6:  */
        !             7: 
        !             8: #ifndef LS_USER
        !             9: 
        !            10: #include <fsinfo.h>
        !            11: 
        !            12: #ifndef S_IRWXU
        !            13: #ifndef S_IREAD
        !            14: #define S_IREAD        00400
        !            15: #define S_IWRITE       00200
        !            16: #define S_IEXEC                00100
        !            17: #endif
        !            18: #ifndef S_ISUID
        !            19: #define S_ISUID                04000
        !            20: #endif
        !            21: #ifndef S_ISGID
        !            22: #define S_ISGID                02000
        !            23: #endif
        !            24: #ifndef S_ISVTX
        !            25: #define S_ISVTX                01000
        !            26: #endif
        !            27: #ifndef S_IRUSR
        !            28: #define S_IRUSR                S_IREAD
        !            29: #define S_IWUSR                S_IWRITE
        !            30: #define S_IXUSR                S_IEXEC
        !            31: #define S_IRGRP                (S_IREAD>>3)
        !            32: #define S_IWGRP                (S_IWRITE>>3)
        !            33: #define S_IXGRP                (S_IEXEC>>3)
        !            34: #define S_IROTH                (S_IREAD>>6)
        !            35: #define S_IWOTH                (S_IWRITE>>6)
        !            36: #define S_IXOTH                (S_IEXEC>>6)
        !            37: #endif
        !            38: 
        !            39: #define S_IRWXU                (S_IRUSR|S_IWUSR|S_IXUSR)
        !            40: #define S_IRWXG                (S_IRGRP|S_IWGRP|S_IXGRP)
        !            41: #define S_IRWXO                (S_IROTH|S_IWOTH|S_IXOTH)
        !            42: #endif
        !            43: 
        !            44: #ifdef stat_blocks
        !            45: #define tblocks(p)     (((p)->st_blocks+1)/2)
        !            46: #else
        !            47: #define tblocks(p)     iblocks(p)
        !            48: #if __STDC__ || __cplusplus || c_plusplus
        !            49: #if __cplusplus
        !            50: extern "C" {
        !            51: #endif
        !            52: extern long            iblocks(struct stat*);
        !            53: #if __cplusplus
        !            54: }
        !            55: #endif
        !            56: #else
        !            57: extern long            iblocks();
        !            58: #endif
        !            59: #endif
        !            60: 
        !            61: #define LS_ATIME       (1<<0)          /* list st_atime                */
        !            62: #define LS_BLOCKS      (1<<1)          /* list blocks used by file     */
        !            63: #define LS_CTIME       (1<<2)          /* list st_ctime                */
        !            64: #define LS_INUMBER     (1<<3)          /* list st_ino                  */
        !            65: #define LS_LONG                (1<<4)          /* long listing                 */
        !            66: #define LS_MARK                (1<<5)          /* append file name marks       */
        !            67: #define LS_NOGROUP     (1<<6)          /* omit group name for LS_LONG  */
        !            68: #define LS_NOUSER      (1<<7)          /* omit user name for LS_LONG   */
        !            69: 
        !            70: #define LS_USER                (1<<8)          /* first user flag bit          */
        !            71: 
        !            72: #define LS_W_BLOCKS    5               /* LS_BLOCKS field width        */
        !            73: #define LS_W_INUMBER   7               /* LS_INUMBER field width       */
        !            74: #define LS_W_LONG      55              /* LS_LONG width (w/o names)    */
        !            75: #define LS_W_LINK      4               /* link text width (w/o names)  */
        !            76: #define LS_W_MARK      1               /* LS_MARK field width          */
        !            77: #define LS_W_NAME      9               /* group|user name field width  */
        !            78: 
        !            79: #if __STDC__ || __cplusplus || c_plusplus
        !            80: #if __cplusplus
        !            81: extern "C" {
        !            82: #endif
        !            83: extern char*   fmtls(char*, const char*, struct stat*, const char*, const char*, int);
        !            84: #if __cplusplus
        !            85: }
        !            86: #endif
        !            87: #else
        !            88: extern char*   fmtls();
        !            89: #endif
        !            90: 
        !            91: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.