at_wini also needs a pci_reserve() for the pci compatability device, if
[minix3.git] / lib / other / ctermid.c
blob8d92d9ef652235f8c54236174ab4bd235f1bfc36
1 /* ctermid(3)
3 * Author: Terrence Holm Aug. 1988
6 * Ctermid(3) returns a pointer to a string naming the controlling
7 * terminal. If <name_space> is NULL then local PRIVATE storage
8 * is used, otherwise <name_space> must point to storage of at
9 * least L_ctermid characters.
11 * Returns a pointer to "/dev/tty".
14 #include <lib.h>
15 #include <string.h>
16 #include <stdio.h>
18 _PROTOTYPE( char *ctermid, (char *name_space));
20 #ifndef L_ctermid
21 #define L_ctermid 9
22 #endif
24 char *ctermid(name_space)
25 char *name_space;
27 PRIVATE char termid[L_ctermid];
29 if (name_space == (char *)NULL) name_space = termid;
30 strcpy(name_space, "/dev/tty");
31 return(name_space);