diff options
Diffstat (limited to 'src/unistd/ctermid.c')
| -rw-r--r-- | src/unistd/ctermid.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c new file mode 100644 index 00000000..32a47b64 --- /dev/null +++ b/src/unistd/ctermid.c @@ -0,0 +1,21 @@ +#include "stddef.h" +#include "sys/types.h" +#include <unistd.h> +#include "stdio.h" +#include "string.h" + +char * ctermid(char * s) +{ + static char termid[L_ctermid] = "/dev/tty"; + + if (s == NULL) { + s = termid; + } else { + strcpy(s, termid); + } + + return s; +} +/* +POSIX(1) +*/ |
