Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_posix/sys/src/ape/lib/ap/plan9/ctermid.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <unistd.h>
2
#include <stdio.h>
3
#include <string.h>
4
 
5
char *
6
ctermid(char *s)
7
{
8
	static char buf[L_ctermid];
9
 
10
	if(s == 0)
11
		s = buf;
12
	strncpy(s, "/dev/cons", sizeof buf);
13
	return(s);
14
}
15
 
16
char *
17
ctermid_r(char *s)
18
{
19
	return s ? ctermid(s) : NULL;
20
}