Annotation of mstools/posix/samples/psxarc/links.h, revision 1.1

1.1     ! root        1: #include <sys/types.h>
        !             2: 
        !             3: typedef struct _LIST_ENTRY {
        !             4:        struct _LIST_ENTRY *Flink;
        !             5:        struct _LIST_ENTRY *Blink;
        !             6: } LIST_ENTRY, *PLIST_ENTRY;
        !             7: 
        !             8: typedef struct _LINKFILE {
        !             9:        LIST_ENTRY links;
        !            10:        int nlink;
        !            11:        char *name;
        !            12:        dev_t dev;
        !            13:        ino_t ino;
        !            14: } LINKFILE, *PLINKFILE;
        !            15: 
        !            16: #define InsertTailList(ListHead, Entry) \
        !            17:        (Entry)->Flink = (ListHead);\
        !            18:        (Entry)->Blink = (ListHead)->Blink;\
        !            19:        (ListHead)->Blink->Flink = (Entry);\
        !            20:        (ListHead)->Blink = (Entry)
        !            21: 
        !            22: #define RemoveEntryList(Entry) {\
        !            23:        PLIST_ENTRY _EX_Entry;\
        !            24:        _EX_Entry = (Entry);\
        !            25:        _EX_Entry->Blink->Flink = _EX_Entry->Flink;\
        !            26:        _EX_Entry->Flink->Blink = _EX_Entry->Blink;\
        !            27:        }
        !            28: 
        !            29: #define InitializeListHead(ListHead) \
        !            30:        ((ListHead)->Flink = (ListHead)->Blink = (ListHead))
        !            31: 
        !            32: #define IsListEmpty(ListHead) \
        !            33:        ((ListHead)->Flink == (ListHead))
        !            34: 
        !            35: extern PLINKFILE GetLinkByName(char *);
        !            36: extern PLINKFILE GetLinkByIno(ino_t);
        !            37: struct stat;
        !            38: extern void AddLinkList(struct stat *, char *);
        !            39: extern void InitLinkList(void);

unix.superglobalmegacorp.com

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