public
/
FUZIX.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c172f8
)
libc: add ctermid
author
Alan Cox
<alan@etchedpixels.co.uk>
Sat, 24 Oct 2015 12:56:07 +0000
(13:56 +0100)
committer
Alan Cox
<alan@etchedpixels.co.uk>
Sat, 24 Oct 2015 12:56:07 +0000
(13:56 +0100)
Yes this is a cheap implementation but it works as we have a proper
/dev/tty now
Library/libs/ctermid.c
[new file with mode: 0644]
patch
|
blob
diff --git a/Library/libs/ctermid.c
b/Library/libs/ctermid.c
new file mode 100644
(file)
index 0000000..
c30e355
--- /dev/null
+++ b/
Library/libs/ctermid.c
@@ -0,0
+1,15
@@
+#include <stdio.h>
+#include <string.h>
+
+/* 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;
+}