Annotation of researchv10dc/man/manx/getshput.3, revision 1.1

1.1     ! root        1: .TH GETSHPUT 3 SHARE
        !             2: .SH NAME
        !             3: getshput \- read, modify, and write shares file entry
        !             4: .SH SYNOPSIS
        !             5: .B "#include <shares.h>"
        !             6: .br
        !             7: .sp
        !             8: .B "unsigned long getshput(lp, func)"
        !             9: .br
        !            10: .B "struct lnode * lp;"
        !            11: .br
        !            12: .B "unsigned long (*func)();"
        !            13: .SH DESCRIPTION
        !            14: .I Getshput
        !            15: finds the shares entry with the same uid as
        !            16: .I lp\->l_uid
        !            17: and reads it into an internal
        !            18: .I lnode
        !            19: structure.
        !            20: The function pointed to by
        !            21: .I func
        !            22: is then called with two arguments,
        !            23: the first pointing to the original
        !            24: .I lnode
        !            25: structure,
        !            26: and the second pointing to the internal
        !            27: .I lnode
        !            28: structure.
        !            29: If
        !            30: .I func
        !            31: returns with a value other than 0
        !            32: the (presumably modified) second structure is written back to the shares file,
        !            33: with the ``extime'' field in the shares record filled with the value returned by
        !            34: .IR func .
        !            35: Otherwise
        !            36: .I getshput
        !            37: simply returns.
        !            38: .I Getshput
        !            39: returns the value returned by
        !            40: .IR func .
        !            41: .SH "SEE ALSO"
        !            42: closeshares(3),
        !            43: getshares(3),
        !            44: openshares(3),
        !            45: putshares(3),
        !            46: sharesfile(3).
        !            47: .SH DIAGNOSTICS
        !            48: .I Getshput
        !            49: returns 0
        !            50: if the entry can't be modified.

unix.superglobalmegacorp.com

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