Annotation of 43BSD/contrib/notes/doc/4.3, revision 1.1

1.1     ! root        1: .se "User Subroutines"
        !             2: 
        !             3: .ss "Nfcomment"
        !             4: 
        !             5:        The nfcomment subroutine is callable from a user's C program. It
        !             6: allows any user program to enter text into a notesfile:
        !             7: 
        !             8:        nfcomment (nfname, text, title, dirflag, anonflag)
        !             9: 
        !            10: .KS
        !            11: .br
        !            12: The parameters are:
        !            13: 
        !            14: .br
        !            15: .ls 1
        !            16:        char *nfname;   /* name of notesfile */
        !            17: .br
        !            18:        char *text;     /* null terminated text to be entered */
        !            19: .br
        !            20:        char *title;    /* if non-null, title of note */
        !            21: .br
        !            22:        int dirflag;    /* != 0 -> director flag on (if allowed) */
        !            23: .br
        !            24:        int anonflag;   /* != 0 -> anonymous note (if allowed) */
        !            25: .br
        !            26: .ls
        !            27: .KE
        !            28: 
        !            29:        If the *text pointer is NULL, the text of the note will be read
        !            30: from standard input.
        !            31: If no title is specified the subroutine will manufacture a title
        !            32: from the first line of the note.
        !            33: This routine is useful for error reports, user comments
        !            34: about programs, and automatic logging of statistics or internal states.
        !            35: 
        !            36:        This routine can be loaded with a C program by specifying `-lnfcom'
        !            37: on the `cc' command line.
        !            38: 
        !            39: .ss "Nfabort"
        !            40: 
        !            41:        Nfabort allows users to generate core images of their
        !            42: process, save the core image in a ``known'' place,
        !            43: and
        !            44: log the fact in a notesfile.
        !            45: This proves useful for intermittent failures;
        !            46: when a program does crash,
        !            47: a core image is placed in an appropriate place and a
        !            48: message is placed in a notesfile.
        !            49: The programmer regularly scans the notesfile and can examine
        !            50: the core dump at his leisure.
        !            51: Some of the problems of recreating conditions which cause errors
        !            52: are eliminated by this approach.
        !            53: 
        !            54:        Nfabort is callable from the user program. It accepts
        !            55: the following parameters:
        !            56: 
        !            57:        nfabort (nfname, message, title, cname, exitcode)
        !            58: 
        !            59: .KS
        !            60: .br
        !            61: The parameters are:
        !            62: 
        !            63: .br
        !            64: .ls 1
        !            65:        char *nfname;   /* name of notesfile */
        !            66: .br
        !            67:        char *message;  /* text string to insert */
        !            68: .br
        !            69:        char *title;    /* title of the message */
        !            70: .br
        !            71:        char *cname;    /* prefix for core image destination */
        !            72: .br
        !            73:        int exitcode;   /* code for exit() */
        !            74: .ls
        !            75: .KE
        !            76: 
        !            77:        The core image is placed in the file specified by
        !            78: concatenating the ``cname'' argument and a unique 
        !            79: integer (the process id of the current process).
        !            80: The notesfile specified by the ``nfname'' parameter
        !            81: receives a note whose body consists of the text pointed
        !            82: to by ``message'' and a line telling the complete pathname
        !            83: of the core image.
        !            84: The title of the note is specified by the ``title'' 
        !            85: parameter.
        !            86: After the core image is generated and the
        !            87: note has been written, 
        !            88: nfabort terminates with the exit code specified
        !            89: by the ``exitcode'' parameter.
        !            90: 
        !            91:        Nfabort generates default values for each of
        !            92: the string parameters if NULL pointers are passed.
        !            93: This routine can be loaded with a C program by specifying `-lnfcom'
        !            94: on the `cc' command line.
        !            95: 

unix.superglobalmegacorp.com

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