diff options
author | Jakob Kaivo <jkk@ung.org> | 2020-08-16 20:00:37 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2020-08-16 20:00:37 -0400 |
commit | 73da506ee04ec490c5959b45c216a1f8508bec5b (patch) | |
tree | f356a994826be58341695dca611c3f324b511413 /src/unistd/ctermid.c | |
parent | d82a95f6e907652151f658d140fcd47a26b70976 (diff) |
consistently use <> for standardized headers
Diffstat (limited to 'src/unistd/ctermid.c')
-rw-r--r-- | src/unistd/ctermid.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/unistd/ctermid.c b/src/unistd/ctermid.c index 122bed8a..fd87684e 100644 --- a/src/unistd/ctermid.c +++ b/src/unistd/ctermid.c @@ -1,17 +1,18 @@ -#include "stddef.h" -#include "sys/types.h" +#include <stddef.h> +#include <sys/types.h> #include <unistd.h> -#include "stdio.h" -#include "stdio/_stdio.h" -#include "string.h" +#include <stdio.h> +#include <string.h> char * ctermid(char * s) { + static char ctid[L_ctermid + 1] = "/dev/tty"; + /* TODO: return the empty string if there is no controlling terminal */ if (s == NULL) { - s = __stdio.ctermid; + s = ctid; } else { - strcpy(s, __stdio.ctermid); + strcpy(s, ctid); } return s; |