From: Alan Cox Date: Sat, 24 Oct 2015 12:56:07 +0000 (+0100) Subject: libc: add ctermid X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=dad3023caaee636717ebe46f44d44f7d06d2adf1;p=FUZIX.git libc: add ctermid Yes this is a cheap implementation but it works as we have a proper /dev/tty now --- diff --git a/Library/libs/ctermid.c b/Library/libs/ctermid.c new file mode 100644 index 00000000..c30e355d --- /dev/null +++ b/Library/libs/ctermid.c @@ -0,0 +1,15 @@ +#include +#include + +/* We have a real /dev/tty so this is a valid answer and + to spec */ + +static char path[L_ctermid] = "/dev/tty"; + +char *ctermid(char *p) +{ + if (p) + return strcpy(p, path); + else + return path; +}