[BACK]Return to pty_openbsd.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / vim

Annotation of src/usr.bin/vim/pty_openbsd.c, Revision 1.1.1.1

1.1       downsj      1: /*     $OpenBSD$       */
                      2:
                      3: /*
                      4:  * A quick, OpenBSD specific pty.c replacement.  It's not even entirely
                      5:  * correct; but it's certainly not GPL'd.
                      6:  */
                      7:
                      8: #include <sys/types.h>
                      9: #include <util.h>
                     10:
                     11: int OpenPTY(name)
                     12:        char **name;
                     13: {
                     14:        static char ttyname[64];
                     15:        int mfd, sfd, error;
                     16:
                     17:        error = openpty(&mfd, &sfd, ttyname, NULL, NULL);
                     18:        if (error < 0)
                     19:                return (-1);
                     20:
                     21:        *name = ttyname;
                     22:        return (mfd);
                     23: }